* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
"@(#) Copyright (c) 1980 Regents of the University of California.\n\
static char sccsid
[] = "@(#)users.c 5.2 (Berkeley) %G%";
#define NMAX sizeof(utmp.ut_name)
#define LMAX sizeof(utmp.ut_line)
if ((fi
= fopen(s
, "r")) == NULL
) {
while (fread((char *)&utmp
, sizeof(utmp
), 1, fi
) == 1) {
if(utmp
.ut_name
[0] == '\0')
strncpy(temp
, utmp
.ut_name
, NMAX
);
*namp
= malloc(strlen(temp
) + 1);
qsort(names
, namp
- names
, sizeof names
[0], scmp
);
for (p
=names
; p
< namp
; p
++) {
if (namp
!= names
) /* at least one user */