]> Savannah Git Hosting - gnulib.git/commitdiff
c32isblank: New module.
authorBruno Haible <bruno@clisp.org>
Sat, 25 Jan 2020 22:49:01 +0000 (23:49 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 25 Jan 2020 22:49:01 +0000 (23:49 +0100)
* lib/c32isblank.c: New file.
* modules/c32isblank: New file.
* doc/posix-functions/iswblank.texi: Mention the new module.

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

index 911e65f083254d8dda6c1b785ae9efe161481921..5fd48f04f1362d6847f523e9f8f31b8a74f44e1a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-01-25  Bruno Haible  <bruno@clisp.org>
+
+       c32isblank: New module.
+       * lib/c32isblank.c: New file.
+       * modules/c32isblank: New file.
+       * doc/posix-functions/iswblank.texi: Mention the new module.
+
 2020-01-25  Bruno Haible  <bruno@clisp.org>
 
        c32isalpha: Add tests.
index 973d30526ca7a3e07913497135d821cdc6ec5148..1c40b13c8f4062faeae97da07d443f90027ae14f 100644 (file)
@@ -22,6 +22,9 @@ glibc 2.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{c32isblank}, provided by Gnulib module
+@code{c32isblank}, operates on 32-bit wide characters and therefore does not
+have this limitation.
 @end itemize
diff --git a/lib/c32isblank.c b/lib/c32isblank.c
new file mode 100644 (file)
index 0000000..18be02f
--- /dev/null
@@ -0,0 +1,25 @@
+/* Test 32-bit wide character for being blank.
+   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 c32isblank
+#define WCHAR_FUNC iswblank
+#define UCS_FUNC uc_is_blank
+#include "c32is-impl.h"
diff --git a/modules/c32isblank b/modules/c32isblank
new file mode 100644 (file)
index 0000000..eff925a
--- /dev/null
@@ -0,0 +1,34 @@
+Description:
+c32isblank() function: test 32-bit wide character for being blank.
+
+Files:
+lib/c32isblank.c
+lib/c32is-impl.h
+m4/mbrtoc32.m4
+
+Depends-on:
+uchar
+wchar
+wctype-h
+iswblank
+localcharset    [test $REPLACE_MBSTATE_T = 1]
+streq           [test $REPLACE_MBSTATE_T = 1]
+unictype/ctype-blank
+verify
+
+configure.ac:
+AC_REQUIRE([gl_UCHAR_H])
+AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+gl_UCHAR_MODULE_INDICATOR([c32isblank])
+
+Makefile.am:
+lib_SOURCES += c32isblank.c
+
+Include:
+<uchar.h>
+
+License:
+LGPLv3+ or GPLv2
+
+Maintainer:
+Bruno Haible