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.6 by root, Wed Jan 25 10:51:26 2006 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
23 static ptytty *create (); // create a new pty object 27 static ptytty *create (); // create a new pty object
24 28
25 static void drop_privileges (); 29 static void drop_privileges ();
26 static void use_helper (); 30 static void use_helper ();
27 31
28 static int send_fd (int socket, int fd); 32 static bool send_fd (int socket, int fd);
29 static int recv_fd (int socket); 33 static int recv_fd (int socket);
30 34
31protected: 35protected:
32 36
33 ptytty () 37 ptytty ()
34 : pty(-1), tty(-1) 38 : pty(-1), tty(-1)
35 { 39 {
36 } 40 }
37}; 41};
38 42
43#else
44
45// c api
46
47typedef void *PTYTTY;
48
49int ptytty_pty (PTYTTY ptytty);
50int ptytty_tty (PTYTTY ptytty);
51void ptytty_delete (PTYTTY ptytty);
52int ptytty_get (PTYTTY ptytty);
53void ptytty_login (PTYTTY ptytty, int cmd_pid, int login_shell, const char *hostname);
54
55void ptytty_close_tty (PTYTTY ptytty);
56int ptytty_make_controlling_tty (PTYTTY ptytty);
57void ptytty_set_utf8_mode (PTYTTY ptytty, int on);
58
59void ptytty_init ();
60PTYTTY ptytty_create ();
61
62void ptytty_drop_privileges ();
63void ptytty_use_helper ();
64
39#endif 65#endif
40 66
67#endif
68

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines