This source patch addresses the following:
Enhancements
. added -w command line switch, with optional argument
( offers complete control over width and height, in )
( combination with env variables COLUMNS= and LINES= )
. updated man document to reflect the new capability
. reengineered Fields Management to be more flexible
thus no longer requiring a normal sized tty
Buglets fixed
. forced View_SCROLL off when in 'Batch' mode
. for narrow xterm, fixed return val in show_pmt
. for narrow xterm, fixed cursor pos in linein
. added a window specific end-of-line termcap ptr
( so clr_eol does not overwrite last printable char )
Cosmetic changes
. eliminated TTYGETENVYES define, incorporated as -w
. eliminated RESIZE_LIMIT define, no longer needed
. eliminated FIELD_CURSOR define, no longer possible
. eliminated extra text on Fields Management screen
. fixed miscellaneous man document typos/formatting
Signed-off-by: Jan Görig <jgorig@redhat.com>
Library Changes
. added PROC_EDITCMDLCVT flag
. added an internal (static) fill_cmdline_cvt function:
- reads and "escapes" /proc/#/cmdline
- returns result as a single string in a single vector
- callers are guaranteed a cmdline (no more NULL)
. added vectorize_this_str function, exploited by
fill_cgroup_cvt, fill_cmdline_cvt
. generalized read_cmdline function as read_unvectored, now
exploited by fill_cgroup_cvt, fill_cmdline_cvt, read_cmdline
( cgroup and cmdline no longer need be converted to string )
( vectors before being transformed to final representation )
. fixed bug regarding skipped group numbers (when enabled)
. escape_str made responsible for all single byte translation
with distinction between control chars + other unprintable
. added escaped_copy function for already escaped strings
. reorganized parts of proc_t to restore formatting standards
( displacement changes shouldn't matter with new version # )
. former ZAP_SUSEONLY #define now OOMEM_ENABLE
. added to library.map: escaped_copy; read_cmdline
Top Program Changes
. exploited the new PROC_EDITCMDLCVT provision
. eliminated now obsolete #include "proc/escape.h"
. changed the P_WCH display format if no kernel symbol table
. fixed very old bug in lflgs for out-of-view sort fields
. former ZAP_SUSEONLY #define now OOMEM_ENABLE
Ps Program Changes
. exploited the new PROC_EDITCMDLCVT provision
. exploited the new escaped_copy function
. consolidated pr_args and pr_comm into pr_argcom
Signed-off-by: Jan Görig <jgorig@redhat.com>
This source patchset addresses the following:
Library Extension (readproc)
. added PROC_EDITCGRPCVT flag
. added an internal (static) fill_cgroup_cvt function:
. reads AND parses /proc/#/cgroup
. returns result as a single string in a single vector
. thus no changes to proc_t structure or free memory logic
Program Enhancements (top)
. removed parse_cgroup logic in favor of libproc
. eliminated cgroup sort recurring overhead
. converted WCHAN field to variable width
. generalized variable width field logic in task_show
. real-time notation under P col more distinctive as 'rt'
Program Cosmetic (top)
. CGROUP now known as CGROUPS (plural)
. moved jan's attribution from top.c to 'Notes' in top.h
. numerous comments tweaked
Document Enhancements (top)
. documented CGROUPS field (required renumbering all fields)
. adapted narratives for the 3 current variable width fields
. expanded real-time scheduling notes, 'RT' now shown as 'rt'
Signed-off-by: Jan Görig <jgorig@redhat.com>
This source patch addresses the following:
Conceivable Buglets Avoided
. added sanity checks for previous assumptions re: pid size, num cpus
. changed response for rcfile errors to fatal, vs. silent default
Enhancements
. reorganized WIN_t struct for reduced padding and better readability
. generalized code for multiple var-width cols (divorced from pflags)
. absorbed jan gorig's cgroup patch, with attribution
Cosmetic
. reduced numerous #ifdef directives, especially in calibrate_fields
The documentation portion of the patch addresses the following:
README.top
. corrected a minor typo
. updated to reflect current patch level
top.1
. fixed potentially misinterpreted Me/ME strings
. added '.Bd -literal' directives for indented fixed-width font
. some comments changed from \# to .\" to avoid man2html problems
The source portion of the patch addresses the following:
Buglets
. header/task output length now consistent
. fixed 2 obscure horizontal scrolling bugs
. fixed potential bug regarding 'help' and 'current' window
. messages and prompts are now also sensitive to terminal width
. normalized buffer names/sizes now accommodate any SCREENMAX changes
Features
. made %CPU and 'i' mode handling more efficient
. for input the Up/Dn arrows keys act as alternatives to Ins/Del keys
. an optional USE_X_COLHDR define eliminates ALL 'x' toggle overhead
. an optional ZAP_SUSEONLY define was added for Werner's modifications
Cosmetic
. defines and format for optional end-of-job reports standardized