diff options
Diffstat (limited to 'Build/source/texk/web2c/lib/inputint.c')
-rw-r--r-- | Build/source/texk/web2c/lib/inputint.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/lib/inputint.c b/Build/source/texk/web2c/lib/inputint.c new file mode 100644 index 00000000000..6ee9a59db00 --- /dev/null +++ b/Build/source/texk/web2c/lib/inputint.c @@ -0,0 +1,20 @@ +/* inputint.c: read integers from text files. These routines are only + used for debugging and such, so perfect error checking isn't + necessary. Public domain. */ + +#include "config.h" + + +/* Read an integer from the file F, reading past the subsequent end of + line. */ + +integer +inputint P1C(FILE *, f) +{ + char buffer[MAX_INT_LENGTH]; /* Long enough for anything reasonable. */ + + return + fgets (buffer, sizeof (buffer), f) + ? atoi (buffer) + : 0; +} |