turning off the beep
YONETANI Tomokazu
qhwt+dfly at les.ath.cx
Mon Jan 9 08:05:43 PST 2006
On Mon, Jan 09, 2006 at 10:07:22AM -0500, Erik V. Smith wrote:
> YONETANI Tomokazu wrote:
> >+ bell = 0, duration = 0, pitch = 0;
>
> variable "bell" is being initialized to zero on line 861 of
> kbdcontrol.c, so I'm affraid this won't work.
Well, I missed the tilde here:
if ((bell & ~2) == 0)
fprintf(stderr, "\x1B[=%d;%dB", pitch, duration);
which made me interpret the statement as `when quiet bit not set'...
Anyway, it turned out that both `-b off' and '-b quiet.off' turns off
the bell for me, without or without the patch :-] Do you see something
if you change the line calling ioctl() to something below?
if (ioctl(0, CONS_BELLTYPE, &bell) == -1)
perror("CONS_BELLTYPE");
if ((bell & ~2) == 0)
fprintf(stderr, "\x1B[=%d;%dB", pitch, duration);
If so, you may have to dig into scioctl() to find where it's failing
to set flags or flash the screen.
More information about the Bugs
mailing list