19#undef SP_USE_MAC_MEMORY
26extern void spSetMemoryErrorExit(
int flag);
71#if defined(_WIN32) && defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
72#define xspAlloc(n, type) (type *)malloc((int)(n)*sizeof(type))
73#define xspRealloc(p, n, type) (type *)realloc((char *)(p), (int)(n)*sizeof(type))
74#define xspFree(p) {free((char *)(p)); (p) = NULL;}
75#define xspStrClone(p) _strdup(p)
78#define xspAlloc(n, type) (type *)xspMalloc((int)(n)*sizeof(type))
80#define xspRealloc(p, n, type) (type *)xspRemalloc((char *)(p), (int)(n)*sizeof(type))
82#define xspFree(p) {_xspFree((char *)(p)); (p) = NULL;}
87#define spStrReplace(s1, s2) {if ((s1) != NULL) xspFree(s1); (s1) = (((s2) != NULL) ? xspStrClone(s2) : NULL);}
88#define spArrayCopy(p1, p2, n, type) memmove((char *)(p1), (char *)(p2), (unsigned)(n)*sizeof(type))
90#if !defined(SP_DISABLE_ABBREVIATION)
92#define xalloc xspAlloc
95#define xrealloc xspRealloc
102#define strclone xspStrClone
105#define strrepl spStrReplace
108#define arrcpy spArrayCopy
float ** xspFMatAlloc(int row, int col)
void xspUCMatFree(unsigned char **mat, int row)
void xspIMatFree(int **mat, int row)
char * xspStrClone(const char *string)
void xspCMatFree(char **mat, int row)
void xspDMatFree(double **mat, int row)
long ** xspLMatAlloc(int row, int col)
double ** xspDMatAlloc(int row, int col)
short ** xspSMatAlloc(int row, int col)
void xspLMatFree(long **mat, int row)
void xspSMatFree(short **mat, int row)
char * xspRemalloc(char *p, int nbytes)
unsigned char ** xspUCMatAlloc(int row, int col)
char * xspMalloc(int nbytes)
void xspFMatFree(float **mat, int row)
char ** xspCMatAlloc(int row, int col)
int ** xspIMatAlloc(int row, int col)