root/include/asm-mips/termios.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. trans_from_termio
  2. trans_to_termio

   1 #ifndef __ASM_MIPS_TERMIOS_H
   2 #define __ASM_MIPS_TERMIOS_H
   3 
   4 #include <linux/types.h>
   5 #include <asm/termbits.h>
   6 
   7 struct winsize {
   8         unsigned short ws_row;
   9         unsigned short ws_col;
  10         unsigned short ws_xpixel;
  11         unsigned short ws_ypixel;
  12 };
  13 
  14 /* ----------------------------------------------------------------------- */
  15 
  16 #ifdef __KERNEL__
  17 
  18 /*
  19  * Translate a "termio" structure into a "termios". Ugh.
  20  */
  21 extern inline void trans_from_termio(struct termio * termio,
     /* [previous][next][first][last][top][bottom][index][help] */
  22         struct termios * termios)
  23 {
  24 #define SET_LOW_BITS(x,y)       ((x) = (0xffff0000 & (x)) | (y))
  25         SET_LOW_BITS(termios->c_iflag, termio->c_iflag);
  26         SET_LOW_BITS(termios->c_oflag, termio->c_oflag);
  27         SET_LOW_BITS(termios->c_cflag, termio->c_cflag);
  28         SET_LOW_BITS(termios->c_lflag, termio->c_lflag);
  29 #undef SET_LOW_BITS
  30         memcpy(termios->c_cc, termio->c_cc, NCC);
  31 }
  32 
  33 /*
  34  * Translate a "termios" structure into a "termio". Ugh.
  35  */
  36 extern inline void trans_to_termio(struct termios * termios,
     /* [previous][next][first][last][top][bottom][index][help] */
  37         struct termio * termio)
  38 {
  39         termio->c_iflag = termios->c_iflag;
  40         termio->c_oflag = termios->c_oflag;
  41         termio->c_cflag = termios->c_cflag;
  42         termio->c_lflag = termios->c_lflag;
  43         termio->c_line  = termios->c_line;
  44         memcpy(termio->c_cc, termios->c_cc, NCC);
  45 }
  46 
  47 #endif  /* __KERNEL__ */
  48 
  49 #endif /* __ASM_MIPS_TERMIOS_H */

/* [previous][next][first][last][top][bottom][index][help] */