******** fig3.15 ********** /* Insert (after legal position p). Header implementation assumed */ void insert( element_type x, LIST L, position p ) { position tmp_cell; /*1*/ tmp_cell = (position) malloc( sizeof (struct node) ); /*2*/ if( tmp_cell == NULL ) /*3*/ fatal_error("Out of space!!!"); else { /*4*/ tmp_cell->element = x; /*5*/ tmp_cell->next = p->next; /*6*/ p->next = tmp_cell; } }