gil@bud.UUCP (Gil Hunt) (09/21/88)
I believe there are the following bugs in the pushable Streams module 'ldterm.c' that is included in System V Release 3.2 (although I have only desk-checked the code, not actually run it, so I may have missed something). 1. According to TERMIO(BA_ENV): (my quotes in both cases) - If IGNCR is set, a "received" ASCII CR character is ignored (not read) - If INLCR is set, a "received" NL character is translated into a ASCII CR I take this to mean that a received NL that is translated into a CR should NOT also be discarded if IGNCR is set, since CR was not the original character. In looking at ldterm.c, I found the following: - In the put procedure for input from the tty driver, 'ldtermin' (at lines 508 through 511 of ldterm.c for those of you with source), a '\n' is translated into a '\r' if INLCR is set. - Once this put procedure is done with the message, the message is passed to the input service routine 'ldterminsrv'. - In 'ldterminsrv' (at lines 767 through 772 of ldterm.c), if IGNCR is set in iflags, a '\r' is discarded. If both of the flags IGNCR and INLCR are set in iflags, it appears that a '\n' will first be turned into '\r' in 'ldtermin', then discarded by 'ldterminsrv'. 2. It appears that there is no way the EOF character may be entered literally (i.e., by preceding it with the escape character \). The check for an EOF character at line 922 does not see if the previous character was an escape. If I am wrong, please send me e-mail and I will post the proper response. gil hunt - ARIX corp.