aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2018-03-25 10:22:02 -0700
committerkatherine <shmibs@shmibbles.me>2018-03-25 10:22:02 -0700
commit86071ec611fdaad93e7fe0e1a24007bdb8dc6fda (patch)
tree7f87a0b0cb9f2d324ad21025559c5619d176f056 /doc
parentfd5b37444a16e85606d56ab27ef0f84ddc20df78 (diff)
downloadsimple-opt-86071ec611fdaad93e7fe0e1a24007bdb8dc6fda.tar.gz
fix error printing
Diffstat (limited to 'doc')
-rw-r--r--doc/example.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/example.c b/doc/example.c
index 50d8173..2c21341 100644
--- a/doc/example.c
+++ b/doc/example.c
@@ -35,9 +35,10 @@ int main(int argc, char **argv)
result = simple_opt_parse(argc, argv, options);
- /* catch any errors and print a default result */
+ /* catch any errors and print a default error message. you can do this bit
+ * yourself, if you'd like more control of the output */
if (result.result_type != SIMPLE_OPT_RESULT_SUCCESS) {
- simple_opt_print_error(stderr, argv[0], options, result);
+ simple_opt_print_error(stderr, argv[0], result);
return 1;
}