Imported from ../bash-3.0.16.tar.gz.

This commit is contained in:
Jari Aalto 2004-11-09 21:37:25 +00:00
commit eb87367179
21 changed files with 181 additions and 67 deletions

View file

@ -31,6 +31,8 @@
extern size_t xmbsrtowcs __P((wchar_t *, const char **, size_t, mbstate_t *));
extern size_t xdupmbstowcs __P((wchar_t **, char ***, const char *));
extern size_t mbstrlen __P((const char *));
extern char *xstrchr __P((const char *, int));
#ifndef MB_INVALIDCH
@ -38,6 +40,9 @@ extern char *xstrchr __P((const char *, int));
#define MB_NULLWCH(x) ((x) == 0)
#endif
#define MBSLEN(s) (((s) && (s)[0]) ? ((s)[1] ? mbstrlen (s) : 1) : 0)
#define MB_STRLEN(s) ((MB_CUR_MAX > 1) ? MBSLEN (s) : STRLEN (s))
#else /* !HANDLE_MULTIBYTE */
#undef MB_LEN_MAX
@ -54,6 +59,8 @@ extern char *xstrchr __P((const char *, int));
#define MB_NULLWCH(x) (0)
#endif
#define MB_STRLEN(s) (STRLEN(s))
#endif /* !HANDLE_MULTIBYTE */
/* Declare and initialize a multibyte state. Call must be terminated