mirror of
https://github.com/mirror/wget.git
synced 2025-03-13 11:20:19 +08:00
[svn] Declare opt.verbose as int, not bool.
This commit is contained in:
parent
7c431e235c
commit
0a41b946d4
@ -1,3 +1,7 @@
|
|||||||
|
2005-06-24 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* init.c: opt.verbose must be declared as int.
|
||||||
|
|
||||||
2005-06-23 Hrvoje Niksic <hniksic@xemacs.org>
|
2005-06-23 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* cmpt.c (strpbrk): Removed.
|
* cmpt.c (strpbrk): Removed.
|
||||||
|
19
src/init.c
19
src/init.c
@ -89,6 +89,7 @@ CMD_DECLARE (cmd_spec_secure_protocol);
|
|||||||
#endif
|
#endif
|
||||||
CMD_DECLARE (cmd_spec_timeout);
|
CMD_DECLARE (cmd_spec_timeout);
|
||||||
CMD_DECLARE (cmd_spec_useragent);
|
CMD_DECLARE (cmd_spec_useragent);
|
||||||
|
CMD_DECLARE (cmd_spec_verbose);
|
||||||
|
|
||||||
/* List of recognized commands, each consisting of name, place and
|
/* List of recognized commands, each consisting of name, place and
|
||||||
function. When adding a new command, simply add it to the list,
|
function. When adding a new command, simply add it to the list,
|
||||||
@ -230,7 +231,7 @@ static struct {
|
|||||||
{ "useproxy", &opt.use_proxy, cmd_boolean },
|
{ "useproxy", &opt.use_proxy, cmd_boolean },
|
||||||
{ "user", &opt.user, cmd_string },
|
{ "user", &opt.user, cmd_string },
|
||||||
{ "useragent", NULL, cmd_spec_useragent },
|
{ "useragent", NULL, cmd_spec_useragent },
|
||||||
{ "verbose", &opt.verbose, cmd_boolean },
|
{ "verbose", NULL, cmd_spec_verbose },
|
||||||
{ "wait", &opt.wait, cmd_time },
|
{ "wait", &opt.wait, cmd_time },
|
||||||
{ "waitretry", &opt.waitretry, cmd_time }
|
{ "waitretry", &opt.waitretry, cmd_time }
|
||||||
};
|
};
|
||||||
@ -1254,6 +1255,22 @@ cmd_spec_useragent (const char *com, const char *val, void *place_ignored)
|
|||||||
opt.useragent = xstrdup (val);
|
opt.useragent = xstrdup (val);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The "verbose" option cannot be cmd_boolean because the variable is
|
||||||
|
not bool -- it's of type int (-1 means uninitialized because of
|
||||||
|
some random hackery for disallowing -q -v). */
|
||||||
|
|
||||||
|
static bool
|
||||||
|
cmd_spec_verbose (const char *com, const char *val, void *place_ignored)
|
||||||
|
{
|
||||||
|
bool flag;
|
||||||
|
if (cmd_boolean (com, val, &flag))
|
||||||
|
{
|
||||||
|
opt.verbose = flag;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* Miscellaneous useful routines. */
|
/* Miscellaneous useful routines. */
|
||||||
|
|
||||||
|
@ -29,7 +29,8 @@ so, delete this exception statement from your version. */
|
|||||||
|
|
||||||
struct options
|
struct options
|
||||||
{
|
{
|
||||||
bool verbose; /* Are we verbose? */
|
int verbose; /* Are we verbose? (First set to -1,
|
||||||
|
hence not boolean.) */
|
||||||
bool quiet; /* Are we quiet? */
|
bool quiet; /* Are we quiet? */
|
||||||
int ntry; /* Number of tries per URL */
|
int ntry; /* Number of tries per URL */
|
||||||
bool retry_connrefused; /* Treat CONNREFUSED as non-fatal. */
|
bool retry_connrefused; /* Treat CONNREFUSED as non-fatal. */
|
||||||
|
Loading…
Reference in New Issue
Block a user