projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests for module 'unicase/u16-is-uppercase'.
[gnulib.git]
/
lib
/
strptime.c
diff --git
a/lib/strptime.c
b/lib/strptime.c
index
9373b45
..
a8791cf
100644
(file)
--- a/
lib/strptime.c
+++ b/
lib/strptime.c
@@
-17,9
+17,10
@@
#ifndef _LIBC
# include <config.h>
#ifndef _LIBC
# include <config.h>
-# include "strptime.h"
#endif
#endif
+#include <time.h>
+
#include <assert.h>
#include <ctype.h>
#ifdef _LIBC
#include <assert.h>
#include <ctype.h>
#ifdef _LIBC
@@
-27,7
+28,6
@@
#endif
#include <limits.h>
#include <string.h>
#endif
#include <limits.h>
#include <string.h>
-#include <time.h>
#include <stdbool.h>
#ifdef _LIBC
#include <stdbool.h>
#ifdef _LIBC
@@
-35,7
+35,6
@@
#endif
#ifndef _LIBC
#endif
#ifndef _LIBC
-# include "time_r.h"
enum ptime_locale_status { not, loc, raw };
#endif
enum ptime_locale_status { not, loc, raw };
#endif
@@
-669,13
+668,16
@@
__strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
specify hours. If fours digits are used, minutes are
also specified. */
{
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;
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';
while (n < 4 && *rp >= '0' && *rp <= '9')
{
val = val * 10 + *rp++ - '0';