summaryrefslogtreecommitdiff
path: root/src/who.c
AgeCommit message (Collapse)Author
2005-10-15(usage): Undocument deprecated --idle (-i) option.Jim Meyering
2005-09-22Include canon-host.h rather than declaring canon_host ourselves.Paul Eggert
2005-06-02Don't use "path" or "filename".Paul Eggert
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-03-30(who): New arg OPTIONS. All uses changed.Paul Eggert
(main): Check PIDs when invoked with zero or two arguments. Omit duplicate code in 2-arg case. (UT_PID): Moved to ../lib/readutmp.h.
2005-03-28(print_user): Use NULL, not `0'.Jim Meyering
2004-11-30(USER_PROCESS, RUN_LVL, INIT_PROCESS, LOGIN_PROCESS,Paul Eggert
DEAD_PROCESS, BOOT_TIME, NEW_TIME, UT_TYPE_UNDEF, UT_TYPE): Remove. (IS_USER_PROCESS): Move to ../lib/readutmp.h. (UT_TYPE_RUN_LVL, UT_TYPE_INIT_PROCESS, UT_TYPE_LOGIN_PROCESS, UT_TYPE_DEAD_PROCESS, UT_TYPE_NEW_TIME): New macros. (gethostname): Remove decl. (list_entries_who, scan_entries): Use the new macros defined above, for consistency with pinky, uptime, and users.
2004-11-16Fix memory leak.Paul Eggert
2004-09-21Remove unused "case 0".Paul Eggert
2004-08-03(scan_entries): 0 -> STDIN_FILENO.Paul Eggert
2004-08-02(do_lookup, short_list, short_output, include_idle,Paul Eggert
include_heading, include_mesg, include_exit, need_boottime, need_deadprocs, need_login, need_initspawn, need_clockchange, need_runlevel, need_users, my_line_only, main): Use bool for booleans. (print_runlevel): Use unsigned char for bytes. (list_entries_who, scan_entries, who): Use size_t for sizes. (main): No need to pass a non-NULL last arg to getopt_long.
2004-07-24(print_line): New arguments USERLEN and LINELEN, since USER and LINEPaul Eggert
might not be null terminated. All callers changed.
2004-06-23(idle_string, print_user): New arg boottime,Jim Meyering
specifying the most recent boot time. All uses changed. (idle_string) Consider a line to be "old" if it hasn't been used since the last boot time. Watch out for overflow when computing times, and for times in the future. (idle_string): Record latest boot time.
2004-06-22The 2004-06-19 fix for who and pinky was incomplete, as ctimeJim Meyering
has undefined behavior if the year precedes -999 or follows 9999. Since we have to stop using ctime anyway, we might as well use strftime and fix the FIXME, and support internationalized dates. Include "hard-locale.h". (time_format, time_format_width): New vars. (time_string, print_line): Use them. (main): Set them. (time_string): Use localtime + strftime instead of ctime, to avoid problems with years before -999 or after 9999.
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-06-20Don't dump core if ctime returns NULL; this is possible onJim Meyering
hosts with 64-bit time_t and 32-bit int. Include "inttostr.h". (time_string): If ctime fails, print the raw time as an integer instead of dumping core.
2004-06-20(print_line): Don't truncate user names at 8 bytes.Jim Meyering
Problem reported by Guido Leenders in: http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00056.html
2004-06-13(PIDSTR_DECL_AND_INIT): Don't assume pid_t fits in int.Jim Meyering
(UT_ID) [!HAVE_STRUCT_XTMP_UT_ID]: Remove bogus comment, as (sizeof "??") reliably returns 3. (print_line): Guard against idle and pid being too long (which is possible when printing headers). (print_user): Allocate enough bytes for idlestr. Use IDLESTR_LEN. Avoid unnecessary cast of sizeof to int. (make_id_equals_comment): Do not assume that UT_ID returns a string; it might return a non-null-terminated array. Use strncat instead. It's not very often where strncat is exactly what you want, but this is one of those rare cases.
2004-06-12(list_entries_who): Don't output a trailing space.Jim Meyering
2004-04-18(print_user): Use xrealloc here, rather than unchecked realloc.Jim Meyering
Remove anachronistic casts.
2004-03-29Include "vasprintf.h", for asprintf.Jim Meyering
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
2003-11-06(who): Free `utmp_buf' so there is no confusion aboutJim Meyering
whether it's leaked or not.
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-09-18revert previous changeJim Meyering
2003-09-18Update AUTHORS definition to be a comma-separated list of strings and/or updateJim Meyering
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-08-31Change meaning of -l from --lookup to --login, per POSIX.Jim Meyering
who's -l option has been eliciting an unconditional warning about this impending change since sh-utils-2.0.12 (April 2002).
2003-08-17Avoid unnecessary and sometimes time-consuming hostname lookups.Jim Meyering
(print_user): Likewise. This fixes a typo I introduced in who-users.c on 1996-02-23.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-07-04(print_line): Rewrite to use asprintf, in order to beJim Meyering
able to avoid emitting trailing blanks.
2003-06-28tweak comment to fit in 80 columnsJim Meyering
2003-06-17(main): Call initialize_main.Jim Meyering
2003-05-10(main): Handle argc < optind.Jim Meyering
2003-02-06(print_boottime, print_deadprocs, print_runlevel):Jim Meyering
Fix memory allocation arithmetic.
2002-09-14(print_user): Change type of local to size_tJim Meyering
to avoid warnings about `comparison between signed and unsigned'.
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-30Change `error (1, ...' to `error (EXIT_FAILURE, ...'.Jim Meyering
2002-07-27(UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Remove definitions.Jim Meyering
Now they're defined in readutmp.h. (print_deadprocs): Remove obsolete FIXME comment.
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-05-03(usage): Tweak description of --users.Jim Meyering
From Karl Eichwalder.
2002-04-28add comment for prev changeJim Meyering
2002-04-28(make_id_equals_comment): Cast sizeof expression (used as fieldJim Meyering
width argument) to `int'.
2002-04-28(PIDSTR_DECL_AND_INIT): Cast ut_pid value to int.Jim Meyering
2002-04-28Don't include xalloc.h.Jim Meyering
It's already included via system.h.
2002-04-16(UT_TYPE_UNDEF, UT_TYPE, IS_USER_PROCESS): Define.Jim Meyering
(print_line): Use "%-8.8s" for the format: the user name is not always NUL terminated. (scan_entries) [need_users]: Use IS_USER_PROCESS, so that this works even on systems without ut_type.
2002-04-16(BOOT_TIME): Define.Jim Meyering
(NEW_TIME): Define to 0, not INT_MAX. (UT_PID, UT_ID, UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define. Replace literal uses of ut_pid, ut_id, and ut_exit members with uses through macros. (make_id_equals_comment): New function, factored out of three others.
2002-04-15add FIXME commentsJim Meyering
2002-04-15Include xalloc.h.Jim Meyering
Use xmalloc everywhere, not malloc.