8 CURLE_UNSUPPORTED_PROTOCOL
11 CURLE_URL_MALFORMAT_USER
12 CURLE_COULDNT_RESOLVE_PROXY
13 CURLE_COULDNT_RESOLVE_HOST
15 CURLE_FTP_WEIRD_SERVER_REPLY
16 CURLE_FTP_ACCESS_DENIED
17 CURLE_FTP_USER_PASSWORD_INCORRECT
18 CURLE_FTP_WEIRD_PASS_REPLY
19 CURLE_FTP_WEIRD_USER_REPLY
20 CURLE_FTP_WEIRD_PASV_REPLY
21 CURLE_FTP_WEIRD_227_FORMAT
22 CURLE_FTP_CANT_GET_HOST
23 CURLE_FTP_CANT_RECONNECT
24 CURLE_FTP_COULDNT_SET_BINARY
26 CURLE_FTP_COULDNT_RETR_FILE
29 CURLE_HTTP_RETURNED_ERROR
32 CURLE_FTP_COULDNT_STOR_FILE
35 CURLE_OPERATION_TIMEOUTED
36 CURLE_FTP_COULDNT_SET_ASCII
38 CURLE_FTP_COULDNT_USE_REST
39 CURLE_FTP_COULDNT_GET_SIZE
40 CURLE_HTTP_RANGE_ERROR
42 CURLE_SSL_CONNECT_ERROR
43 CURLE_BAD_DOWNLOAD_RESUME
44 CURLE_FILE_COULDNT_READ_FILE
45 CURLE_LDAP_CANNOT_BIND
46 CURLE_LDAP_SEARCH_FAILED
47 CURLE_LIBRARY_NOT_FOUND
48 CURLE_FUNCTION_NOT_FOUND
49 CURLE_ABORTED_BY_CALLBACK
50 CURLE_BAD_FUNCTION_ARGUMENT
51 CURLE_BAD_CALLING_ORDER
52 CURLE_INTERFACE_FAILED
53 CURLE_BAD_PASSWORD_ENTERED
54 CURLE_TOO_MANY_REDIRECTS
55 CURLE_UNKNOWN_TELNET_OPTION
56 CURLE_TELNET_OPTION_SYNTAX
57 CURLE_SSL_PEER_CERTIFICATE
59 CURLE_SSL_ENGINE_NOTFOUND
60 CURLE_SSL_ENGINE_SETFAILED
67 CURLE_BAD_CONTENT_ENCODING
68 CURLE_LDAP_INVALID_URL
69 CURLE_FILESIZE_EXCEEDED
71 CURLE_SEND_FAIL_REWIND
72 CURLE_SSL_ENGINE_INITFAILED
76 CURLE_REMOTE_DISK_FULL
79 CURLE_REMOTE_FILE_EXISTS
83 CURLE_SSL_CACERT_BADFILE
84 CURLE_REMOTE_FILE_NOT_FOUND
86 CURLE_SSL_SHUTDOWN_FAILED
90 let pr fmt
= Printf.ksprintf print_endline fmt
93 let l = String.nsplit
all "\n" |> List.map
String.strip
|> List.filter
((<>) "") in
94 match List.tl
@@ Array.to_list
@@ Sys.argv
with
96 l |> List.iteri
begin fun i s
->
99 pr " {\"%s\", %s}," s s
101 pr "#if HAVE_DECL_%s" s
;
102 pr "#if %s != %d" s i
;
103 pr "#warning error code mismatch: %s != %d" s i
;
105 pr " {\"%s\", %s}," s s
;
107 pr " {\"%s\", -1}," s
;
110 | "ml"::[] -> l |> List.iter
(pr " | %s")
112 Format.set_margin
80;
114 l |> List.iter
(function "CURLE_OK" -> () | s
-> Format.printf
"%s,@ " s
);
116 | _
-> failwith
"bad usage"