diff options
Diffstat (limited to 'gdb/mi/mi-getopt.c')
-rw-r--r-- | gdb/mi/mi-getopt.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/mi/mi-getopt.c b/gdb/mi/mi-getopt.c index 59ccdf3..3f2a902 100644 --- a/gdb/mi/mi-getopt.c +++ b/gdb/mi/mi-getopt.c @@ -74,3 +74,19 @@ mi_getopt (const char *prefix, } error ("%s: Unknown option ``%s''", prefix, arg + 1); } + +int +mi_valid_noargs (const char *prefix, int argc, char **argv) +{ + int optind = 0; + char *optarg; + static struct mi_opt opts[] = + { + 0 + }; + + if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) == -1) + return 1; + else + return 0; +} |