// aac.h

#define	YES	1
#define	NO	0

#include    <stdio.h>
#include    <stdlib.h>
#include    <sys/types.h>
#include    <utmp.h>
#include    <time.h>
#include    <fcntl.h>
#include    <string.h>
#include    <ctype.h>

//	linked list of structs
//
struct link {
	char        *id;                          // id       of log entry
	int          inTime;                      // in-time  of log entry
        int          outTime;                     // out-time of log entry
	struct link *next;                        // pointer to next link
};

void         fatal(char *errStr);
void         dumpfile( char *fileName, char *userName );
void         readUtpLine( struct utmp *rp, char *userName );
int          newEntry(char *id, int myInTime );
void         printLList();
void         emptyList();
float        tallyList();
struct link *lookup( char *str );
void         show_utrec( struct utmp *rp );
char        *typename( int typenum );
int          utmp_open( char *filename );
struct utmp *utmp_next();
int          utmp_reload();
void         utmp_close();