apportate/src/uri.h

11 lines
449 B
C

/* uri_parse -- split a URI into its components */
/* uri_str -- the URI to split */
/* return values */
/* 0/ERROKAY: success */
/* -1/ERRMALF: malformed URI */
/* -2/ERRMEM: memory failure */
/* this is really awful but I wrote it at 0200... need to rewrite it to use */
/* regex for URI validation. as it stands, it doesn't detect malformed URIs */
/* properly. it *does* split them fine, though. */
int uri_parse(const char *uri_str, uri *res);