void initTrees( void ) { if ( ( globalPointerToVertexHead = malloc( sizeof( nodePointer * ) ) ) == NULL ) exit( EXIT_FAILURE ); if ( ( globalPointerToEdgeHead = malloc( sizeof( nodePointer * ) ) ) == NULL ) exit( EXIT_FAILURE ); initDoubleLinkedList( globalPointerToVertexHead ); initDoubleLinkedList( globalPointerToEdgeHead ); return; }
void dirHash_insert(Hash_t aHash, SetElem_t *pElem){ int key = pElem->key.intKey; if (key >= aHash.length){ fprintf(stderr, "key overflow\n"); return; } if (aHash.pData[key] == NULL){ aHash.pData[key] = initDoubleLinkedList(); } doubleLinkedList_insert(aHash.pData[key], pElem); }