1
1
/* Align/Truncate a string in a given screen width
2
Copyright (C) 2009-2011 Free Software Foundation, Inc.
2
Copyright (C) 2009-2012 Free Software Foundation, Inc.
4
4
This program is free software: you can redistribute it and/or modify
5
5
it under the terms of the GNU General Public License as published by
22
22
/* Use unibyte mode for invalid multibyte strings
23
23
or when heap memory is exhausted. */
24
MBA_UNIBYTE_FALLBACK = 0x0001
24
MBA_UNIBYTE_FALLBACK = 0x0001,
26
/* As an optimization, don't do multibyte processing
27
when we know no multibyte characters are present. */
28
MBA_UNIBYTE_ONLY = 0x0002,
30
/* Don't add leading padding. */
31
MBA_NO_LEFT_PAD = 0x0004,
33
/* Don't add trailing padding. */
34
MBA_NO_RIGHT_PAD = 0x0008
26
36
#if 0 /* Other possible options. */
27
/* Skip invalid multibyte chars rather than failing */
28
MBA_IGNORE_INVALID = 0x0002,
30
/* Align multibyte strings using "figure space" (\u2007) */
31
MBA_USE_FIGURE_SPACE = 0x0004,
33
/* Don't add any padding */
34
MBA_TRUNCATE_ONLY = 0x0008,
37
MBA_PAD_ONLY = 0x0010,
37
/* Skip invalid multibyte chars rather than failing. */
40
/* Align multibyte strings using "figure space" (\u2007). */
46
/* Ensure no leading whitespace. */
49
/* Ensure no trailing whitespace. */