home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue6 / SDL.ZIP / !gcc / include / unixlib / internal / h / tty < prev   
Encoding:
Text File  |  2006-09-17  |  1.2 KB  |  57 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/unixlib/tty.h,v $
  4.  * $Date: 2005/03/04 20:59:05 $
  5.  * $Revision: 1.5 $
  6.  * $State: Exp $
  7.  * $Author: alex $
  8.  *
  9.  ***************************************************************************/
  10.  
  11. #ifndef __INTERNAL_TTY_H
  12. #define __INTERNAL_TTY_H
  13.  
  14. #ifndef __UNIXLIB_FEATURES_H
  15. #include <features.h>
  16. #endif
  17.  
  18. #ifndef __TERMIOS_H
  19. #include <termios.h>
  20. #endif
  21.  
  22. #ifndef __SYS_IOCTL_H
  23. #include <sys/ioctl.h>
  24. #endif
  25.  
  26. #ifndef __SYS_PARAM_H
  27. #include <sys/param.h>
  28. #endif
  29.  
  30. __BEGIN_DECLS
  31.  
  32. #define MAXTTY    2
  33.  
  34. #define TTY_CON 0
  35. #define TTY_423 1
  36.  
  37. /* Beware of backwards compatibility when altering this structure.
  38.    It is referenced by SUL and other processes */
  39. struct tty
  40.   {
  41.   int type;             /* tty type */
  42.   unsigned int refcount;
  43.   struct termios t[1];
  44.   struct winsize w[1];
  45.   int sx,cx;        /* screen x, character x */
  46.   int cnt;        /* number of characters in input buffer */
  47.   char *ptr;        /* read pointer in input buffer */
  48.   int lookahead;    /* [1 byte or -1] lookahead to allow select() */
  49.   char buf[MAX_INPUT];  /* input buffer */
  50.   char del[MAX_INPUT];  /* number of displayed characters for character cx */
  51.   };
  52.  
  53.  
  54. __END_DECLS
  55.  
  56. #endif
  57.