From 1f4a711a05e00db81da552dd990f6ddff4ffb63e Mon Sep 17 00:00:00 2001 From: Michele Ballabio Date: Mon, 24 Mar 2008 15:02:21 +0100 Subject: parse-options.c: introduce OPT_DATE There are quite a few places that will need to call approxidate(), when they'll adopt the parse-options system, so this patch adds the function parse_opt_approxidate_cb(), used by OPT_DATE. Signed-off-by: Michele Ballabio Signed-off-by: Junio C Hamano --- parse-options.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'parse-options.c') diff --git a/parse-options.c b/parse-options.c index 8e64316fe0..e87cafbe41 100644 --- a/parse-options.c +++ b/parse-options.c @@ -409,3 +409,10 @@ int parse_opt_abbrev_cb(const struct option *opt, const char *arg, int unset) *(int *)(opt->value) = v; return 0; } + +int parse_opt_approxidate_cb(const struct option *opt, const char *arg, + int unset) +{ + *(unsigned long *)(opt->value) = approxidate(arg); + return 0; +} -- cgit v1.2.1