xp_comm_proj/rd_dicom/Papyrus3/PapyEallocMac3.c
/********************************************************************************/
/*										*/
/*	erealloc3 : checked version of realloc					*/
/*	return : the validated pointer if OK					*/
/*										*/
/********************************************************************************/
erealloc3 : checked version of realloc
return : the validated pointer if OK
erealloc3 : checked version of realloc return : the validated pointer if OK
void *
erealloc3 (void *inPtr, PapyULong inNewSize, PapyULong inOldSize)
{
  void	*theP;
  Size	thePtrSize;
  inOldSize = inOldSize; 
  theP = NewPtr (inNewSize);
  thePtrSize = GetPtrSize (inPtr);
  memmove (theP, inPtr, (size_t) thePtrSize);
  DisposePtr ((Ptr) inPtr);
  return theP;
}
void * erealloc3 ( void * inPtr , PapyULong inNewSize , PapyULong inOldSize ) { void * theP ; Size thePtrSize ; inOldSize = inOldSize ; theP = NewPtr ( inNewSize ) ; thePtrSize = GetPtrSize ( inPtr ) ; memmove ( theP , inPtr , ( size_t ) thePtrSize ) ; DisposePtr ( ( Ptr ) inPtr ) ; return theP ; }
erealloc3 : checked version of realloc
return : the validated pointer if OK
erealloc3 : checked version of realloc return : the validated pointer if OK
/*	return checkvp3 (realloc ((char *) ptr, (size_t) size));*/ /* dummy instruction for dummy programmers... */