******** fig5.10 ********** void insert( element_type key, HASH_TABLE H ) { position pos, new_cell; LIST L; /*1*/ pos = find( key, H ); /*2*/ if( pos == NULL ) /* key is not found */ { /*3*/ new_cell = (position) malloc( sizeof (struct list_node) ); /*4*/ if( new_cell == NULL ) /*5*/ fatal_error( "Out of space!!!"); else { /*6*/ L = H->the_lists[ hash( key, H->table_size ) ]; /*7*/ new_cell->next = L->next; /*8*/ new_cell->element = key; /* Probably need strcpy!! */ /*9*/ L->next = new_cell; } } }