]> sjero.net Git - wget/commitdiff
Fix merge glitches, get it to build.
authorMicah Cowan <micah@cowan.name>
Tue, 22 Apr 2008 08:47:39 +0000 (01:47 -0700)
committerMicah Cowan <micah@cowan.name>
Tue, 22 Apr 2008 08:47:39 +0000 (01:47 -0700)
.hgignore
src/Makefile.am
src/convert.c
src/css.l [new file with mode: 0644]
src/css.lex [deleted file]
src/http.c
src/recur.c
ylwrap [new symlink]

index 666c5c382419fb9ad7c1e6a47c6fa927868526fe..58932bb021bb5e5033d4894039138e4d3a3eae13 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -28,6 +28,7 @@ src/.deps
 src/stamp-h1
 src/config.h
 src/config.h.in
+src/css.c
 src/wget
 src/cscope.out
 src/tags
index 2403f6718d7bfa045d0b3b3d0f539267049a4317..a29983a9db44e1a38c1d6ba1a81c88454ced3ef1 100644 (file)
@@ -36,7 +36,7 @@ LIBS     = @LIBS@ @LIBSSL@ @LIBGNUTLS@ @LIBINTL@
 
 bin_PROGRAMS = wget
 wget_SOURCES = cmpt.c connect.c convert.c cookies.c \
-              css.lex css-url.c \
+              css.l css-url.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  \
index 4f90bb3b062c17662ad53b3f260eeeb34cb8703c..00319ddc76e5212fbda84bd1721a0410d998e769 100644 (file)
@@ -73,7 +73,7 @@ convert_links_in_hashtable (struct hash_table *downloaded_set,
   if (downloaded_set)
     cnt = hash_table_count (downloaded_set);
   if (cnt == 0)
-    goto cleanup;
+    return;
   file_array = alloca_array (char *, cnt);
   string_set_to_array (downloaded_set, file_array);
 
@@ -184,7 +184,7 @@ convert_all_links (void)
   secs = ptimer_measure (timer);
   logprintf (LOG_VERBOSE, _("Converted %d files in %s seconds.\n"),
              file_count, print_decimal (secs));
-cleanup:
+
   ptimer_destroy (timer);
 }
 
diff --git a/src/css.l b/src/css.l
new file mode 100644 (file)
index 0000000..8d1477a
--- /dev/null
+++ b/src/css.l
@@ -0,0 +1,137 @@
+%option case-insensitive
+%option noyywrap
+%option never-interactive
+
+%{
+/* Lex source for CSS tokenizing.
+   Taken from http://www.w3.org/TR/CSS21/grammar.html#q2
+   Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Wget.
+
+GNU Wget is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GNU Wget is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Wget; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+In addition, as a special exception, the Free Software Foundation
+gives permission to link the code of its release of Wget with the
+OpenSSL project's "OpenSSL" library (or with modified versions of it
+that use the same license as the "OpenSSL" library), and distribute
+the linked executables.  You must obey the GNU General Public License
+in all respects for all of the code used other than "OpenSSL".  If you
+modify this file, you may extend this exception to your version of the
+file, but you are not obligated to do so.  If you do not wish to do
+so, delete this exception statement from your version.  */
+
+#include "css-tokens.h"
+
+/* {s}+\/\*[^*]*\*+([^/*][^*]*\*+)*\/      {unput(' '); } */
+/*replace by space*/
+%}
+
+h               [0-9a-f]
+nonascii        [\200-\377]
+unicode         \\{h}{1,6}(\r\n|[ \t\r\n\f])?
+escape          {unicode}|\\[^\r\n\f0-9a-f]
+nmstart         [_a-z]|{nonascii}|{escape}
+nmchar          [_a-z0-9-]|{nonascii}|{escape}
+string1         \"([^\n\r\f\\"]|\\{nl}|{escape})*\"
+string2         \'([^\n\r\f\\']|\\{nl}|{escape})*\'
+invalid1        \"([^\n\r\f\\"]|\\{nl}|{escape})*
+invalid2        \'([^\n\r\f\\']|\\{nl}|{escape})*
+
+comment         \/\*[^*]*\*+([^/*][^*]*\*+)*\/
+ident           -?{nmstart}{nmchar}*
+name            {nmchar}+
+num             [0-9]+|[0-9]*"."[0-9]+
+string          {string1}|{string2}
+invalid         {invalid1}|{invalid2}
+url             ([!#$%&*-~]|{nonascii}|{escape})*
+s               [ \t\r\n\f]
+w               ({s}|{comment})*
+nl              \n|\r\n|\r|\f
+
+A               a|\\0{0,4}(41|61)(\r\n|[ \t\r\n\f])?
+C               c|\\0{0,4}(43|63)(\r\n|[ \t\r\n\f])?
+D               d|\\0{0,4}(44|64)(\r\n|[ \t\r\n\f])?
+E               e|\\0{0,4}(45|65)(\r\n|[ \t\r\n\f])?
+G               g|\\0{0,4}(47|67)(\r\n|[ \t\r\n\f])?|\\g
+H               h|\\0{0,4}(48|68)(\r\n|[ \t\r\n\f])?|\\h
+I               i|\\0{0,4}(49|69)(\r\n|[ \t\r\n\f])?|\\i
+K               k|\\0{0,4}(4b|6b)(\r\n|[ \t\r\n\f])?|\\k
+M               m|\\0{0,4}(4d|6d)(\r\n|[ \t\r\n\f])?|\\m
+N               n|\\0{0,4}(4e|6e)(\r\n|[ \t\r\n\f])?|\\n
+P               p|\\0{0,4}(50|70)(\r\n|[ \t\r\n\f])?|\\p
+R               r|\\0{0,4}(52|72)(\r\n|[ \t\r\n\f])?|\\r
+S               s|\\0{0,4}(53|73)(\r\n|[ \t\r\n\f])?|\\s
+T               t|\\0{0,4}(54|74)(\r\n|[ \t\r\n\f])?|\\t
+X               x|\\0{0,4}(58|78)(\r\n|[ \t\r\n\f])?|\\x
+Z               z|\\0{0,4}(5a|7a)(\r\n|[ \t\r\n\f])?|\\z
+
+%%
+
+{s}                     {return S;}
+
+\/\*[^*]*\*+([^/*][^*]*\*+)*\/          {return S;} /* ignore comments */
+
+"<!--"          {return CDO;}
+"-->"                   {return CDC;}
+"~="                    {return INCLUDES;}
+"|="                    {return DASHMATCH;}
+
+{w}"{"                  {return LBRACE;}
+{w}"+"                  {return PLUS;}
+{w}">"                  {return GREATER;}
+{w}","                  {return COMMA;}
+
+{string}                {return STRING;}
+{invalid}               {return INVALID; /* unclosed string */}
+
+{ident}                 {return IDENT;}
+
+"#"{name}               {return HASH;}
+
+"@import"               {return IMPORT_SYM;}
+"@page"                 {return PAGE_SYM;}
+"@media"                {return MEDIA_SYM;}
+"@charset "             {return CHARSET_SYM;}
+
+"!"{w}"important"       {return IMPORTANT_SYM;}
+
+{num}{E}{M}             {return EMS;}
+{num}{E}{X}             {return EXS;}
+{num}{P}{X}             {return LENGTH;}
+{num}{C}{M}             {return LENGTH;}
+{num}{M}{M}             {return LENGTH;}
+{num}{I}{N}             {return LENGTH;}
+{num}{P}{T}             {return LENGTH;}
+{num}{P}{C}             {return LENGTH;}
+{num}{D}{E}{G}          {return ANGLE;}
+{num}{R}{A}{D}          {return ANGLE;}
+{num}{G}{R}{A}{D}       {return ANGLE;}
+{num}{M}{S}             {return TIME;}
+{num}{S}                {return TIME;}
+{num}{H}{Z}             {return FREQ;}
+{num}{K}{H}{Z}          {return FREQ;}
+{num}{ident}            {return DIMENSION;}
+
+{num}%                  {return PERCENTAGE;}
+{num}                   {return NUMBER;}
+
+"url("{w}{string}{w}")" {return URI;}
+"url("{w}{url}{w}")"    {return URI;}
+{ident}"("              {return FUNCTION;}
+
+.                       {return *yytext;}
+
+%%
diff --git a/src/css.lex b/src/css.lex
deleted file mode 100644 (file)
index 8d1477a..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-%option case-insensitive
-%option noyywrap
-%option never-interactive
-
-%{
-/* Lex source for CSS tokenizing.
-   Taken from http://www.w3.org/TR/CSS21/grammar.html#q2
-   Copyright (C) 2006 Free Software Foundation, Inc.
-
-This file is part of GNU Wget.
-
-GNU Wget is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-GNU Wget is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Wget; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-In addition, as a special exception, the Free Software Foundation
-gives permission to link the code of its release of Wget with the
-OpenSSL project's "OpenSSL" library (or with modified versions of it
-that use the same license as the "OpenSSL" library), and distribute
-the linked executables.  You must obey the GNU General Public License
-in all respects for all of the code used other than "OpenSSL".  If you
-modify this file, you may extend this exception to your version of the
-file, but you are not obligated to do so.  If you do not wish to do
-so, delete this exception statement from your version.  */
-
-#include "css-tokens.h"
-
-/* {s}+\/\*[^*]*\*+([^/*][^*]*\*+)*\/      {unput(' '); } */
-/*replace by space*/
-%}
-
-h               [0-9a-f]
-nonascii        [\200-\377]
-unicode         \\{h}{1,6}(\r\n|[ \t\r\n\f])?
-escape          {unicode}|\\[^\r\n\f0-9a-f]
-nmstart         [_a-z]|{nonascii}|{escape}
-nmchar          [_a-z0-9-]|{nonascii}|{escape}
-string1         \"([^\n\r\f\\"]|\\{nl}|{escape})*\"
-string2         \'([^\n\r\f\\']|\\{nl}|{escape})*\'
-invalid1        \"([^\n\r\f\\"]|\\{nl}|{escape})*
-invalid2        \'([^\n\r\f\\']|\\{nl}|{escape})*
-
-comment         \/\*[^*]*\*+([^/*][^*]*\*+)*\/
-ident           -?{nmstart}{nmchar}*
-name            {nmchar}+
-num             [0-9]+|[0-9]*"."[0-9]+
-string          {string1}|{string2}
-invalid         {invalid1}|{invalid2}
-url             ([!#$%&*-~]|{nonascii}|{escape})*
-s               [ \t\r\n\f]
-w               ({s}|{comment})*
-nl              \n|\r\n|\r|\f
-
-A               a|\\0{0,4}(41|61)(\r\n|[ \t\r\n\f])?
-C               c|\\0{0,4}(43|63)(\r\n|[ \t\r\n\f])?
-D               d|\\0{0,4}(44|64)(\r\n|[ \t\r\n\f])?
-E               e|\\0{0,4}(45|65)(\r\n|[ \t\r\n\f])?
-G               g|\\0{0,4}(47|67)(\r\n|[ \t\r\n\f])?|\\g
-H               h|\\0{0,4}(48|68)(\r\n|[ \t\r\n\f])?|\\h
-I               i|\\0{0,4}(49|69)(\r\n|[ \t\r\n\f])?|\\i
-K               k|\\0{0,4}(4b|6b)(\r\n|[ \t\r\n\f])?|\\k
-M               m|\\0{0,4}(4d|6d)(\r\n|[ \t\r\n\f])?|\\m
-N               n|\\0{0,4}(4e|6e)(\r\n|[ \t\r\n\f])?|\\n
-P               p|\\0{0,4}(50|70)(\r\n|[ \t\r\n\f])?|\\p
-R               r|\\0{0,4}(52|72)(\r\n|[ \t\r\n\f])?|\\r
-S               s|\\0{0,4}(53|73)(\r\n|[ \t\r\n\f])?|\\s
-T               t|\\0{0,4}(54|74)(\r\n|[ \t\r\n\f])?|\\t
-X               x|\\0{0,4}(58|78)(\r\n|[ \t\r\n\f])?|\\x
-Z               z|\\0{0,4}(5a|7a)(\r\n|[ \t\r\n\f])?|\\z
-
-%%
-
-{s}                     {return S;}
-
-\/\*[^*]*\*+([^/*][^*]*\*+)*\/          {return S;} /* ignore comments */
-
-"<!--"          {return CDO;}
-"-->"                   {return CDC;}
-"~="                    {return INCLUDES;}
-"|="                    {return DASHMATCH;}
-
-{w}"{"                  {return LBRACE;}
-{w}"+"                  {return PLUS;}
-{w}">"                  {return GREATER;}
-{w}","                  {return COMMA;}
-
-{string}                {return STRING;}
-{invalid}               {return INVALID; /* unclosed string */}
-
-{ident}                 {return IDENT;}
-
-"#"{name}               {return HASH;}
-
-"@import"               {return IMPORT_SYM;}
-"@page"                 {return PAGE_SYM;}
-"@media"                {return MEDIA_SYM;}
-"@charset "             {return CHARSET_SYM;}
-
-"!"{w}"important"       {return IMPORTANT_SYM;}
-
-{num}{E}{M}             {return EMS;}
-{num}{E}{X}             {return EXS;}
-{num}{P}{X}             {return LENGTH;}
-{num}{C}{M}             {return LENGTH;}
-{num}{M}{M}             {return LENGTH;}
-{num}{I}{N}             {return LENGTH;}
-{num}{P}{T}             {return LENGTH;}
-{num}{P}{C}             {return LENGTH;}
-{num}{D}{E}{G}          {return ANGLE;}
-{num}{R}{A}{D}          {return ANGLE;}
-{num}{G}{R}{A}{D}       {return ANGLE;}
-{num}{M}{S}             {return TIME;}
-{num}{S}                {return TIME;}
-{num}{H}{Z}             {return FREQ;}
-{num}{K}{H}{Z}          {return FREQ;}
-{num}{ident}            {return DIMENSION;}
-
-{num}%                  {return PERCENTAGE;}
-{num}                   {return NUMBER;}
-
-"url("{w}{string}{w}")" {return URI;}
-"url("{w}{url}{w}")"    {return URI;}
-{ident}"("              {return FUNCTION;}
-
-.                       {return *yytext;}
-
-%%
index fb8184f1cec7cfda2739433341857db708eebbb8..4fcc96552e9228c0d71590b36487d4d900c1ae12 100644 (file)
@@ -69,6 +69,7 @@ as that of the covered work.  */
 extern char *version_string;
 
 /* Forward decls. */
+struct http_stat;
 static char *create_authorization_line (const char *, const char *,
                                         const char *, const char *,
                                         const char *, bool *);
index daf8a374ad94751d65cc6d489ab9b06085e25e18..7f86469789c48aac8936ad0e897743658b2c2d23 100644 (file)
@@ -55,6 +55,7 @@ as that of the covered work.  */
 /* Functions for maintaining the URL queue.  */
 
 struct queue_element {
+  const char *url;              /* the URL to download */
   const char *referer;          /* the referring document */
   int depth;                    /* the depth */
   bool html_allowed;            /* whether the document is allowed to
diff --git a/ylwrap b/ylwrap
new file mode 120000 (symlink)
index 0000000..fd53578
--- /dev/null
+++ b/ylwrap
@@ -0,0 +1 @@
+/usr/share/automake-1.10/ylwrap
\ No newline at end of file