TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
learn_debug.h File Reference
#include <learning/real.h>
Include dependency graph for learn_debug.h:

Go to the source code of this file.

Macros

#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)
#define WriteFile(f, fs)
#define CloseFile(f)
#define AllocM(type, x)
#define FreeM(address)
#define ObjCopy(new_obj, 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

Functions

int ShowError (int ec)
long FileLength (char *fname)

Macro Definition Documentation

◆ AllocM

#define AllocM ( type,
x )
Value:
((type *) malloc (sizeof(type)*(x)))

Definition at line 30 of file learn_debug.h.

◆ CloseFile

#define CloseFile ( f)
Value:
{assert(f); fclose(f); f = NULL;}

Definition at line 28 of file learn_debug.h.

◆ dbgmsg

#define dbgmsg   printf ("# "); printf

Definition at line 18 of file learn_debug.h.

◆ DEC_ARG_CORRUPT

#define DEC_ARG_CORRUPT   0x2000

Definition at line 41 of file learn_debug.h.

◆ DEC_ARG_INVALID

#define DEC_ARG_INVALID   0x1000

Definition at line 40 of file learn_debug.h.

◆ DEC_MASK

#define DEC_MASK   0xffff

Definition at line 44 of file learn_debug.h.

◆ DEC_MEM_ERROR

#define DEC_MEM_ERROR   0x0001

Definition at line 37 of file learn_debug.h.

◆ DEC_RES_INVALID

#define DEC_RES_INVALID   0x0002

Definition at line 38 of file learn_debug.h.

◆ DEC_SANITY_ERROR

#define DEC_SANITY_ERROR   0x0004

Definition at line 39 of file learn_debug.h.

◆ FreeM

#define FreeM ( address)
Value:
if (address) {free(address); address = NULL;} else fprintf(stderr,"ERROR: pointer already freed\n");

Definition at line 31 of file learn_debug.h.

◆ logmsg

#define logmsg   printf ("# "); printf

Definition at line 17 of file learn_debug.h.

◆ ObjCopy

#define ObjCopy ( new_obj,
cl_nam )
Value:
(memcpy (new_obj, &cl_nam ## _class, sizeof(cl_nam)))

Definition at line 33 of file learn_debug.h.

◆ ReadFile

#define ReadFile ( f,
fs )
Value:
((fs=fopen(f,"rb"))!=NULL)
static tRmFileSelect fs

Definition at line 26 of file learn_debug.h.

◆ Serror

#define Serror   printf("# ERROR (%s - %s: %d) ", __FUNCTION__,__FILE__, __LINE__); printf

Definition at line 10 of file learn_debug.h.

◆ Smessage

#define Smessage   printf("# "); printf

Definition at line 20 of file learn_debug.h.

◆ Swarning

#define Swarning   printf("# WARNING (%s - %s: %d) ", __FUNCTION__,__FILE__, __LINE__); printf

Definition at line 11 of file learn_debug.h.

◆ WriteFile

#define WriteFile ( f,
fs )
Value:
((fs=fopen(f,"wb"))!=NULL)

Definition at line 27 of file learn_debug.h.

Function Documentation

◆ FileLength()

long FileLength ( char * fname)

◆ ShowError()

int ShowError ( int ec)