MCPcopy Create free account
hub / github.com/IBM/Project_CodeNet / node_find

Function node_find

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

Source from the content-addressed store, hash-verified

131}
132
133Node node_find(Graph g, jsmntok_t *id)
134{
135 /* Assumes id is a valid nodeid */
136 int len1 = id->end-id->start;
137 Node n;
138 for (n = g->nodes; n; n = n->next) {
139 int len2 = n->id->end-n->id->start;
140 if (len1 == len2 && !strncmp(input+id->start, input+n->id->start, len1))
141 return n;
142 }
143 return NULL;
144}
145
146static Edge edge_create(void)
147{

Callers 2

mk_adjacency_graphFunction · 0.85
show_sptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected