- *buf++ = c;
- } while (c != 0);
-}
-
-char *speeds[] =
- { "0", "50", "75", "110", "134", "150", "200", "300",
- "600", "1200", "1800", "2400", "4800", "9600", "19200", "38400" };
-#define NSPEEDS (sizeof (speeds) / sizeof (speeds[0]))
-
-doremoteterm(term, tp)
- char *term;
- struct sgttyb *tp;
-{
- register char *cp = index(term, '/'), **cpp;
- char *speed;
-
- if (cp) {
- *cp++ = '\0';
- speed = cp;
- cp = index(speed, '/');
- if (cp)
- *cp++ = '\0';
- for (cpp = speeds; cpp < &speeds[NSPEEDS]; cpp++)
- if (strcmp(*cpp, speed) == 0) {
- tp->sg_ispeed = tp->sg_ospeed = cpp-speeds;
- break;
- }
- compatsiz(cp);
- }
- tp->sg_flags = ECHO|CRMOD|ANYP|XTABS;
-}
-
-/* BEGIN TRASH
- *
- * This is here only long enough to get us by to the revised rlogin
- */
-compatsiz(cp)
- char *cp;
-{
- struct winsize ws;
-
- ws.ws_row = ws.ws_col = -1;
- ws.ws_xpixel = ws.ws_ypixel = -1;
- if (cp) {
- ws.ws_row = atoi(cp);
- cp = index(cp, ',');
- if (cp == 0)
- goto done;
- ws.ws_col = atoi(++cp);
- cp = index(cp, ',');
- if (cp == 0)
- goto done;
- ws.ws_xpixel = atoi(++cp);
- cp = index(cp, ',');
- if (cp == 0)
- goto done;
- ws.ws_ypixel = atoi(++cp);
- }
-done:
- if (ws.ws_row != -1 && ws.ws_col != -1 &&
- ws.ws_xpixel != -1 && ws.ws_ypixel != -1)
- ioctl(0, TIOCSWINSZ, &ws);