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

Function main

lib_acl/samples/json/json3/main.cpp:97–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97int main(int argc, char* argv[])
98{
99 int ch;
100 char filepath[256];
101
102 filepath[0] = 0;
103
104 while ((ch = getopt(argc, argv, "h")) > 0) {
105 switch (ch) {
106 case 'h':
107 usage(argv[0]);
108 return 0;
109 default:
110 break;
111 }
112 }
113
114 if (filepath[0]) {
115 char *data = acl_vstream_loadfile(filepath);
116 if (data) {
117 parse_json(data);
118 acl_myfree(data);
119 }
120 } else
121 parse_json(__json_string);
122
123 return 0;
124}

Callers

nothing calls this directly

Calls 4

acl_vstream_loadfileFunction · 0.85
usageFunction · 0.70
parse_jsonFunction · 0.70
getoptFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…