#include "include/ipc.h"
#include <stdlib.h>
+// === GLOBALS ===
+int giAxWin3_MainLoopExit;
+
// === CODE ===
int SoMain(void *Base, int argc, const char *argv[], const char **envp)
{
// TODO: Parse the environment for the AXWIN3_SERVER variable
- gsAxWin3_int_ServerDesc = getenv("AXWIN3_SERVER");
+ //gsAxWin3_int_ServerDesc = getenv("AXWIN3_SERVER");
+ gsAxWin3_int_ServerDesc = "pipe:/Devices/ipcpipe/axwin";
return 0;
}
-void AxWin3_MainLoop(void)
+int AxWin3_MainLoop(void)
{
tAxWin_IPCMessage *msg;
- int bExit = 0;
- while(!bExit)
+ giAxWin3_MainLoopExit = 0;
+
+ while(!giAxWin3_MainLoopExit)
{
msg = AxWin3_int_GetIPCMessage(0, NULL);
if(!msg) continue;
AxWin3_int_HandleMessage( msg );
}
+ return giAxWin3_MainLoopExit;
+}
+
+void AxWin3_StopMainLoop(int Reason)
+{
+ giAxWin3_MainLoopExit = Reason;
}
void AxWin3_MessageSelect(int nFD, fd_set *FDs)