diff options
author | Pierre Humblet <phumblet@phumblet.no-ip.org> | 2004-05-12 01:44:11 +0000 |
---|---|---|
committer | Pierre Humblet <phumblet@phumblet.no-ip.org> | 2004-05-12 01:44:11 +0000 |
commit | 8bdfa78a69bf543f55cc05940fa698262fcd1010 (patch) | |
tree | afe8e1bc62f57d9a29ac4e0a53050221d9bed077 /winsup/cygwin/tty.h | |
parent | 5b4c8ae219eb888667c4f345a3a254a1fd56cdff (diff) | |
download | cygnal-8bdfa78a69bf543f55cc05940fa698262fcd1010.tar.gz cygnal-8bdfa78a69bf543f55cc05940fa698262fcd1010.tar.bz2 cygnal-8bdfa78a69bf543f55cc05940fa698262fcd1010.zip |
2004-05-12 Pierre Humblet <pierre.humblet@ieee.org>
* tty.h: Remove the %d or %x from all cygtty strings.
(tty::open_output_mutex): Only declare.
(tty::open_input_mutex): Ditto.
(tty::open_mutex): New definition.
* fhandlet_tty.cc (fhandler_tty_slave::open): Declare buf with
size CYG_MAX_PATH and replace __small_printf calls by shared_name.
* tty.cc (tty::create_inuse): Ditto.
(tty::get_event): Ditto.
(tty::common_init): Ditto.
(tty::open_output_mutex): New method definition.
(tty::open_input_mutex): Ditto.
(tty::open_mutex): New method.
Diffstat (limited to 'winsup/cygwin/tty.h')
-rw-r--r-- | winsup/cygwin/tty.h | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index 94d98048b..d29b2e903 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -8,7 +8,6 @@ This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ - /* tty tables */ #define INP_BUFFER_SIZE 256 @@ -18,15 +17,15 @@ details. */ /* Input/Output/ioctl events */ -#define OUTPUT_DONE_EVENT "cygtty%d.output.done" -#define IOCTL_REQUEST_EVENT "cygtty%d.ioctl.request" -#define IOCTL_DONE_EVENT "cygtty%d.ioctl.done" -#define RESTART_OUTPUT_EVENT "cygtty%d.output.restart" -#define INPUT_AVAILABLE_EVENT "cygtty%d.input.avail" -#define OUTPUT_MUTEX "cygtty%d.output.mutex" -#define INPUT_MUTEX "cygtty%d.input.mutex" -#define TTY_SLAVE_ALIVE "cygtty%x.slave_alive" -#define TTY_MASTER_ALIVE "cygtty%x.master_alive" +#define OUTPUT_DONE_EVENT "cygtty.output.done" +#define IOCTL_REQUEST_EVENT "cygtty.ioctl.request" +#define IOCTL_DONE_EVENT "cygtty.ioctl.done" +#define RESTART_OUTPUT_EVENT "cygtty.output.restart" +#define INPUT_AVAILABLE_EVENT "cygtty.input.avail" +#define OUTPUT_MUTEX "cygtty.output.mutex" +#define INPUT_MUTEX "cygtty.input.mutex" +#define TTY_SLAVE_ALIVE "cygtty.slave_alive" +#define TTY_MASTER_ALIVE "cygtty.master_alive" #include <sys/termios.h> @@ -105,18 +104,9 @@ public: HWND gethwnd () {return hwnd;} void sethwnd (HWND wnd) {hwnd = wnd;} bool make_pipes (fhandler_pty_master *ptym); - HANDLE open_output_mutex () - { - char buf[80]; - __small_sprintf (buf, OUTPUT_MUTEX, ntty); - return OpenMutex (MUTEX_ALL_ACCESS, TRUE, buf); - } - HANDLE open_input_mutex () - { - char buf[80]; - __small_sprintf (buf, INPUT_MUTEX, ntty); - return OpenMutex (MUTEX_ALL_ACCESS, TRUE, buf); - } + HANDLE open_mutex (const char *mutex); + HANDLE open_output_mutex (); + HANDLE open_input_mutex (); bool exists () { HANDLE h = open_output_mutex (); |