Fix Platform initialisation, move common Arg handling code from Platfrom to Modules.

This commit is contained in:
David Brown 2016-12-01 18:08:08 +00:00
parent aed9134e99
commit 299b0636ad
9 changed files with 99 additions and 162 deletions

View file

@ -258,10 +258,10 @@ extern void Heap_INCREF();
// Main module initialisation, registration and finalisation
extern void Platform_Init(INT32 argc, ADDRESS argv);
extern void Modules_Init(INT32 argc, ADDRESS argv);
extern void Heap_FINALL();
#define __INIT(argc, argv) static void *m; Platform_Init(argc, (ADDRESS)&argv);
#define __INIT(argc, argv) static void *m; Modules_Init(argc, (ADDRESS)&argv);
#define __REGMAIN(name, enum) m = Heap_REGMOD((CHAR*)name,enum)
#define __FINI Heap_FINALL(); return 0