提交 0206f596 编写于 作者: R Rich Felker

add missing yes/no strings to nl_langinfo

these were removed from the standard but still offered as an extension
in langinfo.h, so nl_langinfo should support them.
上级 a19cd2b6
......@@ -24,7 +24,7 @@ static const char c_time[] =
"%a %b %e %T %Y\0"
"%H:%M:%S";
static const char c_messages[] = "^[yY]\0" "^[nN]";
static const char c_messages[] = "^[yY]\0" "^[nN]\0" "yes\0" "no";
static const char c_numeric[] = ".\0" "";
char *__nl_langinfo_l(nl_item item, locale_t loc)
......@@ -49,7 +49,7 @@ char *__nl_langinfo_l(nl_item item, locale_t loc)
str = "";
break;
case LC_MESSAGES:
if (idx > 1) return NULL;
if (idx > 3) return NULL;
str = c_messages;
break;
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册