- 2008-05-02 Madhusudan Hosaagrahara <com.gmail.hrmadhu>
- * src/Makefile.am, src/main.c, src/init.c, src/init.h,
- src/build_info.c: Adds build information to the --version
- command line option. Fixes bug #20636.
++2008-06-13 Madhusudan Hosaagrahara <com.gmail.hrmadhu>
++
++ * Makefile.am, main.c, init.c, init.h, build_info.c: Adds build
++ information to the --version command line option. Fixes bug
++ #20636.
++
+ 2008-06-01 Micah Cowan <micah@cowan.name>
+
+ * main.c [WINDOWS]: Reopen stdout in binary mode, when -O - is
+ given.
+
+ 2008-05-31 Micah Cowan <micah@cowan.name>
+
+ * html-url.c, http.c: Avoid casts in a couple spots.
+
+ 2008-05-30 Henri Häkkinen <henux@users.sourceforge.net>
+
+ * cookies.c, ftp-basic.c, hash.c, html-url.c, http-ntlm.c, http.c,
+ init.c, log.c, main.c, progress.c, ptimer.c, spider.c, url.c,
+ utils.c: Minor changes to silence warnings when using -Wall.
+
+ 2008-05-26 Steven Schubiger <schubiger@gmail.com>
+
+ * ftp.c (getftp): Replace last remaining invocation of escnonprint
+ with gnulib quote.
+
+ 2008-05-19 Micah Cowan <micah@cowan.name>
+
+ * main.c (main): Password prompt should be done only once (not
+ once per argument), and should be done prior to the background
+ fork.
+
+ 2008-05-17 Steven Schubiger <schubiger@gmail.com>
+
+ * init.c (defaults): Set the preferred IP family to `none' by
+ default.
+
+ 2008-05-17 Kenny Parnell <k.parnell@gmail.com>
+
+ (cmd_spec_prefer_family): Initialize prefer_family to prefer_none.
+
+ 2008-05-17 Micah Cowan <micah@cowan.name>
+
+ * main.c (main): Handle Ctrl-D on command-line.
+
+ 2008-05-15 Steven Schubiger <schubiger@gmail.com>
+
+ * ftp.c (getftp): Verify that the file actually exists in FTP, by
+ checking it against the listing.
+
+ 2008-05-15 Micah Cowan <micah@cowan.name>
+
+ * main.c (prompt_for_password): Use the quote module.
+
+ 2008-05-14 Micah Cowan <micah@cowan.name>
+
+ * ftp.c (ftp_retrieve_list): Symlinks and other filenames
+ should be fully quoted.
+
+ 2008-05-12 Micah Cowan <micah@cowan.name>
+
+ * main.c (main): Downgrade "-N with -O" to a warning, and switch
+ it off to avoid confusing messages.
2008-04-30 Micah Cowan <micah@cowan.name>
LIBS = @LIBSSL@ @LIBGNUTLS@ @LIBINTL@ @LIBS@
bin_PROGRAMS = wget
-wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c ftp-basic.c \
- ftp-ls.c hash.c host.c html-parse.c html-url.c http.c \
- init.c log.c main.c netrc.c progress.c ptimer.c recur.c \
- res.c retr.c snprintf.c spider.c url.c \
- utils.c \
- connect.h convert.h cookies.h \
- ftp.h gen-md5.h hash.h host.h html-parse.h \
- http.h http-ntlm.h init.h log.h mswindows.h netrc.h \
- options.h progress.h ptimer.h recur.h res.h retr.h \
+wget_SOURCES = build_info.c cmpt.c connect.c convert.c cookies.c ftp.c \
+ ftp-basic.c ftp-ls.c hash.c host.c html-parse.c html-url.c \
+ http.c init.c log.c main.c netrc.c progress.c ptimer.c \
+ recur.c res.c retr.c snprintf.c spider.c url.c \
- utils.c xmalloc.c \
++ utils.c \
+ connect.h convert.h cookies.h \
+ ftp.h gen-md5.h hash.h host.h html-parse.h \
+ http.h http-ntlm.h init.h log.h mswindows.h netrc.h \
+ options.h progress.h ptimer.h recur.h res.h retr.h \
- spider.h ssl.h sysdep.h url.h utils.h wget.h xmalloc.h
+ spider.h ssl.h sysdep.h url.h utils.h wget.h
nodist_wget_SOURCES = version.c
EXTRA_wget_SOURCES = mswindows.c
- LDADD = $(ALLOCA) $(LIBOBJS) ../lib/libgnu.a @MD5_LDADD@
+ LDADD = $(LIBOBJS) ../lib/libgnu.a @MD5_LDADD@
AM_CPPFLAGS = -I$(top_srcdir)/lib @MD5_CPPFLAGS@
+ESCAPEQUOTE = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
version.c: $(wget_SOURCES) $(LDADD) $(srcdir)/Makefile.am
- echo 'const char *version_string = "@VERSION@"' > $@
- -hg log -r . --template='" ({node|short})"\n' 2>/dev/null >> $@
+ echo '/* version.c */' > $@
+ echo '/* Autogenerated by Makefile - DO NOT EDIT */' >> $@
+ echo '' >> $@
+ echo -n 'char* version_string = "@VERSION@ ' >> $@
+ -hg log -r . --template=' ({node|short})"\n' 2>/dev/null >> $@
echo ';' >> $@
+ echo 'char* compilation_string = "'$(COMPILE)'";' | $(ESCAPEQUOTE) >> $@
+ echo 'char* link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' | $(ESCAPEQUOTE) >> $@
check_LIBRARIES = libunittest.a
libunittest_a_SOURCES = $(wget_SOURCES) test.c test.h
return buf;
}
+ static char *
+ prompt_for_password (void)
+ {
+ if (opt.user)
+ printf (_("Password for user %s: "), quote (opt.user));
+ else
+ printf (_("Password: "));
+ return getpass("");
+ }
+
+/* Function that prints the line argument while limiting it
+ to at most line_length. prefix is printed on the first line
+ and an appropriate number of spaces are added on subsequent
+ lines.*/
+static void
+format_and_print_line (char* prefix, char* line,
+ int line_length)
+{
+ assert (prefix != NULL);
+ assert (line != NULL);
+
+ if (line_length <= 0)
+ line_length = max_chars_per_line;
+
+ const int leading_spaces = strlen (prefix);
+ printf ("%s", prefix);
+ int remaining_chars = line_length - leading_spaces;
+ /* We break on spaces. */
+ char* token = strtok (line, " ");
+ while (token != NULL)
+ {
+ /* If however a token is much larger than the maximum
+ line length, all bets are off and we simply print the
+ token on the next line. */
+ if (remaining_chars <= strlen (token))
+ {
+ printf ("\n");
+ int j = 0;
+ for (j = 0; j < leading_spaces; j++)
+ {
+ printf (" ");
+ }
+ remaining_chars = line_length - leading_spaces;
+ }
+ printf ("%s ", token);
+ remaining_chars -= strlen (token) + 1; // account for " "
+ token = strtok (NULL, " ");
+ }
+
+ printf ("\n");
+ xfree (prefix);
+ xfree (line);
+}
+
static void
print_version (void)
{