summaryrefslogtreecommitdiff
path: root/src/option.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-16 17:25:19 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-16 17:25:19 -0400
commitb7f2a95c1f630d1246afa4b7f847435d62c9341e (patch)
tree58fdbf7aeb495270398de5c17f0364951aba6497 /src/option.h
parent275da22752f690f202269e2a0dc5cd405e0490e2 (diff)
downloadfork-ledger-b7f2a95c1f630d1246afa4b7f847435d62c9341e.tar.gz
fork-ledger-b7f2a95c1f630d1246afa4b7f847435d62c9341e.tar.bz2
fork-ledger-b7f2a95c1f630d1246afa4b7f847435d62c9341e.zip
Accept --first/--last as synonyms for --head/--tail
Diffstat (limited to 'src/option.h')
-rw-r--r--src/option.h4
1 files changed, 4 insertions, 0 deletions
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 && \