src/ListCreation.c
/*
 * FUNCTION NAME: makeConnectionsListNode
 *
 * DESCRIPTION:
 * This function creates cityListNode (node of a ConnectionsList_t *lst)
 * and fills it with proper values.
 *
 * RETURNS:
 * node - created node that will be added to ConnectionsList_t *lst.
 */
FUNCTION NAME: makeConnectionsListNode
DESCRIPTION:
This function creates cityListNode (node of a ConnectionsList_t *lst)
and fills it with proper values.

created node that will be added to ConnectionsList_t *lst.
FUNCTION NAME : makeConnectionsListNode DESCRIPTION : This function creates cityListNode ( node of a ConnectionsList_t * lst ) and fills it with proper values . created node that will be added to ConnectionsList_t * lst .
ConnectionsListNode_t* makeConnectionsListNode(const char* city1, const char* city2, double distance)
{
    ConnectionsListNode_t* node;
    node = (ConnectionsListNode_t*)malloc(sizeof(ConnectionsListNode_t));
    checkMemory(node);
    node->from = (char*)malloc(G_CITYS_NAME_LENGTH * sizeof(char));
    checkMemory(node->from);
    node->to = (char*)malloc(G_CITYS_NAME_LENGTH * sizeof(char));
    checkMemory(node->to);
    strcpy(node->from, city1);
    strcpy(node->to, city2);
    node->distance = distance;
    node->next = NULL;
    return node;
}
ConnectionsListNode_t * makeConnectionsListNode ( const char * city1 , const char * city2 , double distance ) { ConnectionsListNode_t * node ; node = ( ConnectionsListNode_t * ) malloc ( sizeof ( ConnectionsListNode_t ) ) ; checkMemory ( node ) ; node -> from = ( char * ) malloc ( G_CITYS_NAME_LENGTH * sizeof ( char ) ) ; checkMemory ( node -> from ) ; node -> to = ( char * ) malloc ( G_CITYS_NAME_LENGTH * sizeof ( char ) ) ; checkMemory ( node -> to ) ; strcpy ( node -> from , city1 ) ; strcpy ( node -> to , city2 ) ; node -> distance = distance ; node -> next = NULL ; return node ; }
FUNCTION NAME: makeConnectionsListNode
 DESCRIPTION:
 This function creates cityListNode (node of a ConnectionsList_t *lst)
 and fills it with proper values.
FUNCTION NAME : makeConnectionsListNode DESCRIPTION : This function creates cityListNode ( node of a ConnectionsList_t * lst ) and fills it with proper values .