Peter Gerwinski wrote:
The African Chief wrote:
[...] WinCRT is not a direct port of the Dos "crt" unit (although there are several compatible routines such as Readkey, GotoXY, etc), but is rather a wrapper around several WinAPI calls to produce a standard Windows window - but one that can process Readln/Writeln/Readkey calls, etc. [...]
It's mostly a port of the Dos Crt unit -- though a lot is missing, and there are a few additions (some of them are emulated in GPC's CRT unit), but these additions are not essential for normal usage.
Unless I am missing something, the same holds for the X11 version of our CRT unit (replacing "WinAPI" with "X11 API", encapsulated in some `*curses' library). So `uses CRT' with GPC should give the desired result.
Yes.
- but this would not result in an X application - is this
correct, Peter?
If you follow the instructions in `crt.pas' you can produce an X11 application as well as a console application (that will of course run under X11 without any restrictions) - just at your option.
(However I noticed some problems with the window not being selectable under X11. Somebody knows what happens there?)
Seems to be a library problem: GPC reverses the order of libraries in a `{$L}' directive. Obviously, the X libraries don't like that too much...
So it's up to you to fix it. ;-)
Frank
-- Frank Heckenbach, frank@fjf.gnu.de http://fjf.gnu.de/ PGP and GPG keys: http://fjf.gnu.de/plan