From: Jonas Fonseca Date: Fri, 11 Dec 2009 23:26:25 +0000 (-0500) Subject: Define date values in DATE_INFO macro X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b6c315d056a6e7d8fe36f9e3baab3be35e7b9bd2;p=tig.git Define date values in DATE_INFO macro --- 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_ };