From b6c315d056a6e7d8fe36f9e3baab3be35e7b9bd2 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Fri, 11 Dec 2009 18:26:25 -0500 Subject: [PATCH] Define date values in DATE_INFO macro --- tig.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tig.c b/tig.c index 08b2993..4282b9d 100644 --- a/tig.c +++ b/tig.c @@ -381,19 +381,21 @@ static int local_tzoffset(time_t time) return offset * eastwest; } +#define DATE_INFO \ + DATE_(NO), \ + DATE_(DEFAULT), \ + DATE_(RELATIVE), \ + DATE_(SHORT) + enum date { - DATE_NO = 0, - DATE_DEFAULT, - DATE_RELATIVE, - DATE_SHORT +#define DATE_(name) DATE_##name + DATE_INFO +#undef DATE_ }; static const struct enum_map date_map[] = { #define DATE_(name) ENUM_MAP(#name, DATE_##name) - DATE_(NO), - DATE_(DEFAULT), - DATE_(RELATIVE), - DATE_(SHORT) + DATE_INFO #undef DATE_ }; -- 2.30.2