• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/wget-1.12/src/

Lines Matching defs:to

1 /* Conversion of links to local files.
26 grants you additional permission to convey the resulting work.
102 the file is not followed, we might still want to convert the
119 /* We decide the direction of conversion according to whether
127 /* We've downloaded this URL. Convert it to relative
130 not be identical to that on the server (think `-nd',
134 DEBUGP (("will convert url %s to local %s\n", u->url, local_name));
139 complete (including a full host name), convert it to
145 DEBUGP (("will convert url %s to complete\n", u->url));
158 /* This function is called when the retrieval is done to convert the
159 links that have been downloaded. It has to be called at the end of
162 direction to convert to.
164 The "direction" means that the URLs to the files that have been
165 downloaded get converted to the relative URL which will point to
166 that file. And the other URLs get converted to the remote URL on
217 any URL needs to be converted in the first place. If not, just
226 logputs (LOG_VERBOSE, _("nothing to do.\n"));
249 logprintf (LOG_NOTQUIET, _("Unable to delete %s: %s\n"),
276 /* If the URL is not to be converted, skip it. */
283 /* Echo the file contents, up to the offending URL's opening
284 quote, to the outfile. */
291 /* Convert absolute URL to relative. */
304 DEBUGP (("TO_RELATIVE: %s to %s at position %d in %s.\n",
312 /* Convert the link to absolute URL. */
325 DEBUGP (("TO_COMPLETE: <something> to %s at position %d in %s.\n",
332 /* Change the base href to "". */
350 /* Construct and return a link that points from BASEFILE to LINKFILE.
363 results might ensue. The function makes no special efforts to
375 /* First, skip the initial directory components common to both
391 The link we're constructing needs to be:
413 /* Used by write_backup_file to remember which files have been
421 converted version, save the former to *.orig. Note we only do
430 /* TODO: hack this to work with css files */
433 /* Just write "orig" over "html". We need to do it this way
434 because when we're checking to see if we've downloaded the
435 file before (to see if we can skip downloading it), we don't
437 at that stage that -E is going to cause us to tack on
438 ".html", so we need to compare vs. the original URL plus
446 /* Append ".orig" to the name. */
455 /* We can get called twice on the same URL thanks to the
462 /* Rename <file> to <file>.orig before former gets written over. */
471 safe to just set 'converted_file_ptr->string' to 'file' below,
473 thought I could just add a field to the urlpos structure saying
475 so I had to make this separate list.
478 This [adding a field to the urlpos structure] didn't work
539 <meta http-equiv=refresh content="new_text"> because we need to
558 the character is found, return true and set BP and EP to point to
590 /* Quote FILE for use as local reference to an HTML file.
592 We quote ? as %3F to avoid passing part of the file name as the
594 it is safe to do this only when `--adjust-extension' is turned on.
595 This is because converting "index.html?foo=bar" to
598 "index.html?foo=bar.html" to "index.html%3Ffoo=bar.html" should be
608 char *newname, *to;
615 having to be quoted. */
616 to = newname = (char *)alloca (3 * strlen (file) + 1);
621 *to++ = '%';
622 *to++ = '2';
623 *to++ = '5';
626 *to++ = '%';
627 *to++ = '2';
628 *to++ = '3';
631 *to++ = '%';
632 *to++ = '3';
633 *to++ = 'B';
638 *to++ = '%';
639 *to++ = '3';
640 *to++ = 'F';
645 *to++ = *from;
647 *to = '\0';
655 these functions to let us know that a file has been downloaded. */
684 /* Strings differ at the very beginning -- bail out. We need to
685 check this explicitly to avoid `lng - 1' reading outside the
736 /* Remove all associations from various URLs to FILE from dl_url_file_map. */
746 /* Register that URL has been successfully downloaded to FILE. This
747 is used by the link conversion code to convert references to URLs
748 to references to local files. It is also being used to check if a
766 /* We have somehow managed to download the same URL twice.
767 Nothing to do. */
782 /* Remove all the URLs that point to this file. Yes, there can
785 redirects to URL2 which gets downloaded to FILE, we map both
786 URL1 and URL2 to FILE in dl_url_file_map. (dl_file_url_map
787 only points to URL2.) When another URL gets loaded to FILE,
792 called very rarely, only when two URLs resolve to the same
808 same URL always resolves to the same file. But if you do
813 then the first URL will resolve to "FILE", and the other to
815 dl_file_url_map, but URL will still point to FILE in
827 /* Register that FROM has been redirected to TO. This assumes that TO
832 register_redirection (const char *from, const char *to)
838 file = hash_table_get (dl_url_file_map, to);
914 it to a hash table beause it was actually taking a lot of time to
950 failures on or that we skip due to -N).
953 to -E, call this function with
957 If you just want to check if a file has been previously added
959 sure to call this function with local filenames, not remote
1006 /* The function returns the pointer to the malloc-ed quoted version of