diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2003-08-02 21:43:46 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2003-08-02 21:43:46 +0000 |
commit | d74850a770b15db3c6d2fbae3f85b3318b1d5aa3 (patch) | |
tree | 377f09dba45ba16963d47473c153f2a993691314 /libcons/file-changed.c | |
parent | acdd8445816fb1068728057ec65a8c6dd61bc1f5 (diff) |
2003-08-01 Marco Gerards <metgerards@student.han.nl>
* opts-std-startup.c: Include <string.h>.
(OPT_VISUAL_BELL): New macro.
(OPT_AUDIBLE_BELL): Likewise.
(_cons_visual_bell): New variable.
(_cons_audible_bell): Likewise.
(startup_options): Added options "--visual-bell" and
"--audible-bell" ...
(parse_startup_opt): ...and parse those new options here.
* priv.h (bell_type_t): New enumeration.
(_cons_visual_bell): New external variable.
(_cons_audible_bell): Likewise.
* file-changed.c (cons_S_file_changed): Use the right bell.
Diffstat (limited to 'libcons/file-changed.c')
-rw-r--r-- | libcons/file-changed.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libcons/file-changed.c b/libcons/file-changed.c index f65eb0b5..40c00af8 100644 --- a/libcons/file-changed.c +++ b/libcons/file-changed.c @@ -1,5 +1,5 @@ /* file-changed.c - Handling file changed notifications. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. Written by Marcus Brinkmann. This file is part of the GNU Hurd. @@ -202,7 +202,10 @@ cons_S_file_changed (cons_notify_t notify, natural_t tickno, while (vcons->state.bell.audible < vcons->display->bell.audible) { - cons_vcons_beep (vcons); + if (_cons_audible_bell == BELL_AUDIBLE) + cons_vcons_beep (vcons); + else if (_cons_audible_bell == BELL_VISUAL) + cons_vcons_flash (vcons); vcons->state.bell.audible++; } } @@ -211,7 +214,10 @@ cons_S_file_changed (cons_notify_t notify, natural_t tickno, while (vcons->state.bell.visible < vcons->display->bell.visible) { - cons_vcons_flash (vcons); + if (_cons_visual_bell == BELL_VISUAL) + cons_vcons_flash (vcons); + else if (_cons_visual_bell == BELL_AUDIBLE) + cons_vcons_beep (vcons); vcons->state.bell.visible++; } } |