diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-09-28 17:36:09 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-09-30 17:50:48 +0200 |
commit | ffb634d4ef5378c5f8255577fb65df3de82c0396 (patch) | |
tree | f82d8cdb5888dc01743bcc0a98871c5e4b01f931 /src/tool_help.h | |
parent | d10a0af2f3ba4ad7a3b9636b77cc81e1a9c667d8 (diff) | |
download | curl-ffb634d4ef5378c5f8255577fb65df3de82c0396.tar.gz |
tool_listhelp: easier to generate with gen.pl
tool_listhelp.c is now a separate file with only the command line --help
output, exactly as generated by gen.pl. This makes it easier to generate
updates according to what's in the docs/cmdline-opts docs.
cd $srcroot/docs/cmdline-opts
./gen.pl listhelp *.d > $srcroot/src/tool_listhelp.c
With a configure build, this also works:
make -C src listhelp
Closes #7787
Diffstat (limited to 'src/tool_help.h')
-rw-r--r-- | src/tool_help.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/src/tool_help.h b/src/tool_help.h index 39ea2400d..143466286 100644 --- a/src/tool_help.h +++ b/src/tool_help.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -27,4 +27,46 @@ void tool_help(char *category); void tool_list_engines(void); void tool_version_info(void); +typedef unsigned int curlhelp_t; + +struct helptxt { + const char *opt; + const char *desc; + curlhelp_t categories; +}; + +/* + * The bitmask output is generated with the following command + ------------------------------------------------------------ + cd $srcroot/docs/cmdline-opts + ./gen.pl listcats *.d + */ + +#define CURLHELP_HIDDEN 1u << 0u +#define CURLHELP_AUTH 1u << 1u +#define CURLHELP_CONNECTION 1u << 2u +#define CURLHELP_CURL 1u << 3u +#define CURLHELP_DNS 1u << 4u +#define CURLHELP_FILE 1u << 5u +#define CURLHELP_FTP 1u << 6u +#define CURLHELP_HTTP 1u << 7u +#define CURLHELP_IMAP 1u << 8u +#define CURLHELP_IMPORTANT 1u << 9u +#define CURLHELP_MISC 1u << 10u +#define CURLHELP_OUTPUT 1u << 11u +#define CURLHELP_POP3 1u << 12u +#define CURLHELP_POST 1u << 13u +#define CURLHELP_PROXY 1u << 14u +#define CURLHELP_SCP 1u << 15u +#define CURLHELP_SFTP 1u << 16u +#define CURLHELP_SMTP 1u << 17u +#define CURLHELP_SSH 1u << 18u +#define CURLHELP_TELNET 1u << 19u +#define CURLHELP_TFTP 1u << 20u +#define CURLHELP_TLS 1u << 21u +#define CURLHELP_UPLOAD 1u << 22u +#define CURLHELP_VERBOSE 1u << 23u + +extern const struct helptxt helptext[]; + #endif /* HEADER_CURL_TOOL_HELP_H */ |