diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-09-25 23:28:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-09-25 23:28:15 +0000 |
commit | df2b3bcf44299d7060b3bc6c17c6e80a1f358692 (patch) | |
tree | cca69c2cc61378a4e15ca1b3a147d7009fe508ea /cmd-generic.c | |
parent | 44b368e22098cc2d080a0e7695e46d7cef8db83d (diff) |
Fix stupid GNU getopt behaviour.
Diffstat (limited to 'cmd-generic.c')
-rw-r--r-- | cmd-generic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd-generic.c b/cmd-generic.c index 49bb14b2..f1322d1c 100644 --- a/cmd-generic.c +++ b/cmd-generic.c @@ -1,4 +1,4 @@ -/* $Id: cmd-generic.c,v 1.12 2008-06-29 07:04:30 nicm Exp $ */ +/* $Id: cmd-generic.c,v 1.13 2008-09-25 23:28:12 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -44,7 +44,7 @@ cmd_target_parse(struct cmd *self, int argc, char **argv, char **cause) cmd_target_init(self, 0); data = self->data; - while ((opt = getopt(argc, argv, "dkt:")) != EOF) { + while ((opt = getopt(argc, argv, GETOPT_PREFIX "dkt:")) != EOF) { switch (opt) { case 'd': if (self->entry->flags & CMD_DFLAG) { @@ -166,7 +166,7 @@ cmd_srcdst_parse(struct cmd *self, int argc, char **argv, char **cause) cmd_srcdst_init(self, 0); data = self->data; - while ((opt = getopt(argc, argv, "dks:t:")) != EOF) { + while ((opt = getopt(argc, argv, GETOPT_PREFIX "dks:t:")) != EOF) { switch (opt) { case 'd': if (self->entry->flags & CMD_DFLAG) { @@ -299,7 +299,7 @@ cmd_buffer_parse(struct cmd *self, int argc, char **argv, char **cause) cmd_buffer_init(self, 0); data = self->data; - while ((opt = getopt(argc, argv, "b:dkt:")) != EOF) { + while ((opt = getopt(argc, argv, GETOPT_PREFIX "b:dkt:")) != EOF) { switch (opt) { case 'b': if (data->buffer == -1) { |