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

Wed, 24 Jul 1996 01:51:36 +0200 (MET DST)


Hello Berend, hello everybody!

> > There are really few of them, but since the source exists, I suggest
> > that somebody ports *everything* to the DOS version of GPC, and we can
> > make the "potentially portable" parts portable in a second stage.
> 
> What use does it have when you already have a good Dos compiler, i.e. Borland
> Pascal? It fullfills all my needs for the Dos environment.

Not mine, and when you look into comp.lang.pascal.borland you will find
a lot of Borland Pascal programmers complaining about version 7 and
looking around for a version 8 which should eliminate the 64kB limit.
But it is clear that Borland will *not* write this version 8, although
they promised to do so a few CeBit fairs ago.

Borland Pascal is a good DOS Pascal compiler, but it is not good enough
at least for *my* needs in the next years.  GNU Pascal *is*, and I am sure
we could get a lot of Borland Pascal programmers to switch to GNU Pascal
if we had CRT and Graph Units available.

> Besides, what do you mean by 'porting', i.e. should do exactly the same with
> every quirk inherited or just similar enough?

I mean: similar enough.

> The system unit can be implemented easily, I've done already that for 90%. A few
> things you can't do like Inc, and some functions which have overloaded
> parameters (Assign, Close, ...).

Inc, dec, shl, shr, etc. *ARE* already implemented into GPC.
Read the file README.TURBO.

If you have a Borland "system" module, please publish it!

> If similar is good enough, I suggest we define a POSIX interface first, starting
> from the one I wrote for Dos, and build the Dos unit on top of that.

Why not?  Please do it!

> We can do the Crt unit in the same manner, building on top of the curses
> library.

Like this (I think at least), the FPK Pascal CRT Unit I am speaking of works.

> >  We have free sources of Borland Units (CRT, Graph, ...)
> 
> Note, you don't have the source of the Graph unit.

    ********************************************
    Note, I HAVE the source of the Graph unit!!!
    ********************************************

I am not speaking of the Borland source (which I once bought for 600 DM
-- just to see that they were sold for 50 DM one month later)-< which
in fact does not include the source of Graph.  Those sources are 
copyrighted by Borland and of no use for our FreeWare project.
I am speaking of the FREEWARE sources of CRT, Graph, etc. from the 
FPK Pascal project!

I herewith repeat:

    I am in contact with Florian Klaempfl, the author of FPK Pascal,
    another free 32-bit Pascal compiler. Florian has got free sources 
    for Borland compatible Units like SYSTEM, CRT, PRINTER, and GRAPH
    for FPK Pascal which cry for being ported to GNU Pascal. 

So, unless Florian is lying (what I don't believe!), we *have*
Graph sources available as FreeWare.

> From my viewpoint, Borland Pascal does everything, so spending time for 
> a Dos only solution is not a thing I want. And it is not necessary.

>From my viewpoint, Borland Pascal is bursting due to the 64kB limit
which is still present for single variables and single code segments.
Even a DOS-only solution would be very useful for a lot of Borland 
Pascal programmers who could smoothly switch to GNU Pascal if the 
Units were available.

> And is gpc already for such projects? 

YES!  Read, for example, README.TURBO.

> I see some problems with gpc as I know it:
> - no renaming, necessary to avoid clashing with c libraries.

No problem: Use the AsmName directive.

> - qualifed imports available?

What's that?

> - how to link with C libraries? You have the c; construct, but exactly 
>   how does it work? What does it do?

The C directive decapitalizes the name of a Procedure/Function while
making it an external declaration.  Like this, you can access C library
functions which are in lowercase.  For other functions use the AsmName
directive:

  Function MyCFunction ( i: Integer ): Integer;
  AsmName 'my_C_func';

is equivalent to the C construct

  extern int my_C_func (int i);

and therefore allows to access the C function my_C_func from Pascal.

And again:

  Porting *existing* CRT, Graph, etc. sources to GNU Pascal.
  Anybody wants to do the job?

Yours,

    Peter


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