diff options
author | katherine <shmibs@shmibbles.me> | 2018-03-18 12:48:57 -0700 |
---|---|---|
committer | katherine <shmibs@shmibbles.me> | 2018-03-18 12:48:57 -0700 |
commit | ada96265ab15e72f491ba35e05f45583a8a7dedf (patch) | |
tree | ae2f3e9bc33c0423e9e145465417c5fafe9ee4b0 | |
parent | 37332b77909844642c924972ea53382c4a24289c (diff) | |
download | simple-opt-ada96265ab15e72f491ba35e05f45583a8a7dedf.tar.gz |
make defines static
was an idiot and removed before, second-guessing myself -_-
-rw-r--r-- | doc/interface.md | 8 | ||||
-rw-r--r-- | src/simple-opt.h | 20 |
2 files changed, 14 insertions, 14 deletions
diff --git a/doc/interface.md b/doc/interface.md index 5e2bb4e..361dcf9 100644 --- a/doc/interface.md +++ b/doc/interface.md @@ -163,8 +163,8 @@ single header file nature) simple_opt_result`: ``` -struct simple_opt_result simple_opt_parse(int argc, char **argv, struct - simple_opt *options); +static struct simple_opt_result simple_opt_parse(int argc, char **argv, + struct simple_opt *options); ``` `argc` is the number of arguments contained in `argv`, and `argv` is an array @@ -182,8 +182,8 @@ about that parsing (also described above). usage message, similar to those typical of GNU cli commands: ``` -void simple_opt_print_usage(FILE *f, unsigned width, char *usage_name, - char *usage_options, char *usage_summary, struct simple_opt *options) +static void simple_opt_print_usage(FILE *f, unsigned width, char *usage_name, + char *usage_options, char *usage_summary, struct simple_opt *options); ``` `f` is a file pointer to which the message should be printed diff --git a/src/simple-opt.h b/src/simple-opt.h index 52b51dd..fe714a1 100644 --- a/src/simple-opt.h +++ b/src/simple-opt.h @@ -80,10 +80,10 @@ struct simple_opt_result { char *argv[SIMPLE_OPT_MAX_ARGC]; }; -struct simple_opt_result simple_opt_parse(int argc, char **argv, struct - simple_opt *options); +static struct simple_opt_result simple_opt_parse(int argc, char **argv, + struct simple_opt *options); -void simple_opt_print_usage(FILE *f, unsigned width, char *usage_name, +static void simple_opt_print_usage(FILE *f, unsigned width, char *usage_name, char *usage_options, char *usage_summary, struct simple_opt *options); @@ -92,7 +92,7 @@ void simple_opt_print_usage(FILE *f, unsigned width, char *usage_name, * */ -bool sub_simple_opt_parse(struct simple_opt *o, char *s) +static bool sub_simple_opt_parse(struct simple_opt *o, char *s) { int i, j; char *str; @@ -191,7 +191,7 @@ strmatch_out: } } -int sub_simple_opt_id(char *s, struct simple_opt *o) +static int sub_simple_opt_id(char *s, struct simple_opt *o) { int i; char c; @@ -222,8 +222,8 @@ int sub_simple_opt_id(char *s, struct simple_opt *o) return -1; } -struct simple_opt_result simple_opt_parse(int argc, char **argv, struct - simple_opt *options) +static struct simple_opt_result simple_opt_parse(int argc, char **argv, + struct simple_opt *options) { int i, j, opt_i; int arg_end; @@ -382,8 +382,8 @@ opt_copy_and_return: goto end; } -int sub_simple_opt_wrap_print(FILE *f, unsigned width, int col, int line_start, - const char *s) +static int sub_simple_opt_wrap_print(FILE *f, unsigned width, int col, + int line_start, const char *s) { bool add_newline = false, first_word = true; int i, j, word_start, word_end; @@ -474,7 +474,7 @@ int sub_simple_opt_wrap_print(FILE *f, unsigned width, int col, int line_start, return col; } -void simple_opt_print_usage(FILE *f, unsigned width, char *usage_name, +static void simple_opt_print_usage(FILE *f, unsigned width, char *usage_name, char *usage_options, char *usage_summary, struct simple_opt *options) { char print_buffer[SIMPLE_OPT_USAGE_PRINT_BUFFER_WIDTH]; |