fox32os/applications/fetcher/Fetcher.okm

24 lines
728 B
Plaintext
Raw Normal View History

MODULE Fetcher;
IMPORT OS, Browser, Desktop;
EXTERN terminalStreamPtr: POINTER TO CHAR;
EXTERN arg0Ptr: POINTER TO CHAR;
EXTERN arg1Ptr: POINTER TO CHAR;
EXTERN arg2Ptr: POINTER TO CHAR;
EXTERN arg3Ptr: POINTER TO CHAR;
PROCEDURE Main();
BEGIN
IF (terminalStreamPtr = 0) & (arg0Ptr = 0) THEN
(* probably launched from startup.cfg *)
DesktopMain();
ELSIF arg0Ptr <|= 5 THEN
(* launched from an existing instance of fetcher *)
2023-07-13 01:41:39 +02:00
BrowserMain(arg0Ptr, arg1Ptr, arg2Ptr, arg3Ptr);
ELSE
(* probably launched from the terminal *)
2023-07-13 01:41:39 +02:00
BrowserMain(string_to_int(arg0Ptr, 10), 0, 0, 0);
END;
END;
END.