MCPcopy Index your code
hub / github.com/IBM/Project_CodeNet / main

Function main

tools/json-graph/src/jgf2dot.c:118–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118int main(int argc, char *argv[])
119{
120 /* Read from a file argument or stdin: */
121 if (argc > 1 && argv[1]) {
122 if (!strcmp(argv[1], "-d")) {
123 debug = 1;
124 /*shift*/
125 argc--; argv[1] = argv[2];
126 }
127 }
128 if (argc > 1 && argv[1]) {
129 if (!freopen (argv[1], "rb", stdin)) {
130 fprintf (stderr, "(E): Cannot read file %s.\n", argv[1]);
131 exit(4);
132 }
133 if (debug) fprintf(stderr, "(D): Processing file %s.\n", argv[1]);
134 }
135
136 if (debug)
137 fprintf(stderr, "(D): Converting JSON to GraphViz Dot...\n");
138
139 Graph graph = jgf_parse();
140 graph_show_list_dot(graph, stdout);
141
142 /*graph_free(graph); */
143 return 0;
144}

Callers

nothing calls this directly

Calls 2

jgf_parseFunction · 0.85
graph_show_list_dotFunction · 0.85

Tested by

no test coverage detected