Remove char_u: get_mess_lang()

This commit is contained in:
Mark Bainter 2015-04-13 02:22:02 +00:00
parent 78c77e8555
commit 08c08ecdf3
2 changed files with 8 additions and 8 deletions

View File

@ -2970,26 +2970,26 @@ static char *get_locale_val(int what)
* Obtain the current messages language. Used to set the default for * Obtain the current messages language. Used to set the default for
* 'helplang'. May return NULL or an empty string. * 'helplang'. May return NULL or an empty string.
*/ */
char_u *get_mess_lang(void) char *get_mess_lang(void)
{ {
char_u *p; char *p;
# ifdef HAVE_GET_LOCALE_VAL # ifdef HAVE_GET_LOCALE_VAL
# if defined(LC_MESSAGES) # if defined(LC_MESSAGES)
p = (char_u *)get_locale_val(LC_MESSAGES); p = get_locale_val(LC_MESSAGES);
# else # else
/* This is necessary for Win32, where LC_MESSAGES is not defined and $LANG /* This is necessary for Win32, where LC_MESSAGES is not defined and $LANG
* may be set to the LCID number. LC_COLLATE is the best guess, LC_TIME * may be set to the LCID number. LC_COLLATE is the best guess, LC_TIME
* and LC_MONETARY may be set differently for a Japanese working in the * and LC_MONETARY may be set differently for a Japanese working in the
* US. */ * US. */
p = (char_u *)get_locale_val(LC_COLLATE); p = get_locale_val(LC_COLLATE);
# endif # endif
# else # else
p = os_getenv((char_u *)"LC_ALL"); p = os_getenv("LC_ALL");
if (p == NULL || *p == NUL) { if (p == NULL || *p == NUL) {
p = os_getenv((char_u *)"LC_MESSAGES"); p = os_getenv("LC_MESSAGES");
if (p == NULL || *p == NUL) if (p == NULL || *p == NUL)
p = os_getenv((char_u *)"LANG"); p = os_getenv("LANG");
} }
# endif # endif
return p; return p;

View File

@ -2039,7 +2039,7 @@ void set_init_1(void)
} }
/* Set the default for 'helplang'. */ /* Set the default for 'helplang'. */
set_helplang_default((char *)get_mess_lang()); set_helplang_default(get_mess_lang());
} }
/* /*