Lines Matching +full:- +full:nv
8 * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
42 #define NV(e) {#e, e} macro
47 NV(CURLPROXY_HTTP),
48 NV(CURLPROXY_HTTP_1_0),
49 NV(CURLPROXY_HTTPS),
50 NV(CURLPROXY_SOCKS4),
51 NV(CURLPROXY_SOCKS5),
52 NV(CURLPROXY_SOCKS4A),
53 NV(CURLPROXY_SOCKS5_HOSTNAME),
58 NV(CURLPROXY_SOCKS4),
59 NV(CURLPROXY_SOCKS5),
60 NV(CURLPROXY_SOCKS4A),
61 NV(CURLPROXY_SOCKS5_HOSTNAME),
66 NV(CURLAUTH_ANY), /* combination */
67 NV(CURLAUTH_ANYSAFE), /* combination */
68 NV(CURLAUTH_BASIC),
69 NV(CURLAUTH_DIGEST),
70 NV(CURLAUTH_GSSNEGOTIATE),
71 NV(CURLAUTH_NTLM),
72 NV(CURLAUTH_DIGEST_IE),
73 NV(CURLAUTH_NTLM_WB),
74 NV(CURLAUTH_ONLY),
75 NV(CURLAUTH_NONE),
80 NV(CURL_HTTP_VERSION_NONE),
81 NV(CURL_HTTP_VERSION_1_0),
82 NV(CURL_HTTP_VERSION_1_1),
83 NV(CURL_HTTP_VERSION_2_0),
84 NV(CURL_HTTP_VERSION_2TLS),
89 NV(CURL_SSLVERSION_DEFAULT),
90 NV(CURL_SSLVERSION_TLSv1),
91 NV(CURL_SSLVERSION_SSLv2),
92 NV(CURL_SSLVERSION_SSLv3),
93 NV(CURL_SSLVERSION_TLSv1_0),
94 NV(CURL_SSLVERSION_TLSv1_1),
95 NV(CURL_SSLVERSION_TLSv1_2),
96 NV(CURL_SSLVERSION_TLSv1_3),
101 NV(CURL_TIMECOND_IFMODSINCE),
102 NV(CURL_TIMECOND_IFUNMODSINCE),
103 NV(CURL_TIMECOND_LASTMOD),
104 NV(CURL_TIMECOND_NONE),
109 NV(CURLFTPSSL_CCC_NONE),
110 NV(CURLFTPSSL_CCC_PASSIVE),
111 NV(CURLFTPSSL_CCC_ACTIVE),
116 NV(CURLUSESSL_NONE),
117 NV(CURLUSESSL_TRY),
118 NV(CURLUSESSL_CONTROL),
119 NV(CURLUSESSL_ALL),
124 NV(CURLSSLOPT_ALLOW_BEAST),
125 NV(CURLSSLOPT_NO_REVOKE),
130 NV(CURL_NETRC_IGNORED),
131 NV(CURL_NETRC_OPTIONAL),
132 NV(CURL_NETRC_REQUIRED),
136 /* These mappings essentially triplicated - see
139 NV(CURLPROTO_ALL), /* combination */
140 NV(CURLPROTO_DICT),
141 NV(CURLPROTO_FILE),
142 NV(CURLPROTO_FTP),
143 NV(CURLPROTO_FTPS),
144 NV(CURLPROTO_GOPHER),
145 NV(CURLPROTO_HTTP),
146 NV(CURLPROTO_HTTPS),
147 NV(CURLPROTO_IMAP),
148 NV(CURLPROTO_IMAPS),
149 NV(CURLPROTO_LDAP),
150 NV(CURLPROTO_LDAPS),
151 NV(CURLPROTO_POP3),
152 NV(CURLPROTO_POP3S),
153 NV(CURLPROTO_RTSP),
154 NV(CURLPROTO_SCP),
155 NV(CURLPROTO_SFTP),
156 NV(CURLPROTO_SMB),
157 NV(CURLPROTO_SMBS),
158 NV(CURLPROTO_SMTP),
159 NV(CURLPROTO_SMTPS),
160 NV(CURLPROTO_TELNET),
161 NV(CURLPROTO_TFTP),
165 /* These options have non-zero default values. */
231 /* Allocate space based on worst-case */ in c_escape()
281 if(config->libcurl && !skip && !ret) { in tool_setopt_enum()
282 /* we only use this for real if --libcurl was used */ in tool_setopt_enum()
283 const NameValue *nv = NULL; in tool_setopt_enum() local
284 for(nv = nvlist; nv->name; nv++) { in tool_setopt_enum()
285 if(nv->value == lval) break; /* found it */ in tool_setopt_enum()
287 if(! nv->name) { in tool_setopt_enum()
294 CODE2("curl_easy_setopt(hnd, %s, (long)%s);", name, nv->name); in tool_setopt_enum()
314 if(config->libcurl && !skip && !ret) { in tool_setopt_flags()
315 /* we only use this for real if --libcurl was used */ in tool_setopt_flags()
318 const NameValue *nv = NULL; in tool_setopt_flags() local
321 for(nv = nvlist; nv->name; nv++) { in tool_setopt_flags()
322 if((nv->value & ~ rest) == 0) { in tool_setopt_flags()
324 rest &= ~ nv->value; /* remove bits handled here */ in tool_setopt_flags()
326 preamble, nv->name, rest ? " |" : ");"); in tool_setopt_flags()
357 if(config->libcurl && !skip && !ret) { in tool_setopt_bitmask()
358 /* we only use this for real if --libcurl was used */ in tool_setopt_bitmask()
361 const NameValueUnsigned *nv = NULL; in tool_setopt_bitmask() local
364 for(nv = nvlist; nv->name; nv++) { in tool_setopt_bitmask()
365 if((nv->value & ~ rest) == 0) { in tool_setopt_bitmask()
367 rest &= ~ nv->value; /* remove bits handled here */ in tool_setopt_bitmask()
369 preamble, nv->name, rest ? " |" : ");"); in tool_setopt_bitmask()
400 for(; slist; slist = slist->next) { in libcurl_generate_slist()
402 escaped = c_escape(slist->data, CURL_ZERO_TERMINATED); in libcurl_generate_slist()
429 const char *filename = part->filename; in libcurl_generate_mime_part()
432 if(part->prev) { in libcurl_generate_mime_part()
433 ret = libcurl_generate_mime_part(curl, config, part->prev, mimeno); in libcurl_generate_mime_part()
441 switch(part->kind) { in libcurl_generate_mime_part()
453 escaped = c_escape(part->data, CURL_ZERO_TERMINATED); in libcurl_generate_mime_part()
459 size_t size = strlen(part->data); in libcurl_generate_mime_part()
463 memcpy(cp, part->data, size + 1); in libcurl_generate_mime_part()
468 data = part->data; in libcurl_generate_mime_part()
481 escaped = c_escape(part->data, CURL_ZERO_TERMINATED); in libcurl_generate_mime_part()
484 if(part->kind == TOOLMIME_FILEDATA && !filename) { in libcurl_generate_mime_part()
491 filename = "-"; in libcurl_generate_mime_part()
495 CODE1("curl_mime_data_cb(part%d, -1, (curl_read_callback) fread, \\", in libcurl_generate_mime_part()
504 if(!ret && part->encoder) { in libcurl_generate_mime_part()
506 escaped = c_escape(part->encoder, CURL_ZERO_TERMINATED); in libcurl_generate_mime_part()
518 if(!ret && part->name) { in libcurl_generate_mime_part()
520 escaped = c_escape(part->name, CURL_ZERO_TERMINATED); in libcurl_generate_mime_part()
525 if(!ret && part->type) { in libcurl_generate_mime_part()
527 escaped = c_escape(part->type, CURL_ZERO_TERMINATED); in libcurl_generate_mime_part()
532 if(!ret && part->headers) { in libcurl_generate_mime_part()
535 ret = libcurl_generate_slist(part->headers, &slistno); in libcurl_generate_mime_part()
568 if(toolmime->subparts) { in libcurl_generate_mime()
571 toolmime->subparts, *mimeno); in libcurl_generate_mime()
586 if(!ret && config->libcurl) { in tool_setopt_mimepost()
588 config->current->mimeroot, &mimeno); in tool_setopt_mimepost()
607 if(config->libcurl && list && !ret) { in tool_setopt_slist()
639 const NameValue *nv = NULL; in tool_setopt() local
640 for(nv = setopt_nv_CURLNONZERODEFAULTS; nv->name; nv++) { in tool_setopt()
641 if(!strcmp(name, nv->name)) { in tool_setopt()
642 defval = nv->value; in tool_setopt()
695 if(config->libcurl && !skip && !ret) { in tool_setopt()
696 /* we only use this for real if --libcurl was used */ in tool_setopt()