2 * getutline.c: not-quite-compatible replacement for getutline(3)
3 * by nathan bryant, feb 1999
16 struct utmp *getutline(struct utmp *ut)
18 static struct utmp retval;
22 if ((utmp = fopen(UTMP_FILE, "rb")) == NULL)
24 if ((utmp = fopen(_PATH_UTMP, "rb")) == NULL)
29 if (!fread(&retval, sizeof retval, 1, utmp))
34 while (strcmp(ut->ut_line, retval.ut_line));
39 #endif /* HAVE_UTMP_H */