*
*/
-#define STORING_PTRS (Oflag || Rflag)
#define CHUNKSIZE 512
#define ALWAYS 1
static bool Xflag = false; /* set rotated bit */
static long Num_pts = 0; /* number of pointers/strings */
+static bool storing_ptrs(void) { return (Oflag || Rflag); }
+
static int32_t *Seekpts;
static FILE *Sort_1, *Sort_2; /* pointers for sorting */
*/
static void add_offset(FILE *fp, int32_t off)
{
- if (!STORING_PTRS)
+ if (!storing_ptrs())
{
uint32_t net;
net = htonl((uint32_t)off);
*/
static void fix_last_offset(FILE *fp, int32_t off)
{
- if (!STORING_PTRS)
+ if (!storing_ptrs())
{
uint32_t net = htonl((uint32_t)off);
fseek(fp, -(long)(sizeof net), SEEK_CUR);
perror(Outfile);
exit(1);
}
- if (!STORING_PTRS)
+ if (!storing_ptrs())
(void)fseek(outf, sizeof Tbl, 0);
/*
fwrite(&Tbl.str_shortlen, sizeof Tbl.str_shortlen, 1, outf);
fwrite(&Tbl.str_flags, sizeof Tbl.str_flags, 1, outf);
fwrite(Tbl.stuff, sizeof Tbl.stuff, 1, outf);
- if (STORING_PTRS)
+ if (storing_ptrs())
{
for (p = Seekpts, cnt = (int)Num_pts; cnt--; ++p)
{