Page 3 of 3

Re: LibVT

Posted: Mon Jan 27, 2020 10:54 am
by tofro
SM7I wrote:
I tried what you suggested, but the QL won´t recognize SETENV.
Then you need to install Environment Variable support (comes with C68).

Tobias

Re: LibVT

Posted: Mon Jan 27, 2020 12:15 pm
by SM7I
tofro wrote:
SM7I wrote:
I tried what you suggested, but the QL won´t recognize SETENV.
Then you need to install Environment Variable support (comes with C68).

Tobias
OK, I get that. It works perfect with Environment Variable support, but...as I can create a window with a simple struct of condetails and then fopen or io_open CON_ , why can’t curses be used then ?

Please explain as I’m very confused about the QL way of working :)

Re: LibVT

Posted: Wed Jan 29, 2020 11:51 am
by Derek_Stewart
Hi,

Sorry not to of replied earlier, I seem have no time for anything these days...

But with regards to defining the QL window in C68, a WINDWDEF structure has to be defined for example:
struct WINDDEF _condetails =
{
*/ Border Colour, Border Size, Ink, Paper, Xsize, Ysize, Xpos, Ypos */
2,1,7,1,512,256,0,0
};
The qdos.h file has be included.

So the start of testcur1_c is:

Code: Select all

#include <curse.h>
#include <qdos.h>

struct WINDDEF _condetails =
{
  */ Border Colour, Border Size, Ink, Paper, Xsize, Ysize, Xpos, Ypos */
  2,1,7,1,512,256,0,0
}; 

main () {

/* ...code continues... */
Then just compile the C programme:

ex CC;"-o testcur1_exe testcur1_c -lcurses"

The console window will be defined as in the WINDOWDEF structure.

Incidentently, a console channel already open can be passed to the C coopiled programme in the command line:

EX testcur1_exe;,#1

all default consoles operations go to the screen channel #1.

This information is defined the C68 documentation, also see other existing C68 source coce, for example the ansview_c programme in the LBBVT archive.

Re: LibVT

Posted: Thu Jan 30, 2020 6:08 pm
by SM7I
Thanks Derek. Now it all fits together. Thanks very much for your explanation. This was just what I needed !!