doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs | Enumerations | Functions
main.c File Reference
#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.

Classes

struct  getout
 
struct  LongShort
 
struct  Configurable
 
struct  multi_files
 
struct  OutStruct
 
struct  InStruct
 
struct  ProgressData
 

Macros

#define _MPRINTF_REPLACE   /* we want curl-functions instead of native ones */
 
#define CURLseparator   "--_curl_--"
 
#define DEFAULT_MAXREDIRS   50L
 
#define CURL_PROGRESS_STATS   0 /* default progress display */
 
#define CURL_PROGRESS_BAR   1
 
#define MIN(X, Y)   (((X) < (Y)) ? (X) : (Y))
 standard MIN macro More...
 
#define CONF_DEFAULT   0
 
#define CONF_AUTO_REFERER   (1<<4) /* the automatic referer-system please! */
 
#define CONF_VERBOSE   (1<<5) /* talk a lot */
 
#define CONF_HEADER   (1<<8) /* throw the header out too */
 
#define CONF_NOPROGRESS   (1<<10) /* shut off the progress meter */
 
#define CONF_NOBODY   (1<<11) /* use HEAD to get http document */
 
#define CONF_FAILONERROR   (1<<12) /* no output on http error codes >= 300 */
 
#define CONF_FTPLISTONLY   (1<<16) /* Use NLST when listing ftp dir */
 
#define CONF_FTPAPPEND   (1<<20) /* Append instead of overwrite on upload! */
 
#define CONF_NETRC   (1<<22) /* read user+password from .netrc */
 
#define CONF_FOLLOWLOCATION   (1<<23) /* use Location: Luke! */
 
#define CONF_GETTEXT   (1<<24) /* use ASCII/text for transfer */
 
#define CONF_HTTPPOST   (1<<25) /* multipart/form-data HTTP POST */
 
#define CONF_MUTE   (1<<28) /* force NOPROGRESS */
 
#define CONF_NETRC_OPT
 
#define CONF_UNRESTRICTED_AUTH   (1<<30)
 
#define GETOUT_OUTFILE   (1<<0) /* set when outfile is deemed done */
 
#define GETOUT_URL   (1<<1) /* set when URL is deemed done */
 
#define GETOUT_USEREMOTE   (1<<2) /* use remote file name locally */
 
#define GETOUT_UPLOAD   (1<<3) /* if set, -T has been used */
 
#define GETOUT_NOUPLOAD   (1<<4) /* if set, -T "" has been used */
 
#define FORM_FILE_SEPARATOR   ','
 
#define FORM_TYPE_SEPARATOR   ';'
 
#define CURLRC   DOT_CHAR "curlrc"
 
#define isseparator(x)   (((x)=='=') || ((x) == ':'))
 
#define CURL_CA_CERT_ERRORMSG1
 
#define CURL_CA_CERT_ERRORMSG2
 

Typedefs

typedef char bool
 

Enumerations

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
}
 

Functions

char * strdup (char *str)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

#define _MPRINTF_REPLACE   /* we want curl-functions instead of native ones */

Definition at line 38 of file main.c.

#define CONF_AUTO_REFERER   (1<<4) /* the automatic referer-system please! */

Definition at line 161 of file main.c.

#define CONF_DEFAULT   0

Definition at line 159 of file main.c.

#define CONF_FAILONERROR   (1<<12) /* no output on http error codes >= 300 */

Definition at line 166 of file main.c.

#define CONF_FOLLOWLOCATION   (1<<23) /* use Location: Luke! */

Definition at line 170 of file main.c.

#define CONF_FTPAPPEND   (1<<20) /* Append instead of overwrite on upload! */

Definition at line 168 of file main.c.

#define CONF_FTPLISTONLY   (1<<16) /* Use NLST when listing ftp dir */

Definition at line 167 of file main.c.

#define CONF_GETTEXT   (1<<24) /* use ASCII/text for transfer */

Definition at line 171 of file main.c.

#define CONF_HEADER   (1<<8) /* throw the header out too */

Definition at line 163 of file main.c.

#define CONF_HTTPPOST   (1<<25) /* multipart/form-data HTTP POST */

Definition at line 172 of file main.c.

#define CONF_MUTE   (1<<28) /* force NOPROGRESS */

Definition at line 173 of file main.c.

#define CONF_NETRC   (1<<22) /* read user+password from .netrc */

Definition at line 169 of file main.c.

#define CONF_NETRC_OPT
Value:
(1<<29) /* read user+password from either
* .netrc or URL*/

Definition at line 175 of file main.c.

#define CONF_NOBODY   (1<<11) /* use HEAD to get http document */

Definition at line 165 of file main.c.

#define CONF_NOPROGRESS   (1<<10) /* shut off the progress meter */

Definition at line 164 of file main.c.

#define CONF_UNRESTRICTED_AUTH   (1<<30)

Definition at line 177 of file main.c.

#define CONF_VERBOSE   (1<<5) /* talk a lot */

Definition at line 162 of file main.c.

#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

Definition at line 138 of file main.c.

#define CURL_PROGRESS_STATS   0 /* default progress display */

Definition at line 137 of file main.c.

#define CURLRC   DOT_CHAR "curlrc"
#define CURLseparator   "--_curl_--"

Definition at line 52 of file main.c.

#define DEFAULT_MAXREDIRS   50L

Definition at line 116 of file main.c.

#define FORM_FILE_SEPARATOR   ','

Definition at line 747 of file main.c.

#define FORM_TYPE_SEPARATOR   ';'

Definition at line 748 of file main.c.

#define GETOUT_NOUPLOAD   (1<<4) /* if set, -T "" has been used */

Definition at line 271 of file main.c.

#define GETOUT_OUTFILE   (1<<0) /* set when outfile is deemed done */

Definition at line 267 of file main.c.

#define GETOUT_UPLOAD   (1<<3) /* if set, -T has been used */

Definition at line 270 of file main.c.

#define GETOUT_URL   (1<<1) /* set when URL is deemed done */

Definition at line 268 of file main.c.

#define GETOUT_USEREMOTE   (1<<2) /* use remote file name locally */

Definition at line 269 of file main.c.

#define isseparator (   x)    (((x)=='=') || ((x) == ':'))
#define MIN (   X,
 
)    (((X) < (Y)) ? (X) : (Y))

standard MIN macro

Definition at line 145 of file main.c.

Typedef Documentation

typedef char bool

Definition at line 133 of file main.c.

Enumeration Type Documentation

enum HttpReq
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.

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 3453 of file main.c.

char* strdup ( char *  str)

Definition at line 183 of file main.c.