Fix crash when using custom dot styles
Hrvoje Niksic <[email protected]>
| Newsgroups | gmane.comp.web.wget.patches |
|---|---|
| Message-ID | <[email protected]> |
CVS Wget crashes when you specify custom dot styles, using `-e dotsinline=...' etc. This patch fixes the problem, introduced by large file support: 2005-03-12 Hrvoje Niksic <[email protected]> * wget.h: Include options.h after wgint has been defined. * options.h (struct options): Declare options processed with cmd_bytes as wgint, not long. Index: src/options.h =================================================================== RCS file: /pack/anoncvs/wget/src/options.h,v retrieving revision 1.46 diff -u -r1.46 options.h --- src/options.h 2005/03/06 02:11:09 1.46 +++ src/options.h 2005/03/15 17:39:57 @@ -110,7 +110,7 @@ double waitretry; /* The wait period between retries. - HEH */ int use_robots; /* Do we heed robots.txt? */ - long limit_rate; /* Limit the download rate to this + wgint limit_rate; /* Limit the download rate to this many bps. */ LARGE_INT quota; /* Maximum file size to download and store. */ @@ -144,7 +144,7 @@ listings? */ char *dot_style; - long dot_bytes; /* How many bytes in a printing + wgint dot_bytes; /* How many bytes in a printing dot. */ int dots_in_line; /* How many dots in one line. */ int dot_spacing; /* How many dots between spacings. */ Index: src/wget.h =================================================================== RCS file: /pack/anoncvs/wget/src/wget.h,v retrieving revision 1.54 diff -u -r1.54 wget.h --- src/wget.h 2005/03/04 19:26:18 1.54 +++ src/wget.h 2005/03/15 17:39:59 @@ -88,7 +88,6 @@ /* Include these, so random files need not include them. */ #include "sysdep.h" -#include "options.h" /* locale independent replacement for ctype.h */ #include "safe-ctype.h" @@ -124,6 +123,8 @@ # define WGINT_MAX LLONG_MAX # endif #endif + +#include "options.h" /* Everything uses this, so include them here directly. */ #include "xmalloc.h"