evil: add windows compatible langinfo.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
michelle legrand 2015-01-30 10:49:45 +01:00 committed by Cedric BAIL
parent ac0b42a51a
commit 256fc80dbc
2 changed files with 28 additions and 0 deletions

View File

@ -43,6 +43,26 @@ nl_langinfo(nl_item index)
{
return localeconv()->decimal_point;
}
case D_T_FMT:
{
return "%a %d %b %Y %T %Z";
}
case D_FMT:
{
return "%m/%d/%Y";
}
case T_FMT:
{
return "%T";
}
case T_FMT_AMPM:
{
return "%r";
}
default:
{
return "%a %d %b %Y %T %Z";
}
}
return nothing;

View File

@ -19,6 +19,14 @@ enum {
_NL_CTYPE_CODESET = __NL_ITEM( LC_CTYPE, 0 ),
_NL_NUMERIC_RADIXCHAR = __NL_ITEM( LC_NUMERIC, 0 ),
D_T_FMT, /* Date and time format for strftime*/
#define D_T_FMT D_T_FMT
D_FMT, /* Date format for strftime*/
#define D_FMT D_FMT
T_FMT, /* Time format for strftime*/
#define T_FMT T_FMT
T_FMT_AMPM, /*12-hour time format for strftime*/
#define T_FMT_AMPM T_FMT_AMPM
/*
* Dummy entry, to terminate the list.
*/