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

Function acl_xml_encode

lib_acl/src/code/acl_xmlcode.c:54–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52};
53
54int acl_xml_encode(const char *in, ACL_VSTRING *out)
55{
56 const unsigned char *ptr = (const unsigned char*) in;
57 int n = 0;
58 size_t len = strlen(in);
59
60 len += len / 2;
61
62 ACL_VSTRING_SPACE(out, (int) len);
63
64 while (*ptr) {
65 if (__charmap[*ptr] != NULL) {
66 acl_vstring_strcat(out, __charmap[*ptr]);
67 n++;
68 } else {
69 ACL_VSTRING_ADDCH(out, *ptr);
70 }
71 ptr++;
72 }
73
74 ACL_VSTRING_TERMINATE(out);
75 return n;
76}
77
78typedef struct {
79 const char *str;

Callers 4

mainFunction · 0.85
escape_appendFunction · 0.85
escape_copyFunction · 0.85
escape_appendFunction · 0.85

Calls 1

acl_vstring_strcatFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…