'
' CURL definitions based on libcurl/7.21.0 from http://curl.haxx.se/ - their license below.
'
' API description here: http://curl.haxx.se/libcurl/c/
'
' Ported to BaCon INCLUDE file by Doyle Whisenant.
' Minor modifications by Peter van Eerten
'
' Version 1.0: Initial release
' Version 1.1: Adapted for BaCon 3.0 and higher
'
'***************************************************************************
'                                  _   _ ____  _
'  Project                     ___| | | |  _ \| |
'                             / __| | | | |_) | |
'                            | (__| |_| |  _ <| |___
'                             \___|\___/|_| \_\_____|
'
' Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
'
' This software is licensed as described in the file COPYING, which
' you should have received as part of this distribution. The terms
' are also available at http://curl.haxx.se/docs/copyright.html.
'
' You may opt to use, copy, modify, merge, publish, distribute and/or sell
' copies of the Software, and permit persons to whom the Software is
' furnished to do so, under the terms of the COPYING file.
'
' This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
' KIND, either express or implied.
'
'***************************************************************************

CATCH GOTO handle_error

lib$ = "libcurl.so"
seq = -1

LABEL import_retry
    INCR seq
    retry = FALSE
    IMPORT "curl_easy_init" FROM lib$ TYPE long
    IF retry THEN GOTO import_retry

GOTO contin

LABEL handle_error
    ERROR = 0
    IF seq IS 0 THEN lib$ = "libcurl.so.0"
    ELSE lib$ = CONCAT$(LEFT$(lib$, INSTRREV(lib$, ".")), STR$(seq))
    IF seq < 50 THEN
        retry = TRUE
    ELSE
        PRINT "Curl library not found!"
        END
    END IF
    RESUME

LABEL contin

CATCH RESET

CONST HTTPPOST_FILENAME = 1<<0
CONST HTTPPOST_READFILE = 1<<1
CONST HTTPPOST_PTRNAME = 1<<2
CONST HTTPPOST_PTRCONTENTS = 1<<3
CONST HTTPPOST_BUFFER = 1<<4
CONST HTTPPOST_PTRBUFFER = 1<<5
CONST HTTPPOST_CALLBACK = 1<<6
CONST CURLPROTO_HTTP = 1<<0
CONST CURLPROTO_HTTPS = 1<<1
CONST CURLPROTO_FTP = 1<<2
CONST CURLPROTO_FTPS = 1<<3
CONST CURLPROTO_SCP = 1<<4
CONST CURLPROTO_SFTP = 1<<5
CONST CURLPROTO_TELNET = 1<<6
CONST CURLPROTO_LDAP = 1<<7
CONST CURLPROTO_LDAPS = 1<<8
CONST CURLPROTO_DICT = 1<<9
CONST CURLPROTO_FILE = 1<<10
CONST CURLPROTO_TFTP = 1<<11
CONST CURLPROTO_IMAP = 1<<12
CONST CURLPROTO_IMAPS = 1<<13
CONST CURLPROTO_POP3 = 1<<14
CONST CURLPROTO_POP3S = 1<<15
CONST CURLPROTO_SMTP = 1<<16
CONST CURLPROTO_SMTPS = 1<<17
CONST CURLPROTO_RTSP = 1<<18
CONST CURLPROTO_RTMP = 1<<19
CONST CURLPROTO_RTMPT = 1<<20
CONST CURLPROTO_RTMPE = 1<<21
CONST CURLPROTO_RTMPTE = 1<<22
CONST CURLPROTO_RTMPS = 1<<23
CONST CURLPROTO_RTMPTS = 1<<24
CONST CURL_HTTP_VERSION_NONE = 0
CONST CURL_HTTP_VERSION_1_0 = 1
CONST CURL_HTTP_VERSION_1_1 = 2
CONST CURL_RTSPREQ_NONE = 0
CONST CURL_RTSPREQ_OPTIONS = 1
CONST CURL_RTSPREQ_DESCRIBE = 2
CONST CURL_RTSPREQ_ANNOUNCE = 3
CONST CURL_RTSPREQ_SETUP = 4
CONST CURL_RTSPREQ_PLAY = 5
CONST CURL_RTSPREQ_PAUSE = 6
CONST CURL_RTSPREQ_TEARDOWN = 7
CONST CURL_RTSPREQ_GET_PARAMETER = 8
CONST CURL_RTSPREQ_SET_PARAMETER = 9
CONST CURL_RTSPREQ_RECORD = 10
CONST CURL_RTSPREQ_RECEIVE = 11
CONST CURL_NETRC_IGNORED = 0
CONST CURL_NETRC_OPTIONAL = 1
CONST CURL_NETRC_REQUIRED = 2
CONST CURL_SSLVERSION_DEFAULT = 0
CONST CURL_SSLVERSION_TLSv1 = 1
CONST CURL_SSLVERSION_SSLv2 = 2
CONST CURL_SSLVERSION_SSLv3 = 3
CONST CURLOPT_ADDRESS_SCOPE = 171
CONST CURLOPT_APPEND = 50
CONST CURLOPT_AUTOREFERER = 58
CONST CURLOPT_BUFFERSIZE = 98
CONST CURLOPT_CAINFO = 10065
CONST CURLOPT_CAPATH = 10097
CONST CURLOPT_CERTINFO = 172
CONST CURLOPT_CHUNK_BGN_FUNCTION = 20198
CONST CURLOPT_CHUNK_DATA = 10201
CONST CURLOPT_CHUNK_END_FUNCTION = 20199
CONST CURLOPT_CLOSEPOLICY = 72
CONST CURLOPT_CONNECT_ONLY = 141
CONST CURLOPT_CONNECTTIMEOUT = 78
CONST CURLOPT_CONNECTTIMEOUT_MS = 156
CONST CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142
CONST CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144
CONST CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143
CONST CURLOPT_COOKIE = 10022
CONST CURLOPT_COOKIEFILE = 10031
CONST CURLOPT_COOKIEJAR = 10082
CONST CURLOPT_COOKIELIST = 10135
CONST CURLOPT_COOKIESESSION = 96
CONST CURLOPT_COPYPOSTFIELDS = 10165
CONST CURLOPT_CRLF = 27
CONST CURLOPT_CRLFILE = 10169
CONST CURLOPT_CUSTOMREQUEST = 10036
CONST CURLOPT_DEBUGDATA = 10095
CONST CURLOPT_DEBUGFUNCTION = 20094
CONST CURLOPT_DIRLISTONLY = 48
CONST CURLOPT_DNS_CACHE_TIMEOUT = 92
CONST CURLOPT_DNS_USE_GLOBAL_CACHE = 91
CONST CURLOPT_EGDSOCKET = 10077
CONST CURLOPT_ENCODING = 10102
CONST CURLOPT_ERRORBUFFER = 10010
CONST CURLOPT_FAILONERROR = 45
CONST CURLOPT_FILE = 10001
CONST CURLOPT_FILETIME = 69
CONST CURLOPT_FNMATCH_DATA = 10202
CONST CURLOPT_FNMATCH_FUNCTION = 20200
CONST CURLOPT_FOLLOWLOCATION = 52
CONST CURLOPT_FORBID_REUSE = 75
CONST CURLOPT_FRESH_CONNECT = 74
CONST CURLOPT_FTP_ACCOUNT = 10134
CONST CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147
CONST CURLOPT_FTP_CREATE_MISSING_DIRS = 110
CONST CURLOPT_FTP_FILEMETHOD = 138
CONST CURLOPT_FTPPORT = 10017
CONST CURLOPT_FTP_RESPONSE_TIMEOUT = 112
CONST CURLOPT_FTP_SKIP_PASV_IP = 137
CONST CURLOPT_FTPSSLAUTH = 129
CONST CURLOPT_FTP_SSL_CCC = 154
CONST CURLOPT_FTP_USE_EPRT = 106
CONST CURLOPT_FTP_USE_EPSV = 85
CONST CURLOPT_FTP_USE_PRET = 188
CONST CURLOPT_HEADER = 42
CONST CURLOPT_HEADERFUNCTION = 20079
CONST CURLOPT_HTTP200ALIASES = 10104
CONST CURLOPT_HTTPAUTH = 107
CONST CURLOPT_HTTP_CONTENT_DECODING = 158
CONST CURLOPT_HTTPGET = 80
CONST CURLOPT_HTTPHEADER = 10023
CONST CURLOPT_HTTPPOST = 10024
CONST CURLOPT_HTTPPROXYTUNNEL = 61
CONST CURLOPT_HTTP_TRANSFER_DECODING = 157
CONST CURLOPT_HTTP_VERSION = 84
CONST CURLOPT_IGNORE_CONTENT_LENGTH = 136
CONST CURLOPT_INFILE = 10009
CONST CURLOPT_INFILESIZE = 14
CONST CURLOPT_INFILESIZE_LARGE = 30115
CONST CURLOPT_INTERFACE = 10062
CONST CURLOPT_INTERLEAVEDATA = 10195
CONST CURLOPT_INTERLEAVEFUNCTION = 20196
CONST CURLOPT_IOCTLDATA = 10131
CONST CURLOPT_IOCTLFUNCTION = 20130
CONST CURLOPT_IPRESOLVE = 113
CONST CURLOPT_ISSUERCERT = 10170
CONST CURLOPT_KEYPASSWD = 10026
CONST CURLOPT_KRBLEVEL = 10063
CONST CURLOPT_LOCALPORT = 139
CONST CURLOPT_LOCALPORTRANGE = 140
CONST CURLOPT_LOW_SPEED_LIMIT = 19
CONST CURLOPT_LOW_SPEED_TIME = 20
CONST CURLOPT_MAIL_FROM = 10186
CONST CURLOPT_MAIL_RCPT = 10187
CONST CURLOPT_MAXCONNECTS = 71
CONST CURLOPT_MAXFILESIZE = 114
CONST CURLOPT_MAXFILESIZE_LARGE = 30117
CONST CURLOPT_MAX_RECV_SPEED_LARGE = 30146
CONST CURLOPT_MAXREDIRS = 68
CONST CURLOPT_MAX_SEND_SPEED_LARGE = 30145
CONST CURLOPT_NETRC = 51
CONST CURLOPT_NETRC_FILE = 10118
CONST CURLOPT_NEW_DIRECTORY_PERMS = 160
CONST CURLOPT_NEW_FILE_PERMS = 159
CONST CURLOPT_NOBODY = 44
CONST CURLOPT_NOPROGRESS = 43
CONST CURLOPT_NOPROXY = 10177
CONST CURLOPT_NOSIGNAL = 99
CONST CURLOPT_OPENSOCKETDATA = 10164
CONST CURLOPT_OPENSOCKETFUNCTION = 20163
CONST CURLOPT_PASSWORD = 10174
CONST CURLOPT_PORT = 3
CONST CURLOPT_POST = 47
CONST CURLOPT_POSTFIELDS = 10015
CONST CURLOPT_POSTFIELDSIZE = 60
CONST CURLOPT_POSTFIELDSIZE_LARGE = 30120
CONST CURLOPT_POSTQUOTE = 10039
CONST CURLOPT_POSTREDIR = 161
CONST CURLOPT_PREQUOTE = 10093
CONST CURLOPT_PRIVATE = 10103
CONST CURLOPT_PROGRESSDATA = 10057
CONST CURLOPT_PROGRESSFUNCTION = 20056
CONST CURLOPT_PROTOCOLS = 181
CONST CURLOPT_PROXY = 10004
CONST CURLOPT_PROXYAUTH = 111
CONST CURLOPT_PROXYPASSWORD = 10176
CONST CURLOPT_PROXYPORT = 59
CONST CURLOPT_PROXY_TRANSFER_MODE = 166
CONST CURLOPT_PROXYTYPE = 101
CONST CURLOPT_PROXYUSERNAME = 10175
CONST CURLOPT_PROXYUSERPWD = 10006
CONST CURLOPT_PUT = 54
CONST CURLOPT_QUOTE = 10028
CONST CURLOPT_RANDOM_FILE = 10076
CONST CURLOPT_RANGE = 10007
CONST CURLOPT_READFUNCTION = 20012
CONST CURLOPT_REDIR_PROTOCOLS = 182
CONST CURLOPT_REFERER = 10016
CONST CURLOPT_RESUME_FROM = 21
CONST CURLOPT_RESUME_FROM_LARGE = 30116
CONST CURLOPT_RTSP_CLIENT_CSEQ = 193
CONST CURLOPT_RTSP_REQUEST = 189
CONST CURLOPT_RTSP_SERVER_CSEQ = 194
CONST CURLOPT_RTSP_SESSION_ID = 10190
CONST CURLOPT_RTSP_STREAM_URI = 10191
CONST CURLOPT_RTSP_TRANSPORT = 10192
CONST CURLOPT_SEEKDATA = 10168
CONST CURLOPT_SEEKFUNCTION = 20167
CONST CURLOPT_SHARE = 10100
CONST CURLOPT_SOCKOPTDATA = 10149
CONST CURLOPT_SOCKOPTFUNCTION = 20148
CONST CURLOPT_SOCKS5_GSSAPI_NEC = 180
CONST CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179
CONST CURLOPT_SSH_AUTH_TYPES = 151
CONST CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162
CONST CURLOPT_SSH_KEYDATA = 10185
CONST CURLOPT_SSH_KEYFUNCTION = 20184
CONST CURLOPT_SSH_KNOWNHOSTS = 10183
CONST CURLOPT_SSH_PRIVATE_KEYFILE = 10153
CONST CURLOPT_SSH_PUBLIC_KEYFILE = 10152
CONST CURLOPT_SSLCERT = 10025
CONST CURLOPT_SSLCERTTYPE = 10086
CONST CURLOPT_SSL_CIPHER_LIST = 10083
CONST CURLOPT_SSL_CTX_DATA = 10109
CONST CURLOPT_SSL_CTX_FUNCTION = 20108
CONST CURLOPT_SSLENGINE = 10089
CONST CURLOPT_SSLENGINE_DEFAULT = 90
CONST CURLOPT_SSLKEY = 10087
CONST CURLOPT_SSLKEYTYPE = 10088
CONST CURLOPT_SSL_SESSIONID_CACHE = 150
CONST CURLOPT_SSL_VERIFYHOST = 81
CONST CURLOPT_SSL_VERIFYPEER = 64
CONST CURLOPT_SSLVERSION = 32
CONST CURLOPT_STDERR = 10037
CONST CURLOPT_TCP_NODELAY = 121
CONST CURLOPT_TELNETOPTIONS = 10070
CONST CURLOPT_TFTP_BLKSIZE = 178
CONST CURLOPT_TIMECONDITION = 33
CONST CURLOPT_TIMEOUT = 13
CONST CURLOPT_TIMEOUT_MS = 155
CONST CURLOPT_TIMEVALUE = 34
CONST CURLOPT_TRANSFERTEXT = 53
CONST CURLOPT_UNRESTRICTED_AUTH = 105
CONST CURLOPT_UPLOAD = 46
CONST CURLOPT_URL = 10002
CONST CURLOPT_USERAGENT = 10018
CONST CURLOPT_USERNAME = 10173
CONST CURLOPT_USERPWD = 10005
CONST CURLOPT_USE_SSL = 119
CONST CURLOPT_VERBOSE = 41
CONST CURLOPT_WILDCARDMATCH = 197
CONST CURLOPT_WRITEFUNCTION = 20011
CONST CURLOPT_WRITEHEADER = 10029
CONST CURLOPT_WRITEINFO = 10040
CONST CURLOPT_WRITEDATA = CURLOPT_FILE
CONST CURLOPT_READDATA = CURLOPT_INFILE
CONST CURLOPT_HEADERDATA = CURLOPT_WRITEHEADER
CONST CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER
CONST CURL_REDIR_GET_ALL = 0
CONST CURL_REDIR_POST_301 = 1
CONST CURL_REDIR_POST_302 = 2
CONST CURLFORM_COPYNAME = 1
CONST CURLFORM_PTRNAME = 2
CONST CURLFORM_NAMELENGTH = 3
CONST CURLFORM_COPYCONTENTS = 4
CONST CURLFORM_PTRCONTENTS = 5
CONST CURLFORM_CONTENTSLENGTH = 6
CONST CURLFORM_FILECONTENT = 7
CONST CURLFORM_ARRAY = 8
CONST CURLFORM_OBSOLETE = 9
CONST CURLFORM_FILE = 10
CONST CURLFORM_BUFFER = 11
CONST CURLFORM_BUFFERPTR = 12
CONST CURLFORM_BUFFERLENGTH = 13
CONST CURLFORM_CONTENTTYPE = 14
CONST CURLFORM_CONTENTHEADER = 15
CONST CURLFORM_FILENAME = 16
CONST CURLFORM_END = 17
CONST CURLFORM_OBSOLETE2 = 18
CONST CURLFORM_STREAM = 19
CONST CURL_FORMADD_MEMORY = 1
CONST CURL_FORMADD_OPTION_TWICE = 2
CONST CURL_FORMADD_NULL = 3
CONST CURL_FORMADD_UNKNOWN_OPTION = 4
CONST CURL_FORMADD_INCOMPLETE = 5
CONST CURL_FORMADD_ILLEGAL_ARRAY = 6
CONST CURL_FORMADD_DISABLED = 7
CONST CURLINFO_STRING = 0x100000
CONST CURLINFO_LONG = 0x200000
CONST CURLINFO_DOUBLE = 0x300000
CONST CURLINFO_SLIST = 0x400000
CONST CURLINFO_MASK = 0x0fffff
CONST CURLINFO_TYPEMASK = 0xf00000
CONST CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1
CONST CURLINFO_RESPONSE_CODE = CURLINFO_LONG   + 2
CONST CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3
CONST CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4
CONST CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5
CONST CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6
CONST CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7
CONST CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8
CONST CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9
CONST CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10
CONST CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11
CONST CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12
CONST CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13
CONST CURLINFO_FILETIME = CURLINFO_LONG + 14
CONST CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15
CONST CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16
CONST CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17
CONST CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18
CONST CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19
CONST CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20
CONST CURLINFO_PRIVATE = CURLINFO_STRING + 21
CONST CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22
CONST CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23
CONST CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24
CONST CURLINFO_OS_ERRNO = CURLINFO_LONG + 25
CONST CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26
CONST CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27
CONST CURLINFO_COOKIELIST = CURLINFO_SLIST + 28
CONST CURLINFO_LASTSOCKET = CURLINFO_LONG + 29
CONST CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30
CONST CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31
CONST CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32
CONST CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33
CONST CURLINFO_CERTINFO = CURLINFO_SLIST + 34
CONST CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35
CONST CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36
CONST CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37
CONST CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38
CONST CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39
CONST CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40
CONST CURLINFO_LOCAL_IP = CURLINFO_STRING + 41
CONST CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42
CONST CURLCLOSEPOLICY_OLDEST = 1
CONST CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2
CONST CURLCLOSEPOLICY_LEAST_TRAFFIC = 3
CONST CURLCLOSEPOLICY_SLOWEST = 4
CONST CURLCLOSEPOLICY_CALLBACK = 5
CONST CURLVERSION_FIRST = 0
CONST CURLVERSION_SECOND = 1
CONST CURLVERSION_THIRD = 2
CONST CURLVERSION_FOURTH = 3
CONST CURL_VERSION_IPV6 = 1<<0
CONST CURL_VERSION_KERBEROS4 = 1<<1
CONST CURL_VERSION_SSL = 1<<2
CONST CURL_VERSION_LIBZ = 1<<3
CONST CURL_VERSION_NTLM = 1<<4
CONST CURL_VERSION_GSSNEGOTIATE = 1<<5
CONST CURL_VERSION_DEBUG = 1<<6
CONST CURL_VERSION_ASYNCHDNS = 1<<7
CONST CURL_VERSION_SPNEGO = 1<<8
CONST CURL_VERSION_LARGEFILE = 1<<9
CONST CURL_VERSION_IDN = 1<<10
CONST CURL_VERSION_SSPI = 1<<11
CONST CURL_VERSION_CONV = 1<<12
CONST CURL_VERSION_CURLDEBUG = 1<<13
CONST CURLPAUSE_RECV = 1<<0
CONST CURLPAUSE_RECV_CONT = 0
CONST CURLPAUSE_SEND = 1<<2
CONST CURLPAUSE_SEND_CONT = 0
CONST CURLPAUSE_ALL = CURLPAUSE_RECV|CURLPAUSE_SEND
CONST CURLPAUSE_CONT = CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT
CONST CURL_GLOBAL_SSL = (1<<0)
CONST CURL_GLOBAL_WIN32 = (1<<1)
CONST CURL_GLOBAL_ALL = (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
CONST CURL_GLOBAL_NOTHING = 0
CONST CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL

IMPORT "curl_easy_cleanup(long)" FROM lib$ TYPE void
IMPORT "curl_easy_duphandle(long)" FROM lib$ TYPE long
IMPORT "curl_easy_escape(long,char*,int)" FROM lib$ TYPE char* ALIAS curl_easy_escape$
IMPORT "curl_easy_getinfo(long,int,...)" FROM lib$ TYPE int
IMPORT "curl_easy_pause(long,int)" FROM lib$ TYPE int
IMPORT "curl_easy_perform(long)" FROM lib$ TYPE int
IMPORT "curl_easy_recv(long,void*,int,int*)" FROM lib$ TYPE int
IMPORT "curl_easy_reset(long)" FROM lib$ TYPE void
IMPORT "curl_easy_send(long,void*,int,int*)" FROM lib$ TYPE int
IMPORT "curl_easy_setopt(long,int,...)" FROM lib$ TYPE int
IMPORT "curl_easy_strerror(int)" FROM lib$ TYPE char* ALIAS curl_easy_strerror$
IMPORT "curl_easy_unescape(long,char*,int,int*)" FROM lib$ TYPE char* ALIAS curl_easy_unescape$
IMPORT "curl_escape(char*,int)" FROM lib$ TYPE char* ALIAS curl_escape$
IMPORT "curl_formadd(long**,long**,...)" FROM lib$ TYPE int
IMPORT "curl_formfree(long*)" FROM lib$ TYPE void
IMPORT "curl_free(char*)" FROM lib$ TYPE void
IMPORT "curl_getdate(char*, int*)" FROM lib$ TYPE int
IMPORT "curl_global_cleanup" FROM lib$ TYPE void
IMPORT "curl_global_init(long)" FROM lib$ TYPE int
IMPORT "curl_global_init_mem(long,void*,void*,void*,void*,void*)" FROM lib$ TYPE int
IMPORT "curl_slist_append(long*,char*)" FROM lib$ TYPE long
IMPORT "curl_slist_free_all(long*)" FROM lib$ TYPE void
IMPORT "curl_unescape(char*,int)" FROM lib$ TYPE char* ALIAS curl_unescape$
IMPORT "curl_version" FROM lib$ TYPE char* ALIAS curl_version$
IMPORT "curl_version_info(int)" FROM lib$ TYPE long