--- rxvt-unicode/src/logging.h 2003/11/24 17:31:27 1.2 +++ rxvt-unicode/src/logging.h 2006/01/17 06:06:42 1.5 @@ -1,11 +1,23 @@ -/* - * $Id: logging.h,v 1.2 2003/11/24 17:31:27 pcg Exp $ - */ - -#ifndef _LOGGING_H_ -#define _LOGGING_H_ +#ifndef LOGGING_H_ +#define LOGGING_H_ #ifdef UTMP_SUPPORT +# if !defined(RXVT_UTMPX_FILE) || !defined(HAVE_STRUCT_UTMPX) +# undef HAVE_UTMPX_H +# undef HAVE_STRUCT_UTMPX +# endif +# if !defined(RXVT_UTMP_FILE) || !defined(HAVE_STRUCT_UTMP) +# undef HAVE_UTMP_H +# undef HAVE_STRUCT_UTMP +# endif + +# ifdef HAVE_UTMPX_H +# include +# endif +# ifdef HAVE_UTMP_H +# include +# endif + # if ! defined(HAVE_STRUCT_UTMPX) && ! defined(HAVE_STRUCT_UTMP) # error cannot build with utmp support - no utmp or utmpx struct found # endif @@ -13,6 +25,7 @@ # ifdef HAVE_LASTLOG_H # include # endif + # include # ifdef RXVT_UTMP_SYSV @@ -29,6 +42,26 @@ # define ut_name ut_user # endif -#include "logging.intpro" /* PROTOS for internal routines */ +struct rxvt_session +{ + int utmp_pos; + int cmd_pid; + bool login_shell; + +#ifdef HAVE_STRUCT_UTMP + struct utmp ut; +#endif +#ifdef HAVE_STRUCT_UTMPX + struct utmpx utx; #endif +#if (defined(HAVE_STRUCT_UTMP) && defined(HAVE_UTMP_PID)) || defined(HAVE_STRUCT_UTMPX) + char ut_id[5]; +#endif + + void login (const char *pty, int cmd_pid, bool login_shell, const char *hostname); + void logout (); +}; + +#endif + #endif /* _LOGGING_H_ */