From 070ecb47a6bc7ee017ca872ea2294952da7be94b Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 9 Oct 1996 18:42:10 +0000 Subject: (ps_cmp_unames, ps_nominal_string): New declarations. (DEFAULT_FMT_STRING): Add %pid. (_w_specs): Use ps_cmp_unames for `Name'. Use ps_nominal_string for `Name' and `From'. --- utils/w.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'utils') diff --git a/utils/w.c b/utils/w.c index eadb99c0..16b56291 100644 --- a/utils/w.c +++ b/utils/w.c @@ -43,7 +43,7 @@ #include "psout.h" -#define DEFAULT_FMT_STRING "%^%user %tty %from %login %idle %what" +#define DEFAULT_FMT_STRING "%^%user %tty %from %login %idle %pid %what" extern char *canon_host (char *host); extern char *shared_domain (char *host1, char *host2); @@ -229,13 +229,14 @@ const struct ps_getter w_host_getter = extern error_t ps_emit_past_time (), ps_emit_string (), ps_emit_minutes (); extern error_t ps_emit_user_name (); -extern int ps_cmp_times (), ps_cmp_strings (); +extern int ps_cmp_times (), ps_cmp_strings (), ps_cmp_unames (); +extern int ps_nominal_string (); const struct ps_fmt_spec _w_specs[] = { {"User", 0, 8, -1,0, &w_uname_getter,ps_emit_string, ps_cmp_strings}, - {"Name", 0, 20, -1,0, &w_user_getter, ps_emit_user_name,ps_cmp_strings}, + {"Name", 0, 16, -1,0, &w_user_getter, ps_emit_user_name,ps_cmp_unames,ps_nominal_string}, {"Login","Login@", -7, -1,0,&w_login_getter,ps_emit_past_time,ps_cmp_times}, - {"From", 0, 16, -1,0, &w_host_getter, ps_emit_string, ps_cmp_strings}, + {"From", 0, 14, -1,0, &w_host_getter, ps_emit_string, ps_cmp_strings, ps_nominal_string}, {"Idle", 0, -5, -1,PS_FMT_FIELD_COLON_MOD, &w_idle_getter, ps_emit_minutes,ps_cmp_times}, {"What=args"}, {0} -- cgit v1.2.3