Re: example c program that does "beep"

2009-12-26 Thread Thomas Dickey
On Sat, Dec 26, 2009 at 05:16:23PM +, Anton Shterenlikht wrote: > On Sat, Dec 26, 2009 at 11:50:06AM -0500, Thomas Dickey wrote: > > > > instead of the printf/fflush, it would clear the screen and beep - if the > > terminal description says it can do the beep. > > I have > > > echo $TERM >

Re: example c program that does "beep"

2009-12-26 Thread Anton Shterenlikht
On Sat, Dec 26, 2009 at 08:08:52PM +0100, Polytropon wrote: > On Sat, 26 Dec 2009 17:16:23 +, Anton Shterenlikht > wrote: > > On Sat, Dec 26, 2009 at 11:50:06AM -0500, Thomas Dickey wrote: > > > > > > instead of the printf/fflush, it would clear the screen and beep - if the > > > terminal de

Re: example c program that does "beep"

2009-12-26 Thread Polytropon
On Sat, 26 Dec 2009 17:16:23 +, Anton Shterenlikht wrote: > On Sat, Dec 26, 2009 at 11:50:06AM -0500, Thomas Dickey wrote: > > > > instead of the printf/fflush, it would clear the screen and beep - if the > > terminal description says it can do the beep. The exanple I posted displays the re

Re: example c program that does "beep"

2009-12-26 Thread Anton Shterenlikht
On Sat, Dec 26, 2009 at 11:50:06AM -0500, Thomas Dickey wrote: > > instead of the printf/fflush, it would clear the screen and beep - if the > terminal description says it can do the beep. I have > echo $TERM xterm > xterm can do beep, can't it? But I can't get it to beep on anything. I proba

Re: example c program that does "beep"

2009-12-26 Thread Thomas Dickey
On Sat, Dec 26, 2009 at 03:33:27PM +, Anton Shterenlikht wrote: > On Fri, Dec 25, 2009 at 08:49:14PM +0100, Polytropon wrote: > > On Fri, 25 Dec 2009 18:58:26 +, Anton Shterenlikht > > wrote: > > > How can I get a beep from c? > > > I looked at curses and syscons.c, but > > > still not cl

Re: example c program that does "beep"

2009-12-26 Thread Anton Shterenlikht
On Fri, Dec 25, 2009 at 02:02:19PM -0500, Joe Marcus Clarke wrote: > On Fri, 2009-12-25 at 18:58 +, Anton Shterenlikht wrote: > > How can I get a beep from c? > > I looked at curses and syscons.c, but > > still not clear. > > Could somebody send me an example. > > I'd be soo grateful. > >

Re: example c program that does "beep"

2009-12-26 Thread Anton Shterenlikht
On Fri, Dec 25, 2009 at 08:49:14PM +0100, Polytropon wrote: > On Fri, 25 Dec 2009 18:58:26 +, Anton Shterenlikht > wrote: > > How can I get a beep from c? > > I looked at curses and syscons.c, but > > still not clear. > > If you want to use NCURSES / CURSES, it's a bit complicated. > > Othe

Re: example c program that does "beep"

2009-12-25 Thread Thomas Dickey
On Fri, Dec 25, 2009 at 08:34:39PM +0100, Polytropon wrote: > On Fri, 25 Dec 2009 18:58:26 +, Anton Shterenlikht > wrote: > > How can I get a beep from c? > > I looked at curses and syscons.c, but > > still not clear. > > If you want to use NCURSES / CURSES, it's a bit complicated. tput bel

Re: example c program that does "beep"

2009-12-25 Thread Polytropon
On Fri, 25 Dec 2009 18:58:26 +, Anton Shterenlikht wrote: > How can I get a beep from c? > I looked at curses and syscons.c, but > still not clear. If you want to use NCURSES / CURSES, it's a bit complicated. Otherwise, just output %c (the character) 0x07, BEL, which generates an audible be

Re: example c program that does "beep"

2009-12-25 Thread Polytropon
On Fri, 25 Dec 2009 18:58:26 +, Anton Shterenlikht wrote: > How can I get a beep from c? > I looked at curses and syscons.c, but > still not clear. If you want to use NCURSES / CURSES, it's a bit complicated. Otherwise, just output %c (the character) 0x07, BEL, which generates an audible be

Re: example c program that does "beep"

2009-12-25 Thread Joe Marcus Clarke
On Fri, 2009-12-25 at 18:58 +, Anton Shterenlikht wrote: > How can I get a beep from c? > I looked at curses and syscons.c, but > still not clear. > Could somebody send me an example. > I'd be soo grateful. #include int main(int argc, char **argv) { printf("%c", 7); retur

Re: example c program that does "beep"

2009-12-25 Thread Aryeh Friedman
printf("\007"); /* assumes that your using a console/terminal that will beep on ctl-g */ On Fri, Dec 25, 2009 at 1:58 PM, Anton Shterenlikht wrote: > How can I get a beep from c? > I looked at curses and syscons.c, but > still not clear. > Could somebody send me an example. > I'd be soo grate