Improved parsing of some integer arguments (sizes).

This commit is contained in:
Thomas Pornin 2016-11-12 15:23:43 +01:00
parent 9dc3c9b61d
commit 0d974e1c9c
4 changed files with 75 additions and 3 deletions

View file

@ -163,6 +163,12 @@ typedef VECTOR(unsigned char) bvector;
*/
int eqstr(const char *s1, const char *s2);
/*
* Convert a string to a positive integer (size_t). Returned value is
* (size_t)-1 on error. On error, an explicit error message is printed.
*/
size_t parse_size(const char *s);
/*
* Structure for a known protocol version.
*/