#include <learning/real.h>
Go to the source code of this file.
|
| #define | Serror printf("# ERROR (%s - %s: %d) ", __FUNCTION__,__FILE__, __LINE__); printf |
| |
| #define | Swarning printf("# WARNING (%s - %s: %d) ", __FUNCTION__,__FILE__, __LINE__); printf |
| |
| #define | logmsg printf ("# "); printf |
| |
| #define | dbgmsg printf ("# "); printf |
| |
| #define | Smessage printf("# "); printf |
| |
| #define | ReadFile(f, fs) ((fs=fopen(f,"rb"))!=NULL) |
| |
| #define | WriteFile(f, fs) ((fs=fopen(f,"wb"))!=NULL) |
| |
| #define | CloseFile(f) {assert(f); fclose(f); f = NULL;} |
| |
| #define | AllocM(type, x) ((type *) malloc (sizeof(type)*(x))) |
| |
| #define | FreeM(address) if (address) {free(address); address = NULL;} else fprintf(stderr,"ERROR: pointer already freed\n"); |
| |
| #define | ObjCopy(new_obj, cl_nam) (memcpy (new_obj, &cl_nam ## _class, sizeof(cl_nam))) |
| |
| #define | DEC_MEM_ERROR 0x0001 |
| |
| #define | DEC_RES_INVALID 0x0002 |
| |
| #define | DEC_SANITY_ERROR 0x0004 |
| |
| #define | DEC_ARG_INVALID 0x1000 |
| |
| #define | DEC_ARG_CORRUPT 0x2000 |
| |
| #define | DEC_MASK 0xffff |
| |
◆ AllocM
| #define AllocM |
( |
|
type, |
|
|
|
x |
|
) |
| ((type *) malloc (sizeof(type)*(x))) |
◆ CloseFile
| #define CloseFile |
( |
|
f | ) |
{assert(f); fclose(f); f = NULL;} |
◆ dbgmsg
| #define dbgmsg printf ("# "); printf |
◆ DEC_ARG_CORRUPT
| #define DEC_ARG_CORRUPT 0x2000 |
◆ DEC_ARG_INVALID
| #define DEC_ARG_INVALID 0x1000 |
◆ DEC_MASK
◆ DEC_MEM_ERROR
| #define DEC_MEM_ERROR 0x0001 |
◆ DEC_RES_INVALID
| #define DEC_RES_INVALID 0x0002 |
◆ DEC_SANITY_ERROR
| #define DEC_SANITY_ERROR 0x0004 |
◆ FreeM
| #define FreeM |
( |
|
address | ) |
if (address) {free(address); address = NULL;} else fprintf(stderr,"ERROR: pointer already freed\n"); |
◆ logmsg
| #define logmsg printf ("# "); printf |
◆ ObjCopy
| #define ObjCopy |
( |
|
new_obj, |
|
|
|
cl_nam |
|
) |
| (memcpy (new_obj, &cl_nam ## _class, sizeof(cl_nam))) |
◆ ReadFile
| #define ReadFile |
( |
|
f, |
|
|
|
fs |
|
) |
| ((fs=fopen(f,"rb"))!=NULL) |
◆ Serror
| #define Serror printf("# ERROR (%s - %s: %d) ", __FUNCTION__,__FILE__, __LINE__); printf |
◆ Smessage
| #define Smessage printf("# "); printf |
◆ Swarning
| #define Swarning printf("# WARNING (%s - %s: %d) ", __FUNCTION__,__FILE__, __LINE__); printf |
◆ WriteFile
| #define WriteFile |
( |
|
f, |
|
|
|
fs |
|
) |
| ((fs=fopen(f,"wb"))!=NULL) |
◆ FileLength()
| long FileLength |
( |
char * |
fname | ) |
|
◆ ShowError()