X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Furl.h;h=44c9bc2ce6513247bef39d86e80a0442cead672c;hb=3f29125f27f7ee82281e49fef16ad32811cc3dcc;hp=4d95ec985b0def1111aeabd9eb85a2e5c5e8c6c5;hpb=4ecd6b5eabaf81c764a8ecf4ba8bacb7452a26d1;p=libucw.git diff --git a/lib/url.h b/lib/url.h index 4d95ec98..44c9bc2c 100644 --- a/lib/url.h +++ b/lib/url.h @@ -1,9 +1,16 @@ /* * Sherlock Library -- URL Functions * - * (c) 1997 Martin Mares, + * (c) 1997 Martin Mares + * (c) 2001 Robert Spalek + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ +#ifndef _SHERLOCK_URL_H +#define _SHERLOCK_URL_H + #define MAX_URL_SIZE 1024 /* Non-control meanings of control characters */ @@ -15,9 +22,10 @@ #define NCC_AT 5 #define NCC_EQUAL 6 #define NCC_AND 7 -#define NCC_MAX 8 +#define NCC_HASH 8 +#define NCC_MAX 9 -#define NCC_CHARS " ;/?:@=&" +#define NCC_CHARS " ;/?:@=&#" /* Remove/Introduce '%' escapes */ @@ -41,7 +49,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 */ @@ -65,5 +75,8 @@ char *url_error(uns); #define URL_PNAMES { "unknown", "http", "ftp", "file" } #define URL_DEFPORTS { ~0, 80, 21, 0 } +#define URL_PATH_FLAGS { 0, 1, 1, 1 } extern byte *url_proto_names[]; + +#endif