9 date 93.08.25.17.29.44; author jromine; state Exp;
14 date 93.02.26.22.00.33; author jromine; state Exp;
19 date 92.12.15.00.20.22; author jromine; state Exp;
24 date 92.11.13.00.32.32; author jromine; state Exp;
29 date 92.11.12.23.41.07; author jromine; state Exp;
34 date 92.11.12.23.32.19; author jromine; state Exp;
39 date 92.11.12.18.22.51; author jromine; state Exp;
44 date 92.11.12.01.02.20; author jromine; state Exp;
49 date 92.11.04.02.34.45; author jromine; state Exp;
54 date 92.02.11.03.05.36; author jromine; state Exp;
59 date 92.02.10.18.12.35; author jromine; state Exp;
64 date 92.02.07.19.20.10; author jromine; state Exp;
69 date 92.01.31.22.28.38; author jromine; state Exp;
74 date 92.01.24.00.05.13; author jromine; state Exp;
79 date 90.04.05.15.00.17; author sources; state Exp;
84 date 90.03.12.10.24.05; author sources; state Exp;
89 date 90.02.06.13.34.13; author sources; state Exp;
94 date 90.02.05.14.26.52; author sources; state Exp;
99 date 90.02.05.14.17.26; author sources; state Exp;
104 date 90.02.05.14.17.07; author sources; state Exp;
115 @off_t fixes for BSD44
118 @/* vmh.c - visual front-end to mh */
120 static char ident[] = "@@(#)$Id: vmh.c,v 1.19 1993/02/26 22:00:33 jromine Exp jromine $";
122 #if defined(SYS5) && !defined(TERMINFO)
124 * Define TERMINFO if you have it.
125 * You get it automatically if you're running SYS5, and you don't get
126 * it if you're not. (If you're not SYS5, you probably have termcap.)
127 * We distinguish TERMINFO from SYS5 because in this file SYS5 really
128 * means "AT&T line discipline" (termio, not sgttyb), whereas terminfo
129 * is quite a separate issue.
135 Pass signals to client during execution
137 Figure out a way for the user to say how big the Scan/Display
140 If curses ever gets fixed, then XYZ code can be removed
145 #define _SYS_REG_H /* NCR redefines "ERR" in <sys/reg.h> */
147 #undef OK /* tricky */
149 #include <term.h> /* variables describing terminal capabilities */
150 #endif /* TERMINFO */
152 #include "../h/vmhsbr.h"
158 #define sigmask(s) (1 << ((s) - 1))
159 #endif /* not sigmask */
169 #include <sys/types.h>
177 #define TCGETATTR /* tcgetattr() */
181 #define _maxx maxx /* curses.h */
183 #define _curx curx /* curses.h */
185 void __cputchar __P((int));
187 #define _putchar __cputchar
188 #include <sys/ioctl.h> /* sgttyb */
191 #define ALARM ((unsigned int) 10)
192 #define PAUSE ((unsigned int) 2)
195 #define abs(a) ((a) > 0 ? (a) : -(a))
201 #define XYZ /* XXX */
205 static struct swit switches[] = {
210 "vmhproc program", 7,
222 static int PEERpid = NOTOK;
224 static jmp_buf PEERctx;
228 static char *myprompt = "(%s) ";
231 static WINDOW *Status;
232 static WINDOW *Display;
233 static WINDOW *Command;
237 WINDOW *windows[NWIN + 1];
249 static struct line *lhead = NULL;
250 static struct line *ltop = NULL;
251 static struct line *ltail = NULL;
253 static int did_less = 0;
254 static int smallmove = SMALLMOVE;
255 static int largemove = LARGEMOVE;
260 static int tty_ready = NOTOK;
264 #define ERASE sg.sg_erase
265 #define KILL sg.sg_kill
266 static struct sgttyb sg;
268 #define EOFC tc.t_eofc
269 #define INTR tc.t_intrc
270 static struct tchars tc;
272 #define ERASE sg.c_cc[VERASE]
273 #define KILL sg.c_cc[VKILL]
274 #define EOFC sg.c_cc[VEOF]
275 #define INTR sg.c_cc[VINTR]
276 static struct termio sg;
280 #define WERASC ('W' & 037)
283 #define WERASC ltc.t_werasc
284 static struct ltchars ltc;
286 #define WERASC sg.c_cc[VWERASE]
287 #undef TIOCGLTC /* the define exists, but struct ltchars doesn't */
289 #endif /* TIOCGLTC */
292 #if !defined(SYS5) && !defined(BSD44)
294 #endif /* not SYS5 */
301 static TYPESIG ALRMser (), PIPEser (), SIGser ();
303 static TYPESIG TSTPser ();
311 extern char *sys_errlist[];
314 static void adorn ();
316 static vmh(), lreset(), linsert(), ladvance(), lretreat(), lgo();
317 static TTYon(), TTYoff(), foreground();
318 static int PEERinit(), pINI(), pLOOP(), pTTY(), pWIN(), WINinit();
319 static int WINgetstr(), WINless(), WINputc(), TTYinit(), pWINaux();
338 setlocale(LC_ALL, "");
340 invo_name = r1bindex (argv[0], '/');
341 if ((cp = m_find (invo_name)) != NULL) {
342 ap = brkstring (cp = getcpy (cp), " ", "\n");
343 ap = copyip (ap, arguments);
347 (void) copyip (argv + 1, ap);
354 switch (smatch (++cp, switches)) {
356 ambigsw (cp, switches);
362 (void) sprintf (buffer, "%s [switches for vmhproc]",
364 help (buffer, switches);
368 if (!(myprompt = *argp++) || *myprompt == '-')
369 adios (NULLCP, "missing argument to %s", argp[-2]);
373 if (!(vmhproc = *argp++) || *vmhproc == '-')
374 adios (NULLCP, "missing argument to %s", argp[-2]);
385 if (TTYinit (nprog) == NOTOK || WINinit (nprog) == NOTOK) {
388 vec[0] = r1bindex (vmhproc, '/');
389 execvp (vmhproc, vec);
390 adios (vmhproc, "unable to exec");
393 (void) PEERinit (vecp, vec);
407 (void) pLOOP (RC_QRY, NULLCP);
409 wmove (Command, 0, 0);
410 wprintw (Command, myprompt, invo_name);
414 switch (WINgetstr (Command, buffer)) {
419 done (0); /* NOTREACHED */
423 (void) pLOOP (RC_CMD, buffer);
431 static int PEERinit (vecp, vec)
440 if (pipe (pfd0) == NOTOK || pipe (pfd1) == NOTOK)
441 adios ("pipe", "unable to");
443 switch (PEERpid = fork ()) {
445 * Calling vfork() and then another routine [like close()] before
446 * an exec() messes up the stack frame, causing crib death.
447 * Use fork() instead.
450 switch (PEERpid = vfork ()) {
451 #endif /* not hpux */
453 adios ("vfork", "unable to");/* NOTREACHED */
456 (void) close (pfd0[0]);
457 (void) close (pfd1[1]);
459 vec[vecp++] = "-vmhread";
460 (void) sprintf (buf1, "%d", pfd1[0]);
462 vec[vecp++] = "-vmhwrite";
463 (void) sprintf (buf2, "%d", pfd0[1]);
467 (void) signal (SIGINT, SIG_DFL);
468 (void) signal (SIGQUIT, SIG_DFL);
470 vec[0] = r1bindex (vmhproc, '/');
471 execvp (vmhproc, vec);
473 _exit (-1); /* NOTREACHED */
476 (void) close (pfd0[1]);
477 (void) close (pfd1[0]);
479 (void) rcinit (pfd0[0], pfd1[1]);
490 register struct record *rc = &rcs;
496 (void) sprintf (bp, "%d %d", RC_VRSN, numwins);
498 for (w = windows; *w; w++) {
499 (void) sprintf (bp, " %d", (*w) -> _maxy);
503 switch (str2rc (RC_INI, buffer, rc)) {
509 adios (NULLCP, "%s", rc -> rc_data);
511 adios (NULLCP, "pINI peer error");
514 adios (NULLCP, "%s", rc -> rc_data);
517 adios (NULLCP, "pINI protocol screw-up");
524 static int pLOOP (code, str)
530 register struct record *rc = &rcs;
534 (void) str2peer (code, str);
536 switch (peer2rc (rc)) {
538 if (pTTY (rc) == NOTOK)
543 if (sscanf (rc -> rc_data, "%d", &i) != 1
546 (void) fmt2peer (RC_ERR, "no such window \"%s\"",
550 if (pWIN (windows[i - 1]) == NOTOK)
559 adorn (NULLCP, "%s", rc -> rc_data);
561 adorn (NULLCP, "pLOOP(%s) peer error",
562 code == RC_QRY ? "QRY" : "CMD");
567 adorn (NULLCP, "%s", rc -> rc_data);
569 i = pidwait (PEERpid, OK);
574 adios (NULLCP, "%s", rc -> rc_data);
577 adios (NULLCP, "pLOOP(%s) protocol screw-up",
578 code == RC_QRY ? "QRY" : "CMD");
585 register struct record *r;
587 TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
589 register struct record *rc = &rcs;
595 hstat = signal (SIGHUP, SIG_IGN);
596 istat = signal (SIGINT, SIG_IGN);
597 qstat = signal (SIGQUIT, SIG_IGN);
598 tstat = signal (SIGTERM, SIG_IGN);
600 (void) rc2rc (RC_ACK, 0, NULLCP, rc);
602 (void) signal (SIGHUP, hstat);
603 (void) signal (SIGINT, istat);
604 (void) signal (SIGQUIT, qstat);
605 (void) signal (SIGTERM, tstat);
609 if (r -> rc_len && strcmp (r -> rc_data, "FAST") == 0)
613 (void) signal (SIGTSTP, SIG_IGN);
617 tputs (SO, 0, _putchar);
619 putp(enter_standout_mode);
620 #endif /* TERMINFO */
621 fprintf (stdout, "Type any key to continue... ");
622 (void) fflush (stdout);
625 tputs (SE, 0, _putchar);
627 putp(exit_standout_mode);
628 #endif /* TERMINFO */
631 (void) signal (SIGTSTP, TSTPser);
637 switch (rc -> rc_type) {
639 (void) rc2peer (RC_ACK, 0, NULLCP);
644 adorn (NULLCP, "%s", rc -> rc_data);
646 adorn (NULLCP, "pTTY peer error");
650 adios (NULLCP, "%s", rc -> rc_data);
653 adios (NULLCP, "pTTY protocol screw-up");
666 if ((i = pWINaux (w)) == OK && did_less)
667 (void) WINless (w, 1);
676 static int pWINaux (w)
684 register struct record *rc = &rcs;
696 switch (rc2rc (RC_ACK, 0, NULLCP, rc)) {
698 if (eol && WINputc (w, '\n') == ERR && WINless (w, 0))
700 for (bp = rc -> rc_data, n = rc -> rc_len; n-- > 0; ) {
701 if ((c = *bp++) == '\n')
703 if (WINputc (w, c) == ERR)
704 if (n == 0 && c == '\n')
707 if (WINless (w, 0)) {
709 (void) fmt2peer (RC_ERR, "flush window");
710 #ifdef XYZ /* should NEVER happen... */
721 (void) rc2peer (RC_ACK, 0, NULLCP);
731 adorn (NULLCP, "%s", rc -> rc_data);
733 adorn (NULLCP, "pWIN peer error");
737 adios (NULLCP, "%s", rc -> rc_data);
740 adios (NULLCP, "pWIN protocol screw-up");
753 (void) rc2peer (RC_FIN, 0, NULLCP);
756 switch (setjmp (PEERctx)) {
758 (void) signal (SIGALRM, ALRMser);
759 (void) alarm (ALARM);
761 status = pidwait (PEERpid, OK);
767 (void) kill (PEERpid, SIGKILL);
778 static int WINinit (nprog) {
779 register int nlines, /* not "lines" because terminfo uses that */
784 if (initscr () == (WINDOW *) ERR)
788 adios (NULLCP, "could not initialize terminal");
790 (void) signal (SIGTSTP, SIG_DFL);
797 if (cursor_address == NULL) /* assume mtr wanted "cm", not "CM" */
798 #endif /* TERMINFO */
803 "sorry, your terminal isn't powerful enough to run %s",
807 if (tgetflag ("xt") || tgetnum ("sg") > 0)
808 SO = SE = US = UE = NULL;
811 * If termcap mapped directly to terminfo, we'd use the following:
812 * if (teleray_glitch || magic_cookie_glitch > 0)
813 * enter_standout_mode = exit_standout_mode =
814 * enter_underline_mode = exit_underline_mode = NULL;
815 * But terminfo does the right thing so we don't have to resort to that.
817 #endif /* TERMINFO */
819 if ((nlines = LINES - 1) < 11)
820 adios (NULLCP, "screen too small");
821 if ((top = nlines / 3 + 1) > LINES / 4 + 2)
823 bottom = nlines - top - 2;
826 Scan = windows[numwins++] = newwin (top, COLS, 0, 0);
827 Status = windows[numwins++] = newwin (1, COLS, top, 0);
831 Display = windows[numwins++] = newwin (bottom, COLS, top + 1, 0);
832 Command = newwin (1, COLS - 1, top + 1 + bottom, 0);
833 windows[numwins] = NULL;
835 largemove = Display -> _maxy / 2 + 2;
841 static int WINgetstr (w, buffer)
852 switch (c = toascii (wgetch (w))) {
854 adios (NULLCP, "wgetch lost");
864 leaveok (curscr, FALSE);
865 wmove (w, 0, w -> _curx - (bp - buffer));
867 leaveok (curscr, TRUE);
875 wprintw (w, "Interrupt");
896 w -> _curx -= bp - buffer;
906 } while (isspace (*bp) && bp > buffer);
911 } while (!isspace (*bp) && bp > buffer);
919 if (c >= ' ' && c < '\177')
920 (void) waddch (w, *bp++ = c);
930 static int WINwritev (w, iov, n)
932 register struct iovec *iov;
939 for (i = 0; i < n; i++, iov++)
940 wprintw (w, "%*.*s", iov -> iov_len, iov -> iov_len, iov -> iov_base);
954 " forward backwards", NULL,
955 " ------- ---------", NULL,
956 "next screen SPACE", NULL,
957 "next %d line%s RETURN y", &smallmove,
958 "next %d line%s EOT u", &largemove,
961 "refresh CTRL-L", NULL,
969 static int WINless (w, fin)
982 register struct line *lbottom;
997 if (nfresh || nwait) {
1009 (void) lgo (ltail -> l_no - w -> _maxy + 1);
1014 ltop = lbottom && lbottom -> l_prev ? lbottom -> l_prev
1017 for (lbottom = ltop; lbottom; lbottom = lbottom -> l_next)
1018 if (waddstr (w, lbottom -> l_buf) == ERR
1019 || waddch (w, '\n') == ERR)
1021 if (lbottom == NULL)
1024 if (nlatch && (ltail -> l_no >= w -> _maxy)) {
1025 (void) lgo (ltail -> l_no - w -> _maxy + 1);
1031 while (waddstr (w, "~\n") != ERR)
1043 wmove (Command, 0, 0);
1045 wstandout (Command);
1046 wprintw (Command, "%s", cp);
1047 wstandend (Command);
1051 wprintw (Command, fin ? "top:%d bot:%d end:%d" : "top:%d bot:%d",
1052 ltop -> l_no, lbottom -> l_no, ltail -> l_no);
1053 wprintw (Command, ">> ");
1054 wclrtoeol (Command);
1057 c = toascii (wgetch (Command));
1071 ltop = lbottom -> l_next;
1081 if (ladvance (smallmove))
1089 if (lretreat (smallmove))
1097 if (ladvance (largemove))
1104 if (lretreat (largemove))
1109 if (lgo (n ? n : 1))
1114 if (lgo (n ? n : ltail -> l_no - w -> _maxy + 1))
1127 for (i = 0; hlpmsg[i].h_msg; i++) {
1128 if (hlpmsg[i].h_val)
1129 wprintw (w, hlpmsg[i].h_msg, *hlpmsg[i].h_val,
1130 *hlpmsg[i].h_val != 1 ? "s" : "");
1132 (void) waddstr (w, hlpmsg[i].h_msg);
1133 (void) waddch (w, '\n');
1147 wmove (Command, 0, 0);
1149 while (isdigit (c)) {
1150 wprintw (Command, "%c", c);
1152 i = i * 10 + c - '0';
1153 c = toascii (wgetch (Command));
1165 cp = "not understood";
1173 static int WINputc (w, c)
1183 if (WINputc (w, 'M') == ERR || WINputc (w, '-') == ERR)
1188 if (c < ' ' || c == '\177') {
1189 if (WINputc (w, '^') == ERR)
1201 return waddch (w, c);
1203 if ((x = w -> _curx) < 0 || x >= w -> _maxx
1204 || (y = w -> _cury) < 0 || y >= w -> _maxy)
1209 for (x = 8 - (x & 0x07); x > 0; x--)
1210 if (WINputc (w, ' ') == ERR)
1215 if (++y < w -> _maxy)
1216 (void) waddch (w, c);
1222 if (++x < w -> _maxx)
1223 (void) waddch (w, c);
1233 register struct line *lp,
1236 for (lp = lhead; lp; lp = mp) {
1241 lhead = ltop = ltail = NULL;
1249 register struct line *lp;
1251 if ((lp = (struct line *) calloc ((unsigned) 1, sizeof *lp)) == NULL)
1252 adios (NULLCP, "unable to allocate line storage");
1254 lp -> l_no = (ltail ? ltail -> l_no : 0) + 1;
1256 lp -> l_buf = getcpy (w -> _y[w -> _cury]);
1258 lp -> l_buf = getcpy (w -> lines[w -> _cury]->line);
1260 for (cp = lp -> l_buf + strlen (lp -> l_buf) - 1; cp >= lp -> l_buf; cp--)
1271 ltail -> l_next = lp;
1272 lp -> l_prev = ltail;
1278 static int ladvance (n)
1282 register struct line *lp;
1284 for (i = 0, lp = ltop; i < n && lp; i++, lp = lp -> l_next)
1295 static int lretreat (n)
1299 register struct line *lp;
1301 for (i = 0, lp = ltop; i < n && lp; i++, lp = lp -> l_prev)
1319 register struct line *lp;
1321 if ((i = n - (lp = lhead) -> l_no)
1322 > (j = abs (n - (ltop ? ltop : ltail) -> l_no)))
1323 i = j, lp = ltop ? ltop : ltail;
1324 if (i > (j = abs (ltail -> l_no - n)))
1327 if (n >= lp -> l_no) {
1328 for (; lp; lp = lp -> l_next)
1329 if (lp -> l_no == n)
1333 for (; lp; lp = lp -> l_prev)
1334 if (lp -> l_no == n)
1349 static int TTYinit (nprog) {
1350 if (!isatty (fileno (stdin)) || !isatty (fileno (stdout)))
1354 adios (NULLCP, "not a tty");
1358 if (ioctl (fileno (stdin), TIOCGETP, (char *) &sg) == NOTOK)
1359 adios ("failed", "ioctl TIOCGETP");
1360 if (ioctl (fileno (stdin), TIOCGETC, (char *) &tc) == NOTOK)
1361 adios ("failed", "ioctl TIOCGETC");
1364 if( tcgetattr( fileno(stdin), &sg) == NOTOK)
1365 adios( "failed", "tcgetattr");
1367 if (ioctl (fileno (stdin), TCGETA, &sg) == NOTOK)
1368 adios ("failed", "ioctl TCGETA");
1372 if (ioctl (fileno (stdin), TIOCGLTC, (char *) <c) == NOTOK)
1373 adios ("failed", "ioctl TIOCGLTC");
1374 #endif /* TIOCGLTC */
1380 (void) signal (SIGPIPE, PIPEser);
1388 if (tty_ready == DONE)
1393 (void) ioctl (fileno (stdin), TIOCSETC, (char *) &tc);
1395 (void) ioctl (fileno (stdin), TCSETA, &sg);
1401 scrollok (curscr, FALSE);
1407 (void) signal (SIGHUP, SIGser);
1408 (void) signal (SIGINT, SIGser);
1409 (void) signal (SIGQUIT, SIGser);
1411 (void) signal (SIGTSTP, TSTPser);
1412 #endif /* SIGTSTP */
1418 if (tty_ready == NOTOK)
1423 (void) ioctl (fileno (stdin), TIOCSETC, (char *) &tc);
1425 (void) ioctl (fileno (stdin), TCSETA, &sg);
1428 leaveok (curscr, TRUE);
1429 mvcur (0, COLS - 1, LINES - 1, 0);
1431 if (tty_ready == DONE) {
1434 tputs (CE, 0, _putchar);
1436 #else /* TERMINFO */
1438 #endif /* TERMINFO */
1439 fprintf (stdout, "\r\n");
1441 (void) fflush (stdout);
1445 (void) signal (SIGHUP, SIG_DFL);
1446 (void) signal (SIGINT, SIG_DFL);
1447 (void) signal (SIGQUIT, SIG_DFL);
1449 (void) signal (SIGTSTP, SIG_DFL);
1450 #endif /* SIGTSTP */
1455 static foreground () {
1459 TYPESIG (*tstat) ();
1461 if ((pgrp = getpgrp (0)) == NOTOK)
1462 adios ("process group", "unable to determine");
1464 if (ioctl (fileno (stdin), TIOCGPGRP, (char *) &tpgrp) == NOTOK)
1465 adios ("tty's process group", "unable to determine");
1469 tstat = signal (SIGTTIN, SIG_DFL);
1470 (void) kill (0, SIGTTIN);
1471 (void) signal (SIGTTIN, tstat);
1474 (void) signal (SIGTTIN, SIG_IGN);
1475 (void) signal (SIGTTOU, SIG_IGN);
1476 (void) signal (SIGTSTP, SIG_IGN);
1477 #endif /* TIOCGPGRP */
1483 (void) signal (SIGTTIN, SIG_DFL);
1484 (void) signal (SIGTTOU, SIG_DFL);
1485 (void) signal (SIGTSTP, SIG_DFL);
1486 #endif /* TIOCGPGRP */
1493 static TYPESIG ALRMser (sig)
1496 longjmp (PEERctx, DONE);
1504 static TYPESIG PIPEser (sig)
1508 (void) signal (sig, SIG_IGN);
1511 adios (NULLCP, "lost peer");
1519 static TYPESIG SIGser (sig)
1523 (void) signal (sig, SIG_IGN);
1531 static TYPESIG TSTPser (sig)
1535 tputs (tgoto (CM, 0, LINES - 1), 0, _putchar);
1536 #else /* TERMINFO */
1537 move(LINES - 1, 0); /* to lower left corner */
1538 clrtoeol(); /* clear bottom line */
1539 wrefresh(curscr); /* flush out everything */
1540 #endif /* TERMINFO */
1541 (void) fflush (stdout);
1545 (void) sigsetmask (sigblock (0) & ~sigmask (SIGTSTP));
1548 (void) kill (getpid (), sig);
1551 (void) sigblock (sigmask (SIGTSTP));
1557 #endif /* SIGTSTP */
1574 static void adorn (what, fmt, a, b, c, d, e, f)
1584 char *cp = invo_name;
1587 advise (what, fmt, a, b, c, d, e, f);
1595 void advertise (what, tail, fmt, a, b, c, d, e, f)
1607 char buffer[BUFSIZ],
1609 struct iovec iob[20];
1610 register struct iovec *iov = iob;
1612 (void) fflush (stdout);
1614 (void) fflush (stderr);
1617 iov -> iov_len = strlen (iov -> iov_base = invo_name);
1619 iov -> iov_len = strlen (iov -> iov_base = ": ");
1623 (void) sprintf (buffer, fmt, a, b, c, d, e, f);
1624 iov -> iov_len = strlen (iov -> iov_base = buffer);
1628 iov -> iov_len = strlen (iov -> iov_base = " ");
1630 iov -> iov_len = strlen (iov -> iov_base = what);
1632 iov -> iov_len = strlen (iov -> iov_base = ": ");
1635 if (eindex > 0 && eindex < sys_nerr)
1636 iov -> iov_len = strlen (iov -> iov_base = sys_errlist[eindex]);
1638 (void) sprintf (err, "Error %d", eindex);
1639 iov -> iov_len = strlen (iov -> iov_base = err);
1643 if (tail && *tail) {
1644 iov -> iov_len = strlen (iov -> iov_base = ", ");
1646 iov -> iov_len = strlen (iov -> iov_base = tail);
1649 iov -> iov_len = strlen (iov -> iov_base = "\n");
1652 if (tty_ready == DONE)
1653 (void) WINwritev (Display, iob, iov - iob);
1655 (void) writev (fileno (stderr), iob, iov - iob);
1661 static int writev (fd, iov, n)
1663 register struct iovec *iov;
1669 for (i = j = 0; i < n; i++, iov++)
1670 if (write (fd, iov -> iov_base, iov -> iov_len) != iov -> iov_len)
1673 j += iov -> iov_len;
1688 static char ident[] = "@@(#)$Id: vmh.c,v 1.18 1992/12/15 00:20:22 jromine Exp jromine $";
1701 static char ident[] = "@@(#)$Id: vmh.c,v 1.17 1992/11/13 00:32:32 jromine Exp jromine $";
1718 static char ident[] = "@@(#)$Id: vmh.c,v 1.16 1992/11/12 23:41:07 jromine Exp jromine $";
1865 static char ident[] = "@@(#)$Id: vmh.c,v 1.15 1992/11/12 23:32:19 jromine Exp jromine $";
1867 #if defined(ncr) || defined(hpux)
1868 #define TERMIOS /* struct termios, tcgetattr() */
1875 static struct termios sg;
1890 static char ident[] = "@@(#)$Id: vmh.c,v 1.14 1992/11/12 18:22:51 jromine Exp jromine $";
1901 #if defined(TIOCGLTC) && !defined(SVR4)
1912 static char ident[] = "@@(#)$Id: vmh.c,v 1.13 1992/11/12 01:02:20 jromine Exp jromine $";
1929 static char ident[] = "@@(#)$Id: vmh.c,v 1.12 1992/11/04 02:34:45 jromine Exp jromine $";
1944 static char ident[] = "@@(#)$Id: vmh.c,v 1.11 1992/02/11 03:05:36 jromine Exp jromine $";
1959 @don't double include sgtty.h
1964 static char ident[] = "@@(#)$Id: vmh.c,v 1.10 1992/02/10 18:12:35 jromine Exp jromine $";
1980 static int ALRMser (), PIPEser (), SIGser ();
1983 static int TSTPser ();
2006 static int ALRMser (sig)
2009 static int PIPEser (sig)
2012 static int SIGser (sig)
2015 static int TSTPser (sig)
2022 add "localdomain" tailor option
2027 static char ident[] = "@@(#)$Id: vmh.c,v 1.9 1992/02/07 19:20:10 jromine Exp jromine $";
2042 static char ident[] = "@@(#)$Id: vmh.c,v 1.8 1992/01/31 22:28:38 jromine Exp jromine $";
2054 static char ident[] = "@@(#)$Id: vmh.c,v 1.7 1992/01/24 00:05:13 jromine Exp jromine $";
2066 static char ident[] = "@@(#)$Id: vmh.c,v 1.6 1990/04/05 15:00:17 sources Exp jromine $";
2092 static char ident[] = "@@(#)$Id:$";
2124 int ALRMser (), PIPEser (), SIGser ();
2137 @*** empty log message ***
2142 int (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
2153 if (initscr () == ERR)