From 754cef922dbb294ec5640a7e10f264f32b77fdad Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 28 Apr 2005 13:47:36 +0000 Subject: [PATCH] First version --- src/include/url.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/include/url.h diff --git a/src/include/url.h b/src/include/url.h new file mode 100644 index 00000000..bafd5521 --- /dev/null +++ b/src/include/url.h @@ -0,0 +1,22 @@ +#ifndef URL_H +#define URL_H + +/* + * Information parsed from a URL string. "char *" pointers will point + * to the start of the relevant portion of the original URL string, + * which will have been modified by inserting terminating NULs at the + * appropriate points. Use unparse_url() if you want to get back the + * original string. + * + */ +struct url_info { + char *protocol; + char *host; + char *port; + char *file; +}; + +extern void parse_url ( struct url_info *info, char *url ); +extern char * unparse_url ( struct url_info *info ); + +#endif /* URL_H */