df9e7eb311
This commit includes needed kernel changes and additions.
21 lines
581 B
Plaintext
21 lines
581 B
Plaintext
MODULE Fetcher;
|
|
IMPORT OS, Browser, Desktop;
|
|
|
|
EXTERN terminalStreamPtr: POINTER TO CHAR;
|
|
EXTERN arg0Ptr: 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 *)
|
|
BrowserMain(arg0Ptr);
|
|
ELSE
|
|
(* probably launched from the terminal *)
|
|
BrowserMain(string_to_int(arg0Ptr, 10));
|
|
END;
|
|
END;
|
|
END.
|