diff options
Diffstat (limited to 'pty.c')
-rw-r--r-- | pty.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1,20 +1,20 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * pty.c | 3 | * pty.c |
4 | * | 4 | * |
5 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 5 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
6 | * | 6 | * |
7 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 7 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
8 | * All rights reserved | 8 | * All rights reserved |
9 | * | 9 | * |
10 | * Created: Fri Mar 17 04:37:25 1995 ylo | 10 | * Created: Fri Mar 17 04:37:25 1995 ylo |
11 | * | 11 | * |
12 | * Allocating a pseudo-terminal, and making it the controlling tty. | 12 | * Allocating a pseudo-terminal, and making it the controlling tty. |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | RCSID("$Id: pty.c,v 1.17 2000/03/17 12:58:59 damien Exp $"); | 17 | RCSID("$Id: pty.c,v 1.18 2000/04/16 01:18:44 damien Exp $"); |
18 | 18 | ||
19 | #ifdef HAVE_UTIL_H | 19 | #ifdef HAVE_UTIL_H |
20 | # include <util.h> | 20 | # include <util.h> |
@@ -46,7 +46,7 @@ RCSID("$Id: pty.c,v 1.17 2000/03/17 12:58:59 damien Exp $"); | |||
46 | * returned (the buffer must be able to hold at least 64 characters). | 46 | * returned (the buffer must be able to hold at least 64 characters). |
47 | */ | 47 | */ |
48 | 48 | ||
49 | int | 49 | int |
50 | pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) | 50 | pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) |
51 | { | 51 | { |
52 | #if defined(HAVE_OPENPTY) || defined(BSD4_4) | 52 | #if defined(HAVE_OPENPTY) || defined(BSD4_4) |
@@ -186,7 +186,7 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) | |||
186 | 186 | ||
187 | /* Releases the tty. Its ownership is returned to root, and permissions to 0666. */ | 187 | /* Releases the tty. Its ownership is returned to root, and permissions to 0666. */ |
188 | 188 | ||
189 | void | 189 | void |
190 | pty_release(const char *ttyname) | 190 | pty_release(const char *ttyname) |
191 | { | 191 | { |
192 | if (chown(ttyname, (uid_t) 0, (gid_t) 0) < 0) | 192 | if (chown(ttyname, (uid_t) 0, (gid_t) 0) < 0) |
@@ -197,7 +197,7 @@ pty_release(const char *ttyname) | |||
197 | 197 | ||
198 | /* Makes the tty the processes controlling tty and sets it to sane modes. */ | 198 | /* Makes the tty the processes controlling tty and sets it to sane modes. */ |
199 | 199 | ||
200 | void | 200 | void |
201 | pty_make_controlling_tty(int *ttyfd, const char *ttyname) | 201 | pty_make_controlling_tty(int *ttyfd, const char *ttyname) |
202 | { | 202 | { |
203 | int fd; | 203 | int fd; |
@@ -250,7 +250,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname) | |||
250 | 250 | ||
251 | /* Changes the window size associated with the pty. */ | 251 | /* Changes the window size associated with the pty. */ |
252 | 252 | ||
253 | void | 253 | void |
254 | pty_change_window_size(int ptyfd, int row, int col, | 254 | pty_change_window_size(int ptyfd, int row, int col, |
255 | int xpixel, int ypixel) | 255 | int xpixel, int ypixel) |
256 | { | 256 | { |