static char sccsid
[] = "@(#)uulog.c 5.1 (Berkeley) %G%";
static char SYSBUF
[BUFSIZ
];
* -s - system name for search
* -u - user name for search
char buf
[BUFSIZ
], u
[20], s
[20];
strcpy(Progname
, "uulog");
while (argc
>1 && argv
[1][0] == '-') {
if (*system
== NULL
&& argc
> 2 && argv
[2][0] != '-') {
if (*user
== NULL
&& argc
> 2 && argv
[2][0] != '-') {
printf("unknown flag %s\n", argv
[1]); break;
if (user
== NULL
&& system
== NULL
) {
fprintf(stderr
, "usage: uulog [-u user] [-s system]\n");
/* chmod(LOGFILE, 0666); rm-ed by rti!trt */
plogf
= fopen(LOGFILE
, "r");
ASSERT(plogf
!= NULL
, "CAN NOT OPEN", LOGFILE
, 0);
while (fgets(buf
, BUFSIZ
, plogf
) != NULL
) {
sscanf(buf
, "%s%s", u
, s
);
if (user
!= NULL
&& !prefix(user
, u
))
if (system
!= NULL
&& !prefix(system
, s
))