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 me...@bristol.ac.uk 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.

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. #include

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 me...@bristol.ac.uk wrote: How can I get a beep from c? I looked at curses and syscons.c, but still

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 probably

Re: example c program that does beep

2009-12-26 Thread Polytropon
On Sat, 26 Dec 2009 17:16:23 +, Anton Shterenlikht me...@bristol.ac.uk 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

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 me...@bristol.ac.uk 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

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 xterm

example c program that does beep

2009-12-25 Thread Anton Shterenlikht
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. many thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44

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 me...@bristol.ac.uk 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

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 stdio.h int main(int argc, char **argv) { printf(%c, 7);

Re: example c program that does beep

2009-12-25 Thread Polytropon
On Fri, 25 Dec 2009 18:58:26 +, Anton Shterenlikht me...@bristol.ac.uk 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

Re: example c program that does beep

2009-12-25 Thread Polytropon
On Fri, 25 Dec 2009 18:58:26 +, Anton Shterenlikht me...@bristol.ac.uk 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

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 me...@bristol.ac.uk 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.