*BSD News Article 20414


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!doc.ic.ac.uk!uknet!mcsun!chsun!bernina!torda
From: torda@igc.ethz.ch (Andrew Torda)
Subject: Re: pccons.c swallows null character [NetBSD 0.9]
Message-ID: <CCu6Fq.9MM@bernina.ethz.ch>
Keywords: pccons.c null character sputc sgetc
Sender: news@bernina.ethz.ch (USENET News System)
Nntp-Posting-Host: hermitage
Organization: Computational Chemistry, ETH, Zuerich
References: <CCrrFz.8Hz@bernina.ethz.ch>
Date: Sat, 4 Sep 1993 15:45:25 GMT
Lines: 28

Please excuse me following up my own post.
A few days ago, I noted that pccons.c wanted to swallow the
null character (it doesn't get returned from a read() from the
console).
According to the table scan_codes[] in
/usr/src/sys/arch/i386/isa/pccons.c, ctl-2 should produce a null:

>     static Scan_def	scan_codes[] =
[....]
>	ASCII,	"2",		"@",		"\000", /* 3 2 */

I just noted the following:

If you don't have XSERVER defined in your kernel config file,
you see the problem. If you do define XSERVER, the problem
goes away.

I don't think the behaviour should depend on this kernel
define.

This is with NetBSD 0.9 and with the following version of
pccons.c
 *	from: @(#)pccons.c	5.11 (Berkeley) 5/21/91
 *	pccons.c,v 1.28 1993/07/12 11:37:17 mycroft Exp

-Andrew
-- 
Andrew Torda, Computational Chemistry, ETH, Zurich, torda@igc.ethz.ch