Fork me on GitHub

root/include/fiwix/termios.h

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

INCLUDED FROM


   1 /*
   2  * fiwix/include/fiwix/termios.h
   3  *
   4  * Copyright 2018, Jordi Sanfeliu. All rights reserved.
   5  * Distributed under the terms of the Fiwix License.
   6  */
   7 
   8 #ifndef _FIWIX_TERMIOS_H
   9 #define _FIWIX_TERMIOS_H
  10 
  11 #include <fiwix/termbits.h>
  12 
  13 struct winsize {
  14         unsigned short int ws_row;
  15         unsigned short int ws_col;
  16         unsigned short int ws_xpixel;
  17         unsigned short int ws_ypixel;
  18 };
  19 
  20 
  21 #define NCC     8
  22 
  23 /* old terminal control structure */
  24 struct termio {
  25         unsigned short int c_iflag;     /* input mode flags */
  26         unsigned short int c_oflag;     /* output mode flags */
  27         unsigned short int c_cflag;     /* control mode flags */
  28         unsigned short int c_lflag;     /* local mode flags */
  29         unsigned char c_line;           /* line discipline */
  30         unsigned char c_cc[NCC];        /* control characters */
  31 };
  32 
  33 
  34 #define NCCS 19
  35 
  36 /* new terminal control structure */
  37 struct termios {
  38         tcflag_t c_iflag;       /* input mode flags */
  39         tcflag_t c_oflag;       /* output mode flags */
  40         tcflag_t c_cflag;       /* control mode flags */
  41         tcflag_t c_lflag;       /* local mode flags */
  42         cc_t c_line;            /* line discipline */
  43         cc_t c_cc[NCCS];        /* control characters */
  44 };
  45 
  46 #endif /* _FIWIX_TERMIOS_H */

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