#include <sys/types.h>#include <signal.h>#include <string.h>#include <utmp.h>#include <time.h>#include <stdlib.h>#include <stdio.h>#include <errno.h>#include <minix/paths.h>Include dependency graph for last.c:

Go to the source code of this file.
Data Structures | |
| struct | logout |
Defines | |
| #define | FALSE 0 |
| #define | TRUE 1 |
| #define | RLOGIN 1 |
| #define | BUFFER_SIZE 4096 |
| #define | MAX_WTMP_COUNT ( BUFFER_SIZE / sizeof(struct utmp) ) |
| #define | min(a, b) ( (a < b) ? a : b ) |
| #define | max(a, b) ( (a > b) ? a : b ) |
| #define | NLOADS 3 |
Functions | |
| _PROTOTYPE (int main,(int argc, char **argv)) | |
| _PROTOTYPE (void Sigint,(int sig)) | |
| _PROTOTYPE (void usage,(void)) | |
| _PROTOTYPE (void Process,(struct utmp *wtmp)) | |
| _PROTOTYPE (int Print_Record,(struct utmp *wtmp)) | |
| _PROTOTYPE (void Print_Duration,(long from, long to)) | |
| void | Sigint (int sig) |
| void | Sigquit (int sig) |
| void | usage () |
| void | Process (struct utmp *wtmp) |
| int | Print_Record (struct utmp *wtmp) |
| void | Print_Duration (long from, long to) |
| void | Print_Uptime () |
| void | Record_Logout_Time (struct utmp *wtmp) |
| int | main (int argc, argv) |
Variables | |
| static char * | Version = "@(#) LAST 1.7 (10/24/92)" |
| char | boot_limit = FALSE |
| char | count_limit = FALSE |
| char | tell_uptime = FALSE |
| int | print_count |
| char * | prog |
| int | arg_count |
| char ** | args |
| long | boot_time = 0 |
| char * | boot_down |
| logout * | first_link = NULL |
| int | interrupt = FALSE |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 67 of file last.c. Referenced by main(). |
|
|
|
|
|
Referenced by Print_Uptime(), and showtop(). |
|
|
Definition at line 64 of file last.c. Referenced by Print_Record(). |
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 390 of file last.c. References _PATH_WTMP, arg_count, args, atoi, boot_limit, count_limit, ctime(), exit(), f, FALSE, fopen(), fprintf(), fread(), fseek(), ftell(), int(), interrupt, L, long(), MAX_WTMP_COUNT, min, NULL, perror(), print_count, printf, Process(), prog, SIG_IGN, SIGINT, signal(), SIGQUIT, size, stderr, strcmp, strrchr(), tell_uptime, time, time_t, TRUE, usage, and utmp::ut_time. |
|
||||||||||||
|
|
|
|
Definition at line 248 of file last.c. References arg_count, args, count_limit, ctime(), exit(), FALSE, i, if(), print_count, printf, RLOGIN, strncmp(), tell_uptime, and TRUE. Referenced by Process(). |
|
|
Definition at line 309 of file last.c. References _PATH_UTMP, boot_time, days, errno, exit(), fclose(), fopen(), fprintf(), fread(), getloadavg(), i, L, localtime(), NLOADS, now, NULL, printf, prog, stderr, strerror(), time, time_t, tm::tm_hour, tm::tm_min, and USER_PROCESS. Referenced by Process(). |
|
|
Definition at line 175 of file last.c. References boot_down, boot_limit, boot_time, exit(), first_link, fprintf(), free, link, NULL, Print_Record(), Print_Uptime(), prog, putchar, stderr, strcmp, strncmp(), strncpy(), and tell_uptime. |
|
|
Definition at line 365 of file last.c. References first_link, link, NULL, and strncmp(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 89 of file last.c. Referenced by do_up(), main(), and Print_Record(). |
|
|
|
|
|
Definition at line 94 of file last.c. Referenced by Process(). |
|
|
|
|
|
Definition at line 93 of file last.c. Referenced by Print_Uptime(), and Process(). |
|
|
Definition at line 85 of file last.c. Referenced by main(), and Print_Record(). |
|
|
Definition at line 95 of file last.c. Referenced by Process(), and Record_Logout_Time(). |
|
|
|
|
|
Definition at line 87 of file last.c. Referenced by main(), and Print_Record(). |
|
|
|
|
|
Definition at line 86 of file last.c. Referenced by main(), Print_Record(), and Process(). |
|
|
|
1.4.6