util.h - uriparser - URI parser
 (HTM) git clone git://git.codemadness.org/uriparser
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       util.h (738B)
       ---
            1 #include <stdio.h>
            2 
            3 /* ctype-like macros, but always compatible with ASCII / UTF-8 */
            4 #define ISALPHA(c) ((((unsigned)c) | 32) - 'a' < 26)
            5 #define ISDIGIT(c) (((unsigned)c) - '0' < 10)
            6 
            7 #undef strlcat
            8 size_t strlcat(char *, const char *, size_t);
            9 #undef strlcpy
           10 size_t strlcpy(char *, const char *, size_t);
           11 
           12 /* URI */
           13 struct uri {
           14         char proto[48];     /* scheme including ":" or "://" */
           15         char userinfo[256]; /* username [:password] */
           16         char host[256];
           17         char port[6];       /* numeric port */
           18         char path[1024];
           19         char query[1024];
           20         char fragment[1024];
           21 };
           22 
           23 int uri_format(char *, size_t, struct uri *);
           24 int uri_hasscheme(const char *);
           25 int uri_makeabs(struct uri *, struct uri *, struct uri *);
           26 int uri_parse(const char *, struct uri *);