2 * Copyright (c) 2022, 2024 Omar Polo <op@omarpolo.com>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
28 char iri_fragment[1024];
30 #define IH_SCHEME 0x01
34 #define IH_AUTHORITY (IH_UINFO|IH_HOST|IH_PORT)
37 #define IH_FRAGMENT 0x40
41 int iri_parse(const char *, const char *, struct iri *);
42 int iri_unparse(const struct iri *, char *, size_t);
43 int iri_human(const struct iri *, char *, size_t);
44 int iri_setport(struct iri *, const char *);
45 int iri_setquery(struct iri *, const char *);
47 int iri_urlescape(const char *, char *, size_t);
48 int iri_urlunescape(const char *, char *, size_t);