--- rxvt-unicode/src/libptytty.h 2006/01/23 12:05:12 1.3 +++ rxvt-unicode/src/libptytty.h 2007/02/12 17:34:58 1.8 @@ -6,7 +6,7 @@ #ifdef __cplusplus -// c++ api +// C++ API struct ptytty { int pty; // pty file descriptor; connected to rxvt @@ -23,6 +23,7 @@ bool make_controlling_tty (); void set_utf8_mode (bool on); + static void sanitise_stdfd (); static void init (); static ptytty *create (); // create a new pty object @@ -42,19 +43,23 @@ #else -// c api -int ptytty_pty (void *ptytty); -int ptytty_tty (void *ptytty); -void ptytty_delete (void *ptytty); -int ptytty_get (void *ptytty); -void ptytty_login (void *ptytty, int cmd_pid, bool login_shell, const char *hostname); - -void ptytty_close_tty (void *ptytty); -int ptytty_make_controlling_tty (void *ptytty); -void ptytty_set_utf8_mode (void *ptytty, int on); +// C API +typedef void *PTYTTY; + +int ptytty_pty (PTYTTY ptytty); +int ptytty_tty (PTYTTY ptytty); +void ptytty_delete (PTYTTY ptytty); +int ptytty_get (PTYTTY ptytty); +void ptytty_login (PTYTTY ptytty, int cmd_pid, int login_shell, const char *hostname); + +void ptytty_close_tty (PTYTTY ptytty); +int ptytty_make_controlling_tty (PTYTTY ptytty); +void ptytty_set_utf8_mode (PTYTTY ptytty, int on); + +void ptytty_sanitise_stdfd (); void ptytty_init (); -void *ptytty_create (); +PTYTTY ptytty_create (); void ptytty_drop_privileges (); void ptytty_use_helper ();