Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5106 → Rev 5107

/programs/games/fara/trunk/kosSyst.cpp
3,11 → 3,40
 
#define atexitBufferSize 32
 
// Autobuild uses FASM method for exe->kos,
// MENUET01 header should be present in EXE.
#ifdef AUTOBUILD
char kosExePath[1024];
char exeStack[16384];
// must be alphabetically first in the image
#pragma data_seg(".1seg")
extern "C" struct
{
char header[8];
int headerver;
void* entry;
void* i_end;
void* memsize;
void* stack;
void* params;
void* icon;
} header = {
{'M', 'E', 'N', 'U', 'E', 'T', '0', '1'},
1,
&crtStartUp,
0, // filled by doexe2.asm
0, // filled by doexe2.asm
exeStack + sizeof(exeStack),
NULL,
kosExePath
};
#pragma data_seg()
#else
char *kosExePath = NULL;
#endif
 
char pureCallMessage[] = "PURE function call!";
 
char *kosExePath = NULL;
 
//
void (__cdecl *atExitList[atexitBufferSize])();
int atExitFnNum = 0;
843,6 → 872,10
//
void crtStartUp()
{
#ifdef AUTOBUILD
// linker will try to remove unused variables; force header to be included
header.header;
#endif
// èíèöèàëèçèðóåì êó÷ó
__asm
{
859,8 → 892,10
}
// èíèöèàëèçèðóåì ãåíåðàòîð ñëó÷àéíûõ ÷èñåë
rtlSrand( kos_GetSystemClock() );
#ifndef AUTOBUILD
// ïóòü ê ôàéëó ïðîöåññà
kosExePath = *((char **)0x20);
#endif
// âûçîâ ãëàâíîé ôóíêöèè ïðèëîæåíèÿ
kos_Main();
// âûõîä
/programs/games/fara/trunk/kosSyst.h
89,8 → 89,12
} processInfo;
};
 
#ifdef AUTOBUILD
extern char kosExePath[];
#else
//
extern char *kosExePath;
#endif
 
//
void crtStartUp();