ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/libptytty.h
(Generate patch)

Comparing rxvt-unicode/src/libptytty.h (file contents):
Revision 1.1 by root, Sun Jan 22 09:57:48 2006 UTC vs.
Revision 1.8 by root, Mon Feb 12 17:34:58 2007 UTC

1// This file is part of libptytty. Do not make local modifications. 1// This file is part of libptytty. Do not make local modifications.
2// http://software.schmorp.de/pkg/libptytty 2// http://software.schmorp.de/pkg/libptytty
3 3
4#ifndef LIBPTYTTY_H_ /* public libptytty header file */ 4#ifndef LIBPTYTTY_H_ /* public libptytty header file */
5#define LIBPTYTTY_H_ 5#define LIBPTYTTY_H_
6
7#ifdef __cplusplus
8
9// C++ API
6 10
7struct ptytty { 11struct ptytty {
8 int pty; // pty file descriptor; connected to rxvt 12 int pty; // pty file descriptor; connected to rxvt
9 int tty; // tty file descriptor; connected to child 13 int tty; // tty file descriptor; connected to child
10 14
17 21
18 void close_tty (); 22 void close_tty ();
19 bool make_controlling_tty (); 23 bool make_controlling_tty ();
20 void set_utf8_mode (bool on); 24 void set_utf8_mode (bool on);
21 25
26 static void sanitise_stdfd ();
22 static void init (); 27 static void init ();
23 static ptytty *create (); // create a new pty object 28 static ptytty *create (); // create a new pty object
24 29
25 static void drop_privileges (); 30 static void drop_privileges ();
26 static void use_helper (); 31 static void use_helper ();
27 32
28 static int send_fd (int socket, int fd); 33 static bool send_fd (int socket, int fd);
29 static int recv_fd (int socket); 34 static int recv_fd (int socket);
30 35
31protected: 36protected:
32 37
33 ptytty () 38 ptytty ()
34 : pty(-1), tty(-1) 39 : pty(-1), tty(-1)
35 { 40 {
36 } 41 }
37}; 42};
38 43
44#else
45
46// C API
47
48typedef void *PTYTTY;
49
50int ptytty_pty (PTYTTY ptytty);
51int ptytty_tty (PTYTTY ptytty);
52void ptytty_delete (PTYTTY ptytty);
53int ptytty_get (PTYTTY ptytty);
54void ptytty_login (PTYTTY ptytty, int cmd_pid, int login_shell, const char *hostname);
55
56void ptytty_close_tty (PTYTTY ptytty);
57int ptytty_make_controlling_tty (PTYTTY ptytty);
58void ptytty_set_utf8_mode (PTYTTY ptytty, int on);
59
60void ptytty_sanitise_stdfd ();
61void ptytty_init ();
62PTYTTY ptytty_create ();
63
64void ptytty_drop_privileges ();
65void ptytty_use_helper ();
66
39#endif 67#endif
40 68
69#endif
70

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines