ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/ptytty.h
Revision: 1.4
Committed: Mon Jan 2 15:10:18 2006 UTC (18 years, 4 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: rel-6_2
Changes since 1.3: +13 -1 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #ifndef PTYTTY_H
2 #define PTYTTY_H
3
4 #include "feature.h"
5
6 #if defined(HAVE_GRANTPT) && defined(HAVE_UNLOCKPT)
7 # if defined(PTYS_ARE_GETPT) || defined(PTYS_ARE_PTMX)
8 # define NO_SETOWNER_TTYDEV 1
9 # endif
10 #endif
11 #if defined(__CYGWIN32__) || defined(PTYS_ARE_OPENPTY)
12 # define NO_SETOWNER_TTYDEV 1
13 #endif
14
15 enum rxvt_privaction { IGNORE = 'i', SAVE = 's', RESTORE = 'r' };
16
17 struct rxvt_ptytty {
18 #ifndef RESET_TTY_TO_COMMON_DEFAULTS
19 struct stat savestat; /* original status of our tty */
20 #endif
21 #ifndef NO_SETOWNER_TTYDEV
22 void privileges (rxvt_privaction action);
23 bool saved;
24 #endif
25 public:
26 int pty; // pty file descriptor; connected to rxvt
27 int tty; // tty file descriptor; connected to child
28 char *name;
29
30 rxvt_ptytty ();
31 ~rxvt_ptytty ();
32
33 bool get ();
34 void put ();
35
36 void close_tty ();
37
38 bool make_controlling_tty ();
39 void set_utf8_mode (bool on);
40 };
41
42 #endif
43