From b7f2a95c1f630d1246afa4b7f847435d62c9341e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 16 Feb 2009 17:25:19 -0400 Subject: Accept --first/--last as synonyms for --head/--tail --- src/option.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/option.h') diff --git a/src/option.h b/src/option.h index a791e250..7deb5f58 100644 --- a/src/option.h +++ b/src/option.h @@ -202,6 +202,10 @@ inline bool is_eq(const char * p, const char * n) { if (is_eq(p, #name)) \ return ((name ## _handler).parent = this, &(name ## _handler)) +#define OPT_ALT(name, alt) \ + if (is_eq(p, #name) || is_eq(p, #alt)) \ + return ((name ## _handler).parent = this, &(name ## _handler)) + #define OPT_(name) \ if (! *(p + 1) || \ ((name ## _handler).wants_arg && \ -- cgit v1.2.3