ex54.pp 494 B

12345678910111213141516171819
  1. Program Example54;
  2. uses BaseUnix,Termio;
  3. { Program to demonstrate the IOCtl function. }
  4. var
  5. tios : Termios;
  6. begin
  7. {$ifdef FreeBSD}
  8. fpIOCtl(1,TIOCGETA,@tios); // these constants are very OS dependant.
  9. // see the tcgetattr example for a better way
  10. {$endif}
  11. WriteLn('Input Flags : $',hexstr(tios.c_iflag,8));
  12. WriteLn('Output Flags : $',hexstr(tios.c_oflag,8));
  13. WriteLn('Line Flags : $',hexstr(tios.c_lflag,8));
  14. WriteLn('Control Flags: $',hexstr(tios.c_cflag,8));
  15. end.