mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Fixed two bugs in Perl to C conversion that prevented locale name
from being parsed correctly. OK'ed by: markm Approved by: re (scottl) MFC after: 3 days
This commit is contained in:
parent
7657f59596
commit
76c6134966
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147685
|
@ -571,7 +571,7 @@ menu_read(void)
|
|||
|
||||
/* en_US.ISO8859-1 -> en_..\.ISO8859-1 */
|
||||
strlcpy(dialect, lang, sizeof(dialect));
|
||||
if (strlen(dialect) >= 6 && dialect[2] == '-') {
|
||||
if (strlen(dialect) >= 6 && dialect[2] == '_') {
|
||||
dialect[3] = '.';
|
||||
dialect[4] = '.';
|
||||
}
|
||||
|
@ -579,8 +579,8 @@ menu_read(void)
|
|||
|
||||
/* en_US.ISO8859-1 -> en */
|
||||
strlcpy(lang_abk, lang, sizeof(lang_abk));
|
||||
if (strlen(lang_abk) >= 3 && lang_abk[2] == '-')
|
||||
lang_abk[2] = '.';
|
||||
if (strlen(lang_abk) >= 3 && lang_abk[2] == '_')
|
||||
lang_abk[2] = '\0';
|
||||
|
||||
fprintf(stderr, "lang_default = %s\n", lang_default);
|
||||
fprintf(stderr, "dialect = %s\n", dialect);
|
||||
|
|
Loading…
Reference in a new issue