]> sjero.net Git - wget/blob - src/options.h
[svn] Implemented breadth-first retrieval.
[wget] / src / options.h
1 /* struct options.
2    Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3
4 This file is part of GNU Wget.
5
6 GNU Wget is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 GNU Wget is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Wget; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
19
20 /* Needed for FDP.  */
21 #include <stdio.h>
22
23 struct options
24 {
25   int verbose;                  /* Are we verbose? */
26   int quiet;                    /* Are we quiet? */
27   int ntry;                     /* Number of tries per URL */
28   int background;               /* Whether we should work in background. */
29   int kill_longer;              /* Do we reject messages with *more*
30                                    data than specified in
31                                    content-length? */
32   int ignore_length;            /* Do we heed content-length at all?  */
33   int recursive;                /* Are we recursive? */
34   int spanhost;                 /* Do we span across hosts in
35                                    recursion? */
36   int relative_only;            /* Follow only relative links. */
37   int no_parent;                /* Restrict access to the parent
38                                    directory.  */
39   int reclevel;                 /* Maximum level of recursion */
40   int dirstruct;                /* Do we build the directory structure
41                                   as we go along? */
42   int no_dirstruct;             /* Do we hate dirstruct? */
43   int cut_dirs;                 /* Number of directory components to cut. */
44   int add_hostdir;              /* Do we add hostname directory? */
45   int noclobber;                /* Disables clobbering of existing
46                                    data. */
47   char *dir_prefix;             /* The top of directory tree */
48   char *lfilename;              /* Log filename */
49   char *input_filename;         /* Input filename */
50   int force_html;               /* Is the input file an HTML file? */
51
52   int spider;                   /* Is Wget in spider mode? */
53
54   char **accepts;               /* List of patterns to accept. */
55   char **rejects;               /* List of patterns to reject. */
56   char **excludes;              /* List of excluded FTP directories. */
57   char **includes;              /* List of FTP directories to
58                                    follow. */
59
60   char **domains;               /* See host.c */
61   char **exclude_domains;
62
63   char **follow_tags;           /* List of HTML tags to recursively follow. */
64   char **ignore_tags;           /* List of HTML tags to ignore if recursing. */
65
66   int follow_ftp;               /* Are FTP URL-s followed in recursive
67                                    retrieving? */
68   int retr_symlinks;            /* Whether we retrieve symlinks in
69                                    FTP. */
70   char *output_document;        /* The output file to which the
71                                    documents will be printed.  */
72   int od_known_regular;         /* whether output_document is a
73                                    regular file we can manipulate,
74                                    i.e. not `-' or a device file. */
75   FILE *dfp;                    /* The file pointer to the output
76                                    document. */
77
78   int always_rest;              /* Always use REST. */
79   char *ftp_acc;                /* FTP username */
80   char *ftp_pass;               /* FTP password */
81   int netrc;                    /* Whether to read .netrc. */
82   int ftp_glob;                 /* FTP globbing */
83   int ftp_pasv;                 /* Passive FTP. */
84
85   char *http_user;              /* HTTP user. */
86   char *http_passwd;            /* HTTP password. */
87   char *user_header;            /* User-defined header(s). */
88   int http_keep_alive;          /* whether we use keep-alive */
89
90   int use_proxy;                /* Do we use proxy? */
91   int allow_cache;              /* Do we allow server-side caching? */
92   char *http_proxy, *ftp_proxy, *https_proxy;
93   char **no_proxy;
94   char *base_href;
95   char *progress_type;          /* progress indicator type. */
96   char *proxy_user; /*oli*/
97   char *proxy_passwd;
98 #ifdef HAVE_SELECT
99   long timeout;                 /* The value of read timeout in
100                                    seconds. */
101 #endif
102   long wait;                    /* The wait period between retrievals. */
103   long waitretry;               /* The wait period between retries. - HEH */
104   int use_robots;               /* Do we heed robots.txt? */
105
106   long quota;                   /* Maximum number of bytes to
107                                    retrieve. */
108   VERY_LONG_TYPE downloaded;    /* How much we downloaded already. */
109   int downloaded_overflow;      /* Whether the above overflowed. */
110   int numurls;                  /* Number of successfully downloaded
111                                    URLs */
112
113   int server_response;          /* Do we print server response? */
114   int save_headers;             /* Do we save headers together with
115                                    file? */
116
117 #ifdef DEBUG
118   int debug;                    /* Debugging on/off */
119 #endif /* DEBUG */
120
121   int timestamping;             /* Whether to use time-stamping. */
122
123   int backup_converted;         /* Do we save pre-converted files as *.orig? */
124   int backups;                  /* Are numeric backups made? */
125
126   char *useragent;              /* Naughty User-Agent, which can be
127                                    set to something other than
128                                    Wget. */
129   char *referer;                /* Naughty Referer, which can be
130                                    set to something other than
131                                    NULL. */
132   int convert_links;            /* Will the links be converted
133                                    locally? */
134   int remove_listing;           /* Do we remove .listing files
135                                    generated by FTP? */
136   int htmlify;                  /* Do we HTML-ify the OS-dependent
137                                    listings? */
138
139   long dot_bytes;               /* How many bytes in a printing
140                                    dot. */
141   int dots_in_line;             /* How many dots in one line. */
142   int dot_spacing;              /* How many dots between spacings. */
143
144   int delete_after;             /* Whether the files will be deleted
145                                    after download. */
146
147   int html_extension;           /* Use ".html" extension on all text/html? */
148
149   int page_requisites;          /* Whether we need to download all files
150                                    necessary to display a page properly. */
151
152   struct sockaddr_in *bind_address; /* What local IP address to bind to. */
153
154 #ifdef HAVE_SSL
155   char *sslcertfile;            /* external client cert to use. */
156   char *sslcertkey;             /* the keyfile for this certificate
157                                    (if not internal) included in the
158                                    certfile. */
159 #endif /* HAVE_SSL */
160
161   int   cookies;
162   char *cookies_input;
163   char *cookies_output;
164 };
165
166 #ifndef OPTIONS_DEFINED_HERE
167 extern struct options opt;
168 #endif