2 * getutline.c: not-quite-compatible replacement for getutline(3)
3 * by nathan bryant, feb 1999
11 #include <sys/types.h>
16 struct utmp *getutline(struct utmp *ut)
18 static struct utmp retval;
21 if ((utmp = fopen(_PATH_UTMP, "rb")) == NULL)
25 if (!fread(&retval, sizeof retval, 1, utmp))
30 while (strcmp(ut->ut_line, retval.ut_line));
35 #endif /* HAVE_UTMP_H */