version 1.16.2.1, 2006/09/30 04:06:51 |
version 1.17, 2006/03/19 18:51:19 |
|
|
/* $OpenBSD$ */ |
|
/* |
/* |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
|
|
* called by a name other than "ssh" or "Secure Shell". |
* called by a name other than "ssh" or "Secure Shell". |
*/ |
*/ |
|
|
#include <sys/types.h> |
#include "includes.h" |
|
|
#include <sys/ioctl.h> |
#include <sys/ioctl.h> |
|
#include <sys/types.h> |
#include <sys/stat.h> |
#include <sys/stat.h> |
#include <errno.h> |
|
#include <fcntl.h> |
|
#include <grp.h> |
|
#include <paths.h> |
#include <paths.h> |
#include <pwd.h> |
|
#include <string.h> |
|
#include <termios.h> |
#include <termios.h> |
#include <unistd.h> |
|
#include <util.h> |
#include <util.h> |
#include <stdarg.h> |
|
|
|
#include "sshpty.h" |
#include "sshpty.h" |
#include "log.h" |
#include "log.h" |
|
|
*/ |
*/ |
|
|
int |
int |
pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) |
pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) |
{ |
{ |
char buf[64]; |
char buf[64]; |
int i; |
int i; |
|
|
/* Changes the window size associated with the pty. */ |
/* Changes the window size associated with the pty. */ |
|
|
void |
void |
pty_change_window_size(int ptyfd, u_int row, u_int col, |
pty_change_window_size(int ptyfd, int row, int col, |
u_int xpixel, u_int ypixel) |
int xpixel, int ypixel) |
{ |
{ |
struct winsize w; |
struct winsize w; |
|
|
/* may truncate u_int -> u_short */ |
|
w.ws_row = row; |
w.ws_row = row; |
w.ws_col = col; |
w.ws_col = col; |
w.ws_xpixel = xpixel; |
w.ws_xpixel = xpixel; |