/*
 * h.misc
 *
 * $Log: misc,v $
 * Revision 1.4  1998/08/18 21:20:42  joseph
 * Added misc_scantag
 *
 * Revision 1.3  1998/08/09 15:07:02  joseph
 * Added include/exclude lists for URLs
 *
 * Revision 1.2  1998/06/14 21:24:46  joseph
 * Moved relative url resolver from rewrite / http -> misc and rewrote
 * Fixed rewrite leaving []'s all over log file.
 * Fixed misc_urltofilename barfing on url's like http://wiggle
 * Lessened processor time when fetching pages with _lots_ of links in them.
 * Make FetchError open/close at start/end of fetch like FetchLog
 * Fixed handling of ftp urls, with & without proxy set.
 * Fixed bugs in code to set fetchportion
 * URLs now moved to fetch list when fetched (whether sucessful or not)
 * Log file now says '[http]' or '[ftp]' for real link, as appropriate.
 * Recalculates fetch portion for redirected urls
 * Fixed handling of proxy for ftp (wasn't always using proxy)
 * url.c now uses 'times 2' allocator / deallocator.
 * url_handled corrected for ftp (returns true only if proxy set)
 * closes log file when fetch aborted.
 *
 * Revision 1.1  1998/06/06 21:45:59  joseph
 * Created from fetch/rewrite - misc_urltofilename
 *
 *
 */

#ifndef MISC_H
#define MISC_H


extern int misc_urltofilename(const char */*url*/, char */*name*/, const int /*size*/);
extern char *misc_resolverelativeurl( char */*baseurl*/, char */*embeddedurl*/, char */*result*/, int /*resultsize*/ );

typedef struct
{
  char *s;
  int  l;
} url_element;

typedef struct
{
  char *url;
  url_element scheme;
  url_element netloc;
  url_element path;
  url_element parameters;
  url_element query;
  url_element fragment;
} url_parsed;

extern void misc_parseurl( url_parsed */*u*/ );

#include "eval.h"

extern char *misc_scantag( char */*tag*/, int /*len*/, int */*basehref*/,
                           eval_inline */*inline*/, char */*lastchar*/ );


#endif
