]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - stdlib/strtol_l.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / stdlib / strtol_l.c
index f3319a8936f04098f60d012432966c3b86b40844..f4c17694ab39a2fd404b1d8c73466ac6bb1e4237 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert string representing a number to integer value, using given locale.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
 # define UCHAR_TYPE wint_t
 # define STRING_TYPE wchar_t
 # define ISSPACE(Ch) __iswspace_l ((Ch), loc)
-# define ISALPHA(Ch) __iswalpha_l ((Ch), loc)
-# define TOUPPER(Ch) __towupper_l ((Ch), loc)
+# define ISALPHA(Ch) __iswalpha_l ((Ch), _nl_C_locobj_ptr)
+# define TOUPPER(Ch) __towupper_l ((Ch), _nl_C_locobj_ptr)
 #else
 # if defined _LIBC \
    || defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
 # define UCHAR_TYPE unsigned char
 # define STRING_TYPE char
 # define ISSPACE(Ch) __isspace_l ((Ch), loc)
-# define ISALPHA(Ch) __isalpha_l ((Ch), loc)
-# define TOUPPER(Ch) __toupper_l ((Ch), loc)
+# define ISALPHA(Ch) __isalpha_l ((Ch), _nl_C_locobj_ptr)
+# define TOUPPER(Ch) __toupper_l ((Ch), _nl_C_locobj_ptr)
 #endif
 
 #define INTERNAL(X) INTERNAL1(X)
@@ -222,12 +222,8 @@ extern const unsigned char __strtol_ull_rem_tab[] attribute_hidden;
    one converted is stored in *ENDPTR.  */
 
 INT
-INTERNAL (__strtol_l) (nptr, endptr, base, group, loc)
-     const STRING_TYPE *nptr;
-     STRING_TYPE **endptr;
-     int base;
-     int group;
-     __locale_t loc;
+INTERNAL (__strtol_l) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+                      int base, int group, __locale_t loc)
 {
   int negative;
   unsigned LONG int cutoff;
@@ -355,8 +351,8 @@ INTERNAL (__strtol_l) (nptr, endptr, base, group, loc)
                && (wchar_t) c != thousands
 # else
                && ({ for (cnt = 0; cnt < thousands_len; ++cnt)
-                     if (thousands[cnt] != end[cnt])
-                       break;
+                       if (thousands[cnt] != end[cnt])
+                         break;
                      cnt < thousands_len; })
 # endif
                && (!ISALPHA (c)
@@ -546,11 +542,8 @@ INT
 #ifdef weak_function
 weak_function
 #endif
-__strtol_l (nptr, endptr, base, loc)
-     const STRING_TYPE *nptr;
-     STRING_TYPE **endptr;
-     int base;
-     __locale_t loc;
+__strtol_l (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+           int base, __locale_t loc)
 {
   return INTERNAL (__strtol_l) (nptr, endptr, base, 0, loc);
 }