oaa@houxl.UUCP (O.ALEXANDER) (08/21/84)
Can someone please identify what these defines are or what their AT&T System V equivalent are. LPENDIN TIOCSETN TIOCSTI TIOCLBIS CBREAK These were undefined while trying to make dired, a directory editing program posted a while back. The posible include files they may be in are: #include <stdio.h> #include <sys/types.h> #include <signal.h> #include <sgtty.h> #include <sys/ioctl.h> #include <sys/param.h> #include <sys/stat.h> #include <sys/dir.h> #include <whoami.h> Thanks Owen Alexander !houxl!oaa
gwyn@BRL-VLD.ARPA@sri-unix.UUCP (08/24/84)
From: Doug Gwyn (VLD/VMB) <gwyn@BRL-VLD.ARPA> The missing defines are all related to terminal ioctls. LPENDIN is another mode bit meaning "retype pending input at next read or input character"; there is no equivalent in UNIX System V. TIOCSETN sets the parameters according to the pointed-to sgttyb struct. The mode change occurs immediately, without waiting for output to drain. If the mode is being changed from or to RAW mode, unread input is flushed. The nearest UNIX System V equivalent is TCSETA; if you really need the input queue flushed, then an additional TCFLSH, 0 is required. TIOCSTI pushes the pointed-to char onto the terminal input queue, as though it had been typed on the keyboard; there is no equiavlent in UNIX System V. TIOCLBIS `ors' bits into the local mode flag word. This could be simulated (assuming that the modes involved have equivalents) on UNIX System V by a TCGETA followed by a TCSETA. CBREAK turns off input canonicalization; the UNIX System V equivalent is to turn off ICANON. The above are documented in TTY(4) for 4.2BSD, and TERMIO(7) for UNIX System V (the latter for some bogus reason is in the Administrator's Manual instead of the Programmer's Manual where it belongs). One general comment is that any program that makes essential use of such things as LPENDIN and TIOCSTI is highly nonportable, and you should suspect other Berkeleyisms in the source code.