extern void closeTagFile (const boolean resize) { long desiredSize, size; if (Option.etags) writeEtagsIncludes (TagFile.fp); desiredSize = ftell (TagFile.fp); fseek (TagFile.fp, 0L, SEEK_END); size = ftell (TagFile.fp); fclose (TagFile.fp); if (resize && desiredSize < size) { DebugStatement ( debugPrintf (DEBUG_STATUS, "shrinking %s from %ld to %ld bytes\n", TagFile.name, size, desiredSize); )
extern void closeTagFile (const boolean resize) { long desiredSize, size; if (Option.etags) writeEtagsIncludes (TagFile.fp); fflush (TagFile.fp); abort_if_ferror (TagFile.fp); desiredSize = ftell (TagFile.fp); fseek (TagFile.fp, 0L, SEEK_END); size = ftell (TagFile.fp); if (! TagsToStdout) /* The tag file should be closed before resizing. */ if (fclose (TagFile.fp) != 0) error (FATAL | PERROR, "cannot close tag file"); if (resize && desiredSize < size) { DebugStatement ( debugPrintf (DEBUG_STATUS, "shrinking %s from %ld to %ld bytes\n", TagFile.name, size, desiredSize); )