Programmers wanted: CRT, Graph, etc. for GNU Pascal_(re)

Thu, 25 Jul 1996 01:03:15 +0200 (MET DST)


Arcadio wrote:
>
> Has the "Borland UNITs" problem been fixed with GPC yet?  Or are we still 
> stick with that rather nasty (IMHO of course) hack we had to do by  #including 
> the the UNIT file in any program we wished to use that unit?

I am just working on that problem and I'm pretty sure that it will be fixed 
in the next release.  But please be patient since it is *hard* work and...
> since being a student tends to eat up a lot of my time ... :-)

> 	The last time I checked out your BO5 library, Peter, any program 
> that used your Crt unit, I think, had to be set uid on the Linux platform 
> 'cause it did direct screen writes.  Is this still true?  Or did you 
> change it to use NCurses yet?

Use -D TERMCAP instead of -D LINUX and link the -ltermcap library.
export CL_COLOR=YES in order to get ANSI colors.

Since I want to have BO5 being portable to *all* platforms including
OS/2pm and Windoze, I want to avoid to rely on special libraries.  I will
probably use (S)VGALIB with Linux which is part of the operating system,
but I will even try to avoid linking the termcap library in the next
release since I have found computers where it is not installed (!).

Since I am rewriting kind of Turbo Vision (but with graphics mode, too)
I actually won't need something like ncurses.  When my progress on BO5
is so slow, this has (almost) no technical reasons but it's a question
of time.  Currently, I am hacking around in the interior of GPC, in
programs I want to sell, and in my dissertation thesis in physics.

> 	I've already written a Crt-like MODULE for Gardens Point Modula-2 
> compiler which are SLang-based.  Shouldn't be too hard to convert over to 
> GPC.  That is ... if anybody is interested ...

Since my BO5 will take some time to become really useful, I think that
everything which replaces CRT etc. is highly welcome by the GPC users,
even if it is not portable to all platforms.

But once more: I have free sources of CRT, Graph, etc. ...
I don't want to port them myself because I think it is more important
that I work on the compiler itself and on BO5.

> 	Yeah .. it shouldn't be too hard to implement Printer ... it 
> seems rather straight forward to me.  

Here is the DOS version:

  Unit Printer;

  Interface

  uses
    Tools;  (* we need Assign *)

  Var
    lst: Text;

  Implementation

  to begin do  (* Extended Pascal initializers and finalizers *)
    begin
      Assign ( lst, 'prn' );
      rewrite ( lst );
    end (* to begin *)

  to end do
    close ( lst );

  end.

I didn't test it, but it should work. (-: Now it's your turn to
make it portable. ;-)

> 	However, like the other guy said, certain things in Borland 
> Pascal only make sense under DOS (like the Mem[] variable and ABSOLUTE 
> variables).

Absolute variables *make* sense not only under DOS when you use them
instead of variant records to convert data.  Look into the Tools
Unit from BO5 for examples.  (Yes, GPC has "absolute".)

Yours,

    Peter

--------------------------------------------------------------------------------
Dipl. Phys. Peter Gerwinski
Fachbereich Physik
Universitaet-GH Essen                       Phone:  +49-201-183-2763
D-45117 Essen                               Fax:    +49-201-183-2120
Germany                                     e-mail: peter.gerwinski@uni-essen.de
--------------------------------------------------------------------------------


Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es