|
spBase
|
Macros | |
| #define | xspAlloc(n, type) (type *)xspMalloc((int)(n)*sizeof(type)) |
| #define | xspRealloc(p, n, type) (type *)xspRemalloc((char *)(p), (int)(n)*sizeof(type)) |
| #define | xspFree(p) {_xspFree((char *)(p)); (p) = NULL;} |
| #define | spArrayCopy(p1, p2, n, type) memmove((char *)(p1), (char *)(p2), (unsigned)(n)*sizeof(type)) |
| #define | xalloc(n, type) xspAlloc(n, type) |
| #define | xrealloc(p, n, type) xspRealloc(p, n, type) |
| #define | xfree(p) xspFree(p) |
| #define | strclone(string) xspStrClone(string) |
| #define | arrcpy(p1, p2, n, type) spArrayCopy(p1, p2, n, type) |
Functions | |
| char * | xspMalloc (int nbytes) |
| char * | xspRemalloc (char *p, int nbytes) |
| void | _xspFree (char *p) |
| int ** | xspIMatAlloc (int row, int col) |
| void | xspIMatFree (int **mat, int row) |
| short ** | xspSMatAlloc (int row, int col) |
| void | xspSMatFree (short **mat, int row) |
| long ** | xspLMatAlloc (int row, int col) |
| void | xspLMatFree (long **mat, int row) |
| float ** | xspFMatAlloc (int row, int col) |
| void | xspFMatFree (float **mat, int row) |
| double ** | xspDMatAlloc (int row, int col) |
| void | xspDMatFree (double **mat, int row) |
| char ** | xspCMatAlloc (int row, int col) |
| void | xspCMatFree (char **mat, int row) |
| unsigned char ** | xspUCMatAlloc (int row, int col) |
| void | xspUCMatFree (unsigned char **mat, int row) |
| char * | xspStrClone (const char *string) |
| #define xspAlloc | ( | n, | |
| type ) (type *)xspMalloc((int)(n)*sizeof(type)) |
Macro to allocate memory.
| #define xspRealloc | ( | p, | |
| n, | |||
| type ) (type *)xspRemalloc((char *)(p), (int)(n)*sizeof(type)) |
Macro to resize the allocated memory block.
| #define xspFree | ( | p | ) | {_xspFree((char *)(p)); (p) = NULL;} |
Macro to free the allocated memory block.
| #define spArrayCopy | ( | p1, | |
| p2, | |||
| n, | |||
| type ) memmove((char *)(p1), (char *)(p2), (unsigned)(n)*sizeof(type)) |
Macro to copy the array contents of p2 to the address of p1 .
| #define xalloc | ( | n, | |
| type ) xspAlloc(n, type) |
Macro to allocate memory (abbreviated version).
| #define xrealloc | ( | p, | |
| n, | |||
| type ) xspRealloc(p, n, type) |
Macro to resize the allocated memory block (abbreviated version).
| #define xfree | ( | p | ) | xspFree(p) |
Macro to free the allocated memory block (abbreviated version).
| #define strclone | ( | string | ) | xspStrClone(string) |
Makes a memory-allocated clone of the string specified by string (abbreviated version).
| #define arrcpy | ( | p1, | |
| p2, | |||
| n, | |||
| type ) spArrayCopy(p1, p2, n, type) |
Macro to copy the array contents of p2 to the address of p1 (abbreviated version).
|
extern |
Allocates memory.
|
extern |
Resize the allocated memory block.
|
extern |
Frees memory. Use xspFree() instead of this function.
|
extern |
Allocates memory for a 2-d array of int type.
|
extern |
Frees memory of a 2-d array of int type.
|
extern |
Allocates memory for a 2-d array of short type.
|
extern |
Frees memory of a 2-d array of short type.
|
extern |
Allocates memory for a 2-d array of long type.
|
extern |
Frees memory of a 2-d array of long type.
|
extern |
Allocates memory for a 2-d array of float type.
|
extern |
Frees memory of a 2-d array of float type.
|
extern |
Allocates memory for a 2-d array of double type.
|
extern |
Frees memory of a 2-d array of double type.
|
extern |
Allocates memory for a 2-d array of char type.
|
extern |
Frees memory of a 2-d array of char type.
|
extern |
Allocates memory for a 2-d array of unsigned char type.
|
extern |
Frees memory of a 2-d array of unsigned char type.
|
extern |
Makes a memory-allocated clone of the string specified by string .