extern char *xstrchr __P((const char *, int));
+extern int locale_mb_cur_max; /* XXX */
+
#ifndef MB_INVALIDCH
#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2)
#define MB_NULLWCH(x) ((x) == 0)
# define ADVANCE_CHAR(_str, _strsize, _i) \
do \
{ \
- if (MB_CUR_MAX > 1) \
+ if (locale_mb_cur_max > 1) \
{ \
mbstate_t state_bak; \
size_t mblength; \
# define ADVANCE_CHAR_P(_str, _strsize) \
do \
{ \
- if (MB_CUR_MAX > 1) \
+ if (locale_mb_cur_max > 1) \
{ \
mbstate_t state_bak; \
size_t mblength; \
# define BACKUP_CHAR(_str, _strsize, _i) \
do \
{ \
- if (MB_CUR_MAX > 1) \
+ if (locale_mb_cur_max > 1) \
{ \
mbstate_t state_bak; \
size_t mblength; \
# define BACKUP_CHAR_P(_base, _strsize, _str) \
do \
{ \
- if (MB_CUR_MAX > 1) \
+ if (locale_mb_cur_max > 1) \
{ \
mbstate_t state_bak; \
size_t mblength; \
# define COPY_CHAR_P(_dst, _src, _srcend) \
do \
{ \
- if (MB_CUR_MAX > 1) \
+ if (locale_mb_cur_max > 1) \
{ \
mbstate_t state_bak; \
size_t mblength; \
# define COPY_CHAR_I(_dst, _di, _src, _srcend, _si) \
do \
{ \
- if (MB_CUR_MAX > 1) \
+ if (locale_mb_cur_max > 1) \
{ \
mbstate_t state_bak; \
size_t mblength; \
# define SCOPY_CHAR_I(_dst, _escchar, _sc, _src, _si, _slen) \
do \
{ \
- if (MB_CUR_MAX > 1) \
+ if (locale_mb_cur_max > 1) \
{ \
mbstate_t state_bak; \
size_t mblength; \
# define SCOPY_CHAR_M(_dst, _src, _srcend, _si) \
do \
{ \
- if (MB_CUR_MAX > 1) \
+ if (locale_mb_cur_max > 1) \
{ \
mbstate_t state_bak; \
size_t mblength; \
# define SADD_MBCHAR(_dst, _src, _si, _srcsize) \
do \
{ \
- if (MB_CUR_MAX > 1) \
+ if (locale_mb_cur_max > 1) \
{ \
int i; \
mbstate_t state_bak; \
# define SADD_MBCHAR(_dst, _src, _si, _srcsize)
#endif
-/* Watch out when using this -- it's just straight textual subsitution */
+/* Watch out when using this -- it's just straight textual substitution */
#if defined (HANDLE_MULTIBYTE)
# define SADD_MBQCHAR_BODY(_dst, _src, _si, _srcsize) \
\