/* Kernel - creates the main window and menus in it, then enters the events processing loop. */ #include "common.h" #include "text.h" extern Int2 Main(void) { #if DEB_MEM _InitDebMem(); #endif #if DEB_LIB _InitDebLib(); #endif if (!GetConfigFilePath()) { myMessage(MSG_OK,"There is no settings file.\nRun setup from the directory"); return 0; } ReadTexts(); #if DEB #else if (GetParam(SFS_CURRENTS,"LOCK") && *ParBuf=='-') { goon:; #endif SetParam(SFS_CURRENTS,"LOCK","+"); if (CreateMainWindow()==0) { ProcessEvents(); } SetParam(SFS_CURRENTS,"LOCK","-"); #if DEB #else } else { GetParamString(SFS_KERNELERRORS,"SECONDCOPY"); if (myMessage(MSG_YN,ParBuf)==ANS_NO) goto goon; } #endif FreeTexts(); #if DEB_LIB _TermDebLib(); #endif #if DEB_MEM _TermDebMem(); #endif return 0; }