// Add a new edge to the Map/Graph void addLink(Map g, LocationID start, LocationID end, TransportID type) { assert(g != NULL); if (!inVList(g->connections[start],end,type)) { g->connections[start] = insertVList(g->connections[start],end,type); g->connections[end] = insertVList(g->connections[end],start,type); g->nE++; } }
StrList *insertStrList ( StrList *lp, char *line ) { char *value = strdup ( line ); if ( value != NULL ) { return (StrList *) insertVList ( (VList *)lp, (void *)value ); } return NULL; }