1 #ifndef HEADER_CURL_TOOL_HELP_H 2 #define HEADER_CURL_TOOL_HELP_H 3 /*************************************************************************** 4 * _ _ ____ _ 5 * Project ___| | | | _ \| | 6 * / __| | | | |_) | | 7 * | (__| |_| | _ <| |___ 8 * \___|\___/|_| \_\_____| 9 * 10 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 11 * 12 * This software is licensed as described in the file COPYING, which 13 * you should have received as part of this distribution. The terms 14 * are also available at https://curl.se/docs/copyright.html. 15 * 16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 * copies of the Software, and permit persons to whom the Software is 18 * furnished to do so, under the terms of the COPYING file. 19 * 20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 * KIND, either express or implied. 22 * 23 * SPDX-License-Identifier: curl 24 * 25 ***************************************************************************/ 26 #include "tool_setup.h" 27 28 void tool_help(char *category); 29 void tool_list_engines(void); 30 void tool_version_info(void); 31 struct scan_ctx { 32 const char *trigger; 33 size_t tlen; 34 const char *arg; 35 size_t flen; 36 const char *endarg; 37 size_t elen; 38 size_t olen; 39 char rbuf[40]; 40 char obuf[160]; 41 unsigned char show; /* start as at 0. 42 trigger match moves it to 1 43 arg match moves it to 2 44 endarg stops the search */ 45 }; 46 void inithelpscan(struct scan_ctx *ctx, const char *trigger, 47 const char *arg, const char *endarg); 48 bool helpscan(unsigned char *buf, size_t len, struct scan_ctx *ctx); 49 50 struct helptxt { 51 const char *opt; 52 const char *desc; 53 unsigned int categories; 54 }; 55 56 /* 57 * The bitmask output is generated with the following command 58 ------------------------------------------------------------ 59 make -C docs/cmdline-opts listcats 60 */ 61 62 #define CURLHELP_AUTH (1u << 0u) 63 #define CURLHELP_CONNECTION (1u << 1u) 64 #define CURLHELP_CURL (1u << 2u) 65 #define CURLHELP_DEPRECATED (1u << 3u) 66 #define CURLHELP_DNS (1u << 4u) 67 #define CURLHELP_FILE (1u << 5u) 68 #define CURLHELP_FTP (1u << 6u) 69 #define CURLHELP_GLOBAL (1u << 7u) 70 #define CURLHELP_HTTP (1u << 8u) 71 #define CURLHELP_IMAP (1u << 9u) 72 #define CURLHELP_IMPORTANT (1u << 10u) 73 #define CURLHELP_LDAP (1u << 11u) 74 #define CURLHELP_OUTPUT (1u << 12u) 75 #define CURLHELP_POP3 (1u << 13u) 76 #define CURLHELP_POST (1u << 14u) 77 #define CURLHELP_PROXY (1u << 15u) 78 #define CURLHELP_SCP (1u << 16u) 79 #define CURLHELP_SFTP (1u << 17u) 80 #define CURLHELP_SMTP (1u << 18u) 81 #define CURLHELP_SSH (1u << 19u) 82 #define CURLHELP_TELNET (1u << 20u) 83 #define CURLHELP_TFTP (1u << 21u) 84 #define CURLHELP_TIMEOUT (1u << 22u) 85 #define CURLHELP_TLS (1u << 23u) 86 #define CURLHELP_UPLOAD (1u << 24u) 87 #define CURLHELP_VERBOSE (1u << 25u) 88 89 #define CURLHELP_ALL (0xfffffffu) 90 91 extern const struct helptxt helptext[]; 92 93 #endif /* HEADER_CURL_TOOL_HELP_H */ 94