]> andersk Git - gssapi-openssh.git/blobdiff - openssh/ttymodes.c
Import of OpenSSH 4.4p1
[gssapi-openssh.git] / openssh / ttymodes.c
index cf4c7d5c6c83e1130e202e52e16f7924b7bac28a..d8e2c553abd6d079740db22f67efddb71c9ed57d 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenBSD: ttymodes.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ttymodes.c,v 1.19 2003/04/08 20:21:29 itojun Exp $");
+
+#include <sys/types.h>
+
+#include <errno.h>
+#include <string.h>
+#include <termios.h>
+#include <stdarg.h>
 
 #include "packet.h"
 #include "log.h"
 #include "ssh1.h"
 #include "compat.h"
 #include "buffer.h"
-#include "bufaux.h"
 
 #define TTY_OP_END             0
 /*
@@ -384,7 +390,8 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
                        n_bytes += 4;
                        baud = packet_get_int();
                        debug3("tty_parse_modes: ispeed %d", baud);
-                       if (failure != -1 && cfsetispeed(&tio, baud_to_speed(baud)) == -1)
+                       if (failure != -1 &&
+                           cfsetispeed(&tio, baud_to_speed(baud)) == -1)
                                error("cfsetispeed failed for %d", baud);
                        break;
 
@@ -394,7 +401,8 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
                        n_bytes += 4;
                        baud = packet_get_int();
                        debug3("tty_parse_modes: ospeed %d", baud);
-                       if (failure != -1 && cfsetospeed(&tio, baud_to_speed(baud)) == -1)
+                       if (failure != -1 &&
+                           cfsetospeed(&tio, baud_to_speed(baud)) == -1)
                                error("cfsetospeed failed for %d", baud);
                        break;
 
@@ -442,11 +450,12 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
                                        /*
                                         * It is a truly undefined opcode (160 to 255).
                                         * We have no idea about its arguments.  So we
-                                        * must stop parsing.  Note that some data may be
-                                        * left in the packet; hopefully there is nothing
-                                        * more coming after the mode data.
+                                        * must stop parsing.  Note that some data
+                                        * may be left in the packet; hopefully there
+                                        * is nothing more coming after the mode data.
                                         */
-                                       logit("parse_tty_modes: unknown opcode %d", opcode);
+                                       logit("parse_tty_modes: unknown opcode %d",
+                                           opcode);
                                        goto set;
                                }
                        } else {
@@ -462,7 +471,8 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
                                        (void) packet_get_int();
                                        break;
                                } else {
-                                       logit("parse_tty_modes: unknown opcode %d", opcode);
+                                       logit("parse_tty_modes: unknown opcode %d",
+                                           opcode);
                                        goto set;
                                }
                        }
This page took 0.033924 seconds and 4 git commands to generate.