diff options
Diffstat (limited to 'WWW/Library/Implementation/HTParse.h')
-rw-r--r-- | WWW/Library/Implementation/HTParse.h | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/WWW/Library/Implementation/HTParse.h b/WWW/Library/Implementation/HTParse.h index 342c61a3..cb95d722 100644 --- a/WWW/Library/Implementation/HTParse.h +++ b/WWW/Library/Implementation/HTParse.h @@ -12,6 +12,9 @@ #include <HTUtils.h> #endif +#ifdef __cplusplus +extern "C" { +#endif /* * The following are flag bits which may be ORed together to form * a number to give the 'wanted' argument to HTParse. @@ -21,10 +24,8 @@ #define PARSE_PATH 4 #define PARSE_ANCHOR 2 #define PARSE_PUNCTUATION 1 - #define PARSE_ALL 31 #define PARSE_ALL_WITHOUT_ANCHOR (PARSE_ALL ^ PARSE_ANCHOR) - /* * Additional flag bits for more details on components already * covered by the above. The PARSE_PATH above doesn't really @@ -34,7 +35,6 @@ */ #define PARSE_STRICTPATH 32 #define PARSE_QUERY 64 - /* * The following are valid mask values. The terms are the BNF names * in the URL document. @@ -42,15 +42,13 @@ #define URL_XALPHAS UCH(1) #define URL_XPALPHAS UCH(2) #define URL_PATH UCH(4) - /* Strip white space off a string. HTStrip() * ------------------------------- * * On exit, * Return value points to first non-white character, or to 0 if none. * All trailing white space is OVERWRITTEN with zero. - */ -extern char *HTStrip(char *s); + */ extern char *HTStrip(char *s); /* Parse a Name relative to another name. HTParse() * -------------------------------------- @@ -66,9 +64,9 @@ extern char *HTStrip(char *s); * On exit, * returns A pointer to a malloc'd string which MUST BE FREED */ -extern char *HTParse(const char *aName, - const char *relatedName, - int wanted); + extern char *HTParse(const char *aName, + const char *relatedName, + int wanted); /* HTParseAnchor(), fast HTParse() specialization * ---------------------------------------------- @@ -76,7 +74,7 @@ extern char *HTParse(const char *aName, * On exit, * returns A pointer within input string (probably to its end '\0') */ -extern const char *HTParseAnchor(const char *aName); + extern const char *HTParseAnchor(const char *aName); /* Simplify a filename. HTSimplify() * -------------------- @@ -93,7 +91,7 @@ extern const char *HTParseAnchor(const char *aName); * * or ../../albert.html */ -extern void HTSimplify(char *filename); + extern void HTSimplify(char *filename); /* Make Relative Name. HTRelative() * ------------------- @@ -112,8 +110,8 @@ extern void HTSimplify(char *filename); * The caller is responsible for freeing the resulting name later. * */ -extern char *HTRelative(const char *aName, - const char *relatedName); + extern char *HTRelative(const char *aName, + const char *relatedName); /* Escape undesirable characters using % HTEscape() * ------------------------------------- @@ -125,8 +123,8 @@ extern char *HTRelative(const char *aName, * * Unlike HTUnEscape(), this routine returns a malloc'd string. */ -extern char *HTEscape(const char *str, - unsigned char mask); + extern char *HTEscape(const char *str, + unsigned char mask); /* Escape unsafe characters using % HTEscapeUnsafe() * -------------------------------- @@ -138,7 +136,7 @@ extern char *HTEscape(const char *str, * * Unlike HTUnEscape(), this routine returns a malloc'd string. */ -extern char *HTEscapeUnsafe(const char *str); + extern char *HTEscapeUnsafe(const char *str); /* Escape undesirable characters using % but space to +. HTEscapeSP() * ----------------------------------------------------- @@ -151,8 +149,8 @@ extern char *HTEscapeUnsafe(const char *str); * * Unlike HTUnEscape(), this routine returns a malloc'd string. */ -extern char *HTEscapeSP(const char *str, - unsigned char mask); + extern char *HTEscapeSP(const char *str, + unsigned char mask); /* Decode %xx escaped characters. HTUnEscape() * ------------------------------ @@ -162,7 +160,7 @@ extern char *HTEscapeSP(const char *str, * the acsii hex code for character 16x+y. * The string is converted in place, as it will never grow. */ -extern char *HTUnEscape(char *str); + extern char *HTUnEscape(char *str); /* Decode some %xx escaped characters. HTUnEscapeSome() * ----------------------------------- Klaus Weide @@ -174,13 +172,16 @@ extern char *HTUnEscape(char *str); * should be unescaped if escaped in the first string. * The first string is converted in place, as it will never grow. */ -extern char *HTUnEscapeSome(char *str, - const char *do_trans); + extern char *HTUnEscapeSome(char *str, + const char *do_trans); /* * Turn a string which is not a RFC 822 token into a quoted-string. - KW */ -extern void HTMake822Word(char **str, - int quoted); + extern void HTMake822Word(char **str, + int quoted); -#endif /* HTPARSE_H */ +#ifdef __cplusplus +} +#endif +#endif /* HTPARSE_H */ |