R-PAGE
Resistance's Portable-Adventure-Game-Engine
Macros
coroutine.h File Reference
#include <stdlib.h>

Go to the source code of this file.

Macros

#define scrBegin   static int scrLine = 0; switch(scrLine) { case 0:;
 
#define scrFinish(z)   } return (z)
 
#define scrFinishV   } return
 
#define scrReturn(z)
 
#define scrReturnV
 
#define ccrContParam   void **ccrParam
 
#define ccrBeginContext   struct ccrContextTag { int ccrLine
 
#define ccrEndContext(x)   } *x = (struct ccrContextTag *)*ccrParam
 
#define ccrBegin(x)
 
#define ccrFinish(z)   } free(*ccrParam); *ccrParam=0; return (z)
 
#define ccrFinishV   } free(*ccrParam); *ccrParam=0; return
 
#define ccrReturn(z)
 
#define ccrReturnV
 
#define ccrStop(z)   do{ free(*ccrParam); *ccrParam=0; return (z); }while(0)
 
#define ccrStopV   do{ free(*ccrParam); *ccrParam=0; return; }while(0)
 
#define ccrContext   void *
 
#define ccrAbort(ctx)   do { free (ctx); ctx = 0; } while (0)
 

Macro Definition Documentation

#define ccrAbort (   ctx)    do { free (ctx); ctx = 0; } while (0)

Definition at line 179 of file coroutine.h.

#define ccrBegin (   x)
Value:
if(!x) {x= *ccrParam=malloc(sizeof(*x)); x->ccrLine=0;}\
if (x) switch(x->ccrLine) { case 0:;

Definition at line 159 of file coroutine.h.

#define ccrBeginContext   struct ccrContextTag { int ccrLine

Definition at line 156 of file coroutine.h.

#define ccrContext   void *

Definition at line 178 of file coroutine.h.

#define ccrContParam   void **ccrParam

Definition at line 154 of file coroutine.h.

#define ccrEndContext (   x)    } *x = (struct ccrContextTag *)*ccrParam

Definition at line 157 of file coroutine.h.

#define ccrFinish (   z)    } free(*ccrParam); *ccrParam=0; return (z)

Definition at line 161 of file coroutine.h.

#define ccrFinishV   } free(*ccrParam); *ccrParam=0; return

Definition at line 162 of file coroutine.h.

#define ccrReturn (   z)
Value:
do {\
((struct ccrContextTag *)*ccrParam)->ccrLine=__LINE__;\
return (z); case __LINE__:;\
} while (0)

Definition at line 164 of file coroutine.h.

#define ccrReturnV
Value:
do {\
((struct ccrContextTag *)*ccrParam)->ccrLine=__LINE__;\
return; case __LINE__:;\
} while (0)

Definition at line 169 of file coroutine.h.

#define ccrStop (   z)    do{ free(*ccrParam); *ccrParam=0; return (z); }while(0)

Definition at line 175 of file coroutine.h.

#define ccrStopV   do{ free(*ccrParam); *ccrParam=0; return; }while(0)

Definition at line 176 of file coroutine.h.

#define scrBegin   static int scrLine = 0; switch(scrLine) { case 0:;

Definition at line 135 of file coroutine.h.

#define scrFinish (   z)    } return (z)

Definition at line 136 of file coroutine.h.

#define scrFinishV   } return

Definition at line 137 of file coroutine.h.

#define scrReturn (   z)
Value:
do {\
scrLine=__LINE__;\
return (z); case __LINE__:;\
} while (0)

Definition at line 139 of file coroutine.h.

#define scrReturnV
Value:
do {\
scrLine=__LINE__;\
return; case __LINE__:;\
} while (0)

Definition at line 144 of file coroutine.h.