mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Remove char_u: get_mess_lang()
This commit is contained in:
parent
78c77e8555
commit
08c08ecdf3
@ -2970,26 +2970,26 @@ static char *get_locale_val(int what)
|
||||
* Obtain the current messages language. Used to set the default for
|
||||
* '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
|
||||
# if defined(LC_MESSAGES)
|
||||
p = (char_u *)get_locale_val(LC_MESSAGES);
|
||||
p = get_locale_val(LC_MESSAGES);
|
||||
# else
|
||||
/* 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
|
||||
* and LC_MONETARY may be set differently for a Japanese working in the
|
||||
* US. */
|
||||
p = (char_u *)get_locale_val(LC_COLLATE);
|
||||
p = get_locale_val(LC_COLLATE);
|
||||
# endif
|
||||
# else
|
||||
p = os_getenv((char_u *)"LC_ALL");
|
||||
p = os_getenv("LC_ALL");
|
||||
if (p == NULL || *p == NUL) {
|
||||
p = os_getenv((char_u *)"LC_MESSAGES");
|
||||
p = os_getenv("LC_MESSAGES");
|
||||
if (p == NULL || *p == NUL)
|
||||
p = os_getenv((char_u *)"LANG");
|
||||
p = os_getenv("LANG");
|
||||
}
|
||||
# endif
|
||||
return p;
|
||||
|
@ -2039,7 +2039,7 @@ void set_init_1(void)
|
||||
}
|
||||
|
||||
/* Set the default for 'helplang'. */
|
||||
set_helplang_default((char *)get_mess_lang());
|
||||
set_helplang_default(get_mess_lang());
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user