]> sjero.net Git - wget/commitdiff
Automated merge with file:/home/micah/devel/wget/mailing-lists
authorMicah Cowan <micah@cowan.name>
Sat, 13 Oct 2007 07:23:44 +0000 (00:23 -0700)
committerMicah Cowan <micah@cowan.name>
Sat, 13 Oct 2007 07:23:44 +0000 (00:23 -0700)
18 files changed:
ChangeLog
NEWS
PATCHES [deleted file]
doc/ChangeLog
doc/wget.texi
msdos/ChangeLog
msdos/Makefile.DJ
msdos/Makefile.WC [new file with mode: 0644]
msdos/config.h
src/ChangeLog
src/ftp.c
src/http-ntlm.c
src/http.c
src/main.c
src/mswindows.c
src/mswindows.h
src/url.c
src/utils.c

index 46ff400f776d41f6c49c71ab25e9022543a9a7c2..34cb3f76887779a77f610eea7f292977eccef4e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-12  Micah Cowan  <micah@cowan.name>
+
+       * PATCHES: Removed.
+       * NEWS: Updated info about source repositories, removal of
+       PATCHES file.
+
 2007-10-03  Micah Cowan  <micah@cowan.name>
 
        * NEWS: Note missing functionality from GnuTLS support. Call out
diff --git a/NEWS b/NEWS
index 318840dc91cbae06937cbc7b48692e416247d1f6..518b561dae037388b660f87f673d9a8f33489902 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,15 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
 \f
 * Changes in Wget 1.11.
 
+** The source code has been migrated to Mercurial. The repositories are
+available at http://hg.addictivecode.org/. Prior to this, the source
+code was hosted on Subversion (migrated from the original CVS); you can
+still get access to older tags and branches for Wget in the Subversion
+repository at http://addictivecode.org/svn/wget/.
+
+** PATCH file removed; see http://wget.addictivecode.org/PatchGuidelines
+for current information about producing patches for GNU Wget.
+
 ** TODO file removed: we use a bugtracker now; see
 http://wget.addictivecode.org/BugTracker. Also,
 http://wget.addictivecode.org/FeatureSpecifications.
@@ -61,11 +70,6 @@ was only used by the passive_ftp .wgetrc setting.  If you're running
 broken scripts or Perl modules that unconditionally specify
 `--passive-ftp' and your firewall disallows it, you can override them
 by replacing wget with a script that execs wget "$@" --no-passive-ftp.
-
-** The source code has migrated from CVS to Subversion.  The
-repository is available at http://svn.dotsrc.org/repo/wget/; to
-checkout the trunk to a directory named `wget', use something like
-`svn checkout http://svn.dotsrc.org/repo/wget/trunk/ wget'.
 \f
 * Changes in Wget 1.10.
 
diff --git a/PATCHES b/PATCHES
deleted file mode 100644 (file)
index b5bb1f6..0000000
--- a/PATCHES
+++ /dev/null
@@ -1,160 +0,0 @@
-* Guidelines for patch submissions.
-===================================
-
-** What is a patch?
--------------------
-
-A patch file, also known as a "diff", is a textual representation of
-changes to source code.  Patches are readable enough to be reviewed by
-humans and at the same time regular enough to be processed by
-programs.  The `patch' utility is used to change the source code in
-the manner that the patch describes, this being called "applying" the
-patch.  Patches work even on files that have been modified
-independently of the modifications in the patch, as long as those
-other changes do not conflict with the patch.
-
-Because of these properties, patches are the preferred means of
-distributing the changes to a free software project.  If you have made
-a change to Wget and would like to contribute it, you will need to
-create a patch and send it to the developers; please read on.
-
-** Where to send the patches.
------------------------------
-
-Patches intended to be applied to Wget should be mailed to
-<wget-patches@sunsite.dk>.  Each patch will be reviewed by the
-developers, and will be acked and added to the distribution, or
-rejected with an explanation.  Unfortunately, the developers are often
-busy with their day jobs, so the review process can take a while.
-
-If you want to discuss your patch with the community of Wget users and
-developers, it is OK to send it to the main list at <wget@sunsite.dk>.
-If the patch is really huge (more than 100K or so), you may want to
-put it on the web and post the URL.
-
-EVERY patch should be accompanied by an explanation of what the patch
-changes, and why the change is desirable or necessary.  The
-explanation need not be long, but please don't just send a patch
-without any accompanying text.
-
-Normally, a patch can be just inserted into the message, after the
-explanation and the ChangeLog entry.  However, if your mail composer
-or gateway is inclined to munge patches, e.g. by wrapping long lines,
-please send them out as a MIME attachment.  It is important that the
-patch survives the travel unchanged so that we can feed it to the
-`patch' utility after reviewing it.
-
-** How to create patches.
--------------------------
-
-First, please make sure that you are working with the latest version
-of the source -- changing obsolete code is a waste of time.  Working
-on the latest release is acceptable in most cases, but it is better
-yet to download the very latest sources from the public Subversionn
-server and work on those.  The web page at
-<http://www.gnu.org/software/wget/> explains how to get the source
-code from the repository.
-
-Patches are created using the `diff' program.  When making patches,
-please use the `-u' option, or if your diff doesn't support it, `-c'.
-Ordinary (context-free) diffs are notoriously prone to errors, since
-line numbers tend to change when others make changes to the same
-source file.
-
-In the general case, `diff' is used like this:
-
-    diff -u ORIGFILE CHANGEDFILE > patch.txt
-
-Also, it is helpful if you create the patch in the top level of
-the Wget source directory.  For example:
-
-    cp src/http.c src/http.c.orig
-    ... modify src/http.c ....
-    diff -u src/http.c.orig src/http.c > patch.txt
-
-If your patch changes more than one file, feel free to simply
-concatenate the diffs of different files into a large diff:
-
-    (diff -u foo.orig foo; diff -u bar.orig bar) > patch.txt
-
-The alternative is to leave the unchanged source lying around and use
-the `-r' option to compare entire directories:
-
-    diff -ru wget-1.9.orig wget-1.9 > patch.txt
-
-If you do that, please be careful not to include the differences to
-automatically generated files, such as `.info*'.
-
-If you are using Subversion, generating diffs is even simpler -- after
-changing the files, all you need to do is run the following command
-from Wget's top-level directory:
-
-    svn diff > patch.txt
-
-If you run on Windows and don't have `diff' handy, please obtain it.
-It's extremely hard to review changes to files unless they're in the
-form of a patch.  If you really cannot use a variant of `diff', then
-mail us the whole new file and indicate which version of Wget you
-changed; that way we will be able to generate the diff ourselves.
-
-Finally, if your changes introduce new files, or if they change the
-old files past all recognition (e.g. by completely reimplementing the
-old stuff), sending a patch might not make sense.  In that case, just
-attach the files along with an explanation of what is being changed.
-
-** Standards and coding style.
-------------------------------
-
-Wget abides by the GNU coding standards, available at:
-
-    http://www.gnu.org/prep/standards.html
-
-I consider perhaps the most important single point in that entire
-document to be the "no arbitrary limits" rule.  Even where Wget's
-coding is less than exemplary, it respects that rule.  There should be
-no exceptions.
-
-Here is a short recap of the GNU formatting and naming conventions,
-partly borrowed from XEmacs:
-
-  * Put a space after every comma.
-
-  * Put a space before the parenthesis that begins a function call,
-    macro call, function declaration or definition, or control
-    statement (if, while, switch, for).  (DO NOT do this for macro
-    definitions; this is invalid preprocessor syntax.)
-
-  * The brace that begins a control statement (if, while, for, switch,
-    do) or a function definition should go on a line by itself.
-
-  * In function definitions, put the return type and all other
-    qualifiers on a line before the function name.  Thus, the function
-    name is always at the beginning of a line.
-
-  * Indentation level is two spaces.  (However, the first and
-    following statements of a while/for/if/etc. block are indented
-    four spaces from the while/for/if keyword.  The opening and
-    closing braces are indented two spaces.)
-
-  * Variable and function names should be all lowercase, with
-    underscores separating words, except for a prefixing tag, which may
-    be in uppercase.  Do not use the mixed-case convention (e.g.
-    SetVariableToValue ()) and *especially* do not use Microsoft
-    Hungarian notation (char **rgszRedundantTag).
-
-  * Preprocessor constants and enumerations should be all uppercase,
-    and should be prefixed with a tag that groups related constants
-    together.
-
-** ChangeLog policy.
---------------------
-
-Each patch should be accompanied by an update to the appropriate
-ChangeLog file.  Please don't mail diffs of ChangeLog files because
-they have an extremely high rate of failure; just mail us the new
-entries you added to the ChangeLog.  Patches without a ChangeLog entry
-will be accepted, but this creates additional work for the
-maintainers, so please do take the time to write one.
-
-Guidelines for writing ChangeLog entries are also governed by the GNU
-coding standards, under the "Change Logs" section.
index 783eb880f4d2e422f09a30ba8fc210508917de11..b2f017c25bdff8128f713e9958cdc9effb1f75ae 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-10  Micah Cowan  <micah@cowan.name>
+
+       * wget.texi <Wgetrc Commands>: Fixed "doewnloads" typo.
+
 2007-10-03  Micah Cowan  <micah@cowan.name>
 
        * wget.texi <Wgetrc Commands>: Cleaned up alphabetization,
index a8ca8406d5f12c8ceb58d970a77e4f9883b2851a..9b48917bac75333c9615a507df029c3759baf942 100644 (file)
@@ -2659,7 +2659,7 @@ This command used to be named @code{login} prior to Wget 1.10.
 Turn globbing on/off---the same as @samp{--glob} and @samp{--no-glob}.
 
 @item header = @var{string}
-Define a header for HTTP doewnloads, like using
+Define a header for HTTP downloads, like using
 @samp{--header=@var{string}}.
 
 @item html_extension = on/off
index dcf81278e9a4a425ef2cb400c7c9582c8d5fa794..63539b74971a475837da080db2e7f6d067267416 100644 (file)
@@ -1,3 +1,14 @@
+2007-10-02  Gisle Vanem  <gvanem@broadpark.no>
+
+       * config.h: Removed unused defines, added needed 'HAVE_*' defines.
+
+       * Makefile.DJ: rewritten to be used from './src' directory.
+       Added '-DOPENSSL_NO_KRB5' for OpenSSL build. Target is
+       now wget.exe.
+
+       * Makefile.WC: Added for building with OpenWatcom targeting
+       32-bit DOS (DOS32A extender). 
+
 2007-09-24  Gisle Vanem  <giva@bgnett.no>
 
        * Makefile.DJ, config.h: Added to support building on MS-DOS via
index bed35cd141a963dbf714f118afb1460bd9f2dcae..72e1cedf315619d1d548ab0e3b7be60386ec97a4 100644 (file)
@@ -1,28 +1,33 @@
 #
 # GNU Makefile for wget / djgpp / MSDOS.
-# By Gisle Vanem <giva@bgnett.no>.
+# By Gisle Vanem <giva@bgnett.no> 2007.
 #
-.SUFFIXES: .exe .map
+# `cd' to `./src' and issue the command:
+#   make -f ../msdos/Makefile.dj
+#
+.SUFFIXES: .exe
 
 USE_OPENSSL = 0
 USE_IPV6    = 1
 
+#
+# Change to suite.
+#
 OPENSSL_ROOT = e:/net/OpenSSL.099
 ZLIB_ROOT    = e:/djgpp/contrib/zlib
 
-VPATH   = ../src
 OBJ_DIR = djgpp.obj
 CC      = gcc
-CFLAGS  = -O2 -g -Wall -Wcast-align -I. -I../src -I/dev/env/WATT_ROOT/inc \
+CFLAGS  = -O2 -g -Wall -Wcast-align -I. -I../msdos -I/dev/env/WATT_ROOT/inc \
           -DHAVE_CONFIG_H -DENABLE_DEBUG
 
 # LDFLAGS = -s
 
 ifeq ($(USE_OPENSSL),1)
-  CFLAGS  += -DHAVE_OPENSSL -DHAVE_SSL -I$(OPENSSL_ROOT)
+  CFLAGS  += -DHAVE_OPENSSL -DHAVE_SSL -DOPENSSL_NO_KRB5 -I$(OPENSSL_ROOT)
   EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a \
              $(ZLIB_ROOT)/libz.a
-  SOURCES  = ../src/openssl.c ../src/http-ntlm.c
+  SOURCES += openssl.c http-ntlm.c
 endif
 
 ifeq ($(USE_IPV6),1)
@@ -31,28 +36,28 @@ endif
 
 EX_LIBS += /dev/env/WATT_ROOT/lib/libwatt.a
 
-SOURCES += $(addprefix ../src/, cmpt.c connect.c cookies.c ftp.c ftp-basic.c \
-             ftp-ls.c ftp-opie.c getopt.c hash.c host.c html-parse.c html-url.c \
-             http.c init.c log.c main.c gen-md5.c gnu-md5.c netrc.c progress.c \
-             recur.c res.c retr.c safe-ctype.c url.c utils.c version.c convert.c \
-             xmalloc.c ptimer.c spider.c)
+SOURCES += cmpt.c connect.c cookies.c ftp.c ftp-basic.c ftp-ls.c \
+           ftp-opie.c getopt.c hash.c host.c html-parse.c html-url.c \
+           http.c init.c log.c main.c gen-md5.c gnu-md5.c netrc.c \
+           progress.c recur.c res.c retr.c safe-ctype.c url.c utils.c \
+           version.c convert.c xmalloc.c ptimer.c spider.c
 
-OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(SOURCES:.c=.o)))
+OBJECTS = $(addprefix $(OBJ_DIR)/, $(SOURCES:.c=.o))
 
-all: $(OBJ_DIR) ../wget-dos.exe
+all: $(OBJ_DIR) wget.exe
        @echo 'Welcome to Wget'
 
 $(OBJ_DIR):
        mkdir $(OBJ_DIR)
 
-../wget-dos.exe: $(OBJECTS)
+wget.exe: $(OBJECTS)
        $(CC) $(LDFLAGS) -o $@ $^ $(EX_LIBS)
 
 clean:
        rm -f $(OBJECTS) $(MAPFILE)
 
 vclean realclean: clean
-       rm -f ../wget-dos.exe depend.dj
+       rm -f wget.exe depend.dj
        - rmdir $(OBJ_DIR)
 
 $(OBJ_DIR)/%.o: %.c
diff --git a/msdos/Makefile.WC b/msdos/Makefile.WC
new file mode 100644 (file)
index 0000000..de01b8f
--- /dev/null
@@ -0,0 +1,49 @@
+#
+# Makefile for Wget / DOS32A / OpenWatcom
+# by G. Vanem <gvanem@broadpark.no> 2007
+#
+
+COMPILE = *wcc386 -mf -3r -w6 -d2 -zq -zm -of -I. -I$(%watt_root)\inc &
+            -I..\msdos -fr=nul -bt=dos -s -dHAVE_CONFIG_H -dENABLE_DEBUG &
+            -dSIZEOF_INT=4
+
+LINK = *wlink option quiet, map, verbose, eliminate, caseexact, stack=100k &
+        debug all system dos32a
+
+OBJ_DIR = Watcom.obj
+
+OBJECTS = $(OBJ_DIR)\cmpt.obj      $(OBJ_DIR)\connect.obj    &
+          $(OBJ_DIR)\convert.obj   $(OBJ_DIR)\cookies.obj    &
+          $(OBJ_DIR)\ftp-basic.obj $(OBJ_DIR)\ftp-ls.obj     &
+          $(OBJ_DIR)\ftp-opie.obj  $(OBJ_DIR)\ftp.obj        &
+          $(OBJ_DIR)\gen-md5.obj   $(OBJ_DIR)\getopt.obj     &
+          $(OBJ_DIR)\gnu-md5.obj   $(OBJ_DIR)\hash.obj       &
+          $(OBJ_DIR)\host.obj      $(OBJ_DIR)\html-parse.obj &
+          $(OBJ_DIR)\html-url.obj  $(OBJ_DIR)\http.obj       &
+          $(OBJ_DIR)\init.obj      $(OBJ_DIR)\log.obj        &
+          $(OBJ_DIR)\main.obj      $(OBJ_DIR)\netrc.obj      &
+          $(OBJ_DIR)\progress.obj  $(OBJ_DIR)\ptimer.obj     &
+          $(OBJ_DIR)\recur.obj     $(OBJ_DIR)\res.obj        &
+          $(OBJ_DIR)\retr.obj      $(OBJ_DIR)\safe-ctype.obj &
+          $(OBJ_DIR)\spider.obj    $(OBJ_DIR)\url.obj        &
+          $(OBJ_DIR)\utils.obj     $(OBJ_DIR)\version.obj    &
+          $(OBJ_DIR)\xmalloc.obj
+
+all: $(OBJ_DIR) wget.exe .SYMBOLIC
+       @echo 'Welcome to Wget / Watcom'
+
+$(OBJ_DIR):
+       - mkdir $^@
+
+.ERASE
+.c{$(OBJ_DIR)}.obj:
+       *$(COMPILE) $[@ -fo=$@
+
+wget.exe: $(OBJECTS)
+      $(LINK) name $@ file { $(OBJECTS) } library $(%watt_root)\lib\wattcpwf.lib
+
+
+clean: .SYMBOLIC
+       - rm $(OBJ_DIR)\*.obj wget.exe wget.map
+       - rmdir $(OBJ_DIR)
+
index f43ab4ece1ba67a22b6535a4c4764c558f1f15d2..276f66c1716ea14be5a4c4445edf004c0f35c82c 100644 (file)
 #endif
 
 #if defined(__HIGHC__)
-  #define inline
   #define HAVE_UNISTD_H 1
   #define HAVE_UTIME_H 1
 #endif
 
-#if defined(__WATCOMC__) || defined(__BORLANDC__)
+#if defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__HIGHC__)
   #define inline
 #endif
 
-#ifdef HAVE_SSL
-  #define OPENSSL_NO_KRB5
-#endif
-
-#define STDC_HEADERS 1
-#define RETSIGTYPE void
-
 #define USE_OPIE 1
 #define USE_DIGEST 1
 #define DEBUG
 
 #ifdef __DJGPP__
-  #define HAVE_STRUCT_UTIMBUF 1
-  #define HAVE_UNAME 1
-  #define HAVE_UTIME_H 1
+  #define HAVE__BOOL          1
   #define HAVE_STRCASECMP 1
   #define HAVE_STRNCASECMP 1
-  #define HAVE_SYS_SELECT_H 1
-  #define HAVE_USLEEP 1
-  #define HAVE_SIGNAL 1
-  #define HAVE_BASENAME 1
   #define HAVE_SIGSETJMP 1
   #define HAVE_SIGBLOCK 1
-  #define HAVE__BOOL 1
+  #define HAVE_STRUCT_UTIMBUF 1
+  #define HAVE_SYS_SELECT_H   1
+  #define HAVE_USLEEP         1
+  #define HAVE_UTIME_H        1
+  #define HAVE_INT64_T        1
 
   #if (DJGPP_MINOR >= 4)
     #include <stdbool.h>
 #endif
 
 #ifdef OPENWATCOM_15
-  #define HAVE_STRCASECMP
-  #define HAVE_STRNCASECMP
+  #define HAVE_INT64_T     1
+  #define HAVE_STRCASECMP  1
+  #define HAVE_STRNCASECMP 1
+  #define HAVE_UTIME_H     1
 #endif
 
-#define HAVE_GETHOSTBYNAME 1
-#define HAVE_GETHOSTNAME 1
-#define HAVE_SELECT 1
+#define HAVE_PROCESS_H     1
 #define HAVE_STRDUP 1
-#define HAVE_STRERROR 1
-#define HAVE_STRSTR 1
-#define HAVE_MKTIME 1
-#define HAVE_STDARG_H 1
 #define HAVE_STDLIB_H 1
 #define HAVE_STRING_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_GETTIMEOFDAY 1
-#define HAVE_MD5 1
 #define HAVE_BUILTIN_MD5 1
 #define HAVE_ISATTY 1
-#define HAVE_MEMMOVE 1
-
-#define OS_TYPE "DOS"
-#define CTRLBREAK_BACKGND 1
-#define PROTOTYPES 1
-
-#define WGET_USE_STDARG
 
 #define lookup_host  wget_lookuphost
 #define select       select_s
 #define sock_write   wget_sock_write
 #define sock_close   wget_sock_close
 
-#if defined(__DJGPP__)
-  #define MKDIR(p,a) mkdir(p,a)
-#else
+#if !defined(__DJGPP__)
+  #include <direct.h>
+  #define mkdir(p,a)  (mkdir)(p)
   #define strcasecmp stricmp
-  #define MKDIR(p,a) mkdir(p)
 #endif
 
 #if !defined(MSDOS)
-#define MSDOS
+  #define MSDOS
 #endif
 
+#define OS_TYPE "DOS"
+
 #endif  /* CONFIG_DOS_H */
index c6fc6564c1ae7dd5570d5603b99b5a38d17e8689..fb336cebf2a1815e9375b88daa29fbb16db93886 100644 (file)
@@ -1,3 +1,35 @@
+2007-10-10  Micah Cowan  <micah@cowan.name>
+
+       * http-ntlm.c: Include openssl/opensslv.h explicitly, instead of
+       hoping it'll be included by accident in openssl/des.h.
+
+2007-10-09  Gisle Vanem  <gvanem@broadpark.no>
+
+       * mswindows.c: 'argc' and 'argv' in 'windows_main()' are no longer
+       needed.  Hence simply the prototype. Free 'exec_name' at exit.
+
+2007-10-08  Micah Cowan  <micah@cowan.name>
+
+       * http.c (http_loop): Add send_head_first conditional back
+       around code that needs it, but not around the last-modified
+       header-parsing stuff this time. Removed no-longer-useful (was it
+       ever?) restart_loop boolean, continuing unconditionally at end
+       of send_head_first conditional block (if we haven't jumped out).
+
+2007-10-04  Micah Cowan  <micah@cowan.name>
+
+       * http.c (http_loop): We've got_name if content_disposition
+       support isn't on; make sure we continue properly in that case,
+       even though we're not sending HEAD.
+
+2007-10-02  Gisle Vanem  <gvanem@broadpark.no>
+       
+       * ftp.c: Use "_listing" for MSDOS (".listing" is illegal).
+
+       * url.c: Update comment for 'filechr_not_windows'.
+
+       * utils.c: Include <process.h> for 'getpid()' on Watcom.
+
 2007-10-02  Micah Cowan  <micah@cowan.name>
 
        * ftp.c (getftp, ftp_loop_internal), http.c (http_loop), main
        * http.c (http_zero): Remove no-longer-used local_size variable.
        Fixes bug #21057.
 
+2007-09-12  Micah Cowan  <micah@cowan.name>
+
+       * http.c (http_loop): Remove send_head_first from condition for
+       parsing timestamp.
+
 2007-08-29  Micah Cowan  <micah@cowan.name>
 
        * openssl.c (ssl_init): Re un-const-ified the meth local
index d8a184457c39204fbcc35de8cc1cbce4e1217498..e0d0777336453b53977843049daddb3739b5d0f7 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -51,7 +51,11 @@ so, delete this exception statement from your version.  */
 #include "recur.h"              /* for INFINITE_RECURSION */
 
 /* File where the "ls -al" listing will be saved.  */
+#ifdef MSDOS
+#define LIST_FILENAME "_listing"
+#else
 #define LIST_FILENAME ".listing"
+#endif
 
 typedef struct
 {
index 054c8a95939a18b3fced17d09d87cd279de28a20..32bb3c59355b2180b13144e7ecb4b652926b650d 100644 (file)
@@ -42,6 +42,7 @@ so, delete this exception statement from your version.  */
 
 #include <openssl/des.h>
 #include <openssl/md4.h>
+#include <openssl/opensslv.h>
 
 #include "wget.h"
 #include "utils.h"
index 11af939a170fc20d073795988b13ef717d0a1b5b..67e9a989eae93fddfae02cdb73db16fb06656c74 100644 (file)
@@ -2344,6 +2344,11 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
       hstat.local_file = xstrdup (opt.output_document);
       got_name = true;
     }
+  else if (!opt.content_disposition)
+    {
+      hstat.local_file = url_file_name (u);
+      got_name = true;
+    }
 
   /* Reset the counter. */
   count = 0;
@@ -2538,9 +2543,9 @@ Remote file does not exist -- broken link!!!\n"));
         }
 
       /* Did we get the time-stamp? */
-      if (send_head_first && !got_head)
+      if (!got_head)
         {
-          bool restart_loop = false;
+          got_head = true;    /* no more time-stamping */
 
           if (opt.timestamping && !hstat.remote_time)
             {
@@ -2558,92 +2563,87 @@ Last-modified header invalid -- time-stamp ignored.\n"));
                 time_came_from_head = true;
             }
       
-          /* The time-stamping section.  */
-          if (opt.timestamping)
+          if (send_head_first)
             {
-              if (hstat.orig_file_name) /* Perform the following checks only 
-                                           if the file we're supposed to 
-                                           download already exists. */
+              /* The time-stamping section.  */
+              if (opt.timestamping)
                 {
-                  if (hstat.remote_time && 
-                      tmr != (time_t) (-1))
+                  if (hstat.orig_file_name) /* Perform the following
+                                               checks only if the file
+                                               we're supposed to
+                                               download already exists.  */
                     {
-                      /* Now time-stamping can be used validly.  Time-stamping
-                         means that if the sizes of the local and remote file
-                         match, and local file is newer than the remote file,
-                         it will not be retrieved.  Otherwise, the normal
-                         download procedure is resumed.  */
-                      if (hstat.orig_file_tstamp >= tmr)
+                      if (hstat.remote_time && 
+                          tmr != (time_t) (-1))
                         {
-                          if (hstat.contlen == -1 
-                              || hstat.orig_file_size == hstat.contlen)
+                          /* Now time-stamping can be used validly.
+                             Time-stamping means that if the sizes of
+                             the local and remote file match, and local
+                             file is newer than the remote file, it will
+                             not be retrieved.  Otherwise, the normal
+                             download procedure is resumed.  */
+                          if (hstat.orig_file_tstamp >= tmr)
                             {
-                              logprintf (LOG_VERBOSE, _("\
+                              if (hstat.contlen == -1 
+                                  || hstat.orig_file_size == hstat.contlen)
+                                {
+                                  logprintf (LOG_VERBOSE, _("\
 Server file no newer than local file `%s' -- not retrieving.\n\n"),
-                                         hstat.orig_file_name);
-                              ret = RETROK;
-                              goto exit;
-                            }
-                          else
-                            {
-                              logprintf (LOG_VERBOSE, _("\
+                                             hstat.orig_file_name);
+                                  ret = RETROK;
+                                  goto exit;
+                                }
+                              else
+                                {
+                                  logprintf (LOG_VERBOSE, _("\
 The sizes do not match (local %s) -- retrieving.\n"),
-                                         number_to_static_string (hstat.orig_file_size));
+                                             number_to_static_string (hstat.orig_file_size));
+                                }
                             }
-                        }
-                      else
-                        logputs (LOG_VERBOSE,
-                                 _("Remote file is newer, retrieving.\n"));
+                          else
+                            logputs (LOG_VERBOSE,
+                                     _("Remote file is newer, retrieving.\n"));
 
-                      logputs (LOG_VERBOSE, "\n");
+                          logputs (LOG_VERBOSE, "\n");
+                        }
                     }
+                  
+                  /* free_hstat (&hstat); */
+                  hstat.timestamp_checked = true;
                 }
               
-              /* free_hstat (&hstat); */
-              hstat.timestamp_checked = true;
-              restart_loop = true;
-            }
-          
-          if (opt.spider)
-            {
-              if (opt.recursive)
+              if (opt.spider)
                 {
-                  if (*dt & TEXTHTML)
+                  if (opt.recursive)
                     {
-                      logputs (LOG_VERBOSE, _("\
+                      if (*dt & TEXTHTML)
+                        {
+                          logputs (LOG_VERBOSE, _("\
 Remote file exists and could contain links to other resources -- retrieving.\n\n"));
-                      restart_loop = true;
+                        }
+                      else 
+                        {
+                          logprintf (LOG_VERBOSE, _("\
+Remote file exists but does not contain any link -- not retrieving.\n\n"));
+                          ret = RETROK; /* RETRUNNEEDED is not for caller. */
+                          goto exit;
+                        }
                     }
-                  else 
+                  else
                     {
                       logprintf (LOG_VERBOSE, _("\
-Remote file exists but does not contain any link -- not retrieving.\n\n"));
+Remote file exists but recursion is disabled -- not retrieving.\n\n"));
                       ret = RETROK; /* RETRUNNEEDED is not for caller. */
                       goto exit;
                     }
                 }
-              else
-                {
-                  logprintf (LOG_VERBOSE, _("\
-Remote file exists but recursion is disabled -- not retrieving.\n\n"));
-                  ret = RETROK; /* RETRUNNEEDED is not for caller. */
-                  goto exit;
-                }
-            }
 
-          if (send_head_first)
-            {
               got_name = true;
-              restart_loop = true;
-            }
-          
-          got_head = true;    /* no more time-stamping */
-          *dt &= ~HEAD_ONLY;
-          count = 0;          /* the retrieve count for HEAD is reset */
-
-          if (restart_loop) 
-            continue;
-        }
+              *dt &= ~HEAD_ONLY;
+              count = 0;          /* the retrieve count for HEAD is reset */
+              continue;
+            } /* send_head_first */
+        } /* !got_head */
           
       if ((tmr != (time_t) (-1))
           && ((hstat.len == hstat.contlen) ||
index 43cb344d43e203390d0480bffa8b0a7a7ed41d17..f60d0c0a940b0a3f0bc4a3392d8d9cc7c17a269e 100644 (file)
@@ -708,7 +708,7 @@ main (int argc, char *const *argv)
 
 #ifdef WINDOWS
   /* Drop extension (typically .EXE) from executable filename. */
-  windows_main (&argc, (char **) argv, (char **) &exec_name);
+  windows_main ((char **) &exec_name);
 #endif
 
   /* Set option defaults; read the system wgetrc and ~/.wgetrc.  */
index de031cb0117c2aeae3ea7909e4790ad0acb3a58c..1bf8df93d31940990c72d586bf2cdf0752a37e57 100644 (file)
@@ -73,7 +73,7 @@ xsleep (double seconds)
 }
 
 void
-windows_main (int *argc, char **argv, char **exec_name)
+windows_main (char **exec_name)
 {
   char *p;
 
@@ -87,6 +87,7 @@ windows_main (int *argc, char **argv, char **exec_name)
 static void
 ws_cleanup (void)
 {
+  xfree ((char*)exec_name);
   WSACleanup ();
 }
 
index da0665d08d02a8b83a1934f7bc62124ca20f027e..d339bb32e036f456c0dc7b8b82298b06fd834d21 100644 (file)
@@ -208,6 +208,6 @@ void ws_startup (void);
 void ws_changetitle (const char *);
 void ws_percenttitle (double);
 char *ws_mypath (void);
-void windows_main (int *, char **, char **);
+void windows_main (char **);
 
 #endif /* MSWINDOWS_H */
index 6235c5216d224063ad8eca0532de36d348ad22ef..72bb7b90d735c6eca5a73a450dda6b0d4e60a1cf 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -1221,7 +1221,7 @@ append_char (char ch, struct growable *dest)
 
 enum {
   filechr_not_unix    = 1,      /* unusable on Unix, / and \0 */
-  filechr_not_windows = 2,      /* unusable on MSDOS/Windows, one of \|/<>?:*" */
+  filechr_not_windows = 2,      /* unusable on Windows, one of \|/<>?:*" */
   filechr_control     = 4       /* a control character, e.g. 0-31 */
 };
 
index 94b4e3a349bfaa01fdd0fcb5c70972a41e3e205a..63545a3274aec45b1067925c3453aa9b0411cf04 100644 (file)
@@ -42,6 +42,9 @@ so, delete this exception statement from your version.  */
 #ifdef HAVE_MMAP
 # include <sys/mman.h>
 #endif
+#ifdef HAVE_PROCESS_H
+# include <process.h>  /* getpid() */
+#endif
 #ifdef HAVE_UTIME_H
 # include <utime.h>
 #endif