Re: [PATCH 01/14] numparse: new module for parsing integral numbers

2015-03-20 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: +static int parse_precheck(const char *s, unsigned int *flags) +{ + const char *number; + + if (isspace(*s)) { + if (!(*flags NUM_LEADING_WHITESPACE)) + return -NUM_LEADING_WHITESPACE; + do

Re: [PATCH 01/14] numparse: new module for parsing integral numbers

2015-03-20 Thread Eric Sunshine
On Wed, Mar 18, 2015 at 6:47 PM, Michael Haggerty mhag...@alum.mit.edu wrote: On 03/18/2015 07:27 PM, Eric Sunshine wrote: On Tuesday, March 17, 2015, Michael Haggerty mhag...@alum.mit.edu wrote: Implement wrappers for strtol() and strtoul() that are safer and more convenient to use. + * The

Re: [PATCH 01/14] numparse: new module for parsing integral numbers

2015-03-18 Thread Michael Haggerty
On 03/18/2015 07:27 PM, Eric Sunshine wrote: On Tuesday, March 17, 2015, Michael Haggerty mhag...@alum.mit.edu wrote: Implement wrappers for strtol() and strtoul() that are safer and more convenient to use. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- diff --git a/numparse.c

Re: [PATCH 01/14] numparse: new module for parsing integral numbers

2015-03-18 Thread Eric Sunshine
On Tuesday, March 17, 2015, Michael Haggerty mhag...@alum.mit.edu wrote: Implement wrappers for strtol() and strtoul() that are safer and more convenient to use. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- diff --git a/numparse.c b/numparse.c new file mode 100644 index

[PATCH 01/14] numparse: new module for parsing integral numbers

2015-03-17 Thread Michael Haggerty
Implement wrappers for strtol() and strtoul() that are safer and more convenient to use. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Makefile | 1 + numparse.c | 180 + numparse.h | 207