]> sjero.net Git - wget/blob - src/options.h
[svn] Applied contributed patches (see ChangeLog for details.)
[wget] / src / options.h
1 /* struct options.
2    Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3
4 This file is part of Wget.
5
6 This program 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 This program 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 this program; 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 simple_check;             /* Should we use simple checking
40                                    (strcmp) or do we create a host
41                                    hash and call gethostbyname? */
42   int reclevel;                 /* Maximum level of recursion */
43   int dirstruct;                /* Do we build the directory structure
44                                   as we go along? */
45   int no_dirstruct;             /* Do we hate dirstruct? */
46   int cut_dirs;                 /* Number of directory components to cut. */
47   int add_hostdir;              /* Do we add hostname directory? */
48   int noclobber;                /* Disables clobbering of existing
49                                    data. */
50   char *dir_prefix;             /* The top of directory tree */
51   char *lfilename;              /* Log filename */
52   int no_flush;                 /* If non-zero, inhibit flushing log. */
53   char *input_filename;         /* Input filename */
54   int force_html;               /* Is the input file an HTML file? */
55
56   int spider;                   /* Is Wget in spider mode? */
57
58   char **accepts;               /* List of patterns to accept. */
59   char **rejects;               /* List of patterns to reject. */
60   char **excludes;              /* List of excluded FTP directories. */
61   char **includes;              /* List of FTP directories to
62                                    follow. */
63
64   char **domains;               /* See host.c */
65   char **exclude_domains;
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   FILE *dfp;                    /* The file pointer to the output
74                                    document. */
75
76   int always_rest;              /* Always use REST. */
77   char *ftp_acc;                /* FTP username */
78   char *ftp_pass;               /* FTP password */
79   int netrc;                    /* Whether to read .netrc. */
80   int ftp_glob;                 /* FTP globbing */
81   int ftp_pasv;                 /* Passive FTP. */
82
83   char *http_user;              /* HTTP user. */
84   char *http_passwd;            /* HTTP password. */
85   char *user_header;            /* User-defined header(s). */
86
87   int use_proxy;                /* Do we use proxy? */
88   int proxy_cache;              /* Do we load from proxy cache? */
89   char *http_proxy, *ftp_proxy;
90   char **no_proxy;
91   char *base_href;
92   char *proxy_user; /*oli*/
93   char *proxy_passwd;
94 #ifdef HAVE_SELECT
95   long timeout;                 /* The value of read timeout in
96                                    seconds. */
97 #endif
98   long wait;                    /* The wait period between retrievals. */
99   long waitretry;               /* The wait period between retries. - HEH */
100   int use_robots;               /* Do we heed robots.txt? */
101
102   long quota;                   /* Maximum number of bytes to
103                                    retrieve. */
104   long downloaded;              /* How much we downloaded already. */
105   int numurls;                  /* Number of successfully downloaded
106                                    URLs */
107
108   int server_response;          /* Do we print server response? */
109   int save_headers;             /* Do we save headers together with
110                                    file? */
111
112 #ifdef DEBUG
113   int debug;                    /* Debugging on/off */
114 #endif /* DEBUG */
115
116   int timestamping;             /* Whether to use time-stamping. */
117
118   int backup_converted;         /* Do we save pre-converted files as *.orig? */
119   int backups;                  /* Are numeric backups made? */
120
121   char *useragent;              /* Naughty User-Agent, which can be
122                                    set to something other than
123                                    Wget. */
124   char *referer;                /* Naughty Referer, which can be
125                                    set to something other than
126                                    NULL. */
127   int convert_links;            /* Will the links be converted
128                                    locally? */
129   int remove_listing;           /* Do we remove .listing files
130                                    generated by FTP? */
131   int htmlify;                  /* Do we HTML-ify the OS-dependent
132                                    listings? */
133
134   long dot_bytes;               /* How many bytes in a printing
135                                    dot. */
136   int dots_in_line;             /* How many dots in one line. */
137   int dot_spacing;              /* How many dots between spacings. */
138
139   int delete_after;             /* Whether the files will be deleted
140                                    after download. */
141 };
142
143 #ifndef OPTIONS_DEFINED_HERE
144 extern struct options opt;
145 #endif