From a2705f207ff006c07c72081897ec4a6ca22ef269 Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 16 Apr 2004 15:27:29 +0000 Subject: make echoing work. --- src/cmd/9term/Linux.c | 64 +-------------------------------------------------- 1 file changed, 1 insertion(+), 63 deletions(-) (limited to 'src/cmd/9term/Linux.c') diff --git a/src/cmd/9term/Linux.c b/src/cmd/9term/Linux.c index 823344c9..eec79c28 100644 --- a/src/cmd/9term/Linux.c +++ b/src/cmd/9term/Linux.c @@ -1,63 +1 @@ -#include -#include -#include -#include -#include -#include "9term.h" - -int -getpts(int fd[], char *slave) -{ - openpty(&fd[1], &fd[0], slave, 0, 0); - return 0; -} - -int -childpty(int fd[], char *slave) -{ - int sfd; - - close(fd[1]); - setsid(); - sfd = open(slave, ORDWR); - if(sfd < 0) - sysfatal("open %s: %r\n", slave); - if(ioctl(sfd, TIOCSCTTY, 0) < 0) - fprint(2, "ioctl TIOCSCTTY: %r\n"); - return sfd; -} - -struct winsize ows; - -void -updatewinsize(int row, int col, int dx, int dy) -{ - struct winsize ws; - - ws.ws_row = row; - ws.ws_col = col; - ws.ws_xpixel = dx; - ws.ws_ypixel = dy; - if(ws.ws_row != ows.ws_row || ws.ws_col != ows.ws_col) - if(ioctl(rcfd[0], TIOCSWINSZ, &ws) < 0) - fprint(2, "ioctl: %r\n"); - ows = ws; -} - - -int -israw(int fd) -{ - return 0; -/* - if(tcgetattr(fd, &ttmode) < 0) - fprint(2, "tcgetattr: %r\n"); - return !(ttmode.c_lflag&(ICANON|ECHO)); -*/ -} - -int -setecho(int fd, int on) -{ - return 0; -} +#include "bsdpty.c" -- cgit v1.2.3