If that was a typo, Tobias, well done. If it wasn't a typo, even more well done!tofro wrote:Of curse!Derek_Stewart wrote:Hi,
I was going to port ncurses to C68, do you think this would be of any use?
LibVT
Re: LibVT
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html
Re: LibVT
Peter,
the major changes between "traditional Unix" curses and ncurses are:
Tobias
the major changes between "traditional Unix" curses and ncurses are:
- Improved feature set (ncurses API consists of roughly twice the number of API calls than traditional curses)
- Support for forms, windows, menus
- Panel stacks (that is, stacked windows that have a z-order and a back buffer to restore them)
- Wide character support (wchar_t)
- Color support
- many more...
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: LibVT
I would surely appreciate every effort to port ncurses to (xt)C68. I´m going nuts with curses here....I can´t for my life do a simple thing as print a text at a specified location on the screen....move(15,15) does not do anything for my printf and following refresh()
-
- Font of All Knowledge
- Posts: 3972
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: LibVT
Hi,Peter wrote:Of c(o)urse I know that ncurses is newer than curses, but most ncurses calls are said to be easily portable to the old curses, which exists for C68.
What is the exact point in an ncurses port?
I am still trying to write the make file for C68, so early days at present.
Regards,
Derek
Derek
Re: LibVT
SM71,
Check out SMSQzine #7 for some working examples of curses. The source files are in the accompanying .zip file. SMSQzine can be found on my website:
http://swensont.epizy.com/
Tim
Check out SMSQzine #7 for some working examples of curses. The source files are in the accompanying .zip file. SMSQzine can be found on my website:
http://swensont.epizy.com/
Tim
Re: LibVT
Compiled testcur1.c without any problems like so: qcc testcur1.c -o testcur -lcursesswensont wrote:SM71,
Check out SMSQzine #7 for some working examples of curses. The source files are in the accompanying .zip file. SMSQzine can be found on my website:
http://swensont.epizy.com/
Tim
However, when run on a QL I only get 'no terminal defined' in the window.
What´s the problem ?
-
- Font of All Knowledge
- Posts: 3972
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: LibVT
Hi,
The problem here is that you have not set the Environmental Variable for the terminal type, which uses "terminfo_qdos"
I set my VT52 terminal in the boot file with the following commands:
This allows the Curses compiled programme to load the VT52 screen emulation file.
It is detailed in the LIBcurses documentation, the terminfo_qdos file is contained in the C68 distribution runtime disk 2
Having the VT52 terminal defines all the "testcur" C files now compile correctly, giving the "-lcurses" option on the command line at the end of the command string:
ex CC;"-o testcur1_exe testcur1_c -lcurses"
The problem here is that you have not set the Environmental Variable for the terminal type, which uses "terminfo_qdos"
I set my VT52 terminal in the boot file with the following commands:
Code: Select all
REMark Set variable for terminal type
SETENV "TERM=QDOS"
:
REMark Set variable for terminal info file
SETENV "TERMINFO=terminfo"
It is detailed in the LIBcurses documentation, the terminfo_qdos file is contained in the C68 distribution runtime disk 2
Having the VT52 terminal defines all the "testcur" C files now compile correctly, giving the "-lcurses" option on the command line at the end of the command string:
ex CC;"-o testcur1_exe testcur1_c -lcurses"
Regards,
Derek
Derek
Re: LibVT
Aha, so I must set this in my bootfile of both my real QL as well as QLAY2 ? I do all development and compiling on Linux with qcc and then I use mdvtools to create an MDV file which I then use on QL, both real and emulated.Derek_Stewart wrote:Hi,
The problem here is that you have not set the Environmental Variable for the terminal type, which uses "terminfo_qdos"
I set my VT52 terminal in the boot file with the following commands:
This allows the Curses compiled programme to load the VT52 screen emulation file.Code: Select all
REMark Set variable for terminal type SETENV "TERM=QDOS" : REMark Set variable for terminal info file SETENV "TERMINFO=terminfo"
It is detailed in the LIBcurses documentation, the terminfo_qdos file is contained in the C68 distribution runtime disk 2
Having the VT52 terminal defines all the "testcur" C files now compile correctly, giving the "-lcurses" option on the command line at the end of the command string:
ex CC;"-o testcur1_exe testcur1_c -lcurses"
I tried what you suggested, but the QL won´t recognize SETENV.