summaryrefslogtreecommitdiff
path: root/gl/lib/mbsalign.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/lib/mbsalign.h')
-rw-r--r--gl/lib/mbsalign.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/gl/lib/mbsalign.h b/gl/lib/mbsalign.h
index a4ec69395..41bd49092 100644
--- a/gl/lib/mbsalign.h
+++ b/gl/lib/mbsalign.h
@@ -18,6 +18,29 @@
typedef enum { MBS_ALIGN_LEFT, MBS_ALIGN_RIGHT, MBS_ALIGN_CENTER } mbs_align_t;
+enum {
+ /* Use unibyte mode for invalid multibyte strings or
+ or when heap memory is exhausted. */
+ MBA_UNIBYTE_FALLBACK = 0x0001,
+
+#if 0 /* Other possible options. */
+ /* Skip invalid multibyte chars rather than failing */
+ MBA_IGNORE_INVALID = 0x0002,
+
+ /* Align multibyte strings using "figure space" (\u2007) */
+ MBA_USE_FIGURE_SPACE = 0x0004,
+
+ /* Don't add any padding */
+ MBA_TRUNCATE_ONLY = 0x0008,
+
+ /* Don't truncate */
+ MBA_PAD_ONLY = 0x0010,
+#endif
+};
+
size_t
mbsalign (const char *src, char *dest, size_t dest_size,
size_t *width, mbs_align_t align, int flags);
+
+char *
+ambsalign (const char *src, size_t *width, mbs_align_t align, int flags);