Temporary kludge: treat \r same as \n in input, so working on a

comconsole will behave as expected.  The true problem should be fixed
instead, Bruce' comment for this:

>Anyway, i found the reason for my problems: somehow, ICRNL isn't in
>effect at `userconfig' time (but only for comconsole?), hence only

ICRNL doesn't apply to cngetc().  cnputc() unconditionally does the
equivalent of ONLCR; perhaps cngetc() should unconditionally do the
equivalent of ICRNL.  Ddb must be checking for CR.  Userconfig only
checks for NL.  Userconfig works with syscons because pccngetc()
does the conversion.  This is probably the wrong place to do it.
This commit is contained in:
Joerg Wunsch 1994-11-27 13:43:37 +00:00
parent 66f2024ac6
commit d439025208
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: userconfig.c,v 1.14 1994/11/13 01:55:33 jkh Exp $
* $Id: userconfig.c,v 1.15 1994/11/14 03:22:28 bde Exp $
*/
#include <sys/param.h>
@ -431,7 +431,7 @@ cngets(char *input, int maxin)
continue;
}
printf("%c", c);
if ((++nchars == maxin) || (c == '\n')) {
if ((++nchars == maxin) || (c == '\n') || (c == '\r')) {
*input = '\0';
break;
}