[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sound debugging wanted.
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Sound debugging wanted.
- From: Ben Goren <ben_(_at_)_trumpetpower_(_dot_)_com>
- Date: Fri, 22 Nov 2002 18:12:01 -0700
On Fri, Nov 22, 2002 at 04:55:30PM -0800, John D. wrote:
> marco writes:
>
> >cc beeper.c -o beeper -lcurses
>
> I get:
>
> $ cc beeper.c -o beeper -lcurses
> $ a.out
> sh: a.out: not found
You need to re-read the cc (1) manual page. The o flag specifies
the name of the output file.
> $ beeper
> About ready to beep
> Memory fault (core dumped)
>
> Got any ideas on this?
As per Rick Pettit's note, you need this line:
initscr(); // start curses mode
Note that initscr() has side effects, like moving the cursor to
the top of the screen.
You probably want to get real comfy with the curses documentation.
As an alternative to all this, you may be able to get by with
just printing the bell character, ^G. It doesn't work with all
combinations of shells and terminals and languages and whatnot,
and it's been years since I did any serious C programming, so I
don't remember exactly how it's done there, but I'll often use ^G
when I can get away with it.
Cheers,
b&
--
Ben Goren
mailto:ben_(_at_)_trumpetpower_(_dot_)_com
http://www.trumpetpower.com/
icbm:33o25'37"N_111o57'32"W
[demime 0.98d removed an attachment of type application/pgp-signature]
Visit your host, monkey.org