Prof. A Olowofoyeku (The African Chief) wrote:
I have seen a funny thing when running a crt program in the msys environment, using pdcurses-2.6.
This is the program: program Foo; uses crt; var i: Integer; begin clrscr; for i := 1 to ParamCount do WriteLn (ParamStr (i)) end.
This is the weird error I get when I run the program: "LINES value must be >= 2 and <= 1: got 1 initscr(): LINES=1 COLS=1: too small."
If I do "export LINES=25" and run the program again, I get: "LINES value must be >= 2 and <= 1: got 25 initscr(): LINES=25 COLS=1: too small."
If I do "export COLS=80" and run the program again, I get: "LINES value must be >= 2 and <= 1: got 25"
Obviously there is a problem somewhere. How can a value be ">=2" while being "<=1" at the same time? This is a new mathematical experience for me!
It doesn't say it can be, only that it must be. ;-) Well, the code in PDCurses-2.6/win32/pdcscrn.c says: fprintf(stderr,"LINES value must be >= 2 and <= %d: got %d\n", csbi.dwMaximumWindowSize.Y, internal->lines); So, apparently csbi.dwMaximumWindowSize.Y is wrong. It seems to be set a few lines above in GetConsoleScreenBufferInfo(hConOut, &csbi); This seems to be a Windows call, so I don't know anything about it, and even if I did, I couldn't debug it. But perhaps it'll help you find out something ... Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707