be crudely tolerant of crude tty emulators

This commit is contained in:
albert 2004-07-06 04:44:18 +00:00
parent 8f0175f0e8
commit 04e7814f9c
2 changed files with 21 additions and 14 deletions

1
NEWS
View File

@ -4,6 +4,7 @@ avoid warning about -lncurses when not linking -- thanks FLWM
ps: personality-specific -x support (HP-UX and SVR4-MP)
ps: k option, same as --sort
vmstat: fixed -d
top: try to handle terminals lacking rmam and smam
procps-3.2.0 --> procps-3.2.1

34
top.c
View File

@ -337,6 +337,9 @@ static void bye_bye (int eno, const char *str)
fflush(stdout);
#ifdef ATEOJ_REPORT
fprintf(stderr, "\n Screen_cols %d\n", Screen_cols);
fprintf(stderr,
"\nbye_bye's Summary report:"
"\n\tProgram"
@ -351,20 +354,6 @@ static void bye_bye (int eno, const char *str)
"\n\t Cap_can_goto = %s"
"\n\t Screen_cols = %d, Screen_rows = %d"
"\n\t Max_lines = %d, most recent Pseudo_size = %d"
#ifndef STDOUT_IOLBF
"\n\t Stdout_buf = %d, BUFSIZ = %u"
#endif
"\n\tWindows and Curwin->"
"\n\t sizeof(WIN_t) = %u, GROUPSMAX = %d"
"\n\t rc.winname = %s, grpname = %s"
#ifdef CASEUP_HEXES
"\n\t rc.winflags = %08X, maxpflgs = %d"
#else
"\n\t rc.winflags = %08x, maxpflgs = %d"
#endif
"\n\t rc.fieldscur = %s"
"\n\t winlines = %d, rc.maxtasks = %d, maxcmdln = %d"
"\n\t rc.sortindx = %d"
"\n"
, LINUX_VERSION_MAJOR(linux_version_code)
, LINUX_VERSION_MINOR(linux_version_code)
@ -383,6 +372,21 @@ static void bye_bye (int eno, const char *str)
, Cap_can_goto ? "yes" : "No!"
, Screen_cols, Screen_rows
, Max_lines, Pseudo_size
);
fprintf(stderr,
#ifndef STDOUT_IOLBF
"\n\t Stdout_buf = %d, BUFSIZ = %u"
#endif
"\n\tWindows and Curwin->"
"\n\t sizeof(WIN_t) = %u, GROUPSMAX = %d"
"\n\t rc.winname = %s, grpname = %s"
"\n\t rc.winflags = %08x, maxpflgs = %d"
"\n\t rc.fieldscur = %s"
"\n\t winlines = %d, rc.maxtasks = %d, maxcmdln = %d"
"\n\t rc.sortindx = %d"
"\n"
#ifndef STDOUT_IOLBF
, sizeof(Stdout_buf), (unsigned)BUFSIZ
#endif
@ -393,6 +397,8 @@ static void bye_bye (int eno, const char *str)
, Curwin->winlines, Curwin->rc.maxtasks, Curwin->maxcmdln
, Curwin->rc.sortindx
);
#endif
if (str) {