Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-01

ncurses extra package

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Guillermo Martínez Jiménez

Hello everybody.

Recently I asked myself if Free Pascal has support for ncurses and I've found it as an extra package.

I've take a peek at the ncurses.pp file and I've found it uses a lot of external functions. That means this package will not compile on platforms that haven't a previous ncurses implementation (NDS, GP32/2X, etc.). I think if the ncurses package uses the RTL (Crt, keyboard, gpm, etc.) it would be more portable, if the platform can't support Crt, keyboard, mouse, etc. they can be emulated.

Then I decided to write my own ncurses.pp alternative using only the RTL. I will not claim "official declaration" or support, and may be it will not be so complete and successful as Michael Van Canneyt's implementation, but any comment or advice will be welcome.

See you,

Guillermo "Ñuño" Martínez

Michael Van Canneyt
to Guillermo Martínez Jiménez
Guillermo Martínez Jiménez wrote 16 lines
Hello everybody. Recently I asked myself if Free Pascal has support for ncurses and I've found it as an extra package. I've take a peek at the ncurses.pp file and I've found it uses a lot of external functions. That means this package will not compile on platforms that haven't a previous ncurses implementation (NDS, GP32/2X, etc.). I think if the ncurses package uses the RTL (Crt, keyboard, gpm, etc.) it would be more portable, if the platform can't support Crt, keyboard, mouse, etc. they can be emulated. Then I decided to write my own ncurses.pp alternative using only the RTL. I will not claim "official declaration" or support, and may be it will not be so complete and successful as Michael Van Canneyt's implementation, but any comment or advice will be welcome.

To be clear:

The point of the ncurses package in FPC is to allow you to use the official ncurses library. It does not implement any functionality by itself, it is just a translation of the C header files to pascal.

Writing your own pascal-only ncurses is of course something that can be done, but this is a different goal...

Michael.

Guillermo Martínez Jiménez
Michael Van Canneyt wrote
CgpPbiBGcmksIDE4IEphbiAyMDA4LCBHdWlsbGVybW8gTWFydMOtbmV6IEppbcOpbmV6IHdyb3Rl OgoKPiBIZWxsbyBldmVyeWJvZHkuCj4gCj4gUmVjZW50bHkgSSBhc2tlZCBteXNlbGYgaWYgRnJl ...

Er... Pardon?

Marco van de Voort
to Guillermo Martínez Jiménez: Hello everybody. Recently I asked myself if Free Pascal has support for ncurses and I've…
Show quoted text 14 lines
Recently I asked myself if Free Pascal has support for ncurses and I've found it as an extra package. I've take a peek at the ncurses.pp file and I've found it uses a lot of external functions. That means this package will not compile on platforms that haven't a previous ncurses implementation (NDS, GP32/2X, etc.). I think if the ncurses package uses the RTL (Crt, keyboard, gpm, etc.) it would be more portable, if the platform can't support Crt, keyboard, mouse, etc. they can be emulated. Then I decided to write my own ncurses.pp alternative using only the RTL. I will not claim "official declaration" or support, and may be it will not be so complete and successful as Michael Van Canneyt's implementation, but any comment or advice will be welcome.

Ncurses is mostly added from a "so that we have at least something on Unix" perspective. Not so much as crossplatform solution, since the concepts of NCurses are a bit Unix centric.

Anthony W.Henry
to Guillermo Martínez Jiménez: Hello everybody. Recently I asked myself if Free Pascal has support for ncurses and I've…
Guillermo Martínez Jiménez wrote
Hello everybody. Recently I asked myself if Free Pascal has support for ncurses and I've found it as an extra package.

There is also an ncrt unit. If all your looking at is the ability to run the program on different terminals this might be the ticket. This unit implements all the crt functionality but uses ncurses as the back end.

Anthony

Show quoted text 19 lines
I've take a peek at the ncurses.pp file and I've found it uses a lot of external functions. That means this package will not compile on platforms that haven't a previous ncurses implementation (NDS, GP32/2X, etc.). I think if the ncurses package uses the RTL (Crt, keyboard, gpm, etc.) it would be more portable, if the platform can't support Crt, keyboard, mouse, etc. they can be emulated. Then I decided to write my own ncurses.pp alternative using only the RTL. I will not claim "official declaration" or support, and may be it will not be so complete and successful as Michael Van Canneyt's implementation, but any comment or advice will be welcome. See you, Guillermo "Ñuño" Martínez _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal