summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-05-04 23:27:12 +0200
committerBruno Haible <bruno@clisp.org>2023-05-04 23:29:34 +0200
commit15880a3da91a0403eb287a84db90b54713ac4a09 (patch)
tree073cbfb1f015142cf598c710012db0243da45f10 /modules
parent59f878fa3d175b2d085a01a8df786c9e40be14b9 (diff)
downloadgnulib-15880a3da91a0403eb287a84db90b54713ac4a09.tar.gz
c32swidth: New module.
* lib/uchar.in.h (c32swidth): New declaration. * lib/wcswidth-impl.h: Use macros FUNC, UNIT, CHARACTER_WIDTH. * lib/wcswidth.c: Define FUNC, UNIT, CHARACTER_WIDTH before including wcswidth-impl.h. * lib/c32swidth.c: New file. * modules/c32swidth: New file. * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_C32SWIDTH. * modules/uchar (Makefile.am): Substitute GNULIB_C32SWIDTH.
Diffstat (limited to 'modules')
-rw-r--r--modules/c32swidth36
-rw-r--r--modules/uchar1
2 files changed, 37 insertions, 0 deletions
diff --git a/modules/c32swidth b/modules/c32swidth
new file mode 100644
index 0000000000..df60f6b473
--- /dev/null
+++ b/modules/c32swidth
@@ -0,0 +1,36 @@
+Description:
+c32swidth() function: Determine the number of screen columns needed for
+a size-bounded 32-bit wide string.
+
+Files:
+lib/c32swidth.c
+lib/wcswidth-impl.h
+
+Depends-on:
+uchar
+wchar
+wcswidth
+c32width
+
+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([c32swidth])
+
+Makefile.am:
+lib_SOURCES += c32swidth.c
+
+Include:
+<uchar.h>
+
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+
+License:
+LGPLv2+
+
+Maintainer:
+Bruno Haible
diff --git a/modules/uchar b/modules/uchar
index 3c6f3963b9..948bcd7993 100644
--- a/modules/uchar
+++ b/modules/uchar
@@ -58,6 +58,7 @@ uchar.h: uchar.in.h $(top_builddir)/config.status $(CXXDEFS_H)
-e 's/@''GNULIB_C32SNRTOMBS''@/$(GNULIB_C32SNRTOMBS)/g' \
-e 's/@''GNULIB_C32SRTOMBS''@/$(GNULIB_C32SRTOMBS)/g' \
-e 's/@''GNULIB_C32STOMBS''@/$(GNULIB_C32STOMBS)/g' \
+ -e 's/@''GNULIB_C32SWIDTH''@/$(GNULIB_C32SWIDTH)/g' \
-e 's/@''GNULIB_C32TOB''@/$(GNULIB_C32TOB)/g' \
-e 's/@''GNULIB_MBRTOC32''@/$(GNULIB_MBRTOC32)/g' \
-e 's/@''GNULIB_MBSNRTOC32S''@/$(GNULIB_MBSNRTOC32S)/g' \