=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/who/who.c,v retrieving revision 1.18 retrieving revision 1.19 diff -c -r1.18 -r1.19 *** src/usr.bin/who/who.c 2009/10/27 23:59:50 1.18 --- src/usr.bin/who/who.c 2010/11/15 10:57:49 1.19 *************** *** 1,4 **** ! /* $OpenBSD: who.c,v 1.18 2009/10/27 23:59:50 deraadt Exp $ */ /* $NetBSD: who.c,v 1.4 1994/12/07 04:28:49 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: who.c,v 1.19 2010/11/15 10:57:49 otto Exp $ */ /* $NetBSD: who.c,v 1.4 1994/12/07 04:28:49 jtc Exp $ */ /* *************** *** 59,66 **** int show_quick; /* quick, names only */ #define NAME_WIDTH 8 ! #define HOST_WIDTH 32 int main(int argc, char *argv[]) { --- 59,68 ---- int show_quick; /* quick, names only */ #define NAME_WIDTH 8 ! #define HOST_WIDTH 45 + int hostwidth = HOST_WIDTH; + int main(int argc, char *argv[]) { *************** *** 100,105 **** --- 102,112 ---- if (show_quick) { only_current_term = show_term = show_idle = show_labels = 0; } + + if (show_term) + hostwidth -= 2; + if (show_idle) + hostwidth -= 6; if (show_labels) output_labels(); *************** *** 245,251 **** } if (*up->ut_host) ! printf(" (%.*s)", HOST_WIDTH, up->ut_host); (void)putchar('\n'); } --- 252,258 ---- } if (*up->ut_host) ! printf(" (%.*s)", hostwidth, up->ut_host); (void)putchar('\n'); } *************** *** 263,269 **** if (show_idle) (void)printf("IDLE "); ! (void)printf(" %.*s", HOST_WIDTH, "FROM"); (void)putchar('\n'); } --- 270,276 ---- if (show_idle) (void)printf("IDLE "); ! (void)printf(" %.*s", hostwidth, "FROM"); (void)putchar('\n'); }