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.15 by root, Wed Feb 16 21:21:43 2005 UTC vs.
Revision 1.16 by root, Wed Feb 16 21:37:10 2005 UTC

42#include "../config.h" /* NECESSARY */ 42#include "../config.h" /* NECESSARY */
43#include "rxvt.h" /* NECESSARY */ 43#include "rxvt.h" /* NECESSARY */
44#include "logging.h" 44#include "logging.h"
45#ifdef UTMP_SUPPORT 45#ifdef UTMP_SUPPORT
46 46
47#if HAVE_STRUCT_UTMP
47int rxvt_write_bsd_utmp (int utmp_pos, struct utmp *wu); 48int rxvt_write_bsd_utmp (int utmp_pos, struct utmp *wu);
48void rxvt_update_wtmp (const char *fname, const struct utmp *putmp); 49void rxvt_update_wtmp (const char *fname, const struct utmp *putmp);
50#endif
51
49void rxvt_update_lastlog (const char *fname, const char *pty, const char *host); 52void rxvt_update_lastlog (const char *fname, const char *pty, const char *host);
50 53
51/* 54/*
52 * BSD style utmp entry 55 * BSD style utmp entry
53 * ut_line, ut_name, ut_host, ut_time 56 * ut_line, ut_name, ut_host, ut_time
212# endif 215# endif
213# endif 216# endif
214# ifdef HAVE_STRUCT_UTMPX 217# ifdef HAVE_STRUCT_UTMPX
215# if HAVE_UPDWTMPX 218# if HAVE_UPDWTMPX
216 updwtmpx (RXVT_WTMPX_FILE, utx); 219 updwtmpx (RXVT_WTMPX_FILE, utx);
220# else
221 pututxline (utx);
217# endif 222# endif
218# endif 223# endif
219 } 224 }
220#endif 225#endif
221#if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE) 226#if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE)
291# endif 296# endif
292# endif 297# endif
293# ifdef HAVE_STRUCT_UTMPX 298# ifdef HAVE_STRUCT_UTMPX
294# if HAVE_UPDWTMPX 299# if HAVE_UPDWTMPX
295 updwtmpx (RXVT_WTMPX_FILE, utx); 300 updwtmpx (RXVT_WTMPX_FILE, utx);
301# else
302 pututxline (utx);
296# endif 303# endif
297# endif 304# endif
298 } 305 }
299#endif 306#endif
300 307
321/* ------------------------------------------------------------------------- */ 328/* ------------------------------------------------------------------------- */
322/* 329/*
323 * Write a BSD style utmp entry 330 * Write a BSD style utmp entry
324 */ 331 */
325#ifdef HAVE_UTMP_H 332#ifdef HAVE_UTMP_H
326/* INTPROTO */
327int 333int
328rxvt_write_bsd_utmp (int utmp_pos, struct utmp *wu) 334rxvt_write_bsd_utmp (int utmp_pos, struct utmp *wu)
329{ 335{
330 int fd; 336 int fd;
331 337
341 347
342/* ------------------------------------------------------------------------- */ 348/* ------------------------------------------------------------------------- */
343/* 349/*
344 * Update a BSD style wtmp entry 350 * Update a BSD style wtmp entry
345 */ 351 */
346#if defined(WTMP_SUPPORT) && !defined(HAVE_UPDWTMP) 352#if defined(WTMP_SUPPORT) && !defined(HAVE_UPDWTMP) && defined(HAVE_STRUCT_UTMP)
347/* INTPROTO */
348void 353void
349rxvt_update_wtmp (const char *fname, const struct utmp *putmp) 354rxvt_update_wtmp (const char *fname, const struct utmp *putmp)
350{ 355{
351 int fd, gotlock, retry; 356 int fd, gotlock, retry;
352 struct flock lck; /* fcntl locking scheme */ 357 struct flock lck; /* fcntl locking scheme */
384} 389}
385#endif 390#endif
386 391
387/* ------------------------------------------------------------------------- */ 392/* ------------------------------------------------------------------------- */
388#ifdef LASTLOG_SUPPORT 393#ifdef LASTLOG_SUPPORT
389/* INTPROTO */
390void 394void
391rxvt_update_lastlog (const char *fname, const char *pty, const char *host) 395rxvt_update_lastlog (const char *fname, const char *pty, const char *host)
392{ 396{
393# ifdef HAVE_STRUCT_LASTLOGX 397# ifdef HAVE_STRUCT_LASTLOGX
394 struct lastlogx llx; 398 struct lastlogx llx;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines