]> Savannah Git Hosting - gnulib.git/commitdiff
c32isupper: New module.
authorBruno Haible <bruno@clisp.org>
Sat, 25 Jan 2020 23:02:50 +0000 (00:02 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 25 Jan 2020 23:17:36 +0000 (00:17 +0100)
* lib/c32isupper.c: New file.
* modules/c32isupper: New file.
* doc/posix-functions/iswupper.texi: Mention the new module.

ChangeLog
doc/posix-functions/iswupper.texi
lib/c32isupper.c [new file with mode: 0644]
modules/c32isupper [new file with mode: 0644]

index faba42913f50ddcebe8c8be475faa019b8e9a9ca..80c48a5d3e63de5a2dda64d9588678d714a4bddb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-01-25  Bruno Haible  <bruno@clisp.org>
+
+       c32isupper: New module.
+       * lib/c32isupper.c: New file.
+       * modules/c32isupper: New file.
+       * doc/posix-functions/iswupper.texi: Mention the new module.
+
 2020-01-25  Bruno Haible  <bruno@clisp.org>
 
        c32isspace: Add tests.
index b6c8b687d2d8c2662eaeb117ec1475dfde926563..47f4a053dce0d299b56985c2c5a63b71253a4e7e 100644 (file)
@@ -20,6 +20,9 @@ OS X 10.8.
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-On Windows and 32-bit AIX platforms, @code{wchar_t} is a 16-bit type and therefore cannot
-accommodate all Unicode characters.
+On Windows and 32-bit AIX platforms, @code{wchar_t} is a 16-bit type and
+therefore cannot accommodate all Unicode characters.
+However, the Gnulib function @code{c32isupper}, provided by Gnulib module
+@code{c32isupper}, operates on 32-bit wide characters and therefore does not
+have this limitation.
 @end itemize
diff --git a/lib/c32isupper.c b/lib/c32isupper.c
new file mode 100644 (file)
index 0000000..e65257e
--- /dev/null
@@ -0,0 +1,25 @@
+/* Test 32-bit wide character for being uppercase.
+   Copyright (C) 2020 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <uchar.h>
+
+#define FUNC c32isupper
+#define WCHAR_FUNC iswupper
+#define UCS_FUNC uc_is_upper
+#include "c32is-impl.h"
diff --git a/modules/c32isupper b/modules/c32isupper
new file mode 100644 (file)
index 0000000..05ea0f4
--- /dev/null
@@ -0,0 +1,33 @@
+Description:
+c32isupper() function: test 32-bit wide character for being uppercase.
+
+Files:
+lib/c32isupper.c
+lib/c32is-impl.h
+m4/mbrtoc32.m4
+
+Depends-on:
+uchar
+wchar
+wctype-h
+localcharset    [test $REPLACE_MBSTATE_T = 1]
+streq           [test $REPLACE_MBSTATE_T = 1]
+unictype/ctype-upper
+verify
+
+configure.ac:
+AC_REQUIRE([gl_UCHAR_H])
+AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+gl_UCHAR_MODULE_INDICATOR([c32isupper])
+
+Makefile.am:
+lib_SOURCES += c32isupper.c
+
+Include:
+<uchar.h>
+
+License:
+LGPLv3+ or GPLv2
+
+Maintainer:
+Bruno Haible