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

Function test_parse_mmap

lib_acl_cpp/samples/xml/xml4/main.cpp:96–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96static void test_parse_mmap(const char* filepath)
97{
98 acl::string buf;
99 if (acl::ifstream::load(filepath, &buf) == false)
100 {
101 printf("load %s error %s\r\n", filepath, acl::last_serror());
102 return;
103 }
104
105 const char* local_file = "./local.map";
106 acl::xml2 xml(local_file, buf.size() * 2);
107 xml.update(buf.c_str());
108 printf("------------- xml node walk -----------------------\r\n");
109 xml_node_walk(xml.get_root(), 0);
110 printf("------------- xml node walk end -------------------\r\n");
111
112 printf("------------- build xml ---------------------------\r\n");
113 printf("%s\r\n", xml.to_string());
114 printf("------------- build xml end -----------------------\r\n");
115}
116
117static void usage(const char* procname)
118{

Callers 1

mainFunction · 0.85

Calls 6

xml_node_walkFunction · 0.70
last_serrorFunction · 0.50
sizeMethod · 0.45
updateMethod · 0.45
c_strMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…