X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fcommon%2Ferr_try_fgets.h;h=7258a882f9a01a652cf5e21c2c506ee0f56860be;hb=cc4ed0c49279f08a053a3e3a9a4acba22283a01f;hp=deefe98163f94002b91c9868ca5fe7f30c91ce02;hpb=6f98f0b029c3e84f1df0f2f3642f88e91b17cf33;p=plomrogue diff --git a/src/common/err_try_fgets.h b/src/common/err_try_fgets.h index deefe98..7258a88 100644 --- a/src/common/err_try_fgets.h +++ b/src/common/err_try_fgets.h @@ -34,7 +34,7 @@ extern void err_line(uint8_t test, char * line, char * intro, char * msg); * * The available "test" conditions are as follows: * - * '0': check against the line being empty (not even containing a \n char) + * '0': check for "line" not being empty (not even containing a \n char) * 'n': check for "line" ending with an \n char * 'e': check for "line" starting with an \n char * 'f': check for "line" not starting with an \n char @@ -43,9 +43,10 @@ extern void err_line(uint8_t test, char * line, char * intro, char * msg); * 'i': check for "line" describing an integer in all its chars before end or \n * (i.e. all other chars must be digits, except the first char, which may * be '+' or '-'; a '+' or '-' without digits following is invalid) - */ -extern void err_try_fgets(char * line, uint32_t linemax, FILE * file, - char * context, char * test); + * '8': check for "line" describing an integer smaller than or equal UINT8_MAX +*/ +extern char * err_try_fgets(char * line, uint32_t linemax, FILE * file, + char * context, char * test);