X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Furl.h;h=52c53fa504b380612459323ad881357ae2bb2feb;hb=8ffdaed1c5f5bf4ad0914b8d17f14af51ce037a5;hp=07363f2e67d47e30cd0a2a79264072bf1abbb25e;hpb=bf285ff821b06bf89d0301bc2f1623ce4ee44869;p=libucw.git diff --git a/lib/url.h b/lib/url.h index 07363f2e..52c53fa5 100644 --- a/lib/url.h +++ b/lib/url.h @@ -1,9 +1,13 @@ /* * Sherlock Library -- URL Functions * - * (c) 1997 Martin Mares, + * (c) 1997 Martin Mares + * (c) 2001 Robert Spalek */ +#ifndef _SHERLOCK_URL_H +#define _SHERLOCK_URL_H + #define MAX_URL_SIZE 1024 /* Non-control meanings of control characters */ @@ -42,7 +46,9 @@ int url_normalize(struct url *, struct url *); int url_canonicalize(struct url *); int url_pack(struct url *, byte *); int url_canon_split(byte *, byte *, byte *, struct url *); +int url_auto_canonicalize(byte *, byte *); uns identify_protocol(byte *); +int url_has_repeated_component(byte *url); /* Error codes */ @@ -62,10 +68,13 @@ char *url_error(uns); #define URL_PROTO_HTTP 1 #define URL_PROTO_FTP 2 #define URL_PROTO_FILE 3 -#define URL_PROTO_MAX 4 +#define URL_PROTO_SQL 4 +#define URL_PROTO_MAX 5 -#define URL_PNAMES { "unknown", "http", "ftp", "file" } +#define URL_PNAMES { "unknown", "http", "ftp", "file", "sql" } #define URL_DEFPORTS { ~0, 80, 21, 0 } #define URL_PATH_FLAGS { 0, 1, 1, 1 } extern byte *url_proto_names[]; + +#endif