repo_name
string
dataset
string
owner
string
lang
string
func_name
string
code
string
docstring
string
url
string
sha
string
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_meets_timecondition
bool Curl_meets_timecondition(struct SessionHandle *data, time_t timeofdoc) { if((timeofdoc == 0) || (data->set.timevalue == 0)) return TRUE; switch(data->set.timecondition) { case CURL_TIMECOND_IFMODSINCE: default: if(timeofdoc <= data->set.timevalue) { infof(data, "The requested doc...
/* * Check to see if CURLOPT_TIMECONDITION was met by comparing the time of the * remote document with the time provided by CURLOPT_TIMEVAL */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L339-L365
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
readwrite_data
static CURLcode readwrite_data(struct SessionHandle *data, struct connectdata *conn, struct SingleRequest *k, int *didwhat, bool *done) { CURLcode result = CURLE_OK; ssize_t nread; /* number of bytes read */ size_t excess...
/* * Go ahead and do a read if we have a readable socket or if * the stream was rewound (in which case we have data in a * buffer) */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L372-L774
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
readwrite_upload
static CURLcode readwrite_upload(struct SessionHandle *data, struct connectdata *conn, struct SingleRequest *k, int *didwhat) { ssize_t i, si; ssize_t bytes_written; CURLcode result; ssize_t nread; /* number of by...
/* * Send data to upload to the server, when the socket is writable. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L779-L975
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_readwrite
CURLcode Curl_readwrite(struct connectdata *conn, bool *done) { struct SessionHandle *data = conn->data; struct SingleRequest *k = &data->req; CURLcode result; int didwhat=0; curl_socket_t fd_read; curl_socket_t fd_write; int select_res = conn->cselect_bits; conn->cselect_bits ...
/* * Curl_readwrite() is the low-level function to be called when data is to * be read and written to/from the connection. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L981-L1139
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_single_getsock
int Curl_single_getsock(const struct connectdata *conn, curl_socket_t *sock, /* points to numsocks number of sockets */ int numsocks) { const struct SessionHandle *data = conn->data; int bitmap = GETSOCK_BLANK; unsigne...
/* * Curl_single_getsock() gets called by the multi interface code when the app * has requested to get the sockets for the current connection. This function * will then be called once for every connection that the multi interface * keeps track of. This function will only be called for connections that are * in the...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L1148-L1192
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_sleep_time
long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps, int pkt_size) { curl_off_t min_sleep = 0; curl_off_t rv = 0; if(rate_bps == 0) return 0; /* If running faster than about .1% of the desired speed, slow * us down a bit. Use shift instead of division as the ...
/* * Determine optimum sleep time based on configured rate, current rate, * and packet size. * Returns value in milliseconds. * * The basic idea is to adjust the desired rate up/down in this method * based on whether we are running too slow or too fast. Then, calculate * how many milliseconds to wait for the ne...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L1204-L1246
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_pretransfer
CURLcode Curl_pretransfer(struct SessionHandle *data) { CURLcode res; if(!data->change.url) { /* we can't do anything without URL */ failf(data, "No URL set!"); return CURLE_URL_MALFORMAT; } /* Init the SSL session ID cache here. We do it here since we want to do it after the *_setopt() calls ...
/* * Curl_pretransfer() is called immediately before a transfer starts. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L1251-L1319
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_posttransfer
CURLcode Curl_posttransfer(struct SessionHandle *data) { #if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL) /* restore the signal handler for SIGPIPE before we get back */ if(!data->set.no_signal) signal(SIGPIPE, data->state.prev_signal); #else (void)data; /* unused parameter */ #endi...
/* * Curl_posttransfer() is called immediately after a transfer ends */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L1324-L1335
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
strlen_url
static size_t strlen_url(const char *url) { const char *ptr; size_t newlen=0; bool left=TRUE; /* left side of the ? */ for(ptr=url; *ptr; ptr++) { switch(*ptr) { case '?': left=FALSE; /* fall through */ default: newlen++; break; case ' ': if(left) newlen+=3...
/* * strlen_url() returns the length of the given URL if the spaces within the * URL were properly URL encoded. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L1342-L1365
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
strcpy_url
static void strcpy_url(char *output, const char *url) { /* we must add this with whitespace-replacing */ bool left=TRUE; const char *iptr; char *optr = output; for(iptr = url; /* read from here */ *iptr; /* until zero byte */ iptr++) { switch(*iptr) { case '?': left=FALSE;...
/* strcpy_url() copies a url to a output buffer and URL-encodes the spaces in * the source URL accordingly. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L1370-L1399
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
is_absolute_url
static bool is_absolute_url(const char *url) { char prot[16]; /* URL protocol string storage */ char letter; /* used for a silly sscanf */ return (2 == sscanf(url, "%15[^?&/:]://%c", prot, &letter)) ? TRUE : FALSE; }
/* * Returns true if the given URL is absolute (as opposed to relative) */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L1404-L1410
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_follow
CURLcode Curl_follow(struct SessionHandle *data, char *newurl, /* this 'newurl' is the Location: string, and it must be malloc()ed before passed here */ followtype type) /* see transfer.h */ { #ifdef CU...
/* CURL_DISABLE_HTTP */ /* * Curl_follow() handles the URL redirect magic. Pass in the 'newurl' string * as given by the remote server and set up the new URL to request. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L1574-L1776
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_retry_request
CURLcode Curl_retry_request(struct connectdata *conn, char **url) { struct SessionHandle *data = conn->data; *url = NULL; /* if we're talking upload, we can't do the checks below, unless the protocol is HTTP as when uploading over HTTP we will still get a response */ if(data->...
/* Returns CURLE_OK *and* sets '*url' if a request retry is wanted. NOTE: that the *url is malloc()ed. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L1838-L1879
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_setup_transfer
void Curl_setup_transfer( struct connectdata *conn, /* connection data */ int sockindex, /* socket index to read from or -1 */ curl_off_t size, /* -1 if unknown at this point */ bool getheader, /* TRUE if header parsing is wanted */ curl_off_t *bytecountp, /* return number of b...
/* * Curl_setup_transfer() is called to setup some basic properties for the * upcoming transfer. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/transfer.c#L1885-L1964
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_close
CURLcode Curl_close(struct SessionHandle *data) { struct Curl_multi *m; if(!data) return CURLE_OK; Curl_expire(data, 0); /* shut off timers */ m = data->multi; if(m) /* This handle is still part of a multi handle, take care of this first and detach this handle from there. */ curl_multi_...
/* * This is the internal function curl_easy_cleanup() calls. This should * cleanup and free all resources associated with this sessionhandle. * * NOTE: if we ever add something that attempts to write to a socket or * similar here, we must ignore SIGPIPE first. It is currently only done * when curl_easy_perform()...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L366-L450
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_init_userdefined
CURLcode Curl_init_userdefined(struct UserDefined *set) { CURLcode res = CURLE_OK; set->out = stdout; /* default output to stdout */ set->in = stdin; /* default input from stdin */ set->err = stderr; /* default stderr to stderr */ /* use fwrite as default function to store output */ set->fwrite_func =...
/* * Initialize the UserDefined fields within a SessionHandle. * This may be safely called on a new or existing SessionHandle. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L456-L559
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_open
CURLcode Curl_open(struct SessionHandle **curl) { CURLcode res = CURLE_OK; struct SessionHandle *data; CURLcode status; /* Very simple start-up: alloc the struct, init it with zeroes and return */ data = calloc(1, sizeof(struct SessionHandle)); if(!data) { /* this is a very serious error */ DEBUGF(...
/** * Curl_open() * * @param curl is a pointer to a sessionhandle pointer that gets set by this * function. * @return CURLcode */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L569-L634
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
SocketIsDead
static bool SocketIsDead(curl_socket_t sock) { int sval; bool ret_val = TRUE; sval = Curl_socket_ready(sock, CURL_SOCKET_BAD, 0); if(sval == 0) /* timeout */ ret_val = FALSE; return ret_val; }
/* * This function should return TRUE if the socket is to be assumed to * be dead. Most commonly this happens when the server has closed the * connection due to inactivity. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L2587-L2598
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_printPipeline
static void Curl_printPipeline(struct curl_llist *pipeline) { struct curl_llist_element *curr; curr = pipeline->head; while(curr) { struct SessionHandle *data = (struct SessionHandle *) curr->ptr; infof(data, "Handle in pipeline: %s\n", data->state.path); curr = curr->next; } }
/* this code is saved here as it is useful for debugging purposes */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L2647-L2657
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_getoff_all_pipelines
void Curl_getoff_all_pipelines(struct SessionHandle *data, struct connectdata *conn) { bool recv_head = (conn->readchannel_inuse && (gethandleathead(conn->recv_pipe) == data)) ? TRUE : FALSE; bool send_head = (conn->writechannel_inuse && (gethandleathead(conn->send_pipe) == d...
/* remove the specified connection from all (possible) pipelines and related queues */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L2672-L2687
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
ConnectionExists
static bool ConnectionExists(struct SessionHandle *data, struct connectdata *needle, struct connectdata **usethis) { struct connectdata *check; struct connectdata *chosen = 0; bool canPipeline = IsPipeliningPossible(data, needle); bool wantNTLM = (data->state.authhost.want==CUR...
/* * Given one filled in connection struct (named needle), this function should * detect if there already is one that has all the significant details * exactly the same and thus should be used instead. * * If there is a match, this function returns TRUE - and has marked the * connection as 'in-use'. It must later...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L2777-L3016
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
ConnectionDone
static bool ConnectionDone(struct SessionHandle *data, struct connectdata *conn) { /* data->multi->maxconnects can be negative, deal with it. */ size_t maxconnects = (data->multi->maxconnects < 0) ? 0 : data->multi->maxconnects; struct connectdata *conn_candidate = NULL; /* Mark the current connection as '...
/* Mark the connection as 'idle', or close it if the cache is full. Returns TRUE if the connection is kept, or FALSE if it was closed. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3020-L3047
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
ConnectionStore
static CURLcode ConnectionStore(struct SessionHandle *data, struct connectdata *conn) { static int connection_id_counter = 0; CURLcode result; /* Assign a number to the connection for easier tracking in the log output */ conn->connection_id = connection_id_counter++; re...
/* * The given input connection struct pointer is to be stored in the connection * cache. If the cache is already full, least interesting existing connection * (if any) gets closed. * * The given connection should be unique. That must've been checked prior to * this call. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3057-L3073
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_connected_proxy
CURLcode Curl_connected_proxy(struct connectdata *conn) { switch(conn->proxytype) { #ifndef CURL_DISABLE_PROXY case CURLPROXY_SOCKS5: case CURLPROXY_SOCKS5_HOSTNAME: return Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, conn->host.name, conn->remote_port, FIRSTSO...
/* after a TCP connection to the proxy has been verified, this function does the next magic step. Note: this function's sub-functions call failf() */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3081-L3109
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_protocol_connecting
CURLcode Curl_protocol_connecting(struct connectdata *conn, bool *done) { CURLcode result=CURLE_OK; if(conn && conn->handler->connecting) { *done = FALSE; result = conn->handler->connecting(conn, done); } else *done = TRUE; return result; }
/* * We are doing protocol-specific connecting and this is being called over and * over from the multi interface until the connection phase is done on * protocol layer. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3191-L3204
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_protocol_doing
CURLcode Curl_protocol_doing(struct connectdata *conn, bool *done) { CURLcode result=CURLE_OK; if(conn && conn->handler->doing) { *done = FALSE; result = conn->handler->doing(conn, done); } else *done = TRUE; return result; }
/* * We are DOING this is being called over and over from the multi interface * until the DOING phase is done on protocol layer. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3211-L3223
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_protocol_connect
CURLcode Curl_protocol_connect(struct connectdata *conn, bool *protocol_done) { CURLcode result=CURLE_OK; *protocol_done = FALSE; if(conn->bits.tcpconnect[FIRSTSOCKET] && conn->bits.protoconnstart) { /* We already are connected, get back. This may happen when the connect ...
/* * We have discovered that the TCP connection has been successful, we can now * proceed with some action. * */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3230-L3278
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
is_ASCII_name
static bool is_ASCII_name(const char *hostname) { const unsigned char *ch = (const unsigned char*)hostname; while(*ch) { if(*ch++ & 0x80) return FALSE; } return TRUE; }
/* * Helpers for IDNA convertions. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3283-L3292
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tld_check_name
static bool tld_check_name(struct SessionHandle *data, const char *ace_hostname) { size_t err_pos; char *uc_name = NULL; int rc; #ifndef CURL_DISABLE_VERBOSE_STRINGS const char *tld_errmsg = "<no msg>"; #else (void)data; #endif /* Convert (and downcase) ACE-name back into locale'...
/* * Check if characters in hostname is allowed in Top Level Domain. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3298-L3335
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
fix_hostname
static void fix_hostname(struct SessionHandle *data, struct connectdata *conn, struct hostname *host) { #ifndef USE_LIBIDN (void)data; (void)conn; #elif defined(CURL_DISABLE_VERBOSE_STRINGS) (void)conn; #endif /* set the name we use to display the host name */ host->dispname = host->...
/* * Perform any necessary IDN conversion of hostname */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3341-L3394
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
parseurlandfillconn
static CURLcode parseurlandfillconn(struct SessionHandle *data, struct connectdata *conn, bool *prot_missing, char *user, char *passwd) { char *at; char *fragment; char *...
/* * Parse URL and fill in the relevant members of the connection struct. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3573-L3808
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
setup_range
static CURLcode setup_range(struct SessionHandle *data) { struct UrlState *s = &data->state; s->resume_from = data->set.set_resume_from; if(s->resume_from || data->set.str[STRING_SET_RANGE]) { if(s->rangestringalloc) free(s->range); if(s->resume_from) s->range = aprintf("%" FORMAT_OFF_TU "-",...
/* * If we're doing a resumed transfer, we need to setup our stuff * properly. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3814-L3839
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
setup_connection_internals
static CURLcode setup_connection_internals(struct connectdata *conn) { const struct Curl_handler * p; CURLcode result; conn->socktype = SOCK_STREAM; /* most of them are TCP streams */ /* Scan protocol handler table. */ /* Perform setup complement if some. */ p = conn->handler; if(p->setup_connection) ...
/*************************************************************** * Setup connection internals specific to the requested protocol. * This MUST get called after proxy magic has been figured out. ***************************************************************/
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3846-L3874
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
check_noproxy
static bool check_noproxy(const char* name, const char* no_proxy) { /* no_proxy=domain1.dom,host.domain2.dom * (a comma-separated list of hosts which should * not be proxied, or an asterisk to override * all proxy variables) */ size_t tok_start; size_t tok_end; const char* separator = ", "; ...
/**************************************************************** * Checks if the host is in the noproxy list. returns true if it matches * and therefore the proxy should NOT be used. ****************************************************************/
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L3881-L3949
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
parse_proxy
static CURLcode parse_proxy(struct SessionHandle *data, struct connectdata *conn, char *proxy) { char *prox_portno; char *endofprot; /* We use 'proxyptr' to point to the proxy name from now on... */ char *proxyptr; char *portptr; char *atsign; /* We do the proxy host string p...
/* * If this is supposed to use a proxy, we need to figure out the proxy * host name, so that we can re-use an existing connection * that may exist registered to the same proxy host. * proxy will be freed before this function returns. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L4046-L4179
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
parse_proxy_auth
static CURLcode parse_proxy_auth(struct SessionHandle *data, struct connectdata *conn) { char proxyuser[MAX_CURL_USER_LENGTH]=""; char proxypasswd[MAX_CURL_PASSWORD_LENGTH]=""; if(data->set.str[STRING_PROXYUSERNAME] != NULL) { strncpy(proxyuser, data->set.str[STRING_PROXYUSER...
/* * Extract the user and password from the authentication string */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L4184-L4210
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
parse_url_userpass
static CURLcode parse_url_userpass(struct SessionHandle *data, struct connectdata *conn, char *user, char *passwd) { /* At this point, we're hoping all the other special cases have * been taken care of, so conn->host.name is at most * [use...
/* CURL_DISABLE_PROXY */ /* * * Parse a user name and password in the URL and strip it out of the host name * * Inputs: data->set.use_netrc (CURLOPT_NETRC) * conn->host.name * * Outputs: (almost :- all currently undefined) * conn->bits.user_passwd - non-zero if non-default passwords exist * ...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L4226-L4297
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
parse_remote_port
static CURLcode parse_remote_port(struct SessionHandle *data, struct connectdata *conn) { char *portptr; char endbracket; /* Note that at this point, the IPv6 address cannot contain any scope suffix as that has already been removed in the parseurlandfillconn() function...
/************************************************************* * Figure out the remote port number and fix it in the URL * * No matter if we use a proxy or not, we have to figure out the remote * port number of various reasons. * * To be able to detect port number flawlessly, we must not confuse them * IPv6-spec...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L4313-L4416
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
override_userpass
static void override_userpass(struct SessionHandle *data, struct connectdata *conn, char *user, char *passwd) { if(data->set.str[STRING_USERNAME] != NULL) { strncpy(user, data->set.str[STRING_USERNAME], MAX_CURL_USER_LENGTH); user[MAX_CURL_USER_LENGT...
/* * Override a user name and password from the URL with that in the * CURLOPT_USERPWD option or a .netrc file, if applicable. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L4422-L4453
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
set_userpass
static CURLcode set_userpass(struct connectdata *conn, const char *user, const char *passwd) { /* If our protocol needs a password and we have none, use the defaults */ if((conn->handler->flags & PROTOPT_NEEDSPWD) && !conn->bits.user_passwd) { conn->user = strdup(CURL_DEFAULT_...
/* * Set password so it's available in the connection. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L4458-L4484
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
resolve_server
static CURLcode resolve_server(struct SessionHandle *data, struct connectdata *conn, bool *async) { CURLcode result=CURLE_OK; long timeout_ms = Curl_timeleft(data, NULL, TRUE); /************************************************************* * Resolv...
/************************************************************* * Resolve the address of the server or proxy *************************************************************/
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L4489-L4560
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
reuse_conn
static void reuse_conn(struct connectdata *old_conn, struct connectdata *conn) { if(old_conn->proxy.rawalloc) free(old_conn->proxy.rawalloc); /* free the SSL config struct from this connection struct as this was allocated in vain and is targeted for destruction */ Curl_free_ssl_co...
/* * Cleanup the connection just allocated before we can move along and use the * previously existing one. All relevant data is copied over and old_conn is * ready for freeing once this function returns. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L4567-L4631
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
create_conn
static CURLcode create_conn(struct SessionHandle *data, struct connectdata **in_connect, bool *async) { CURLcode result=CURLE_OK; struct connectdata *conn; struct connectdata *conn_temp = NULL; size_t urllen; char user[MAX_CURL_USER_LENGTH]; char passw...
/** * create_conn() sets up a new connectdata struct, or re-uses an already * existing one, and resolves host name. * * if this function returns CURLE_OK and *async is set to TRUE, the resolve * response will be coming asynchronously. If *async is FALSE, the name is * already resolved. * * @param data The sessi...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L4649-L5019
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_setup_conn
CURLcode Curl_setup_conn(struct connectdata *conn, bool *protocol_done) { CURLcode result = CURLE_OK; struct SessionHandle *data = conn->data; Curl_pgrsTime(data, TIMER_NAMELOOKUP); if(conn->handler->flags & PROTOPT_NONETWORK) { /* nothing to setup when not using a network */ ...
/* Curl_setup_conn() is called after the name resolve initiated in * create_conn() is all done. * * Curl_setup_conn() also handles reused connections * * conn->data MUST already have been setup fine (in create_conn) */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L5029-L5139
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
do_init
static CURLcode do_init(struct connectdata *conn) { struct SessionHandle *data = conn->data; struct SingleRequest *k = &data->req; conn->bits.done = FALSE; /* Curl_done() is not called yet */ conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to use */ data->state.expect100header = FALSE; ...
/* * do_init() inits the readwrite session. This is inited each time (in the DO * function before the protocol-specific DO functions are invoked) for a * transfer, sometimes multiple times on the same SessionHandle. Make sure * nothing in here depends on stuff that are setup dynamically for the * transfer. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L5293-L5333
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
do_complete
static void do_complete(struct connectdata *conn) { conn->data->req.chunk=FALSE; conn->data->req.maxfd = (conn->sockfd>conn->writesockfd? conn->sockfd:conn->writesockfd)+1; Curl_pgrsTime(conn->data, TIMER_PRETRANSFER); }
/* * do_complete is called when the DO actions are complete. * * We init chunking and trailer bits to their default values here immediately * before receiving any header data for the current request in the pipeline. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L5341-L5347
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_do_more
CURLcode Curl_do_more(struct connectdata *conn, bool *completed) { CURLcode result=CURLE_OK; *completed = FALSE; if(conn->handler->do_more) result = conn->handler->do_more(conn, completed); if(!result && *completed) /* do_complete must be called after the protocol-specific DO function */ do_compl...
/* * Curl_do_more() is called during the DO_MORE multi state. It is basically a * second stage DO state which (wrongly) was introduced to support FTP's * second connection. * * TODO: A future libcurl should be able to work away this state. * */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L5396-L5410
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_reset_reqproto
void Curl_reset_reqproto(struct connectdata *conn) { struct SessionHandle *data = conn->data; if(data->state.proto.generic && data->state.current_conn != conn) { free(data->state.proto.generic); data->state.proto.generic = NULL; } data->state.current_conn = conn; }
/* Called on connect, and if there's already a protocol-specific struct allocated for a different connection, this frees it that it can be setup properly later on. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/lib/url.c#L5415-L5423
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_SSL_Init_Application_a
int Curl_SSL_Init_Application_a(SSLInitApp * init_app) { int rc; unsigned int i; SSLInitApp ia; if (!init_app || !init_app->applicationID || !init_app->applicationIDLen) return SSL_Init_Application(init_app); memcpy((char *) &ia, (char *) init_app, sizeof ia); i = ia.applicationIDLen; if (!(ia.app...
/* ASCII wrappers for the SSL procedures. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/packages/OS400/os400sys.c#L347-L373
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
Curl_gss_convert_in_place
static int Curl_gss_convert_in_place(OM_uint32 * minor_status, gss_buffer_t buf) { unsigned int i; char * t; /* Convert `buf' in place, from EBCDIC to ASCII. If error, release the buffer and return -1. Else return 0. */ i = buf->length; if (i) { if (!(t = malloc(i))) { gss_release_buffer(mi...
/* ASCII wrappers for the GSSAPI procedures. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/packages/OS400/os400sys.c#L458-L486
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
convert_sockaddr
static int convert_sockaddr(struct sockaddr_storage * dstaddr, const struct sockaddr * srcaddr, int srclen) { const struct sockaddr_un * srcu; struct sockaddr_un * dstu; unsigned int i; unsigned int dstsize; /* Convert a socket address into job CCSID, if needed. */ if (!sr...
/* CURL_DISABLE_LDAP */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/packages/OS400/os400sys.c#L944-L978
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_debug_cb
int tool_debug_cb(CURL *handle, curl_infotype type, unsigned char *data, size_t size, void *userdata) { struct Configurable *config = userdata; FILE *output = config->errors; const char *text; struct timeval tv; struct tm *now; char timebuf[20]; time_t secs; static ti...
/* ** callback for CURLOPT_DEBUGFUNCTION */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_cb_dbg.c#L43-L213
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_header_cb
size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata) { struct HdrCbData *hdrcbdata = userdata; struct OutStruct *outs = hdrcbdata->outs; struct OutStruct *heads = hdrcbdata->heads; const char *str = ptr; const size_t cb = size * nmemb; const char *end = (char*)ptr + cb; /* * Onc...
/* ** callback for CURLOPT_HEADERFUNCTION */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_cb_hdr.c#L42-L130
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_read_cb
size_t tool_read_cb(void *buffer, size_t sz, size_t nmemb, void *userdata) { ssize_t rc; struct InStruct *in = userdata; rc = read(in->fd, buffer, sz*nmemb); if(rc < 0) { if(errno == EAGAIN) { errno = 0; in->config->readbusy = TRUE; return CURL_READFUNC_PAUSE; } /* since size_t is...
/* ** callback for CURLOPT_READFUNCTION */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_cb_rea.c#L37-L54
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_seek_cb
int tool_seek_cb(void *userdata, curl_off_t offset, int whence) { struct InStruct *in = userdata; #if(CURL_SIZEOF_CURL_OFF_T > SIZEOF_OFF_T) && !defined(USE_WIN32_LARGE_FILES) /* The offset check following here is only interesting if curl_off_t is larger than off_t and we are not using the WIN32 large file s...
/* ** callback for CURLOPT_SEEKFUNCTION ** ** Notice that this is not supposed to return the resulting offset. This ** shall only return CURL_SEEKFUNC_* return codes. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_cb_see.c#L47-L89
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_ftruncate64
int tool_ftruncate64(int fd, curl_off_t where) { if(_lseeki64(fd, where, SEEK_SET) < 0) return -1; if(!SetEndOfFile((HANDLE)_get_osfhandle(fd))) return -1; return 0; }
/* * Truncate a file handle at a 64-bit position 'where'. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_cb_see.c#L119-L128
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_write_cb
size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata) { size_t rc; struct OutStruct *outs = userdata; struct Configurable *config = outs->config; /* * Once that libcurl has called back tool_write_cb() the returned value * is checked against the amount that was intended to be written...
/* ** callback for CURLOPT_WRITEFUNCTION */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_cb_wrt.c#L38-L151
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
convert_to_network
CURLcode convert_to_network(char *buffer, size_t length) { /* translate from the host encoding to the network encoding */ char *input_ptr, *output_ptr; size_t res, in_bytes, out_bytes; /* open an iconv conversion descriptor if necessary */ if(outbound_cd == (iconv_t)-1) { outbound_cd = iconv_open(CURL_IC...
/* * convert_to_network() is a curl tool function to convert * from the host encoding to ASCII on non-ASCII platforms. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_convert.c#L49-L73
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
convert_from_network
CURLcode convert_from_network(char *buffer, size_t length) { /* translate from the network encoding to the host encoding */ char *input_ptr, *output_ptr; size_t res, in_bytes, out_bytes; /* open an iconv conversion descriptor if necessary */ if(inbound_cd == (iconv_t)-1) { inbound_cd = iconv_open(CURL_IC...
/* * convert_from_network() is a curl tool function * for performing ASCII conversions on non-ASCII platforms. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_convert.c#L79-L103
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
convert_char
char convert_char(curl_infotype infotype, char this_char) { /* determine how this specific character should be displayed */ switch(infotype) { case CURLINFO_DATA_IN: case CURLINFO_DATA_OUT: case CURLINFO_SSL_DATA_IN: case CURLINFO_SSL_DATA_OUT: /* data, treat as ASCII */ if((this_char >= 0x20) && (thi...
/* HAVE_ICONV */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_convert.c#L116-L147
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
create_dir_hierarchy
CURLcode create_dir_hierarchy(const char *outfile, FILE *errors) { char *tempdir; char *tempdir2; char *outdup; char *dirbuildup; CURLcode result = CURLE_OK; outdup = strdup(outfile); if(!outdup) return CURLE_OUT_OF_MEMORY; dirbuildup = malloc(strlen(outfile) + 1); if(!dirbuildup) { Curl_saf...
/* * Create the needed directory hierarchy recursively in order to save * multi-GETs in file output, ie: * curl "http://my.site/dir[1-5]/file[1-5].txt" -o "dir#1/file#2.txt" * should create all the dir* automagically */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_dirhie.c#L94-L144
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
FindWin32CACert
CURLcode FindWin32CACert(struct Configurable *config, const char *bundle_file) { CURLcode result = CURLE_OK; /* search and set cert file only if libcurl supports SSL */ if(curlinfo->features & CURL_VERSION_SSL) { DWORD res_len; DWORD buf_tchar_size = PATH_MAX + 1; DWORD buf_bytes_size = sizeof(TCHAR...
/* * Function to find CACert bundle on a Win32 platform using SearchPath. * (SearchPath is already declared via inclusions done in setup header file) * (Use the ASCII version instead of the unicode one!) * The order of the directories it searches is: * 1. application's directory * 2. current working directory ...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_doswin.c#L265-L294
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
easysrc_free
static void easysrc_free(void) { curl_slist_free_all(easysrc_decl); easysrc_decl = NULL; curl_slist_free_all(easysrc_data); easysrc_data = NULL; curl_slist_free_all(easysrc_code); easysrc_code = NULL; curl_slist_free_all(easysrc_toohard); easysrc_toohard = NULL; curl_slist_free_all(easysrc_clean); e...
/* Clean up all source code if we run out of memory */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_easysrc.c#L78-L90
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
easysrc_add
CURLcode easysrc_add(struct curl_slist **plist, const char *line) { CURLcode ret = CURLE_OK; struct curl_slist *list = curl_slist_append(*plist, line); if(!list) { easysrc_free(); ret = CURLE_OUT_OF_MEMORY; } else *plist = list; return ret; }
/* Add a source line to the main code or remarks */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_easysrc.c#L93-L105
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
formparse
int formparse(struct Configurable *config, const char *input, struct curl_httppost **httppost, struct curl_httppost **last_post, bool literal_value) { /* nextarg MUST be a string in the format 'name=contents' and we'll build a linked list with the info */ ...
/*************************************************************************** * * formparse() * * Reads a 'name=value' parameter and builds the appropriate linked list. * * Specify files to upload with 'name=@filename', or 'name=@"filename"' * in case the filename contain ',' or ';'. Supports specified * given C...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_formparse.c#L143-L360
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
hugehelp
void hugehelp(void) { unsigned char* buf; int status,headerlen; z_stream z; /* Make sure no gzip options are set */ if (hugehelpgz[3] & 0xfe) return; headerlen = 10; memset(&z, 0, sizeof(z_stream)); z.zalloc = (alloc_func)zalloc_func; z.zfree = (free_func)zfree_func; z.avail_in = (unsigned int...
/* Decompress and send to stdout a gzip-compressed buffer */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_hugehelp.c#L7718-L7755
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
get_libcurl_info
CURLcode get_libcurl_info(void) { static struct proto_name_pattern { const char *proto_name; long proto_pattern; } const possibly_built_in[] = { { "dict", CURLPROTO_DICT }, { "file", CURLPROTO_FILE }, { "ftp", CURLPROTO_FTP }, { "ftps", CURLPROTO_FTPS }, { "gophe...
/* * libcurl_info_init: retrieves run-time information about libcurl, * setting a global pointer 'curlinfo' to libcurl's run-time info * struct, and a global bit pattern 'built_in_protos' composed of * CURLPROTO_* bits indicating which protocols are actually built * into library being used. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_libinfo.c#L47-L99
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
main_checkfds
static void main_checkfds(void) { #ifdef HAVE_PIPE int fd[2] = { STDIN_FILENO, STDIN_FILENO }; while(fd[0] == STDIN_FILENO || fd[0] == STDOUT_FILENO || fd[0] == STDERR_FILENO || fd[1] == STDIN_FILENO || fd[1] == STDOUT_FILENO || fd[1] == STDERR_FILENO) if(pipe(fd) < 0) ...
/* * Ensure that file descriptors 0, 1 and 2 (stdin, stdout, stderr) are * open before starting to run. Otherwise, the first three network * sockets opened by curl could be used for input sources, downloaded data * or error logs as they will effectively be stdin, stdout and/or stderr. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_main.c#L64-L80
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
main
int main(int argc, char *argv[]) { int res; struct Configurable config; memset(&config, 0, sizeof(struct Configurable)); config.errors = stderr; /* default errors to stderr */ main_checkfds(); #if defined(HAVE_SIGNAL) && defined(SIGPIPE) (void)signal(SIGPIPE, SIG_IGN); #endif res = operate(&config, a...
/* ** curl tool main function. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_main.c#L85-L119
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
check_hash
static int check_hash(const char *filename, const metalink_digest_def *digest_def, const unsigned char *digest, FILE *error) { unsigned char *result; digest_context *dctx; int check_ok, flags, fd; flags = O_RDONLY; #ifdef O_BINARY /* O_BINARY is required in order t...
/* * Check checksum of file denoted by filename. The expected hash value * is given in hex_hash which is hex-encoded string. * * This function returns 1 if it succeeds or one of the following * integers: * * 0: * Checksum didn't match. * -1: * Could not open file; or could not read data from file. * -2: ...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_metalink.c#L537-L596
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
check_hex_digest
static int check_hex_digest(const char *hex_digest, const metalink_digest_def *digest_def) { size_t i; for(i = 0; hex_digest[i]; ++i) { char c = hex_digest[i]; if(!(('0' <= c && c <= '9') || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))) { return 0; } } ...
/* Returns nonzero if hex_digest is properly formatted; that is each letter is in [0-9A-Za-z] and the length of the string equals to the result length of digest * 2. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_metalink.c#L644-L656
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
check_content_type
static int check_content_type(const char *content_type, const char *media_type) { const char *ptr = content_type; size_t media_type_len = strlen(media_type); for(; *ptr && (*ptr == ' ' || *ptr == '\t'); ++ptr); if(!*ptr) { return 0; } return Curl_raw_nequal(ptr, media_type, media_type_len) && (*(ptr...
/* * Returns nonzero if content_type includes mediatype. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_metalink.c#L821-L832
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
FreeMultiInfo
void FreeMultiInfo(struct multi_files **multi_first, struct multi_files **multi_last) { struct multi_files *next; struct multi_files *item = *multi_first; while(item) { next = item->next; Curl_safefree(item); item = next; } *multi_first = NULL; if(multi_last) *multi_last ...
/* * FreeMultiInfo: Free the items of the list. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_mfiles.c#L112-L126
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
warnf
void warnf(struct Configurable *config, const char *fmt, ...) { if(!config->mute) { va_list ap; int len; char *ptr; char print_buffer[256]; va_start(ap, fmt); len = vsnprintf(print_buffer, sizeof(print_buffer), fmt, ap); va_end(ap); ptr = print_buffer; while(len > 0) { fput...
/* * Emit warning formatted message on configured 'errors' stream unless * mute (--silent) was selected. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_msgs.c#L41-L79
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
helpf
void helpf(FILE *errors, const char *fmt, ...) { va_list ap; if(fmt) { va_start(ap, fmt); fputs("curl: ", errors); /* prefix it */ vfprintf(errors, fmt, ap); va_end(ap); } fprintf(errors, "curl: try 'curl --help' " #ifdef USE_MANUAL "or 'curl --manual' " #endif "for more info...
/* * Emit help formatted message on given stream. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_msgs.c#L85-L99
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
list_engines
void list_engines(const struct curl_slist *engines) { puts("Build-time engines:"); if(!engines) { puts(" <none>"); return; } for(; engines; engines = engines->next) printf(" %s\n", engines->data); }
/* * Print list of OpenSSL supported engines */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_operhlp.c#L53-L62
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
get_url_file_name
CURLcode get_url_file_name(char **filename, const char *url) { const char *pc; *filename = NULL; /* Find and get the remote file name */ pc = strstr(url, "://"); if(pc) pc += 3; else pc = url; pc = strrchr(pc, '/'); if(pc) { /* duplicate the string beyond the slash */ pc++; if(*pc...
/* Extracts the name portion of the URL. * Returns a pointer to a heap-allocated string or NULL if * no name part, at location indicated by first argument. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_operhlp.c#L156-L198
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
main_init
CURLcode main_init(void) { #if defined(__DJGPP__) || defined(__GO32__) /* stop stat() wasting time */ _djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE; #endif return curl_global_init(CURL_GLOBAL_DEFAULT); }
/* * This is the main global constructor for the app. Call this before * _any_ libcurl usage. If this fails, *NO* libcurl functions may be * used, or havoc may be the result. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_operhlp.c#L205-L213
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
main_free
void main_free(void) { curl_global_cleanup(); convert_cleanup(); #ifdef USE_METALINK metalink_cleanup(); #endif }
/* * This is the main global destructor for the app. Call this after * _all_ libcurl usage is done. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_operhlp.c#L219-L226
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
str2num
ParameterError str2num(long *val, const char *str) { if(str) { char *endptr; long num = strtol(str, &endptr, 10); if((endptr != str) && (endptr == str + strlen(str))) { *val = num; return PARAM_OK; /* Ok */ } } return PARAM_BAD_NUMERIC; /* badness */ }
/* * Parse the string and write the long in the given address. Return PARAM_OK * on success, otherwise a parameter specific error enum. * * Since this function gets called with the 'nextarg' pointer from within the * getparameter a lot, we must check it for NULL before accessing the str * data. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_paramhlp.c#L157-L168
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
str2unum
ParameterError str2unum(long *val, const char *str) { if(str[0]=='-') return PARAM_NEGATIVE_NUMERIC; /* badness */ return str2num(val, str); }
/* * Parse the string and write the long in the given address. Return PARAM_OK * on success, otherwise a parameter error enum. ONLY ACCEPTS POSITIVE NUMBERS! * * Since this function gets called with the 'nextarg' pointer from within the * getparameter a lot, we must check it for NULL before accessing the str * da...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_paramhlp.c#L179-L184
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
proto2num
long proto2num(struct Configurable *config, long *val, const char *str) { char *buffer; const char *sep = ","; char *token; static struct sprotos { const char *name; long bit; } const protos[] = { { "all", CURLPROTO_ALL }, { "http", CURLPROTO_HTTP }, { "https", CURLPROTO_HTTPS }, { "f...
/* * Parse the string and modify the long in the given address. Return * non-zero on failure, zero on success. * * The string is a list of protocols * * Since this function gets called with the 'nextarg' pointer from within the * getparameter a lot, we must check it for NULL before accessing the str * data. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_paramhlp.c#L197-L290
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
str2offset
ParameterError str2offset(curl_off_t *val, const char *str) { char *endptr; if(str[0] == '-') /* offsets aren't negative, this indicates weird input */ return PARAM_NEGATIVE_NUMERIC; #if(CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG) *val = curlx_strtoofft(str, &endptr, 0); if((*val == CURL_OFF_T_MAX || *v...
/** * Parses the given string looking for an offset (which may be a * larger-than-integer value). The offset CANNOT be negative! * * @param val the offset to populate * @param str the buffer containing the offset * @return PARAM_OK if successful, a parameter specific error enum if failure. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_paramhlp.c#L300-L320
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
parseconfig
int parseconfig(const char *filename, struct Configurable *config) { int res; FILE *file; char filebuffer[512]; bool usedarg; char *home; int rc = 0; if(!filename || !*filename) { /* NULL or no file name attempts to load .curlrc from the homedir! */ #ifndef __AMIGA__ filename = C...
/* return 0 on everything-is-fine, and non-zero otherwise */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_parsecfg.c#L44-L226
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_setopt_enum
CURLcode tool_setopt_enum(CURL *curl, struct Configurable *config, const char *name, CURLoption tag, const NameValue *nvlist, long lval) { CURLcode ret = CURLE_OK; bool skip = FALSE; ret = curl_easy_setopt(curl, tag, lval); if(!lval) skip = TRUE; if(co...
/* setopt wrapper for enum types */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_setopt.c#L213-L243
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_setopt_flags
CURLcode tool_setopt_flags(CURL *curl, struct Configurable *config, const char *name, CURLoption tag, const NameValue *nvlist, long lval) { CURLcode ret = CURLE_OK; bool skip = FALSE; ret = curl_easy_setopt(curl, tag, lval); if(!lval) skip = TRUE; if...
/* setopt wrapper for flags */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_setopt.c#L246-L285
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_setopt_bitmask
CURLcode tool_setopt_bitmask(CURL *curl, struct Configurable *config, const char *name, CURLoption tag, const NameValueUnsigned *nvlist, long lval) { CURLcode ret = CURLE_OK; bool skip = FALSE; ret = curl_easy_setopt(curl, tag...
/* setopt wrapper for bitmasks */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_setopt.c#L288-L328
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_setopt_httppost
CURLcode tool_setopt_httppost(CURL *curl, struct Configurable *config, const char *name, CURLoption tag, struct curl_httppost *post) { CURLcode ret = CURLE_OK; char *escaped = NULL; bool skip = FALSE; ret = curl_easy_setopt(curl, tag, post); if(!pos...
/* setopt wrapper for CURLOPT_HTTPPOST */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_setopt.c#L331-L404
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_setopt_slist
CURLcode tool_setopt_slist(CURL *curl, struct Configurable *config, const char *name, CURLoption tag, struct curl_slist *list) { CURLcode ret = CURLE_OK; char *escaped = NULL; bool skip = FALSE; ret = curl_easy_setopt(curl, tag, list); if(!list) skip ...
/* setopt wrapper for curl_slist options */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_setopt.c#L407-L443
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_setopt
CURLcode tool_setopt(CURL *curl, bool str, struct Configurable *config, const char *name, CURLoption tag, ...) { va_list arg; char buf[256]; const char *value = NULL; bool remark = FALSE; bool skip = FALSE; bool escape = FALSE; char *escaped = NULL; CURLcode ret = CURLE_OK; va_st...
/* generic setopt wrapper for all other options. * Some type information is encoded in the tag value. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_setopt.c#L447-L543
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
glob_set
static GlobCode glob_set(URLGlob *glob, char *pattern, size_t pos, int *amount) { /* processes a set expression with the point behind the opening '{' ','-separated elements are collected until the next closing '}' */ URLPattern *pat; GlobCode res; bool done = FALSE; char* buf =...
/* returned number of strings */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_urlglob.c#L49-L165
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_tvdiff
long tool_tvdiff(struct timeval newer, struct timeval older) { return (newer.tv_sec-older.tv_sec)*1000+ (newer.tv_usec-older.tv_usec)/1000; }
/* * Make sure that the first argument is the more recent time, as otherwise * we'll get a weird negative time-diff back... * * Returns: the time difference in number of milliseconds. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_util.c#L113-L117
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_tvdiff_secs
double tool_tvdiff_secs(struct timeval newer, struct timeval older) { if(newer.tv_sec != older.tv_sec) return (double)(newer.tv_sec-older.tv_sec)+ (double)(newer.tv_usec-older.tv_usec)/1000000.0; else return (double)(newer.tv_usec-older.tv_usec)/1000000.0; }
/* * Same as tool_tvdiff but with full usec resolution. * * Returns: the time difference in seconds with subsecond resolution. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_util.c#L124-L131
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
tool_tvlong
long tool_tvlong(struct timeval t1) { return t1.tv_sec; }
/* return the number of seconds in the given input timeval struct */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_util.c#L134-L137
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
is_vms_shell
int is_vms_shell(void) { char *shell; /* Have we checked the shell yet? */ if(vms_shell >= 0) return vms_shell; shell = getenv("SHELL"); /* No shell, means DCL */ if(shell == NULL) { vms_shell = 1; return 1; } /* Have to make sure some one did not set shell to DCL */ if(strcmp(shell, "...
/* VMS has a DCL shell and and also has Unix shells ported to it. * When curl is running under a Unix shell, we want it to be as much * like Unix as possible. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_vms.c#L48-L72
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
vms_special_exit
void vms_special_exit(int code, int vms_show) { int vms_code; /* The Posix exit mode is only available after VMS 7.0 */ #if __CRTL_VER >= 70000000 if(is_vms_shell() == 0) { decc$__posix_exit(code); } #endif if(code > CURL_LAST) { /* If CURL_LAST exceeded then */ vms_code = CURL_LAST; /* curlmsg.h...
/* * VMS has two exit() routines. When running under a Unix style shell, then * Unix style and the __posix_exit() routine is used. * * When running under the DCL shell, then the VMS encoded codes and decc$exit() * is used. * * We can not use exit() or return a code from main() because the actual * routine call...
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_vms.c#L91-L109
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
decc_init
static void decc_init(void) { int feat_index; int feat_value; int feat_value_max; int feat_value_min; int i; int sts; /* Set the global flag to indicate that LIB$INITIALIZE worked. */ decc_init_done = 1; /* Loop through all items in the decc_feat_array[]. */ for(i = 0; decc_feat_array[i].name != N...
/* LIB$INITIALIZE initialization function. */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_vms.c#L147-L192
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
fwrite_xattr
int fwrite_xattr(CURL *curl, int fd) { int i = 0; int err = 0; /* loop through all xattr-curlinfo pairs and abort on a set error */ while(err == 0 && mappings[i].attr != NULL) { char *value = NULL; CURLcode rc = curl_easy_getinfo(curl, mappings[i].info, &value); if(rc == CURLE_OK && value) { #ifdef ...
/* store metadata from the curl request alongside the downloaded * file using extended attributes */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/src/tool_xattr.c#L50-L68
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
elapsed
static int elapsed(struct timeval *before, struct timeval *after) { ssize_t result; result = (after->tv_sec - before->tv_sec) * 1000000 + after->tv_usec - before->tv_usec; if (result < 0) result = 0; return curlx_sztosi(result); }
/* return the number of microseconds between two time stamps */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/tests/libtest/lib1501.c#L37-L48
4389085c8ce35cff887a4cc18fc47d1133d89ffb
BigWorld-Engine-14.4.1
github_2023
v2v3v4
c
test
int test(char *URL) { CURL *c = NULL; CURLM *m = NULL; int res = 0; int running; start_test_timing(); global_init(CURL_GLOBAL_ALL); easy_init(c); easy_setopt(c, CURLOPT_URL, URL); multi_init(m); multi_add_handle(m, c); for(;;) { struct timeval timeout; fd_set fdread, fdwrite, fdexce...
/* * Get a single URL without select(). */
https://github.com/v2v3v4/BigWorld-Engine-14.4.1/blob/4389085c8ce35cff887a4cc18fc47d1133d89ffb/programming/bigworld/third_party/curl/tests/libtest/lib502.c#L34-L91
4389085c8ce35cff887a4cc18fc47d1133d89ffb