Exemplo n.º 1
0
// 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++;
	}
}
Exemplo n.º 2
0
StrList	*insertStrList ( StrList *lp, char *line ) {
	char *value = strdup ( line );

	if ( value != NULL ) {
		return (StrList *) insertVList ( (VList *)lp, (void *)value );
	}

	return NULL;
}