dce@mips.UUCP (01/15/87)
The 4.3BSD User's Reference Manual entry for tty(4) states that when one of the tchars characters has a value of -1, the effect of that character is eliminated (this is on page 14, paragraph 2 on the online manual page). In our system (Mips M/500 running a 4.3BSD-derived Unix), the default char type is unsigned. Because of this, the commands that need to check for a tchars element being -1 (specifically, tset, reset, and csh) do not work correctly by default. The only recourse has been to tell the compiler to default to using signed characters, and this is not a particularly nice solution. There are three obvious solutions: 1. Change the types of the characters in <sys/ttychars.h> from 'char' to 'signed char' (the 'signed' keyword is available in our system). PRO - Code that compares the tchars characters with -1 will work without special compilation flags. CON - Who knows what effect this will have on other code that compares or sets these values? 2. Change the 'undefined' value to an unsigned value (what value is reasonable? 255? 0?). PRO - Removes dependency upon having signed characters. CON - Requires changes to existing code. 3. Remove the feature of being able to have an 'undefined' value (this is how System V seems to work). PRO - There's no longer a problem. CON - Commands that require this functionality no longer have it. Any help on solving this problem would be appreciated. David Elliott decwrl!mips!dce