src/ListCreation.c
/*
 * FUNCTION NAME: addUniqueCityToTheList
 *
 * DESCRIPTION:
 * This function adds a new node to city_list list.
 * It adds a new head to the list, so previous first
 * element is now second, previous second is third, and
 * so on.
 */
FUNCTION NAME: addUniqueCityToTheList
DESCRIPTION:
This function adds a new node to city_list list.
It adds a new head to the list, so previous first
element is now second, previous second is third, and
so on.
FUNCTION NAME : addUniqueCityToTheList DESCRIPTION : This function adds a new node to city_list list . It adds a new head to the list so previous first element is now second previous second is third and so on .
void addUniqueCityToTheList(UniqueCitiesList_t* unique_city_list, const char* city)
{
    UniqueCitiesListNode_t* node = makeUniqueCityNode(city);
    if (unique_city_list->head == NULL) {
        unique_city_list->head = node;
    } else {
        node->next = unique_city_list->head;
        unique_city_list->head = node;
    }
}
void addUniqueCityToTheList ( UniqueCitiesList_t * unique_city_list , const char * city ) { UniqueCitiesListNode_t * node = makeUniqueCityNode ( city ) ; if ( unique_city_list -> head == NULL ) { unique_city_list -> head = node ; } else { node -> next = unique_city_list -> head ; unique_city_list -> head = node ; } }
FUNCTION NAME: addUniqueCityToTheList
 DESCRIPTION:
 This function adds a new node to city_list list.
FUNCTION NAME : addUniqueCityToTheList DESCRIPTION : This function adds a new node to city_list list .