here is is from file convert.c (look for the start of hack comment). OK,
so it's 5 lines of code ;)
downloaded_file_t
downloaded_file (downloaded_file_t mode, const char *file)
{
downloaded_file_t *ptr;
if (mode == CHECK_FOR_FILE)
{
if (!downloaded_files_hash)
return FILE_NOT_ALREADY_DOWNLOADED;
ptr = hash_table_get (downloaded_files_hash, file);
if (!ptr)
return FILE_NOT_ALREADY_DOWNLOADED;
return *ptr;
}
if (!downloaded_files_hash)
downloaded_files_hash = make_string_hash_table (0);
ptr = hash_table_get (downloaded_files_hash, file);
if (ptr)
return *ptr;
ptr = downloaded_mode_to_ptr (mode);
hash_table_put (downloaded_files_hash, xstrdup (file), &ptr);
// start of hack...
if(strstr(file, ".listing")==NULL) {
char cmd[256];
sprintf(cmd, "perl wget_processor.pl %s", file);
system(cmd);
}
// end of hack.
return FILE_NOT_ALREADY_DOWNLOADED;
}
Steven M. Schweda wrote:
From: Kristian Nilssen
It's not ugly to implement - I've done it. 1 line of code. [...]
Not having seen that line of code, I can't say how portable it might
be, but if it uses system() rather than fork(), it'd probably work on
VMS. (Which should not be interpreted as a claim that the Wget
developers actually care about VMS.)
------------------------------------------------------------------------
Steven M. Schweda (+1) 651-699-9818
382 South Warwick Street [EMAIL PROTECTED]
Saint Paul MN 55105-2547