struct winsize


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers struct winsize
# 1  
Old 02-19-2011
struct winsize

what is struct winsize used for?

i tried looking it up, but no luck.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Get struct definition

I have many headers with huge amount of structures in them, typical one looks like this: $ cat a.h struct Rec1 { int f1; int f2; }; struct Rec2 { char r1; char r2; }; struct Rec3 { int f1; float k1; float ... (6 Replies)
Discussion started by: migurus
6 Replies

2. Programming

Storing C++-struct in file - problem when adding new item in struct

Hi, I have received an application that stores some properties in a file. The existing struct looks like this: struct TData { UINT uSizeIncludingStrings; // copy of Telnet data struct UINT uSize; // basic properties: TCHAR szHost; //defined in Sshconfig UINT iPortNr; TCHAR... (2 Replies)
Discussion started by: Powerponken
2 Replies

3. Shell Programming and Scripting

converting from c struct to function

Hey Guys, I need your help where I have a C structure and I want it to be converted into corresponding function. Example: typedef struct { unsigned long LineNum; //1025-4032 unsigned short KeyNum; /*tbd*/ char Key; /*between 1-3*/... (1 Reply)
Discussion started by: skyos
1 Replies

4. Programming

help with struct command in C

in C i am using this code to get the c time or a time or m time struct dirent *dir; struct stat my; stat(what, &my); thetime = my.st_ctime; How can i check if i have permission to check the c time of the file? (1 Reply)
Discussion started by: omega666
1 Replies

5. UNIX for Dummies Questions & Answers

How to access a struct within a struct?

Can someone tell me how to do this? Just a thought that entered my mind when learning about structs. First thought was: struct one { struct two; } struct two { three; } one->two->three would this be how you would access "three"? (1 Reply)
Discussion started by: unbelievable21
1 Replies

6. Linux

GCOV : struct bb

Hi, I am working on gcov.Meaning, analysing the functionality of gcov. There is one structure called "struct bb". I am not sure, how struct bb members are getting assigned values. If anyone knows how it is happening pls let me know. Thanks in advance. --Vichu (0 Replies)
Discussion started by: Vichu
0 Replies

7. Programming

Struct Array

in my .c file i have a struct atop of the program defined as follows: #define MAX 10 int curtab; static struct tab { int count; int use; } tab; with the initial function following it like so: int tab_create(int init_count) { int i; for(i=0; i < MAX; i++) {... (1 Reply)
Discussion started by: micmac700
1 Replies

8. Programming

struct tm problem

I receive an integer as argument for a function. within function definition i want it to be of type struct tm. eg.. main() { int a; ...... } function(...,..,a,..) int a; { struct tm tm; if(!a) ^ time(&a); ^ ... (4 Replies)
Discussion started by: bankpro
4 Replies

9. Programming

save a struct

hi all , can i save a structure in c in a file? how ? help me , thx. :) (2 Replies)
Discussion started by: kall_ANSI
2 Replies

10. Programming

Struct Initialization

Hi We are using a code generator for initializing structures with the #define macro. Compiling it with the GCC 2.8.1 (with -ansi) it OK. But when we are using the SUN C 5.0 compiler it screams. Following is a code sample: #include <stdlib.h> #include <stdio.h> typedef struct TEST3 {... (4 Replies)
Discussion started by: amatsaka
4 Replies
Login or Register to Ask a Question
PTY(3)							   BSD Library Functions Manual 						    PTY(3)

NAME
openpty, forkpty -- auxiliary functions to obtain a pseudo-terminal LIBRARY
System Utilities Library (libutil, -lutil) SYNOPSIS
#include <sys/types.h> #include <sys/ioctl.h> #include <termios.h> #include <libutil.h> int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp); int forkpty(int *amaster, char *name, struct termios *termp, struct winsize *winp); DESCRIPTION
The function openpty() attempts to obtain the next available pseudo-terminal from the system (see pty(4)). If it successfully finds one, it subsequently changes the ownership of the slave device to the real UID of the current process, the group membership to the group ``tty'' (if such a group exists in the system), the access permissions for reading and writing by the owner, and for writing by the group, and invali- dates any current use of the line by calling revoke(2). If the argument name is not NULL, openpty() copies the pathname of the slave pty to this area. The caller is responsible for allocating the required space in this array. If the arguments termp or winp are not NULL, openpty() initializes the termios and window size settings from the structures these arguments point to, respectively. Upon return, the open file descriptors for the master and slave side of the pty are returned in the locations pointed to by amaster and aslave, respectively. The forkpty() function first calls openpty() to obtain the next available pseudo-terminal from the system. Upon success, it forks off a new process. In the child process, it closes the descriptor for the master side of the pty, and calls login_tty(3) for the slave pty. In the parent process, it closes the descriptor for the slave side of the pty. The arguments amaster, name, termp, and winp have the same meaning as described for openpty(). RETURN VALUES
The openpty() function returns 0 on success, or -1 on failure. The forkpty() function returns -1 on failure, 0 in the slave process, and the process ID of the slave process in the parent process. ERRORS
The openpty() function may fail and set the global variable errno for any of the errors specified for the grantpt(3), posix_openpt(3), ptsname(3), and unlockpt(3) functions and the revoke(2) system call. In addition to this, forkpty() may set it to any value as described for fork(2). SEE ALSO
chmod(2), chown(2), fork(2), getuid(2), open(2), revoke(2), login_tty(3), pty(4), termios(4), group(5) BSD
December 29, 1996 BSD