#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)getlogin.c 5.3 (Berkeley) %G%";
#endif LIBC_SCCS and not lint
static char UTMP
[] = "/etc/utmp";
if ((uf
= open(UTMP
, 0)) < 0)
lseek (uf
, (long)(me
*sizeof(ubuf
)), 0);
if (read(uf
, (char *)&ubuf
, sizeof (ubuf
)) != sizeof (ubuf
)) {
if (ubuf
.ut_name
[0] == '\0')
ubuf
.ut_name
[sizeof (ubuf
.ut_name
)] = ' ';
for (cp
= ubuf
.ut_name
; *cp
++ != ' '; )