From dfe0d336a00940c8e13c24b6d5d7485a2d7310b0 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Mon, 15 Mar 2010 14:04:31 +0000 Subject: maint: update the mbsalign module * gl/lib/mbsalign.c (mbsalign): Support the MBA_UNIBYTE_FALLBACK flag which reverts to unibyte mode if one can't allocate memory or if there are invalid multibyte characters present. Note memory is no longer dynamically allocated in unibyte mode so one can assume that mbsalign() will not return an error if this flag is present. Don't calculate twice, the number of spaces, when centering. Suppress a signed/unsigned comparison warning. (ambsalign): A new wrapper function to dynamically allocate the minimum memory required to hold the aligned string. * gl/lib/mbsalign.h: Add the MBA_UNIBYTE_FALLBACK flag and also document others that may be implemented in future. (ambsalign): A prototype for the new wrapper. * gl/tests/test-mbsalign.c (main): New test program. * gl/modules/mbsalign-tests: A new index to reference the tests. * .x-sc_program_name: Exclude test-mbsalign.c from this check. --- gl/modules/mbsalign-tests | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 gl/modules/mbsalign-tests (limited to 'gl/modules') diff --git a/gl/modules/mbsalign-tests b/gl/modules/mbsalign-tests new file mode 100644 index 000000000..8e0d138fe --- /dev/null +++ b/gl/modules/mbsalign-tests @@ -0,0 +1,11 @@ +Files: +tests/test-mbsalign.c +tests/macros.h + +Depends-on: + +configure.ac: + +Makefile.am: +TESTS += test-mbsalign +check_PROGRAMS += test-mbsalign -- cgit v1.2.3-70-g09d2