summaryrefslogtreecommitdiff
path: root/gl/modules
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2010-03-15 14:04:31 +0000
committerPádraig Brady <P@draigBrady.com>2010-03-19 19:23:45 +0000
commitdfe0d336a00940c8e13c24b6d5d7485a2d7310b0 (patch)
treede0b56d0af4ba442f070cef2ec717de9c4066a48 /gl/modules
parent3dcbcf98f427f8ab6ceafd27396adae4b2276bb8 (diff)
downloadcoreutils-dfe0d336a00940c8e13c24b6d5d7485a2d7310b0.tar.xz
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.
Diffstat (limited to 'gl/modules')
-rw-r--r--gl/modules/mbsalign-tests11
1 files changed, 11 insertions, 0 deletions
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