=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/display.c,v retrieving revision 1.32 retrieving revision 1.33 diff -c -r1.32 -r1.33 *** src/usr.bin/top/display.c 2007/11/22 11:01:04 1.32 --- src/usr.bin/top/display.c 2007/11/30 10:39:01 1.33 *************** *** 1,4 **** ! /* $OpenBSD: display.c,v 1.32 2007/11/22 11:01:04 otto Exp $ */ /* * Top users/processes display for Unix --- 1,4 ---- ! /* $OpenBSD: display.c,v 1.33 2007/11/30 10:39:01 otto Exp $ */ /* * Top users/processes display for Unix *************** *** 105,113 **** extern int ncpu; int Header_lines; ! static enum { ! OFF, ON, ERASE ! } header_status = ON; static int empty(void) --- 105,111 ---- extern int ncpu; int Header_lines; ! int header_status = Yes; static int empty(void) *************** *** 444,451 **** } } - static int header_length; - /* * *_header(text) - print the header for the process area */ --- 442,447 ---- *************** *** 453,460 **** void i_header(char *text) { ! header_length = strlen(text); ! if (header_status == ON && (screen_length > y_header || !smart_terminal)) { if (!smart_terminal) { putn(); --- 449,455 ---- void i_header(char *text) { ! if (header_status == Yes && (screen_length > y_header || !smart_terminal)) { if (!smart_terminal) { putn(); *************** *** 466,473 **** clrtoeol(); addstrp(text); } - } else if (header_status == ERASE) { - header_status = OFF; } } --- 461,466 ---- *************** *** 512,524 **** } void ! display_header(int t) { ! if (t) { ! header_status = ON; ! } else if (header_status == ON) { ! header_status = ERASE; ! } } void --- 505,513 ---- } void ! display_header(int status) { ! header_status = status; } void