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