src/ManageCities.c
/*
 * FUNCTION NAME: removeCityMenu
 *
 * DESCRIPTION:
 * Function gets user's input and calls removeCity() function.
 */
FUNCTION NAME: removeCityMenu
DESCRIPTION:
Function gets user's input and calls removeCity() function.
FUNCTION NAME : removeCityMenu DESCRIPTION : Function gets user ' s input and calls removeCity () function .
void removeCityMenu(Graph_t* graph)
{
    if (graph->head == NULL) {
        printErrorUsersActions(EMPTY_GRAPH);
        return;
    }
    char city[G_CITYS_NAME_LENGTH];
    programError_t what_error = NO_ERROR;
    int counter = 2;
    do {
        if (counter % 4 == 1) {
            showCityList(graph);
        }
        ++counter;
        printErrorUsersActions(what_error);
        getCitysName(REMOVE_CITY, city);
        what_error = checkIfNameIsCorrect(city);
        if (what_error == NO_ERROR) {
            what_error = checkIfIsInGraph(graph, city);
        }
    } while (what_error != NO_ERROR);
    removeCity(graph, city);
}
void removeCityMenu ( Graph_t * graph ) { if ( graph -> head == NULL ) { printErrorUsersActions ( EMPTY_GRAPH ) ; return ; } char city [ G_CITYS_NAME_LENGTH ] ; programError_t what_error = NO_ERROR ; int counter = 2 ; do { if ( counter % 4 == 1 ) { showCityList ( graph ) ; } ++ counter ; printErrorUsersActions ( what_error ) ; getCitysName ( REMOVE_CITY , city ) ; what_error = checkIfNameIsCorrect ( city ) ; if ( what_error == NO_ERROR ) { what_error = checkIfIsInGraph ( graph , city ) ; } } while ( what_error != NO_ERROR ) ; removeCity ( graph , city ) ; }
FUNCTION NAME: removeCityMenu
 DESCRIPTION:
 Function gets user's input and calls removeCity() function.
FUNCTION NAME : removeCityMenu DESCRIPTION : Function gets user ' s input and calls removeCity () function .