Subj : GPC and curses
To   : Andy Ball
From : Jasen Betts
Date : Sun Oct 17 2004 06:19 pm

Hello Andy.

15 Oct 04 02:33, you wrote to Sean Dennis:

AB> We should probably make an effort to get back on topic. Have you ever
AB> tried gpc?  If so, what were your thoughts?  Can I make use of
AB> termcap

I skipped this message before readint the aboe praragraph... being on-topic
is a good ides.

AB> or curses libraries from a Pascal program compiled with gpc?

Simply using CRT would produce a binary that uses curses (or ncurses)
for its "CRT" ouput.

If you're compiling on DOS you'll then have to choose between a real of
emulated curses library. depending on wether you want it to use "ansi" or
direct screen writes.

I know of no libraries for linux that offer direct scrren text output.
(not that writing one would be hard, but more that using one would msake
applications that would only work on the console and not in an xterm or over a
ssg or telnet connection.

"gcc" (the gnu c comnpiler) is used as a back-end for compiling pascal programs
so they will be potentially linkable with all C libraries

I've not looked closely at gpc I don't know if it can read the c header (*.h)
files to allow you to link arbitrary c libraries, or if you need to provide
that information in a different format.

from the info page the following unit are provided as standard.

* CRT::          BP compatibility: CRT & WinCRT, portable, with many extensions
* Dos::          BP compatibility: Dos
* DosUnix::      Overcome some differences between Dos and Unix
* FileUtils::    Higher level file and directory handling
* GMP::          Arithmetic with unlimited size and precision
* GPCUtil::      Turbo Power compatibility, etc.
* HeapMon::      Primitive heap checking
* Intl::         Internationalization
* MD5::          `MD5' Message Digests
* Overlay::      BP compatibility: Overlay
* Pipe::         Start a child process, connected with
* Ports::        BP compatibility (partly): `Port', `PortW' arrays
* Printer::      BP compatibility: Printer, portable
* RegEx::        Regular Expression matching and substituting
* Strings::      BP compatibility: Strings
* StringUtils::  Higher level string handling
* System::       BP compatibility: System
* Trap::         Trap runtime errors
* Turbo3::       BP compatibility: Turbo3
* WinDos::       BP compatibility: WinDos

Also, from reading the documantation it looks like you can do

{$l /lib/libcurses.o}

and then declare the curses functions which you want to use using the
"asmname" keyword.

I'm notu sure if dynamic linking is supported.

Jasen
--- GoldED+/LNX 1.1.4.7
* Origin:  (3:640/1042)