1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-03-12 16:05:03 +02:00

(mbswidth): Add a flags argument.

(mbswidth): New declaration.
(MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
This commit is contained in:
Jim Meyering
2000-07-29 06:02:28 +00:00
parent e7a7601ef4
commit f247c7bd44

View File

@@ -23,4 +23,19 @@
# endif
#endif
extern int mbswidth PARAMS ((const char *string));
/* Optional flags to influence mbswidth/mbsnwidth behavior. */
/* Assume invalid characters have width 0. If this is not set, the
functions return -1 if an invalid or incomplete character occurs. */
#define MBSW_ACCEPT_INVALID 1
/* Assume unprintable characters have width 1. If this is not set, the
functions return -1 if a non-printable character occurs. */
#define MBSW_ACCEPT_UNPRINTABLE 2
/* Returns the number of screen columns needed for STRING. */
extern int mbswidth PARAMS ((const char *string, int flags));
/* Returns the number of screen columns needed for the NBYTES bytes
starting at BUF. */
extern int mbsnwidth PARAMS ((const char *buf, size_t nbytes, int flags));