xp_comm_proj/rd_dicom/Papyrus3/PapyList3.c
/********************************************************************************/
/*										*/
/*	InsertFirstInList : Create a new Item at the first place in the list 	*/
/*	and insert the given Object in it.					*/
/*	return : The created cell if OK, NULL otherwise				*/
/*										*/
/********************************************************************************/
InsertFirstInList : Create a new Item at the first place in the list
and insert the given Object in it.
return : The created cell if OK, NULL otherwise
InsertFirstInList : Create a new Item at the first place in the list and insert the given Object in it . return : The created cell if OK NULL otherwise
Papy_List *
InsertFirstInList (Papy_List **ioListP, Object *inElemToInsertP)
{
  Papy_List	*theNewCellP;
  if ((theNewCellP = (Papy_List *) emalloc3 ((PapyULong) sizeof (Papy_List))) == NULL)
    return NULL;
  theNewCellP->object = inElemToInsertP;
  theNewCellP->next   = (*ioListP);
  *ioListP = theNewCellP;
  return theNewCellP;
}
Papy_List * InsertFirstInList ( Papy_List * * ioListP , Object * inElemToInsertP ) { Papy_List * theNewCellP ; if ( ( theNewCellP = ( Papy_List * ) emalloc3 ( ( PapyULong ) sizeof ( Papy_List ) ) ) == NULL ) return NULL ; theNewCellP -> object = inElemToInsertP ; theNewCellP -> next = ( * ioListP ) ; * ioListP = theNewCellP ; return theNewCellP ; }
InsertFirstInList : Create a new Item at the first place in the list
and insert the given Object in it.
InsertFirstInList : Create a new Item at the first place in the list and insert the given Object in it .
/* create the new cell and put the Object in */ /* change the head pointer */