--- rxvt-unicode/src/logging.C 2003/11/24 17:28:08 1.1 +++ rxvt-unicode/src/logging.C 2003/11/25 11:52:42 1.3 @@ -1,7 +1,7 @@ /*--------------------------------*-C-*---------------------------------* * File: logging.c *----------------------------------------------------------------------* - * $Id: logging.C,v 1.1 2003/11/24 17:28:08 pcg Exp $ + * $Id: logging.C,v 1.3 2003/11/25 11:52:42 pcg Exp $ * * All portions of code are copyright by their respective author/s. * Copyright (c) 1992 John Bovey @@ -61,10 +61,10 @@ rxvt_makeutent(pR_ const char *pty, const char *hostname) { #ifdef HAVE_STRUCT_UTMP - struct utmp *ut = &(R->h->ut); + struct utmp *ut = &(R->ut); #endif #ifdef HAVE_STRUCT_UTMPX - struct utmpx *utx = &(R->h->utx); + struct utmpx *utx = &(R->utx); #endif #ifdef HAVE_UTMP_PID int i; @@ -94,7 +94,7 @@ STRNCPY(ut->ut_id, ut_id, sizeof(ut->ut_id)); ut->ut_type = DEAD_PROCESS; getutid(ut); /* position to entry in utmp file */ - STRNCPY(R->h->ut_id, ut_id, sizeof(R->h->ut_id)); + STRNCPY(R->ut_id, ut_id, sizeof(R->ut_id)); # endif #endif @@ -104,7 +104,7 @@ STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id)); utx->ut_type = DEAD_PROCESS; getutxid(utx); /* position to entry in utmp file */ - STRNCPY(R->h->ut_id, ut_id, sizeof(R->h->ut_id)); + STRNCPY(R->ut_id, ut_id, sizeof(R->ut_id)); #endif #ifdef HAVE_STRUCT_UTMP @@ -115,14 +115,14 @@ sizeof(ut->ut_user)); STRNCPY(ut->ut_id, ut_id, sizeof(ut->ut_id)); ut->ut_time = time(NULL); - ut->ut_pid = R->h->cmd_pid; + ut->ut_pid = R->cmd_pid; # ifdef HAVE_UTMP_HOST STRNCPY(ut->ut_host, hostname, sizeof(ut->ut_host)); # endif ut->ut_type = USER_PROCESS; pututline(ut); endutent(); /* close the file */ - R->h->utmp_pos = 0; + R->utmp_pos = 0; # else STRNCPY(ut->ut_name, (pwent && pwent->pw_name) ? pwent->pw_name : "?", sizeof(ut->ut_name)); @@ -140,7 +140,7 @@ utx->ut_session = getsid(0); utx->ut_tv.tv_sec = time(NULL); utx->ut_tv.tv_usec = 0; - utx->ut_pid = R->h->cmd_pid; + utx->ut_pid = R->cmd_pid; # ifdef HAVE_UTMPX_HOST STRNCPY(utx->ut_host, hostname, sizeof(utx->ut_host)); # if 0 @@ -155,7 +155,7 @@ utx->ut_type = USER_PROCESS; pututxline(utx); endutxent(); /* close the file */ - R->h->utmp_pos = 0; + R->utmp_pos = 0; #endif #if defined(HAVE_STRUCT_UTMP) && !defined(HAVE_UTMP_PID) @@ -164,7 +164,7 @@ # ifdef HAVE_TTYSLOT i = ttyslot(); if (rxvt_write_bsd_utmp(i, ut)) - R->h->utmp_pos = i; + R->utmp_pos = i; # else FILE *fd0; @@ -178,7 +178,7 @@ if (!STRCMP(ut->ut_line, name)) { if (!rxvt_write_bsd_utmp(i, ut)) i = 0; - R->h->utmp_pos = i; + R->utmp_pos = i; fclose(fd0); break; } @@ -222,17 +222,17 @@ rxvt_cleanutent(pR) { #ifdef HAVE_STRUCT_UTMP - struct utmp *ut = &(R->h->ut); + struct utmp *ut = &(R->ut); #endif #ifdef HAVE_STRUCT_UTMPX - struct utmpx *tmputx, *utx = &(R->h->utx); + struct utmpx *tmputx, *utx = &(R->utx); #endif #ifdef HAVE_STRUCT_UTMP # ifdef HAVE_UTMP_PID MEMSET(ut, 0, sizeof(struct utmp)); setutent(); - STRNCPY(ut->ut_id, R->h->ut_id, sizeof(ut->ut_id)); + STRNCPY(ut->ut_id, R->ut_id, sizeof(ut->ut_id)); ut->ut_type = USER_PROCESS; { struct utmp *tmput = getutid(ut); @@ -253,7 +253,7 @@ #ifdef HAVE_STRUCT_UTMPX MEMSET(utx, 0, sizeof(struct utmpx)); setutxent(); - STRNCPY(utx->ut_id, R->h->ut_id, sizeof(utx->ut_id)); + STRNCPY(utx->ut_id, R->ut_id, sizeof(utx->ut_id)); utx->ut_type = USER_PROCESS; if ((tmputx = getutxid(utx))) /* position to entry in utmp file */ utx = tmputx; @@ -289,16 +289,16 @@ */ #ifdef HAVE_STRUCT_UTMP # ifdef HAVE_UTMP_PID - if (ut->ut_pid == R->h->cmd_pid) + if (ut->ut_pid == R->cmd_pid) pututline(ut); endutent(); # else MEMSET(ut, 0, sizeof(struct utmp)); - rxvt_write_bsd_utmp(R->h->utmp_pos, ut); + rxvt_write_bsd_utmp(R->utmp_pos, ut); # endif #endif #ifdef HAVE_STRUCT_UTMPX - if (utx->ut_pid == R->h->cmd_pid) + if (utx->ut_pid == R->cmd_pid) pututxline(utx); endutxent(); #endif