Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

pi_mem.h File Reference

#include <stdlib.h>

Go to the source code of this file.

Typedefs

typedef INT32 Size

Functions

void * LH_malloc (long a)
void LH_free (void *a)
void LH_mallocInit ()
Ptr DisposeIfPtr (Ptr aPtr)
Ptr SmartNewPtr (Size byteCount, OSErr *resultCode)
Ptr SmartNewPtrClear (Size byteCount, OSErr *resultCode)
UINT32 TickCount (void)
double MyTickCount (void)
double rint (double a)
void BlockMove (const void *srcPtr, void *destPtr, Size byteCount)


Typedef Documentation

typedef INT32 Size
 

Definition at line 17 of file w98/lh_open/pi_mem.h.


Function Documentation

void BlockMove const void *  srcPtr,
void *  destPtr,
Size  byteCount
 

Definition at line 337 of file lh_open/pi_mem.c.

Referenced by DeviceLinkFill(), MyAdd_NL_CopyrightTag(), and MyAdd_NL_DescriptionTag().

00340 { 00341 memmove(destPtr, srcPtr, byteCount); 00342 }

Ptr DisposeIfPtr Ptr  aPtr  ) 
 

Definition at line 99 of file lh_open/pi_mem.c.

References LH_free(), NULL, and Ptr.

Referenced by CMConvIndexToNameProfile(), CMConvNameToIndexProfile(), CMCreateDeviceLinkProfile(), CMCreateMultiProfileTransformInternal(), CMGetNamedProfileInfoProfile(), CMMInitPrivate(), Create_LH_ProfileSet(), CreateCombi(), DeviceLinkFill(), Extract_Gray_Luts(), Extract_MFT_Alut(), Extract_MFT_Elut(), Extract_MFT_Xlut(), Extract_TRC_Alut(), Extract_TRC_Elut(), ExtractAll_MFT_Luts(), LHCheckBitMapPrivate(), LHCheckColorsPrivate(), LHColorWorldClose(), LHMatchBitMapPlanePrivate(), LHMatchBitMapPrivate(), MakeSessionFromLink(), MyAdd_NL_SequenceDescTag(), MyNewDeviceLinkFill(), and PrepareCombiLUTs().

00100 { 00101 if (thePtr) 00102 { 00103 LH_free(thePtr); 00104 } 00105 return NULL; 00106 }

void LH_free void *  a  ) 
 

Definition at line 276 of file lh_open/pi_mem.c.

References Ptr.

Referenced by DisposeIfPtr().

00277 { 00278 #ifdef __MWERKS__ 00279 DisposePtr((Ptr)a); 00280 #else 00281 free(a); 00282 #endif 00283 00284 }

void* LH_malloc long  a  ) 
 

Definition at line 254 of file lh_open/pi_mem.c.

Referenced by SmartNewPtr().

00255 { 00256 #ifdef __MWERKS__ 00257 return NewPtr(a); 00258 #else 00259 return malloc(a); 00260 #endif 00261 00262 }

void LH_mallocInit  ) 
 

Definition at line 238 of file lh_open/pi_mem.c.

00239 { 00240 }

double MyTickCount void   ) 
 

double rint double  a  ) 
 

Ptr SmartNewPtr Size  byteCount,
OSErr resultCode
 

Definition at line 47 of file lh_open/pi_mem.c.

References LH_malloc(), notEnoughMemoryErr, and Ptr.

Referenced by AllocBufferCheckCM(), CheckInputColorSpace(), CheckOutputColorSpace(), CheckOutputColorSpaceChk(), CMConvIndexToNameProfile(), CMConvNameToIndexProfile(), CMGetNamedProfileInfoProfile(), CMMInitPrivate(), DeviceLinkFill(), Do555To8Setup(), Do8To555Setup(), Extract_Gray_Luts(), Extract_MFT_Alut(), Extract_MFT_Elut(), Extract_MFT_Xlut(), Extract_TRC_Alut(), Extract_TRC_Elut(), Extract_TRC_Matrix(), ExtractAll_MFT_Luts(), GetMatrixFromProfile(), InvertLut1d(), MakeSessionFromLink(), MyAdd_NL_SequenceDescTag(), MyNewDeviceLinkFill(), and SmartNewPtrClear().

00049 { 00050 Ptr aPtr; 00051 aPtr = (Ptr)LH_malloc(byteCount); 00052 if (aPtr == 0) 00053 *resultCode = notEnoughMemoryErr; 00054 else 00055 *resultCode = 0; 00056 return aPtr; 00057 }

Ptr SmartNewPtrClear Size  byteCount,
OSErr resultCode
 

Definition at line 72 of file lh_open/pi_mem.c.

References NULL, Ptr, and SmartNewPtr().

Referenced by CMCreateDeviceLinkProfile(), CMCreateMultiProfileTransformInternal(), Create_LH_ProfileSet(), DeviceLinkFill(), LHColorWorldOpen(), and MyNewDeviceLinkFill().

00074 { 00075 Ptr ptr = NULL; 00076 00077 ptr = SmartNewPtr(byteCount, resultCode); 00078 00079 if (ptr != NULL) 00080 { 00081 memset( ptr, 0, byteCount ); 00082 } 00083 return ptr; 00084 00085 }

UINT32 TickCount void   ) 
 

Definition at line 55 of file lh_open/pi_tick.c.

References NULL, and UINT32.

00056 { 00057 UINT32 timevalue; 00058 timevalue = (UINT32) time(NULL); 00059 return timevalue; 00060 }


Generated on Sat May 15 19:45:09 2004 for test by doxygen 1.3.7