1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| 538 /* long may be 32 or 64 bits, but we should never depend on anything else
539 but 32 */
540 #define CURLOPTTYPE_LONG 0
541 #define CURLOPTTYPE_OBJECTPOINT 10000
542 #define CURLOPTTYPE_FUNCTIONPOINT 20000
543 #define CURLOPTTYPE_OFF_T 30000
544
545 /* name is uppercase CURLOPT_<name>,
546 type is one of the defined CURLOPTTYPE_<type>
547 number is unique identifier */
548 #ifdef CINIT
549 #undef CINIT
550 #endif
551
552 #ifdef CURL_ISOCPP
553 #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
554 #else
555 /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
556 #define LONG CURLOPTTYPE_LONG
557 #define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT
558 #define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
559 #define OFF_T CURLOPTTYPE_OFF_T
560 #define CINIT(name,type,number) CURLOPT_/**/name = type + number
561 #endif
562
563 /*
564 * This macro-mania below setups the CURLOPT_[what] enum, to be used with
565 * curl_easy_setopt(). The first argument in the CINIT() macro is the [what]
566 * word.
567 */
568
569 typedef enum {
570 /* This is the FILE * or void * the regular output should be written to. */
571 CINIT(FILE, OBJECTPOINT, 1),
572
573 /* The full URL to get/put */
574 CINIT(URL, OBJECTPOINT, 2),
// je vous épargne les quelques lignes !!!
1148 /* "name" and "pwd" to use with Proxy when fetching. */
1149 CINIT(PROXYUSERNAME, OBJECTPOINT, 175),
1150 CINIT(PROXYPASSWORD, OBJECTPOINT, 176),
1151
1152 CURLOPT_LASTENTRY /* the last unused */
1153 } CURLoption; |
Partager