copx <invalid.RemoveThis@invalid.com> wrote:
>
> "Jim Strathmeyer" <strathWHATEVERIGETENOUGHSPAMANYWAYS.RemoveThis@ipass.net> schrieb im
> Newsbeitrag news:stOdnWENvbp64Z7ZnZ2dnUVZ_t2dnZ2d@adelphia.com...
>> copx <invalid.RemoveThis@invalid.com> schrieb:
>>> The (N)curses functions resizeterm / init_color do not seem to work. I
>>> have
>>
>> What do you want to use resizeterm for? Seems iffy.
>
> I need a specific resolution for my game 33x89 to be exact. If the
> resolution of the terminal is smaller than that everything will look messed
> up.
If I understand the ncurses library correctly (it's been awhile since I last used it),
resizeterm() and wresize() do nothing more than adapting the memory allocation size
for the window to the new dimensions; they can't change the actual size.
From ncurses' source:
] /*
] * This function reallocates NCURSES window structures. It is invoked in
] * response to a SIGWINCH interrupt. Other user-defined windows may also need
] * to be reallocated.
] *
] * Because this performs memory allocation, it should not (in general) be
] * invoked directly from the signal handler.
] */
] NCURSES_EXPORT(int)
] resizeterm(int ToLines, int ToCols)
] {
That means, if the xterm/vterm/terminal emulator is resized, a WINCH signal
is generated, and resizeterm() is called - but you can't do that the other
way round (unless you interface with the appropriate system directly, i.e.
X11 in the case of graphical emulators, or the tty ioctl() code for dealing
with the Linux console ttys).
HTH,
Jan (another rgrd perma-lurker)
>> Stay informed about: curses trouble no. 21390: resizeterm / init_color