Mercurial > hg > octave-kai > gnulib-hg
changeset 8505:1166975a7fe6
Stick to ANSI C syntax, not C99 syntax.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 24 Mar 2007 00:10:32 +0000 |
parents | 24420da38757 |
children | 04518e040836 |
files | ChangeLog lib/strptime.c |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-03-22 Bruno Haible <bruno@clisp.org> + + * lib/strptime.c (__strptime_internal): Use ANSI C syntax. + 2007-03-23 Paul Eggert <eggert@cs.ucla.edu> * MODULES.html.sh (File system functions): New module write-any-file.
--- a/lib/strptime.c +++ b/lib/strptime.c @@ -668,13 +668,16 @@ specify hours. If fours digits are used, minutes are also specified. */ { + bool neg; + int n; + val = 0; while (*rp == ' ') ++rp; if (*rp != '+' && *rp != '-') return NULL; - bool neg = *rp++ == '-'; - int n = 0; + neg = *rp++ == '-'; + n = 0; while (n < 4 && *rp >= '0' && *rp <= '9') { val = val * 10 + *rp++ - '0';