The GNU Modula-2 front end to GCC

ulm-lib-gm2/sys/SysTermIO

DEFINITION MODULE SysTermIO;

   IMPORT termios ;

   TYPE
      ControlChar = termios.ControlChar ;
      Flag = termios.Flag ;

      ControlCharRange = [MIN(ControlChar)..MAX(ControlChar)];

      Modes = SET OF Flag ;

      TermIO = RECORD
                  modes   : Modes ;
                  baud    : CARDINAL ;
                  cc      : ARRAY ControlCharRange OF CHAR ;
                  rows,
                  columns,
                  line    : CARDINAL ;
               END;


   PROCEDURE SetTermIO(fd: CARDINAL; termio: TermIO) : BOOLEAN;


   PROCEDURE GetTermIO(fd: CARDINAL; VAR termio: TermIO) : BOOLEAN;


   PROCEDURE Baudrate(termio: TermIO) : CARDINAL;


   PROCEDURE Isatty(fd: CARDINAL) : BOOLEAN;

END SysTermIO.