summaryrefslogtreecommitdiff
path: root/ctype
diff options
context:
space:
mode:
Diffstat (limited to 'ctype')
-rw-r--r--ctype/Makefile2
-rw-r--r--ctype/ctype-c99.c2
-rw-r--r--ctype/ctype-c99_l.c4
-rw-r--r--ctype/ctype-extn.c2
-rw-r--r--ctype/ctype-info.c2
-rw-r--r--ctype/ctype.c4
-rw-r--r--ctype/ctype.h36
-rw-r--r--ctype/ctype_l.c8
-rw-r--r--ctype/isctype.c2
-rw-r--r--ctype/test_ctype.c2
10 files changed, 23 insertions, 41 deletions
diff --git a/ctype/Makefile b/ctype/Makefile
index a96c2d2a02..e3ccf31d38 100644
--- a/ctype/Makefile
+++ b/ctype/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2016 Free Software Foundation, Inc.
+# Copyright (C) 1991-2018 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
diff --git a/ctype/ctype-c99.c b/ctype/ctype-c99.c
index 69d7ae4f73..396ed4570f 100644
--- a/ctype/ctype-c99.c
+++ b/ctype/ctype-c99.c
@@ -1,5 +1,5 @@
/* External function version of isblank.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/ctype/ctype-c99_l.c b/ctype/ctype-c99_l.c
index 5c0bde5184..b4bfc22114 100644
--- a/ctype/ctype-c99_l.c
+++ b/ctype/ctype-c99_l.c
@@ -1,5 +1,5 @@
/* External function version of isblank_l.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
#include <ctype.h>
int
-__isblank_l (int c, __locale_t l)
+__isblank_l (int c, locale_t l)
{
return __isctype_l (c, _ISblank, l);
}
diff --git a/ctype/ctype-extn.c b/ctype/ctype-extn.c
index b18335212a..0689f22f32 100644
--- a/ctype/ctype-extn.c
+++ b/ctype/ctype-extn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/ctype/ctype-info.c b/ctype/ctype-info.c
index a7e786ce13..bc4b846317 100644
--- a/ctype/ctype-info.c
+++ b/ctype/ctype-info.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/ctype/ctype.c b/ctype/ctype.c
index 5cdc7e5c18..6cb8000771 100644
--- a/ctype/ctype.c
+++ b/ctype/ctype.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,9 +45,11 @@ tolower (int c)
{
return c >= -128 && c < 256 ? __ctype_tolower[c] : c;
}
+libc_hidden_def (tolower)
int
toupper (int c)
{
return c >= -128 && c < 256 ? __ctype_toupper[c] : c;
}
+libc_hidden_def (toupper)
diff --git a/ctype/ctype.h b/ctype/ctype.h
index 6e2124aea0..0e0936ac95 100644
--- a/ctype/ctype.h
+++ b/ctype/ctype.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -101,8 +101,6 @@ extern const __int32_t **__ctype_toupper_loc (void)
#define __exctype(name) extern int name (int) __THROW
-__BEGIN_NAMESPACE_STD
-
/* The following names are all functions:
int isCHARACTERISTIC(int c);
which return nonzero iff C has CHARACTERISTIC.
@@ -126,16 +124,10 @@ extern int tolower (int __c) __THROW;
/* Return the uppercase version of C. */
extern int toupper (int __c) __THROW;
-__END_NAMESPACE_STD
-
/* ISO C99 introduced one new function. */
#ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99
-
__exctype (isblank);
-
-__END_NAMESPACE_C99
#endif
#ifdef __USE_GNU
@@ -241,20 +233,8 @@ __NTH (toupper (int __c))
#ifdef __USE_XOPEN2K8
-/* The concept of one static locale per category is not very well
- thought out. Many applications will need to process its data using
- information from several different locales. Another application is
- the implementation of the internationalization handling in the
- upcoming ISO C++ standard library. To support this another set of
- the functions using locale data exist which have an additional
- argument.
-
- Attention: all these functions are *not* standardized in any form.
- This is a proof-of-concept implementation. */
-
-/* Structure for reentrant locale using functions. This is an
- (almost) opaque type for the user level programs. */
-# include <xlocale.h>
+/* POSIX.1-2008 extended locale interface (see locale.h). */
+# include <bits/types/locale_t.h>
/* These definitions are similar to the ones above but all functions
take as an argument a handle for the locale which shall be used. */
@@ -262,7 +242,7 @@ __NTH (toupper (int __c))
((locale)->__ctype_b[(int) (c)] & (unsigned short int) type)
# define __exctype_l(name) \
- extern int name (int, __locale_t) __THROW
+ extern int name (int, locale_t) __THROW
/* The following names are all functions:
int isCHARACTERISTIC(int c, locale_t *locale);
@@ -284,12 +264,12 @@ __exctype_l (isblank_l);
/* Return the lowercase version of C in locale L. */
-extern int __tolower_l (int __c, __locale_t __l) __THROW;
-extern int tolower_l (int __c, __locale_t __l) __THROW;
+extern int __tolower_l (int __c, locale_t __l) __THROW;
+extern int tolower_l (int __c, locale_t __l) __THROW;
/* Return the uppercase version of C. */
-extern int __toupper_l (int __c, __locale_t __l) __THROW;
-extern int toupper_l (int __c, __locale_t __l) __THROW;
+extern int __toupper_l (int __c, locale_t __l) __THROW;
+extern int toupper_l (int __c, locale_t __l) __THROW;
# if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus
# define __tolower_l(c, locale) \
diff --git a/ctype/ctype_l.c b/ctype/ctype_l.c
index ad5b99420e..e5da90e95e 100644
--- a/ctype/ctype_l.c
+++ b/ctype/ctype_l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
/* Provide real-function versions of all the ctype macros. */
#define func(name, type) \
- int __##name (int c, __locale_t l) { return __isctype_l (c, type, l); } \
+ int __##name (int c, locale_t l) { return __isctype_l (c, type, l); } \
weak_alias (__##name, name)
func (isalnum_l, _ISalnum)
@@ -37,14 +37,14 @@ func (isupper_l, _ISupper)
func (isxdigit_l, _ISxdigit)
int
-(__tolower_l) (int c, __locale_t l)
+(__tolower_l) (int c, locale_t l)
{
return l->__ctype_tolower[c];
}
weak_alias (__tolower_l, tolower_l)
int
-(__toupper_l) (int c, __locale_t l)
+(__toupper_l) (int c, locale_t l)
{
return l->__ctype_toupper[c];
}
diff --git a/ctype/isctype.c b/ctype/isctype.c
index f0c9367522..6fe1d1c6c3 100644
--- a/ctype/isctype.c
+++ b/ctype/isctype.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/ctype/test_ctype.c b/ctype/test_ctype.c
index 6eeaf806ef..8bbde45f3d 100644
--- a/ctype/test_ctype.c
+++ b/ctype/test_ctype.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or