diff options
author | Christopher Faylor <me@cgf.cx> | 2006-01-03 01:15:29 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-01-03 01:15:29 +0000 |
commit | e76625eadb1ea7eb954080e5658fa096bf739544 (patch) | |
tree | 9debe42387701699a5b32772dd7227d6d53cfb36 | |
parent | 1529831639b2fba67f871b34eeed2d35fa6bede7 (diff) | |
download | cygnal-e76625eadb1ea7eb954080e5658fa096bf739544.tar.gz cygnal-e76625eadb1ea7eb954080e5658fa096bf739544.tar.bz2 cygnal-e76625eadb1ea7eb954080e5658fa096bf739544.zip |
* fhandler_console.cc (beep): New function. Restores missing "Default Beep",
if necessary.
(fhandler_console::write_normal): Use beep().
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 14 |
2 files changed, 19 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e7c1806a1..524ca3579 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2006-01-02 Christopher Faylor <cgf@timesys.com> + * fhandler_console.cc (beep): New function. Restores missing "Default + Beep", if necessary. + (fhandler_console::write_normal): Use beep(). + +2006-01-02 Christopher Faylor <cgf@timesys.com> + * dcrt0.cc (_dll_crt0): Move more leftover debugging stuff. (cygwin_dll_init): Remove unneeded initializations. Call _dll_crt0 rather than dll_crt0_1. diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 3fd139deb..3370564c2 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -29,6 +29,7 @@ details. */ #include "pinfo.h" #include "shared_info.h" #include "cygtls.h" +#include "registry.h" #define CONVERT_LIMIT 16384 @@ -1412,6 +1413,17 @@ bad_escape: } } +static void +beep () +{ + char buf[4096]; + reg_key r (HKEY_CURRENT_USER, KEY_ALL_ACCESS, "AppEvents", "Schemes", "Apps", + ".Default", ".Default", ".current", NULL); + if (r.get_string ("", buf, sizeof (buf), "") != 0) + r.set_string ("", "Windows XP Ding.wav"); + MessageBeep (0xFFFFFFFF); +} + const unsigned char * fhandler_console::write_normal (const unsigned char *src, const unsigned char *end) @@ -1470,7 +1482,7 @@ fhandler_console::write_normal (const unsigned char *src, switch (base_chars[*src]) { case BEL: - MessageBeep (0xFFFFFFFF); + beep (); break; case ESC: dev_state->state_ = gotesc; |