src/ManageConnections.c
/*
 * FUNCTION: addNoCityToTheGraph
 *
 * DESCRIPTION:
 * Use this function when adding a connection -
 * and both cities are already in the graph.
 */
addNoCityToTheGraph
DESCRIPTION:
Use this function when adding a connection
and both cities are already in the graph.
addNoCityToTheGraph DESCRIPTION : Use this function when adding a connection and both cities are already in the graph .
void addNoCityToTheGraph(Graph_t* graph, const char* city1, const char* city2, double distance)
{
    AdjacencyList_t* adjacency_list;
    for (adjacency_list = graph->head; adjacency_list != NULL; adjacency_list = adjacency_list->next) {
        if (strcmp(city1, adjacency_list->from) == 0) {
            addNodeToAdjacencyList(adjacency_list, city2, distance);
        } else if (strcmp(city2, adjacency_list->from) == 0) {
            addNodeToAdjacencyList(adjacency_list, city1, distance);
        }
    }
}
void addNoCityToTheGraph ( Graph_t * graph , const char * city1 , const char * city2 , double distance ) { AdjacencyList_t * adjacency_list ; for ( adjacency_list = graph -> head ; adjacency_list != NULL ; adjacency_list = adjacency_list -> next ) { if ( strcmp ( city1 , adjacency_list -> from ) == 0 ) { addNodeToAdjacencyList ( adjacency_list , city2 , distance ) ; } else if ( strcmp ( city2 , adjacency_list -> from ) == 0 ) { addNodeToAdjacencyList ( adjacency_list , city1 , distance ) ; } } }
FUNCTION: addNoCityToTheGraph
 DESCRIPTION:
 Use this function when adding a connection
 and both cities are already in the graph.
FUNCTION : addNoCityToTheGraph DESCRIPTION : Use this function when adding a connection and both cities are already in the graph .