Stick to ANSI C syntax, not C99 syntax.
authorBruno Haible <bruno@clisp.org>
Sat, 24 Mar 2007 00:10:32 +0000 (00:10 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 24 Mar 2007 00:10:32 +0000 (00:10 +0000)
ChangeLog
lib/strptime.c

index b608a7c..74a4800 100644 (file)
--- 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.
index c5a039d..a8791cf 100644 (file)
@@ -668,13 +668,16 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
             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';