From: Art Cancro Date: Wed, 13 Nov 2002 17:20:57 +0000 (+0000) Subject: * When in curses mode, call beep() instead of putc(7, stdout) to make it beep. X-Git-Tag: v7.86~6124 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=41ddb5b6fc7fdf77fd8d8dd83d6f6536967e9a33;p=citadel.git * When in curses mode, call beep() instead of putc(7, stdout) to make it beep. --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 83e2f9133..994a91795 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 601.67 2002/11/13 17:20:57 ajc + * When in curses mode, call beep() instead of putc(7, stdout) to make it beep. + Revision 601.66 2002/11/12 04:30:16 ajc * Completed the invitation accept/decline code. It now sends back a correctly formated reply! (Tested with Evolution) @@ -4214,3 +4217,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/commands.c b/citadel/commands.c index a20f67d26..cfb6b9761 100644 --- a/citadel/commands.c +++ b/citadel/commands.c @@ -219,7 +219,7 @@ void print_express(void) return; if (rc_exp_beep) { - scr_putc(7); + ctdl_beep(); } if (strlen(rc_exp_cmd) == 0) { color(BRIGHT_RED); diff --git a/citadel/rooms.c b/citadel/rooms.c index 3baafc670..9bcbfd785 100644 --- a/citadel/rooms.c +++ b/citadel/rooms.c @@ -714,7 +714,7 @@ void download(CtdlIPC *ipc, int proto) /* clean up the temporary directory */ nukedir(tempdir); - scr_putc(7); /* Beep beep! */ + ctdl_beep(); /* Beep beep! */ } diff --git a/citadel/screen.c b/citadel/screen.c index fa91ce430..c25fae949 100644 --- a/citadel/screen.c +++ b/citadel/screen.c @@ -170,6 +170,19 @@ void screen_delete(void) #endif } +/* + * Beep. + */ +void ctdl_beep(void) { +#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES) + if (myscreen) + beep(); + else +#endif + putc(7, stdout); +} + + /* * Set screen/IO parameters, e.g. at start of program or return from external diff --git a/citadel/screen.h b/citadel/screen.h index f86422fae..4c82a430f 100644 --- a/citadel/screen.h +++ b/citadel/screen.h @@ -38,3 +38,4 @@ int scr_blockread(void); int is_curses_enabled(void); RETSIGTYPE scr_winch(int signum); void wait_indicator(int state); +void ctdl_beep(void);