Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!RESEARCH.ATT.COM!bill From: bill@RESEARCH.ATT.COM Newsgroups: comp.windows.news Subject: Re: Real bells in NeWS??? Message-ID: <8804061943.AA03683@brillig.umd.edu> Date: 6 Apr 88 22:04:02 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 27 Here's the canonical way to ring the bell on a sun. It doesn't need any new devices created in /dev. The idea is to call turn_bell_on() and sometime later (probably after doing a select() call to wait for some fraction of a second) call turn_bell_off(). -Bill Schell AT&T Bell Labs, Murray Hill, NJ allegra!bill #include #include #include #include turn_on_bell() { int bell, bell_on = KBD_CMD_BELL; bell = open("/dev/kbd",1); ioctl(bell, KIOCCMD, &bell_on); close(bell); } turn_off_bell() { int bell, bell_off = KBD_CMD_NOBELL; bell = open("/dev/kbd",1); ioctl(bell, KIOCCMD, &bell_off); close(bell); }