2023-06-06 10:27:35 +00:00
|
|
|
/*
|
|
|
|
* File: main.pls
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2023-06-29 04:09:31 +00:00
|
|
|
* Procedure: main
|
|
|
|
*
|
|
|
|
* Program entry point.
|
2023-06-06 10:27:35 +00:00
|
|
|
*/
|
|
|
|
|
2023-06-29 04:09:31 +00:00
|
|
|
|
|
|
|
PROC main;
|
|
|
|
DCL in AS File;
|
|
|
|
DCL line AS String;
|
|
|
|
DCL now AS DateTime;
|
|
|
|
|
|
|
|
now = [[DateTime allocate] now];
|
|
|
|
IF now == NIL THEN exit(1);
|
|
|
|
in = [[File allocate] initOpen:"/etc/motd"];
|
|
|
|
IF in == NIL THEN exit(1);
|
|
|
|
|
|
|
|
WHILE [in readLine:line] != EOF;
|
|
|
|
print(line);
|
2023-06-06 10:27:35 +00:00
|
|
|
END;
|
2023-06-29 04:09:31 +00:00
|
|
|
|
|
|
|
[in release];
|
|
|
|
[now release];
|
2023-06-06 10:27:35 +00:00
|
|
|
END;
|