3 "CURLE_UNSUPPORTED_PROTOCOL";
6 "CURLE_URL_MALFORMAT_USER";
7 "CURLE_COULDNT_RESOLVE_PROXY";
8 "CURLE_COULDNT_RESOLVE_HOST";
9 "CURLE_COULDNT_CONNECT";
10 "CURLE_FTP_WEIRD_SERVER_REPLY";
11 "CURLE_FTP_ACCESS_DENIED";
12 "CURLE_FTP_USER_PASSWORD_INCORRECT";
13 "CURLE_FTP_WEIRD_PASS_REPLY";
14 "CURLE_FTP_WEIRD_USER_REPLY";
15 "CURLE_FTP_WEIRD_PASV_REPLY";
16 "CURLE_FTP_WEIRD_227_FORMAT";
17 "CURLE_FTP_CANT_GET_HOST";
18 "CURLE_FTP_CANT_RECONNECT";
19 "CURLE_FTP_COULDNT_SET_BINARY";
21 "CURLE_FTP_COULDNT_RETR_FILE";
22 "CURLE_FTP_WRITE_ERROR";
23 "CURLE_FTP_QUOTE_ERROR";
24 "CURLE_HTTP_RETURNED_ERROR";
26 "CURLE_MALFORMAT_USER";
27 "CURLE_FTP_COULDNT_STOR_FILE";
29 "CURLE_OUT_OF_MEMORY";
30 "CURLE_OPERATION_TIMEOUTED";
31 "CURLE_FTP_COULDNT_SET_ASCII";
32 "CURLE_FTP_PORT_FAILED";
33 "CURLE_FTP_COULDNT_USE_REST";
34 "CURLE_FTP_COULDNT_GET_SIZE";
35 "CURLE_HTTP_RANGE_ERROR";
36 "CURLE_HTTP_POST_ERROR";
37 "CURLE_SSL_CONNECT_ERROR";
38 "CURLE_BAD_DOWNLOAD_RESUME";
39 "CURLE_FILE_COULDNT_READ_FILE";
40 "CURLE_LDAP_CANNOT_BIND";
41 "CURLE_LDAP_SEARCH_FAILED";
42 "CURLE_LIBRARY_NOT_FOUND";
43 "CURLE_FUNCTION_NOT_FOUND";
44 "CURLE_ABORTED_BY_CALLBACK";
45 "CURLE_BAD_FUNCTION_ARGUMENT";
46 "CURLE_BAD_CALLING_ORDER";
47 "CURLE_INTERFACE_FAILED";
48 "CURLE_BAD_PASSWORD_ENTERED";
49 "CURLE_TOO_MANY_REDIRECTS";
50 "CURLE_UNKNOWN_TELNET_OPTION";
51 "CURLE_TELNET_OPTION_SYNTAX";
52 "CURLE_SSL_PEER_CERTIFICATE";
54 "CURLE_SSL_ENGINE_NOTFOUND";
55 "CURLE_SSL_ENGINE_SETFAILED";
59 "CURLE_SSL_CERTPROBLEM";
62 "CURLE_BAD_CONTENT_ENCODING";
63 "CURLE_LDAP_INVALID_URL";
64 "CURLE_FILESIZE_EXCEEDED";
65 "CURLE_FTP_SSL_FAILED";
66 "CURLE_SEND_FAIL_REWIND";
67 "CURLE_SSL_ENGINE_INITFAILED";
69 "CURLE_TFTP_NOTFOUND";
71 "CURLE_REMOTE_DISK_FULL";
73 "CURLE_TFTP_UNKNOWNID";
74 "CURLE_REMOTE_FILE_EXISTS";
75 "CURLE_TFTP_NOSUCHUSER";
78 "CURLE_SSL_CACERT_BADFILE";
79 "CURLE_REMOTE_FILE_NOT_FOUND";
81 "CURLE_SSL_SHUTDOWN_FAILED";
85 let pr fmt
= Printf.ksprintf print_endline fmt
88 match List.tl
@@ Array.to_list
@@ Sys.argv
with
90 all |> List.iteri
begin fun i s
->
93 pr " {\"%s\", %s}," s s
95 pr "#if HAVE_DECL_%s" s
;
96 pr "#if %s != %d" s i
;
97 pr "#warning error code mismatch: %s != %d" s i
;
99 pr " {\"%s\", %s}," s s
;
101 pr " {\"%s\", -1}," s
;
104 | "ml"::[] -> all |> List.iter
(pr " | %s")
106 Format.set_margin
80;
108 all |> List.iter
(function "CURLE_OK" -> () | s
-> Format.printf
"%s,@ " s
);
110 | _
-> failwith
"bad usage"