Re: [Bug-wget] http.c code cleaning
Hello, Dmitry Bogatov kact...@gnu.org writes: -request_set_method (req, meth, meth_arg); +req = request_new(meth, meth_arg); I have amended this change: +req = request_new (meth, meth_arg); and I am going to push it. Thanks for your contribution! Giuseppe
Re: [Bug-wget] Bug inside the manpage
Darshit Shah dar...@gmail.com writes: Agreed! The documentation should indeed read: Number of tries since that is what is being set by the option. Attached a patch with the required change. +2013-05-10 Darshit Shah dar...@gmail.com (tiny change) + + * wget.text (No of tries): Fix typo to make it clear that --tries + option sets number of tries not retries. + Reported by: Hauke Hoffman haukebjoernhoff...@googlemail.com + Thanks for the patch. I have amended some trivial changes, s/wget.text/wget.texi/ and removed a trailing whitespace. Giuseppe
Re: [Bug-wget] [PATCH] Regression since wget 1.10: no_prefix function is *bad*
Tim Rühsen tim.rueh...@gmx.de writes: having an abort() without a message is simply a big waste of time for any developer who stumbles upon it. I disagree here, what is so difficult that a debugger cannot catch? On the other hand, I agree this can be improved. Since the init code of Wget has to be rewritten anyways, i provide the fastest solution right now: increasing the buffer size and printing a message before Wget aborts. And yes, the whole issue is hell stupid... - static char buffer[1024]; + static char buffer[2048]; This won't really fix the problem of having a static buffer, the real fix would be to dynamically allocate the memory. -- Giuseppe
Re: [Bug-wget] [PATCH] bit cleanup in utils.c
Hi, Tim Rühsen tim.rueh...@gmx.de writes: I replaced some hand-written string code by standard library functions. In any case these functions may be found in gnulib as well. From d540fd5dbd3644936a8ad1a384516abba10de268 Mon Sep 17 00:00:00 2001 From: Tim Ruehsen tim.rueh...@gmx.de Date: Thu, 9 May 2013 19:53:36 +0200 Subject: [PATCH 1/3] src/utils.c cleanup thanks for the patch, I amended these trivial changes and applied it: src/ChangeLog |6 ++ 2013-05-09 Tim Ruehsen tim.rueh...@gmx.de * utils.c (acceptable): use standard string functions instead of self-written code. (match_tail): Likewise. (suffix): Likewise. (has_wildcards_p): Likewise. (test_subdir_p): Fix some warnings. (test_dir_matches_p): Likewise. src/utils.c | 66 - + if ((p = strrchr(s, '/'))) + if ((p = strrchr (s, '/'))) + int pos = strlen (string) - strlen(tail); + int pos = strlen (string) - strlen (tail); + return false; /* tail is longer than string */ +return false; /* tail is longer than string. */ + if ((p = strrchr(str, '.')) !strchr(p + 1, '/')) + if ((p = strrchr (str, '.')) !strchr (p + 1, '/')) + return p + 1; +return p + 1; + return !!strpbrk(s, *?[]); + return !!strpbrk (s, *?[]); -- Giuseppe
Re: [Bug-wget] [PATCH] Regression since wget 1.10: no_prefix function is *bad*
Am Sonntag, 12. Mai 2013 schrieb Giuseppe Scrivano: Tim Rühsen tim.rueh...@gmx.de writes: having an abort() without a message is simply a big waste of time for any developer who stumbles upon it. I disagree here, what is so difficult that a debugger cannot catch? On the other hand, I agree this can be improved. Since the init code of Wget has to be rewritten anyways, i provide the fastest solution right now: increasing the buffer size and printing a message before Wget aborts. And yes, the whole issue is hell stupid... - static char buffer[1024]; + static char buffer[2048]; This won't really fix the problem of having a static buffer, the real fix would be to dynamically allocate the memory. Yes, as I wrote, it is a quick hack. A real solution would be a rewrite of the init stuff (I saw that already somewhere on the Wget 2.0 wish list or somewhere - don't remeber exactly). I already wrote this kind of code and would contribute it to Wget. But i am unshure how to apply it to Wget. Since it would be a pretty big change, should i git-clone Wget and you merge later or do you create a new branch or ... Ah, than we again have to discuss that infamous c89/c99 thing. AFAIR, the main argument against c99 came from Daniel Stenberg (Curl, haxx.se) who mentioned MS Visual C not being C99 ready (it will never be, said MS). I just saw that Debian has MinGW cross compiler packets for Win32 and Win64 with gcc 4.6, but I have no experience with those. Does anybody know if that is a real alternative to MS VC ? Regards, Tim
Re: [Bug-wget] [PATCH] Regression since wget 1.10: no_prefix function is *bad*
On 12/05/13 21:50, Tim Rühsen wrote: A real solution would be a rewrite of the init stuff (I saw that already somewhere on the Wget 2.0 wish list or somewhere - don't remeber exactly). I already wrote this kind of code and would contribute it to Wget. But i am unshure how to apply it to Wget. Since it would be a pretty big change, should i git-clone Wget and you merge later or do you create a new branch or ... Ah, than we again have to discuss that infamous c89/c99 thing. AFAIR, the main argument against c99 came from Daniel Stenberg (Curl, haxx.se) who mentioned MS Visual C not being C99 ready (it will never be, said MS). I just saw that Debian has MinGW cross compiler packets for Win32 and Win64 with gcc 4.6, but I have no experience with those. Does anybody know if that is a real alternative to MS VC ? Regards, Tim Yes, it is a real alternative as a compiler which works :) However, I'm not sure how much does wget compile natively in win32 in right now, either with VC++ or gcc, mostly due to autoconf and gnulib detection.