diff options
author | Jari Aalto <jari.aalto@cante.net> | 2004-11-09 21:37:25 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:57 +0000 |
commit | eb87367179effbe5f430236db8259006d71438b7 (patch) | |
tree | 012cd9de789fea49510f8e25118acf2be9bfa2ed /include | |
parent | b80f6443b6b7b620c7272664c66ecb0b120a0998 (diff) | |
download | android_external_bash-eb87367179effbe5f430236db8259006d71438b7.tar.gz android_external_bash-eb87367179effbe5f430236db8259006d71438b7.tar.bz2 android_external_bash-eb87367179effbe5f430236db8259006d71438b7.zip |
Imported from ../bash-3.0.16.tar.gz.
Diffstat (limited to 'include')
-rw-r--r-- | include/shmbutil.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/shmbutil.h b/include/shmbutil.h index a737780..1139d50 100644 --- a/include/shmbutil.h +++ b/include/shmbutil.h @@ -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 |