conditional definition of FGETS

This commit is contained in:
Francois Perrad 2018-12-27 09:24:25 +01:00
parent 2bde5bb5d5
commit f1f6762616
1 changed files with 1 additions and 1 deletions

View File

@ -77,13 +77,13 @@ static void _panic(int l)
fprintf(stderr, "\n%d: fgets failed\n", l);
exit(EXIT_FAILURE);
}
#endif
#define FGETS(str, size, stream) \
{ \
char *ret = fgets(str, size, stream); \
if (!ret) { _panic(__LINE__); } \
}
#endif
static mp_int a, b, c, d, e, f;