From 256fc80dbc5c2e72c88df014334797134b807df7 Mon Sep 17 00:00:00 2001 From: michelle legrand Date: Fri, 30 Jan 2015 10:49:45 +0100 Subject: [PATCH] evil: add windows compatible langinfo. Signed-off-by: Cedric BAIL --- src/lib/evil/evil_langinfo.c | 20 ++++++++++++++++++++ src/lib/evil/evil_langinfo.h | 8 ++++++++ 2 files changed, 28 insertions(+) diff --git a/src/lib/evil/evil_langinfo.c b/src/lib/evil/evil_langinfo.c index 39aec6f390..2cec67a003 100644 --- a/src/lib/evil/evil_langinfo.c +++ b/src/lib/evil/evil_langinfo.c @@ -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; diff --git a/src/lib/evil/evil_langinfo.h b/src/lib/evil/evil_langinfo.h index e2dbbda828..b9f35029a4 100644 --- a/src/lib/evil/evil_langinfo.h +++ b/src/lib/evil/evil_langinfo.h @@ -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. */