#include "setup.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <errno.h>
#include <curl/curl.h>
#include <curl/mprintf.h>
#include "urlglob.h"
#include "writeout.h"
#include "getpass.h"
#include "homedir.h"
#include <time.h>
#include "version.h"
#include <strtoofft.h>
Go to the source code of this file.
|
enum | HttpReq {
HTTPREQ_UNSPEC,
HTTPREQ_GET,
HTTPREQ_HEAD,
HTTPREQ_POST,
HTTPREQ_SIMPLEPOST,
HTTPREQ_CUSTOM,
HTTPREQ_LAST
} |
|
enum | ParameterError {
PARAM_OK,
PARAM_OPTION_AMBIGUOUS,
PARAM_OPTION_UNKNOWN,
PARAM_REQUIRES_PARAMETER,
PARAM_BAD_USE,
PARAM_HELP_REQUESTED,
PARAM_GOT_EXTRA_PARAMETER,
PARAM_BAD_NUMERIC,
PARAM_LIBCURL_DOESNT_SUPPORT,
PARAM_LAST
} |
|
#define _MPRINTF_REPLACE /* we want curl-functions instead of native ones */ |
#define CONF_AUTO_REFERER (1<<4) /* the automatic referer-system please! */ |
#define CONF_FAILONERROR (1<<12) /* no output on http error codes >= 300 */ |
#define CONF_FOLLOWLOCATION (1<<23) /* use Location: Luke! */ |
#define CONF_FTPAPPEND (1<<20) /* Append instead of overwrite on upload! */ |
#define CONF_FTPLISTONLY (1<<16) /* Use NLST when listing ftp dir */ |
#define CONF_GETTEXT (1<<24) /* use ASCII/text for transfer */ |
#define CONF_HEADER (1<<8) /* throw the header out too */ |
#define CONF_HTTPPOST (1<<25) /* multipart/form-data HTTP POST */ |
#define CONF_MUTE (1<<28) /* force NOPROGRESS */ |
#define CONF_NETRC (1<<22) /* read user+password from .netrc */ |
Value:
Definition at line 175 of file main.c.
#define CONF_NOBODY (1<<11) /* use HEAD to get http document */ |
#define CONF_NOPROGRESS (1<<10) /* shut off the progress meter */ |
#define CONF_UNRESTRICTED_AUTH (1<<30) |
#define CONF_VERBOSE (1<<5) /* talk a lot */ |
#define CURL_CA_CERT_ERRORMSG1 |
Value:"More details here: http://curl.haxx.se/docs/sslcerts.html\n\n" \
"curl performs SSL certificate verification by default, using a \"bundle\"\n" \
" of Certificate Authority (CA) public keys (CA certs). The default\n" \
" bundle is named curl-ca-bundle.crt; you can specify an alternate file\n" \
" using the --cacert option.\n"
#define CURL_CA_CERT_ERRORMSG2 |
Value:"If this HTTPS server uses a certificate signed by a CA represented in\n" \
" the bundle, the certificate verification probably failed due to a\n" \
" problem with the certificate (it might be expired, or the name might\n" \
" not match the domain name in the URL).\n" \
"If you'd like to turn off curl's verification of the certificate, use\n" \
" the -k (or --insecure) option.\n"
#define CURL_PROGRESS_BAR 1 |
#define CURL_PROGRESS_STATS 0 /* default progress display */ |
#define CURLseparator "--_curl_--" |
#define DEFAULT_MAXREDIRS 50L |
#define FORM_FILE_SEPARATOR ',' |
#define FORM_TYPE_SEPARATOR ';' |
#define GETOUT_NOUPLOAD (1<<4) /* if set, -T "" has been used */ |
#define GETOUT_OUTFILE (1<<0) /* set when outfile is deemed done */ |
#define GETOUT_UPLOAD (1<<3) /* if set, -T has been used */ |
#define GETOUT_URL (1<<1) /* set when URL is deemed done */ |
#define GETOUT_USEREMOTE (1<<2) /* use remote file name locally */ |
#define isseparator |
( |
|
x | ) |
(((x)=='=') || ((x) == ':')) |
#define MIN |
( |
|
X, |
|
|
|
Y |
|
) |
| (((X) < (Y)) ? (X) : (Y)) |
standard MIN macro
Definition at line 145 of file main.c.
Enumerator |
---|
HTTPREQ_UNSPEC |
|
HTTPREQ_GET |
|
HTTPREQ_HEAD |
|
HTTPREQ_POST |
|
HTTPREQ_SIMPLEPOST |
|
HTTPREQ_CUSTOM |
|
HTTPREQ_LAST |
|
Definition at line 148 of file main.c.
Enumerator |
---|
PARAM_OK |
|
PARAM_OPTION_AMBIGUOUS |
|
PARAM_OPTION_UNKNOWN |
|
PARAM_REQUIRES_PARAMETER |
|
PARAM_BAD_USE |
|
PARAM_HELP_REQUESTED |
|
PARAM_GOT_EXTRA_PARAMETER |
|
PARAM_BAD_NUMERIC |
|
PARAM_LIBCURL_DOESNT_SUPPORT |
|
PARAM_LAST |
|
Definition at line 945 of file main.c.
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
char* strdup |
( |
char * |
str | ) |
|