MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / dump_url

Function dump_url

libs/qhttpserver/http-parser/contrib/url_parser.c:5–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <string.h>
4
5void
6dump_url (const char *url, const struct http_parser_url *u)
7{
8 unsigned int i;
9
10 printf("\tfield_set: 0x%x, port: %u\n", u->field_set, u->port);
11 for (i = 0; i < UF_MAX; i++) {
12 if ((u->field_set & (1 << i)) == 0) {
13 printf("\tfield_data[%u]: unset\n", i);
14 continue;
15 }
16
17 printf("\tfield_data[%u]: off: %u, len: %u, part: %.*s\n",
18 i,
19 u->field_data[i].off,
20 u->field_data[i].len,
21 u->field_data[i].len,
22 url + u->field_data[i].off);
23 }
24}
25
26int main(int argc, char ** argv) {
27 struct http_parser_url u;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected