void putfilename(char *srcfile) { /* check for file system out of space */ /* note: dbputc is not used to avoid lint complaint */ if (putc(NEWFILE, newrefs) == EOF) { cannotwrite(newreffile); /* NOTREACHED */ } ++dboffset; if (invertedindex == YES) { srcoffset[nsrcoffset++] = dboffset; } dbfputs(srcfile); fcnoffset = macrooffset = 0; }
void writestring(char *s) { unsigned char c; int i; if (compress == NO) { /* Save some I/O overhead by using puts() instead of putc(): */ dbfputs(s); return; } /* compress digraphs */ for (i = 0; (c = s[i]) != '\0'; ++i) { if (/* dicode1[c] && dicode2[(unsigned char) s[i + 1]] */ IS_A_DICODE(c, s[i + 1])) { /* c = (0200 - 2) + dicode1[c] + dicode2[(unsigned char) s[i + 1]]; */ c = DICODE_COMPRESS(c, s[i + 1]); ++i; } dbputc(c); } }