X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Furl.h;h=aee20715d3c2a7a6f6aae8c9bc6b52bfeaba401e;hb=eb12540e29b13b6d7e956fbe03aa86164408dd82;hp=266e752ac58275af1d7c462f7451ca6162f28cb6;hpb=c6c6c66f35c76a1e7dfec03c30af6b6c501357ff;p=libucw.git diff --git a/ucw/url.h b/ucw/url.h index 266e752a..aee20715 100644 --- a/ucw/url.h +++ b/ucw/url.h @@ -15,23 +15,30 @@ /* Non-control meanings of control characters */ -#define NCC_SEMICOLON 1 -#define NCC_SLASH 2 -#define NCC_QUEST 3 -#define NCC_COLON 4 -#define NCC_AT 5 -#define NCC_EQUAL 6 -#define NCC_AND 7 -#define NCC_HASH 8 -#define NCC_MAX 9 - -#define NCC_CHARS " ;/?:@=&#" +enum { + NCC_SEMICOLON = 1, + NCC_SLASH = 2, + NCC_QUEST = 3, + NCC_COLON = 4, + NCC_AT = 5, + NCC_EQUAL = 6, + NCC_AND = 7, + NCC_HASH = 8, + // Avoid 9 (\t) and 10 (\n) + NCC_DOLLAR = 11, + NCC_PLUS = 12, + // Avoid 13 (\r) + NCC_COMMA = 14, + NCC_MAX = 15 +}; + +#define NCC_CHARS " ;/?:@=&#\t\n$+\r," /* Remove/Introduce '%' escapes */ int url_deescape(const char *s, char *d); int url_enescape(const char *s, char *d); -int url_enescape_friendly(const char *src, char *dest); // for cards.c only +int url_enescape_friendly(const char *src, char *dest); /* URL splitting and normalization */