summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-05-04 13:52:42 +0200
committerBruno Haible <bruno@clisp.org>2023-05-04 13:52:42 +0200
commit103acbb1bde27ab19005994b6f3c85693d642a8a (patch)
tree0ac4ae2c4eb9a7d84665fa95721517ad317324aa /modules
parent1304b9698bd1757b29550d38e5c80d233e65aa01 (diff)
downloadgnulib-103acbb1bde27ab19005994b6f3c85693d642a8a.tar.gz
c32width: New module.
* lib/uchar.in.h (c32width): New declaration. * lib/c32width.c: New file, based on lib/c32is-impl.h. * modules/c32width: New file. * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_C32WIDTH. * modules/uchar (Makefile.am): Substitute GNULIB_C32WIDTH.
Diffstat (limited to 'modules')
-rw-r--r--modules/c32width41
-rw-r--r--modules/uchar1
2 files changed, 42 insertions, 0 deletions
diff --git a/modules/c32width b/modules/c32width
new file mode 100644
index 0000000000..f91e67f37f
--- /dev/null
+++ b/modules/c32width
@@ -0,0 +1,41 @@
+Description:
+c32width() function: Determine the number of screen columns needed for
+a 32-bit wide character.
+
+Files:
+lib/c32width.c
+m4/mbrtoc32.m4
+m4/mbrtowc.m4
+m4/locale-fr.m4
+m4/locale-ja.m4
+m4/locale-zh.m4
+m4/codeset.m4
+
+Depends-on:
+uchar
+wchar
+wcwidth
+uniwidth/width
+
+configure.ac:
+AC_REQUIRE([gl_UCHAR_H])
+dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+dnl determined. It describes how mbrtoc32 is implemented.
+AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+gl_UCHAR_MODULE_INDICATOR([c32width])
+
+Makefile.am:
+lib_SOURCES += c32width.c
+
+Include:
+<uchar.h>
+
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+
+License:
+LGPLv3+ or GPLv2+
+
+Maintainer:
+Bruno Haible
diff --git a/modules/uchar b/modules/uchar
index 6363d543d9..3c6f3963b9 100644
--- a/modules/uchar
+++ b/modules/uchar
@@ -53,6 +53,7 @@ uchar.h: uchar.in.h $(top_builddir)/config.status $(CXXDEFS_H)
-e 's/@''GNULIB_C32ISXDIGIT''@/$(GNULIB_C32ISXDIGIT)/g' \
-e 's/@''GNULIB_C32TOLOWER''@/$(GNULIB_C32TOLOWER)/g' \
-e 's/@''GNULIB_C32TOUPPER''@/$(GNULIB_C32TOUPPER)/g' \
+ -e 's/@''GNULIB_C32WIDTH''@/$(GNULIB_C32WIDTH)/g' \
-e 's/@''GNULIB_C32RTOMB''@/$(GNULIB_C32RTOMB)/g' \
-e 's/@''GNULIB_C32SNRTOMBS''@/$(GNULIB_C32SNRTOMBS)/g' \
-e 's/@''GNULIB_C32SRTOMBS''@/$(GNULIB_C32SRTOMBS)/g' \