]> andersk Git - openssh.git/blobdiff - ttymodes.c
Hopefully things did not get mixed around too much. It compiles under
[openssh.git] / ttymodes.c
index aae9b516fa70c5322df3c431ce933889e4e221c6..2516e9310655a731dc21748bc6ebf6953ea4f423 100644 (file)
@@ -2,18 +2,24 @@
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
- * Created: Tue Mar 21 15:59:15 1995 ylo
  * Encoding and decoding of terminal modes in a portable way.
  * Much of the format is defined in ttymodes.h; it is included multiple times
  * into this file with the appropriate macro definitions to generate the
  * suitable code.
+ *
+ * As far as I am concerned, the code I have written for this software
+ * can be used freely for any purpose.  Any derived versions of this
+ * software must be clearly marked as such, and if the derived work is
+ * incompatible with the protocol description in the RFC file, it must be
+ * called by a name other than "ssh" or "Secure Shell".
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: ttymodes.c,v 1.10 2001/01/21 19:06:01 markus Exp $");
 
 #include "packet.h"
-#include "ssh.h"
+#include "log.h"
+#include "ssh1.h"
 
 #define TTY_OP_END     0
 #define TTY_OP_ISPEED  192     /* int follows */
@@ -23,7 +29,7 @@ RCSID("$Id$");
  * Converts POSIX speed_t to a baud rate.  The values of the
  * constants for speed_t are not themselves portable.
  */
-static int 
+static int
 speed_to_baud(speed_t speed)
 {
        switch (speed) {
@@ -112,7 +118,7 @@ speed_to_baud(speed_t speed)
 /*
  * Converts a numeric baud rate to a POSIX speed_t.
  */
-static speed_t 
+static speed_t
 baud_to_speed(int baud)
 {
        switch (baud) {
@@ -203,13 +209,12 @@ baud_to_speed(int baud)
  * in a portable manner, and appends the modes to a packet
  * being constructed.
  */
-void 
+void
 tty_make_modes(int fd)
 {
        struct termios tio;
        int baud;
 
-       /* Get the modes. */
        if (tcgetattr(fd, &tio) < 0) {
                packet_put_char(TTY_OP_END);
                log("tcgetattr: %.100s", strerror(errno));
@@ -248,7 +253,7 @@ tty_make_modes(int fd)
  * Decodes terminal modes for the terminal referenced by fd in a portable
  * manner from a packet being read.
  */
-void 
+void
 tty_parse_modes(int fd, int *n_bytes_ptr)
 {
        struct termios tio;
This page took 0.033608 seconds and 4 git commands to generate.