4 * getutline.c: not-quite-compatible replacement for getutline(3)
5 * by nathan bryant, feb 1999
16 #include <sys/types.h>
23 struct utmp *getutline(struct utmp *ut)
25 static struct utmp retval;
29 if ((utmp = fopen(UTMP_FILE, "rb")) == NULL)
31 if ((utmp = fopen(_PATH_UTMP, "rb")) == NULL)
36 if (!fread(&retval, sizeof retval, 1, utmp))
41 while (strcmp(ut->ut_line, retval.ut_line));
46 #endif /* HAVE_UTMP_H */