Back to index

tetex-bin  3.0
inputint.c
Go to the documentation of this file.
00001 /* inputint.c: read integers from text files.  These routines are only
00002    used for debugging and such, so perfect error checking isn't
00003    necessary.  Public domain. */
00004 
00005 #include "config.h"
00006 
00007 
00008 /* Read an integer from the file F, reading past the subsequent end of
00009    line.  */
00010 
00011 integer
00012 inputint P1C(FILE *, f)
00013 {
00014   char buffer[MAX_INT_LENGTH]; /* Long enough for anything reasonable.  */
00015 
00016   return
00017     fgets (buffer, sizeof (buffer), f)
00018     ? atoi (buffer)
00019     : 0;
00020 }