/* Wrapper to calling fgetc() and fgets() from function "f". The return code is
* returned unless ferror() indicates an error (i.e. to signify an end of file,
- * fgetc() may return an EOF and fgets() a NULL.
+ * fgetc() may return an EOF and fgets() a NULL). try_fgetc() calls clearerr()
+ * on "file" before fgetc(), because some Unixes fgetc() remember old EOFs and
+ * only return those until explicitely cleared.
*/
extern int try_fgetc(FILE * file, char * f);
extern char * try_fgets(char * line, int size, FILE * file, char * f);
extern void try_fclose_unlink_rename(FILE * file, char * p1, char * p2,
char * f);
-/* Return largest line length from "file" the largest line length (including
- * newline chars) and write the number of newline chars in "file" to the memory
- * pointed to by "n_lines_p" if it is not passed as NULL.
- */
-extern uint32_t textfile_sizes(FILE * file, uint32_t * n_lines_p);
+/* Return largest line length from "file" (including newline chars). */
+extern uint32_t textfile_width(FILE * file);