aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9term/Linux.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-04-16 15:27:29 +0000
committerrsc <devnull@localhost>2004-04-16 15:27:29 +0000
commita2705f207ff006c07c72081897ec4a6ca22ef269 (patch)
tree32babd989cd836072be4bb1ef526340fd0186d82 /src/cmd/9term/Linux.c
parentaba09191af8012bc7d6a1b998ac937875f728d0c (diff)
downloadplan9port-a2705f207ff006c07c72081897ec4a6ca22ef269.tar.gz
plan9port-a2705f207ff006c07c72081897ec4a6ca22ef269.tar.bz2
plan9port-a2705f207ff006c07c72081897ec4a6ca22ef269.zip
make echoing work.
Diffstat (limited to 'src/cmd/9term/Linux.c')
-rw-r--r--src/cmd/9term/Linux.c64
1 files changed, 1 insertions, 63 deletions
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 <u.h>
-#include <termios.h>
-#include <sys/termios.h>
-#include <pty.h>
-#include <libc.h>
-#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"