Integrating C functions
539
/* Definitions of global variables */
\
MM_Environment mmEnv; \
\
void \
MM_InitWrapper(MM_Environment *env, unsigned int envSize)
\
{ \
extern void MM_Init(); \
\
char **envPtr = (char **)env;
\
char **mmPtr = (char **)(&mmEnv);
\
char **envEnd = (char **)((char *) envSize);
\
char **mmEnd = (char **)((char *)mmPtr + sizeof(MM_Environment));
\
\
/* Copy fields from env to mmEnv, one pointer at a time */
\
while (mmPtr < mmEnd && envPtr < envEnd)
\
*mmPtr++ = *+; \
\
/* If env doesn't define all of mmEnv's fields, set extras to NULL */
\
while (mmPtr < mmEnd) \
*mmPtr++ = (char *)0; \
\
/* Call user's MM_Init function */
\
MM_Init(); \
} \
#endif /* _MM_JSAPI_H_ */
Содержание FLASH 8-EXTENDING FLASH
Страница 1: ...Extending Flash...
Страница 38: ...38 Top Level Functions and Methods...
Страница 532: ...532 Objects...
Страница 554: ...554 C Level Extensibility...