aboutsummaryrefslogtreecommitdiffstats
path: root/doc/interface.md
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2018-03-25 14:02:56 -0700
committerkatherine <shmibs@shmibbles.me>2018-03-25 14:02:56 -0700
commit274369e625cd972aa95aa900eb861a6dc5a24712 (patch)
tree3d6029e73b2e0929344dfd81a434ac72c6445173 /doc/interface.md
parentb72f0a2f2657356286f0eda7408b5816561bccb7 (diff)
downloadsimple-opt-274369e625cd972aa95aa900eb861a6dc5a24712.tar.gz
use word-wrapping for error printing
Diffstat (limited to 'doc/interface.md')
-rw-r--r--doc/interface.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/interface.md b/doc/interface.md
index e757e80..f8d5886 100644
--- a/doc/interface.md
+++ b/doc/interface.md
@@ -281,12 +281,15 @@ an alternative method for usage printing.
message, if there is one to be printed:
```
-static void simple_opt_print_error(FILE *f, char *command_name,
+static void simple_opt_print_error(FILE *f, unsigned width, char *command_name,
struct simple_opt_result result);
```
`f` is a file pointer to which the message should be printed.
+`width` is the width to which the output should be word-wrapped. if 0, no
+wrapping will be performed. see `width` in `simple_opt_print_usage` above.
+
`command_name` is the name of the command as it will be printed in the usage
statement. easiest is just to pass `argv[0]` here. if NULL is passed, "err:"
will be printed instead.