10-13-2011
I changed TIOCSWINSZ to TIOCGWINSZ. When you use an S, it sets the terminal dimensions, and when you use a G, it gets the dimensions.
My problem was that I set the terminal dimensions to fields in an uninitialized structure, which caused my terminal program to overload as it tried to make an arbitrarily large window.
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I just changed from windows NT to XP and I am no longer able
to connect to my unix system. I used to use hyper terminal -- which acts as dumb terminal to my main frame unix system. I think one of the options used to be "direct to comX". This option isn't listed now. I use a serial port and the... (2 Replies)
Discussion started by: michelle
2 Replies
2. UNIX for Advanced & Expert Users
Hi all.
I need to be able to get image (gif/jpg) height and
widths from the server so I can size pop-up windows to fit the
images. Is there a built in utility that accomplishes this on Unix
or Linux? (1 Reply)
Discussion started by: Jabba
1 Replies
3. Programming
I want to get the screen width and cursor positions.
When I used curses, all the screen content was cleared.
So Can I use curses to get the screen size without clearing anything in the window?
Or is there any other alternative???
I can use only C or C++. (0 Replies)
Discussion started by: Sreejesh.S
0 Replies
4. Programming
Hi,
i am very new to unix/linux programming. for one of the application i have to change the Terminal width and height. i did try this
if (ioctl (fd, TIOCGWINSZ, &win))
return;
if (y && y >24)
win.ws_row = y;
else
win.ws_row = 24;
if (x && x>80)... (2 Replies)
Discussion started by: bgsunny
2 Replies
5. Shell Programming and Scripting
Hi all,
I have a shell script which uses "mailx -H" to get the subject of a email in a Linux system.
However, the subject is truncated, and I think it has something to do with the terminal width because it only returns the first 80 characters of each line.
I have tried "stty columns"... (7 Replies)
Discussion started by: mezzo
7 Replies
6. Shell Programming and Scripting
How do I resize all images in a directory to the same pixel height? (1 Reply)
Discussion started by: locoroco
1 Replies
7. Shell Programming and Scripting
I have been having an extremely annoying problem. For the record, I am relatively new at this. I've only been working with unix-based OS's for roughly two years, mostly Xubuntu and some Kali. I am pretty familiar with the BASH language, as that's the default shell for debian. Now, I've made this... (16 Replies)
Discussion started by: Huitzilopochtli
16 Replies
8. Shell Programming and Scripting
Hello All,
I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly.
Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies
9. Red Hat
HI,
How do we figure out if the server is half blade server or full blade server?
Anything we need to look at to know on this?
thanks in advance (9 Replies)
Discussion started by: snchaudhari2
9 Replies
LEARN ABOUT XFREE86
glviewport
GLVIEWPORT(3G) GLVIEWPORT(3G)
NAME
glViewport - set the viewport
C SPECIFICATION
void glViewport( GLint x,
GLint y,
GLsizei width,
GLsizei height )
PARAMETERS
x, y Specify the lower left corner of the viewport rectangle, in pixels. The initial value is (0,0).
width, height
Specify the width and height of the viewport. When a GL context is first attached to a window, width and height are set to the dimen-
sions of that window.
DESCRIPTION
glViewport specifies the affine transformation of x and y from normalized device coordinates to window coordinates. Let (xnd, ynd) be nor-
malized device coordinates. Then the window coordinates (xw, yw) are computed as follows:
xw=(xnd+1)(_____)+x
yw=(ynd+1)(______)+y
Viewport width and height are silently clamped to a range that depends on the implementation. To query this range, call glGet with argu-
ment GL_MAX_VIEWPORT_DIMS.
ERRORS
GL_INVALID_VALUE is generated if either width or height is negative.
GL_INVALID_OPERATION is generated if glViewport is executed between the execution of glBegin and the corresponding execution of glEnd.
ASSOCIATED GETS
glGet with argument GL_VIEWPORT
glGet with argument GL_MAX_VIEWPORT_DIMS
SEE ALSO
glDepthRange(3G)
GLVIEWPORT(3G)