 typedef enum {
    URI_none,
    URI_URL,
    URI_URN,
    URI_Rel
} URIType;
 typedef struct {
    URIType tp;
    Strip scheme;
    Strip user;
    Strip passw;
    Strip host;
    Strip port;
    Strip path;
    Strip anchor;
    Strip search;
     int  is_dir;
} URI;
 int URL_parse_selector(char *selector, char *type, char **path);
  int  URL_parse(const char *uri, URI *parsed);
  int  URL_infer_type(char *path,  int  force_binary, char **type,
    char **encoding,  int  *binary);
 char *URL_unescape(char *s);
 void URL_expand(URI *uri, const URI base);
 char *uri2str(const URI uri);
 int URL_strcpy_escaped(char *s1, const char *s2);
 void URL_clean(char *url);
