int rexx_init (void) { RexxSysBase = (REXXBASE *) OpenLibrary ("rexxsyslib.library", 0L); if (!RexxSysBase) { write_log ("Can't find rexxsyslib.library!\n"); return 0; } #ifdef __amigaos4__ IRexxSys = (struct RexxSysIFace *) GetInterface (RexxSysBase, "main", 1, NULL); if (!IRexxSys) { CloseLibrary (RexxSysBase); RexxSysBase = 0; return 0; } #endif if (FindPort(UAE_PORTNAME)) { write_log ("Port \"%s\" already exists!\n", UAE_PORTNAME); return 0; } ARexxPort = CreatePort (UAE_PORTNAME, 0); if (!ARexxPort) { write_log ("Failed to open AREXX port \"%s\"!\n", UAE_PORTNAME); return 0; } write_log ("Rexx port \"%s\" installed.\n", UAE_PORTNAME); rexx_handle_events (); return 1; }
void gui_handle_events (void) { if (have_rexx) rexx_handle_events(); }