MCPcopy Create free account
hub / github.com/acl-dev/acl / main

Function main

lib_acl/samples/html_code/main.c:11–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9"</html>\r\n";
10
11int main(int argc acl_unused, char *argv[] acl_unused)
12{
13 ACL_VSTRING *buf1 = acl_vstring_alloc(32);
14 ACL_VSTRING *buf2 = acl_vstring_alloc(32);
15
16 acl_xml_encode(html, buf1);
17 printf(">>> xml encode: len(%d)\n%s",(int) ACL_VSTRING_LEN(buf1), acl_vstring_str(buf1));
18
19 printf("------------------------------------------\n");
20
21 acl_xml_decode(acl_vstring_str(buf1), buf2);
22 printf(">>> xml decode: len(%d)\n%s", (int) ACL_VSTRING_LEN(buf2), acl_vstring_str(buf2));
23
24 printf("------------------------------------------\n");
25
26 ACL_VSTRING_RESET(buf1);
27 ACL_VSTRING_RESET(buf2);
28
29 acl_html_encode(html, buf1);
30 printf(">>> html encode: len(%d)\n%s", (int) ACL_VSTRING_LEN(buf1), acl_vstring_str(buf1));
31
32 printf("------------------------------------------\n");
33
34 acl_html_decode(acl_vstring_str(buf1), buf2);
35 printf(">>> html decode: len(%d)\n%s", (int) ACL_VSTRING_LEN(buf2), acl_vstring_str(buf2));
36
37 acl_vstring_free(buf1);
38 acl_vstring_free(buf2);
39
40#ifdef WIN32
41 printf("------------------------------------------\n");
42 printf("enter any key to exit ...\n");
43 getchar();
44#endif
45 return (0);
46}

Callers

nothing calls this directly

Calls 6

acl_vstring_allocFunction · 0.85
acl_xml_encodeFunction · 0.85
acl_xml_decodeFunction · 0.85
acl_html_encodeFunction · 0.85
acl_html_decodeFunction · 0.85
acl_vstring_freeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…