comparison src/mbyte.c @ 167:c93c9cad9618

updated for version 7.0051
author vimboss
date Tue, 22 Feb 2005 08:39:57 +0000
parents 8ecb0db93e9a
children 7fd4b5df33be
comparison
equal deleted inserted replaced
166:3a28ed993bbe 167:c93c9cad9618
2869 sprintf(buf, "cp%ld", acp); 2869 sprintf(buf, "cp%ld", acp);
2870 #else 2870 #else
2871 # ifdef HAVE_NL_LANGINFO_CODESET 2871 # ifdef HAVE_NL_LANGINFO_CODESET
2872 if ((s = nl_langinfo(CODESET)) == NULL || *s == NUL) 2872 if ((s = nl_langinfo(CODESET)) == NULL || *s == NUL)
2873 # endif 2873 # endif
2874 # if defined(HAVE_LOCALE_H) || defined(X_LOCALE) 2874 # ifdef MACOS
2875 s = "utf-8";
2876 # else
2877 # if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
2875 if ((s = setlocale(LC_CTYPE, NULL)) == NULL || *s == NUL) 2878 if ((s = setlocale(LC_CTYPE, NULL)) == NULL || *s == NUL)
2876 # endif 2879 # endif
2877 if ((s = getenv("LC_ALL")) == NULL || *s == NUL) 2880 if ((s = getenv("LC_ALL")) == NULL || *s == NUL)
2878 if ((s = getenv("LC_CTYPE")) == NULL || *s == NUL) 2881 if ((s = getenv("LC_CTYPE")) == NULL || *s == NUL)
2879 s = getenv("LANG"); 2882 s = getenv("LANG");
2883 # endif
2880 2884
2881 if (s == NULL || *s == NUL) 2885 if (s == NULL || *s == NUL)
2882 return FAIL; 2886 return FAIL;
2883 2887
2884 /* The most generic locale format is: 2888 /* The most generic locale format is:
5576 } 5580 }
5577 } 5581 }
5578 # endif 5582 # endif
5579 if (vcp->vc_type == CONV_NONE) 5583 if (vcp->vc_type == CONV_NONE)
5580 return FAIL; 5584 return FAIL;
5585
5581 return OK; 5586 return OK;
5582 } 5587 }
5583 5588
5584 #if defined(FEAT_GUI) || defined(AMIGA) || defined(WIN3264) \ 5589 #if defined(FEAT_GUI) || defined(AMIGA) || defined(WIN3264) \
5585 || defined(MSDOS) || defined(PROTO) 5590 || defined(MSDOS) || defined(PROTO)