Jookia wrote:
I've not tried your patch. But by reading it,
+static void write_url_csv (FILE* f, struct url *url)
+{
+ if (!f)
+ return;
Isn't this test superfluous? Already done by caller (?).
I'd suggest the reject-log starts with a comment:
FILE *rejectedlog = 0;
if (opt.rejected_log)
{
rejectedlog = fopen (opt.rejected_log, "w");
if (!rejectedlog)
logprintf (LOG_NOTQUIET, "%s: %s\n", opt.rejected_log, strerror
(errno));
else
fprintf (rejectedlog,"# Wget reject-log %s generated at --%s-- for
%s\n",
opt.rejected_log,
datetime_str (time (NULL),
<base-url, where is this stored?> ));
But according to http://tools.ietf.org/html/rfc4180,
it doesn't specify if a "# comment" is legal before the
CSV header. I think most DB-apps do allow it though.
http://stackoverflow.com/questions/1961006/can-a-csv-file-have-a-comment
Nice work.
--
--gv