diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-10-30 17:37:10 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-10-31 00:37:42 +0000 |
commit | 706c10663499b90639ab8e46e171c4d4952778bf (patch) | |
tree | 5835d1fb6dd242d25c4b35eedf20152d90d8384e /ui/dissect_opts.h | |
parent | 45a023f3d0f616d518a1eb0b08b68c109def3616 (diff) | |
download | wireshark-706c10663499b90639ab8e46e171c4d4952778bf.tar.gz |
Have the routine that handles dissection options not exit.
Have it return TRUE if the option is OK and FALSE if it isn't, and let
its caller exit as appropriate.
Also, rename it - it's not adding something to a collection, it's just
handling the option.
Change-Id: I41863cbb67b7c257d900d3011609891b9b4a7467
Reviewed-on: https://code.wireshark.org/review/18587
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/dissect_opts.h')
-rw-r--r-- | ui/dissect_opts.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/dissect_opts.h b/ui/dissect_opts.h index ad049b8160..629136e131 100644 --- a/ui/dissect_opts.h +++ b/ui/dissect_opts.h @@ -82,9 +82,13 @@ extern dissect_options global_dissect_options; extern void dissect_opts_init(void); -/* set a command line option value */ -extern void -dissect_opts_add_opt(int opt, char *optarg_str_p); +/* + * Handle a command line option. + * Returns TRUE if the option is valid, FALSE if not; an error message + * is reported with cmdarg_err() if it's not valid. + */ +extern gboolean +dissect_opts_handle_opt(int opt, char *optarg_str_p); #ifdef __cplusplus } |