PROJECT PLAN for CSCI-e215 Assignment 1: "almost ac"

2/16/2002

Russell J Lowke


Project: aac


Purpose: To mimick the ac command, implementing login times and external 
         data with -w option


Outline:

        "Outputs connect-session records"

        aac creates a list for each user.  This list contains the id 
        number, logIn and logOut time for all sessions, concurrent or 
        otherwise.  Total log times are calculated for each user listed, 
        then a total log time is made and printed in a single printF


Output:

	Output is a single print statement showing total hours(two decimal 
        places), that the users listed were/are logged for.


Arguments:

	acc accepts a list of users to calculate their total login time.
        There is also a -w option to read from an external data 
        file(struct), Default file used is the UTMP_FILE.


Input:

        Argument list of users and an optional external (-w) data file. 


Data Structures:

        acc reads the UTMP_FILE or selected external data file via 
        aacbuffer. Data is analyzed line by line looking for key user names
        and id's. Sets of user times are stored in a struct linked list, 
        each struct holding the id, the logIn time and the logOut time. 
        Once a users list is complete a tally is made of the times.


Files:
        See Arguments and Input sections above.
