]> sjero.net Git - wget/commitdiff
Merge build info with head.
authorMicah Cowan <micah@cowan.name>
Sat, 14 Jun 2008 05:15:01 +0000 (22:15 -0700)
committerMicah Cowan <micah@cowan.name>
Sat, 14 Jun 2008 05:15:01 +0000 (22:15 -0700)
1  2 
src/ChangeLog
src/Makefile.am
src/init.c
src/main.c

diff --cc src/ChangeLog
index 03330ba3fcf43b6a3a5dff262ebdd46290df6975,49c8506cb35cb4d7ba4cc0d4f56833a57f55a9ba..322bc153395b6a5f11688ad3514fec4041f2a3ff
@@@ -1,7 -1,60 +1,66 @@@
- 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>
  
diff --cc src/Makefile.am
index cafcc20c48326e26c5bc924d7edba2e91306cd7b,451754914cb07dc09c58183c7c383ac621e09b04..c8485cfd8125d3877160f990d1a805aa02ee10d2
@@@ -35,32 -35,25 +35,32 @@@ DEFS     = @DEFS@ -DSYSTEM_WGETRC=\"$(s
  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
diff --cc src/init.c
Simple merge
diff --cc src/main.c
index 20c2aa0c2b3b47d3b30633b54884272ad85cdca6,28b04b30114f66bd876a5280846956f9583dff46..dc15bfbf9e82cd54e03696a3ee8880cdb7efe9f5
@@@ -683,50 -678,16 +688,60 @@@ secs_to_human_time (double interval
    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)
  {