aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-09-03 18:59:14 +0200
committerMattias Andrée <maandree@operamail.com>2015-09-03 18:59:14 +0200
commitb26616c2f4bba3df866592ddd60720a3a2805a99 (patch)
tree0060815db964a452db97372bf338cb89c527e0f4 /src
parentadd some integer types (diff)
downloadslibc-b26616c2f4bba3df866592ddd60720a3a2805a99.tar.gz
slibc-b26616c2f4bba3df866592ddd60720a3a2805a99.tar.bz2
slibc-b26616c2f4bba3df866592ddd60720a3a2805a99.tar.xz
add _l functions in ctype.h
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/ctype.c32
1 files changed, 29 insertions, 3 deletions
diff --git a/src/ctype.c b/src/ctype.c
index 522a799..2c8fe83 100644
--- a/src/ctype.c
+++ b/src/ctype.c
@@ -224,7 +224,7 @@ int (toupper)(int c)
* Check whether a character is an ASCII character.
*
* @param c The character
- * @return - Whether the character is an ASCII character.
+ * @return Whether the character is an ASCII character.
*/
int (isascii)(int c)
{
@@ -238,8 +238,8 @@ int (isascii)(int c)
* Note that this does not make a proper character set
* convertion and the result is virtually arbitrary.
*
- * @param c The character.
- * @param c The character with the 8:th bit cleared.
+ * @param c The character.
+ * @return The character with the 8:th bit cleared.
*/
int (toascii)(int c)
{
@@ -266,3 +266,29 @@ int _toupper(int c)
return toupper(c);
}
+
+
+#define CTYPE_LOCALE(F) \
+ int F##_l(int c, locale_t locale) \
+ { \
+ return F(c); \
+ (void) locale; \
+ }
+
+CTYPE_LOCALE(isalnum)
+CTYPE_LOCALE(isalpha)
+CTYPE_LOCALE(isblank)
+CTYPE_LOCALE(iscntrl)
+CTYPE_LOCALE(isdigit)
+CTYPE_LOCALE(isgraph)
+CTYPE_LOCALE(islower)
+CTYPE_LOCALE(isprint)
+CTYPE_LOCALE(ispunct)
+CTYPE_LOCALE(isspace)
+CTYPE_LOCALE(isupper)
+CTYPE_LOCALE(isxdigit)
+CTYPE_LOCALE(isascii)
+CTYPE_LOCALE(toascii)
+CTYPE_LOCALE(tolower)
+CTYPE_LOCALE(toupper)
+