equal
deleted
inserted
replaced
11 * psql://postgres@localhost/test_db?charset=utf8 |
11 * psql://postgres@localhost/test_db?charset=utf8 |
12 * |
12 * |
13 */ |
13 */ |
14 |
14 |
15 #include <sys/types.h> |
15 #include <sys/types.h> |
|
16 #include <stdio.h> |
16 |
17 |
17 /* |
18 /* |
18 * The schema |
19 * The schema |
19 */ |
20 */ |
20 struct url_schema { |
21 struct url_schema { |
21 size_t count; |
22 size_t count; |
22 const char **list; |
23 const char *list[]; |
23 }; |
24 }; |
24 |
25 |
25 /* |
26 /* |
26 * The options at the end |
27 * The options at the end |
27 */ |
28 */ |
28 struct url_opts { |
29 struct url_opts { |
29 size_t count; |
30 size_t count; |
30 struct url_opt { |
31 struct url_opt { |
31 const char *key; |
32 const char *key; |
32 const char *value; |
33 const char *value; |
33 } **list; |
34 } list[]; |
34 }; |
35 }; |
35 |
36 |
36 /* |
37 /* |
37 * A parsed URL |
38 * A parsed URL |
38 */ |
39 */ |
52 * |
53 * |
53 * Returns zero if the url was valid and was parsed, nonzero if it was invalid. |
54 * Returns zero if the url was valid and was parsed, nonzero if it was invalid. |
54 */ |
55 */ |
55 int url_parse (struct url *url, const char *text); |
56 int url_parse (struct url *url, const char *text); |
56 |
57 |
|
58 /* |
|
59 * Prints a url in a debug-output format. |
|
60 */ |
|
61 void url_dump (const struct url *url, FILE *stream); |
|
62 |
57 #endif /* LIB_URL_H */ |
63 #endif /* LIB_URL_H */ |