=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tip/Attic/cmds.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- src/usr.bin/tip/Attic/cmds.c 2004/02/20 20:34:32 1.18 +++ src/usr.bin/tip/Attic/cmds.c 2004/05/26 18:17:58 1.19 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmds.c,v 1.18 2004/02/20 20:34:32 deraadt Exp $ */ +/* $OpenBSD: cmds.c,v 1.19 2004/05/26 18:17:58 deraadt Exp $ */ /* $NetBSD: cmds.c,v 1.7 1997/02/11 09:24:03 mrg Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)cmds.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = "$OpenBSD: cmds.c,v 1.18 2004/02/20 20:34:32 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: cmds.c,v 1.19 2004/05/26 18:17:58 deraadt Exp $"; #endif /* not lint */ #include "tip.h" @@ -63,8 +63,7 @@ * get a file from the remote host */ void -getfl(c) - char c; +getfl(char c) { char buf[256], *cp, *expand(); @@ -94,8 +93,7 @@ * Cu-like take command */ void -cu_take(cc) - char cc; +cu_take(char cc) { int fd, argc; char line[BUFSIZ], *expand(), *cp; @@ -139,7 +137,7 @@ parwrite(FD, buf, size(buf)); quit = 0; - kill(pid, SIGIOT); + kill(tipout_pid, SIGIOT); read(repdes[0], (char *)&ccc, 1); /* Wait until read process stops */ /* @@ -296,7 +294,7 @@ time_t start_t, stop_t; sig_t f; - kill(pid, SIGIOT); /* put TIPOUT into a wait state */ + kill(tipout_pid, SIGIOT); /* put TIPOUT into a wait state */ stop = 0; f = signal(SIGINT, stopsnd); tcsetattr(0, TCSAFLUSH, &defchars); @@ -422,8 +420,7 @@ * wait for echo & handle timeout */ void -send(c) - int c; +send(int c) { char cc; int retry = 0; @@ -473,7 +470,7 @@ putchar(c); if (prompt("Local command? ", buf, sizeof(buf))) return; - kill(pid, SIGIOT); /* put TIPOUT into a wait state */ + kill(tipout_pid, SIGIOT); /* put TIPOUT into a wait state */ signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); tcsetattr(0, TCSAFLUSH, &defchars); @@ -516,7 +513,7 @@ * 2 <-> local tty out */ void -consh(c) +consh(int c) { char buf[256]; int status, p; @@ -526,7 +523,7 @@ putchar(c); if (prompt("Local command? ", buf, sizeof(buf))) return; - kill(pid, SIGIOT); /* put TIPOUT into a wait state */ + kill(tipout_pid, SIGIOT); /* put TIPOUT into a wait state */ signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); tcsetattr(0, TCSAFLUSH, &defchars); @@ -567,7 +564,7 @@ * Escape to local shell */ void -shell() +shell(void) { int status; char *cp; @@ -609,7 +606,7 @@ /* * enable TIPOUT side for dialogue */ - kill(pid, SIGEMT); + kill(tipout_pid, SIGEMT); if (boolean(value(SCRIPT))) write(fildes[1], value(RECORD), size(value(RECORD))); write(fildes[1], "\n", 1); @@ -646,7 +643,7 @@ char *msg; { - kill(pid, SIGTERM); + kill(tipout_pid, SIGTERM); disconnect(msg); if (msg != NOSTR) printf("\r\n%s", msg); @@ -747,7 +744,7 @@ vlex(buf); if (vtable[BEAUTIFY].v_access&CHANGED) { vtable[BEAUTIFY].v_access &= ~CHANGED; - kill(pid, SIGSYS); + kill(tipout_pid, SIGSYS); } if (vtable[SCRIPT].v_access&CHANGED) { vtable[SCRIPT].v_access &= ~CHANGED;