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

Comparing rxvt-unicode/src/logging.C (file contents):
Revision 1.16 by root, Wed Feb 16 21:37:10 2005 UTC vs.
Revision 1.19 by root, Sat Dec 31 17:16:17 2005 UTC

73 struct utmpx *utx = &this->utx; 73 struct utmpx *utx = &this->utx;
74#endif 74#endif
75#ifdef HAVE_UTMP_PID 75#ifdef HAVE_UTMP_PID
76 int i; 76 int i;
77#endif 77#endif
78 struct passwd *pwent = getpwuid (getuid ()); 78 struct passwd *pwent = getpwuid (getuid ());
79 79
80 if (!strncmp (pty, "/dev/", 5)) 80 if (!strncmp (pty, "/dev/", 5))
81 pty += 5; /* skip /dev/ prefix */ 81 pty += 5; /* skip /dev/ prefix */
82 82
83#ifdef HAVE_UTMP_PID 83#ifdef HAVE_UTMP_PID
176# else 176# else
177 FILE *fd0; 177 FILE *fd0;
178 178
179 if ((fd0 = fopen (TTYTAB_FILENAME, "r")) != NULL) 179 if ((fd0 = fopen (TTYTAB_FILENAME, "r")) != NULL)
180 { 180 {
181 char buf[256], name[256]; 181 char buf[256], name[256];
182 182
183 buf[sizeof (buf) - 1] = '\0'; 183 buf[sizeof (buf) - 1] = '\0';
184 for (i = 1; (fgets (buf, sizeof (buf) - 1, fd0) != NULL);) 184 for (i = 1; (fgets (buf, sizeof (buf) - 1, fd0) != NULL);)
185 { 185 {
186 if (*buf == '#' || sscanf (buf, "%s", name) != 1) 186 if (*buf == '#' || sscanf (buf, "%s", name) != 1)
202 } 202 }
203#endif 203#endif
204 204
205#ifdef WTMP_SUPPORT 205#ifdef WTMP_SUPPORT
206# ifdef WTMP_ONLY_ON_LOGIN 206# ifdef WTMP_ONLY_ON_LOGIN
207 if (options & Opt_loginShell) 207 if (OPTION (Opt_loginShell))
208# endif 208# endif
209 { 209 {
210# ifdef HAVE_STRUCT_UTMP 210# ifdef HAVE_STRUCT_UTMP
211# ifdef HAVE_UPDWTMP 211# ifdef HAVE_UPDWTMP
212 updwtmp (RXVT_WTMP_FILE, ut); 212 updwtmp (RXVT_WTMP_FILE, ut);
222# endif 222# endif
223# endif 223# endif
224 } 224 }
225#endif 225#endif
226#if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE) 226#if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE)
227 if (options & Opt_loginShell) 227 if (OPTION (Opt_loginShell))
228 rxvt_update_lastlog (RXVT_LASTLOG_FILE, pty, hostname); 228 rxvt_update_lastlog (RXVT_LASTLOG_FILE, pty, hostname);
229#endif 229#endif
230} 230}
231 231
232/* ------------------------------------------------------------------------- */ 232/* ------------------------------------------------------------------------- */
283 /* 283 /*
284 * Write ending wtmp entry 284 * Write ending wtmp entry
285 */ 285 */
286#ifdef WTMP_SUPPORT 286#ifdef WTMP_SUPPORT
287# ifdef WTMP_ONLY_ON_LOGIN 287# ifdef WTMP_ONLY_ON_LOGIN
288 if (options & Opt_loginShell) 288 if (OPTION (Opt_loginShell))
289# endif 289# endif
290 { 290 {
291# ifdef HAVE_STRUCT_UTMP 291# ifdef HAVE_STRUCT_UTMP
292# ifdef HAVE_UPDWTMP 292# ifdef HAVE_UPDWTMP
293 updwtmp (RXVT_WTMP_FILE, ut); 293 updwtmp (RXVT_WTMP_FILE, ut);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines