text: /* Copyright (c) 2016, 2017 Dennis Wölfing
   *
   * Permission to use, copy, modify, and/or distribute this software for any
   * purpose with or without fee is hereby granted, provided that the above
   * copyright notice and this permission notice appear in all copies.
   *
   * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   */
  
  /* kernel/include/dennix/termios.h
   * Terminal I/O.
   */
  
  #ifndef _DENNIX_TERMIOS_H
  #define _DENNIX_TERMIOS_H
  
  #define ECHO (1 << 0)
  #define ICANON (1 << 1)
  
  #define VEOF 0
  #define VEOL 1
  #define VERASE 2
  #define VINTR 3
  #define VKILL 4
  #define VMIN 5
  #define VQUIT 6
  #define VSTART 7
  #define VSTOP 8
  #define VSUSP 9
  #define VTIME 10
  #define NCCS 11
  
  #define TCSAFLUSH 0
  
  typedef unsigned char cc_t;
  typedef unsigned int tcflag_t;
  
  struct termios {
      tcflag_t c_iflag;
      tcflag_t c_oflag;
      tcflag_t c_cflag;
      tcflag_t c_lflag;
      cc_t c_cc[NCCS];
  };
  
  #endif
  