I am writing a program to display a database to the screen(xterm) and want to allow the window resize signal to increase/decrease the amount data that is displayed. I have a signal handler function for catching the SIGWINCH event and calling a function to reallocate the space for the windows (stdscr and curscr) an reallocate the space for the windows.
The resize function looks something like:
The problem with the reallocation function seems to be that I put in another call to initscr(). Not every time, but frequently enough to be annoying, the program will have a segmentation fault during the call to initscr() when a resize event occurs. The reason I put in another call to initscr() was getmaxyx() was not updating the size of the windows on a resize event, I tried to just use the endwin() then a call to refresh() to reinitialize the values with no luck. Is there someplace else I can get the xterm's window size and the use some calls to newwin() to create new stdscr and curscr variables on my own? I am running on Solaris 8, thanks in advance for any help.
Is there any way that I could invoke a Win NT application in a UNIX environment?
Needed to do this to direct the output of an Win NT application to a UNIX program, and then back again. Furthermore, because there's a large amount of processing to be done, it will be great if I could do this... (1 Reply)
I was asked to display a banner on the CDE login window and I have successfully accomplished that task. This is what I did:
1) made the directory /etc/dt/config/C
2) cp /usr/dt/config/C/Xresources /etc/dt/config/C
3) I edited /etc/dt/config/C/Xresources and ensured the following lines were... (0 Replies)
I was asked to display a banner on the CDE login window and I have successfully accomplished that task. This is what I did:
1) made the directory /etc/dt/config/C
2) cp /usr/dt/config/C/Xresources /etc/dt/config/C
3) I edited /etc/dt/config/C/Xresources and ensured the following lines were... (0 Replies)
Hi,
Currently in my company, we are using Windows 2003 server and Exceed. Team from India can connect to the Windows 2003 server and start Exceed to run their UNIX application. The application is GUI based.
As you know, Windows 2003 only allows two connection at any time. so I want to... (3 Replies)
I am running Terminal (xterm) on FreeBSD and XFCE. When opening a new terminal window so that an additional tab appears, the window resizes to become taller and partially hiding behind the task bar. I noticed that Xubuntu has fixed this feature and the window does not resize when opening a second... (0 Replies)
Hi.
I am beginning with Unix C Curses Library and i would like to know if it's possible to resize my current window.
In other words, i am working with a Putty Client over my Windows system and with a telnet/ssh connection to linux. I want to build a small linux application using C Curses... (10 Replies)
Hi,
I"m trying to achieve the following:
I have a NAS which holds all my pictures, and have it mounted on my xbmc as a network share. I want to automatically synchronize my pictures (NAS -> xbmc, one direction).
But, during the synchronization I want to resize the pictures to make them... (7 Replies)
I need a command or mini scripts that can find certain type of images file recursively from the current dir with files of minimum 736 width and resize them by "736 max width, relative height" and replace the source files. I currently have GD installed but can also install Imagemagick if needed, I'm... (5 Replies)
Hi Team,
I am facing issue while using Xalan & Xerces for my application.
Below are my environment details i am using :-
Platform:- Oracle Linux 6.6
Compiler :- solarisstudio12.3 C++ compiler for Linux
Below are the versions of Xalan & Xerces source code used to build the shared object... (0 Replies)
Discussion started by: agrachirag
0 Replies
LEARN ABOUT FREEBSD
resizeterm
resizeterm(3X)resizeterm(3X)NAME
is_term_resized, resize_term, resizeterm - change the curses terminal size
SYNOPSIS
#include <curses.h>
bool is_term_resized(int lines, int columns);
int resize_term(int lines, int columns);
int resizeterm(int lines, int columns);
DESCRIPTION
This is an extension to the curses library. It provides callers with a hook into the ncurses data to resize windows, primarily for use by
programs running in an X Window terminal (e.g., xterm). The function resizeterm resizes the standard and current windows to the specified
dimensions, and adjusts other bookkeeping data used by the ncurses library that record the window dimensions such as the LINES and COLS
variables.
Most of the work is done by the inner function resize_term. The outer function resizeterm adds bookkeeping for the SIGWINCH handler. When
resizing the windows, resize_term blank-fills the areas that are extended. The calling application should fill in these areas with appro-
priate data. The resize_term function attempts to resize all windows. However, due to the calling convention of pads, it is not possible
to resize these without additional interaction with the application.
A support function is_term_resized is provided so that applications can check if the resize_term function would modify the window struc-
tures. It returns TRUE if the windows would be modified, and FALSE otherwise.
RETURN VALUE
Except as noted, these functions return the integer ERR upon failure and OK on success. They will fail if either of the dimensions are
less than or equal to zero, or if an error occurs while (re)allocating memory for the windows.
NOTES
While these functions are intended to be used to support a signal handler (i.e., for SIGWINCH), care should be taken to avoid invoking them
in a context where malloc or realloc may have been interrupted, since it uses those functions.
If ncurses is configured to supply its own SIGWINCH handler, the resizeterm function ungetch's a KEY_RESIZE which will be read on the next
call to getch. This is used to alert an application that the screen size has changed, and that it should repaint special features such as
pads that cannot be done automatically.
If the environment variables LINES or COLUMNS are set, this overrides the library's use of the window size obtained from the operating sys-
tem. Thus, even if a SIGWINCH is received, no screen size change may be recorded.
SEE ALSO curs_getch(3X), curs_variables(3X), wresize(3X).
AUTHOR
Thomas Dickey (from an equivalent function written in 1988 for BSD curses).
resizeterm(3X)