189750SdwmaloneThu Mar 30 2000 - wnl (3.5beta12)
289750Sdwmalone	Updated modules: m_aix41.c, m_aix43.c, m_mtxinu.c, m_sco5.c,
389750Sdwmalone	and m_ultrix4.c.
489750Sdwmalone	Included m_irixsgi.c from some source that's been floating around
589750Sdwmalone	SGI.  Don't yet know how it compares to m_irix62.
689750Sdwmalone
789750SdwmaloneFri Mar 10 2000 - wnl (3.5beta11)
889750Sdwmalone	top.c: avoid potential loop if stdout gets closed, use macro
989750Sdwmalone	for p_active to avoid collision with system macros.
1089750Sdwmalone	m_sunos5: widened some fields to accomodate 5.8.
1189750Sdwmalone	m_decosf1: added ordering support
1289750Sdwmalone	m_irix62_64: provides 64-bit module based on m_irix62.
1389750Sdwmalone	m_irix62: skip bogus files in /proc directory
1489750Sdwmalone	m_svr42MP and m_svr5: complete replacement with updated copies
1589750Sdwmalone	m_mtxinu: complete replacement with updated copies
1689750Sdwmalone	m_aix43: new module for 4.3
1789750Sdwmalone	getans: replaced with a Bourne shell script
1889750Sdwmalone
1989750SdwmaloneMon Mar  6 2000 - wnl (3.5beta10)
2089750Sdwmalone	m_sunos5.c: workaround for curses bug: ensure that TERMINFO has
2189750Sdwmalone	a value.
2289750Sdwmalone
2389750SdwmaloneFri Jan 15 1999 - wnl (3.5beta10)
2489750Sdwmalone	top.c: now check return code from read to avoid looping on eof.
2589750Sdwmalone	top.c: delay of 0 now only valid for root.
2689750Sdwmalone	decosf1.c: patches from Rainer Orth should fix most of the
2789750Sdwmalone	problems with this module (including the display of certain
2889750Sdwmalone	processes and runtime errors).
2989750Sdwmalone	sunos5.c: Rainer insisted on putting the slash back in the
3089750Sdwmalone	state field ("run/4") and widened the field to accomodate it.
3189750Sdwmalone	aix.c: widened PID field for 6-digit pids (shortened NICE field)
3289750Sdwmalone	module macosx added, thanks to Andrew Townley.
3389750Sdwmalone
3489750SdwmaloneFri Dec 18 1998 - wnl (3.5beta9)
3589750Sdwmalone	Configure checks status of "make" and complains if it fails.
3689750Sdwmalone
3789750SdwmaloneThu Dec 17 1998 - wnl (3.5beta9)
3889750Sdwmalone	Added module sco5 from Mike Hopkirk.
3989750Sdwmalone	Added module netbsd132 from moto kawasaki.
4089750Sdwmalone
4189750SdwmaloneSun Oct 25 1998 - wnl (3.5beta9)
4289750Sdwmalone	Added Casper's patches for sunos5 for the following:
4389750Sdwmalone	produce same results as swap -s (5.5 and higher),
4489750Sdwmalone	don't use system_pages kstat when /dev/kmem can be opened,
4589750Sdwmalone	skip . and .. when reading /proc, replace use of SOLARIS24
4689750Sdwmalone	with OSREV.
4789750Sdwmalone
4889750SdwmaloneFri Sep 11 1998 - wnl (3.5beta9)
4989750Sdwmalone	Added workaround to getans for the absence of $< in SCO Unix.
5089750Sdwmalone
5189750SdwmaloneWed Jul  1 1998 - wnl (3.5beta9)
5289750Sdwmalone	Changed structure member "errno" to "errnum" in commands.c.
5389750Sdwmalone	Replaced hpux10 module with one from John Haxby.
5489750Sdwmalone
5589750SdwmaloneFri Apr 17 1998 - wnl (3.5beta8)
5689750Sdwmalone	Moved definition of _KMEMUSER earlier in m_sunos5.c.  This should
5789750Sdwmalone	fix the compilation problem with gnu 2.7.2.3, obviating the need
5889750Sdwmalone	for the fixinc.svr4 patch, but hopefully will not affect anything
5989750Sdwmalone	else.
6089750Sdwmalone	Added -DORDER to m_sunos4mp.c
6189750Sdwmalone
6289750SdwmaloneTue Nov 18 1997 - wnl (3.5beta7)
6389750Sdwmalone	Added gcc 2.7.2.3 patch for fixinc.svr4 and changed INSTALL and
6489750Sdwmalone	FAQ to refer to it.
6589750Sdwmalone	Added NetBSD HP9000 fix.  Hopefully it doesn't break other 
6689750Sdwmalone	NetBSD platforms.
6789750Sdwmalone
6889750SdwmaloneFri Oct 24 1997 - wnl (3.5beta7)
6989750Sdwmalone	Modified m_dcosx.c to change uses of procdir to xprocdir, avoiding
7089750Sdwmalone	a name clash with an include file (Bryn Parrott)
7189750Sdwmalone
7289750SdwmaloneSat Oct 11 1997 - wnl (3.5beta6)
7389750Sdwmalone	Incorporated Casper's patches for Solaris 2.6 and for the multi-
7489750Sdwmalone	processor bug ("kstat finds too many cpus").
7589750Sdwmalone
7689750SdwmaloneSun Jan 20 1996 - wnl (3.5beta5)
7789750Sdwmalone	Fixed Casper's m_sunos5 module: there was a poor interaction with 
7889750Sdwmalone	his use of OSREV and SunOS 5.5.1.
7989750Sdwmalone
8089750SdwmaloneFri Dec 20 1996 - wnl (3.5beta4)
8189750Sdwmalone	Replaced m_sunos5 with a reworked version by Casper Dik.  This one
8289750Sdwmalone	should work under 2.6 and may not require that top be run setuid
8389750Sdwmalone	to root under 2.5 or 2.6.  This also fixed a bug in m_sunos5 that
8489750Sdwmalone	was introduced in beta3.
8589750Sdwmalone	Fixed calculation of OSREV in Configure.
8689750Sdwmalone
8789750SdwmaloneWed Nov 20 1996 - wnl (3.5beta3)
8889750Sdwmalone	Incorporated contributed fixes to:  bsdos2, irix62, freebsd20,
8989750Sdwmalone	ultrix4, sunos5.  Changed calculation of swap area in sunos5 (now
9089750Sdwmalone	uses swapctl).  sunos5 now understands idled processors.  Changed
9189750Sdwmalone	Configure to determine os revision using uname (when available)
9289750Sdwmalone	and adding it to machine.c compiliation in Makefile as -DOSREV.
9389750Sdwmalone	Changed calls to "exit" in modules to use "quit" instead.
9489750Sdwmalone
9589750SdwmaloneOct 20 1996 - wnl (3.5beta3)
9689750Sdwmalone	Removed "time" from list of ordering choices:  there's no easy way
9789750Sdwmalone	to get cpu time for all processes (it's in the u area).
9889750Sdwmalone
9989750SdwmaloneFri Oct 18 1996 - wnl (3.5beta3)
10089750Sdwmalone	hpux10 and hpux9: using a better means for determining when a
10189750Sdwmalone	process is idle.
10289750Sdwmalone	decosf1 now includes utils.h.
10389750Sdwmalone
10489750SdwmaloneFri Sep 13 1996 - wnl (3.5beta2)
10589750Sdwmalone	Fixed Configure to build Make.desc in such a way that doesn't
10689750Sdwmalone	require a long argument to sed.
10789750Sdwmalone
10889750SdwmaloneThu Sep 12 1996 - wnl (3.5beta2)
10989750Sdwmalone	Fixed bug in display.c that affected empty cpustate names.
11089750Sdwmalone	Created hpux1010 module - a variant of hpux10 that does not use
11189750Sdwmalone	struct proc or struct user (suitable for HP/UX 10.10).
11289750Sdwmalone
11389750SdwmaloneWed Sep 11 1996 - wnl (3.5beta2)
11489750Sdwmalone	Changes to sunos5 module:  Removed WCPU column since it is meaningless
11589750Sdwmalone	on a SVR4-based system.  Added THR column to show number of threads
11689750Sdwmalone	for each process.  This was not straightforward: the information is
11789750Sdwmalone	not stored in prpsinfo but rather in prstatus.
11889750Sdwmalone
11989750SdwmaloneTue Sep 10 1996 - wnl (3.5beta1)
12089750Sdwmalone	Added patches for sunos4mp to provide order support.
12189750Sdwmalone	Added irix62 module.
12289750Sdwmalone	Changed prime.c to include stdio.h for printf prototype.
12389750Sdwmalone	Added conditional code to os.h and utils.c to handle systems
12489750Sdwmalone	where sys_errlist is defined in stdio.h (such as NetBSD).
12589750Sdwmalone
12689750SdwmaloneMon Sep 09 1996 - wnl (3.5beta1)
12789750Sdwmalone	Removed tar and shar rules from Makefile.X -- don't need them anymore.
12889750Sdwmalone	Added -v option to display version number.  Updated man page.
12989750Sdwmalone
13024139SjoergThu Aug 29 1996 - wnl (3.4)
13124139Sjoerg	Replaced modules (from Tim Pugh): next 32, next40.
13224139Sjoerg	Fixed bug in username.c: hashing negative uids.
13324139Sjoerg
13424139SjoergThu Aug 22 1996 - wnl (3.4beta3)
13524139Sjoerg	Patched modules:  ultrix4, sunos4, sunos5, utek, decosf1, irix5.
13624139Sjoerg	Added modules: next40, next32.
13724139Sjoerg	Fixed procstates update bug in display.c.
13824139Sjoerg	Fixed divide by zero bug in utils.c.
13924139Sjoerg	Fixed bad number in layout.h
14024139Sjoerg	Minor fixes to Configure.
14124139Sjoerg	Complete overhaul of FAQ.
14224139Sjoerg
14324139SjoergTue Feb 13 1996 - wnl (3.4beta3)
14424139Sjoerg	Added convex module from Warren Vosper (originally written by
14524139Sjoerg	William Jones).
14624139Sjoerg
14724139SjoergTue Feb 13 1996 - wnl (3.4beta2)
14824139Sjoerg	Fixed format_k in utils.c to calculate K and M values correctly.
14924139Sjoerg	Added check for gigabyte values ('G').  Changed sumamry_format
15024139Sjoerg	in display.c to use format_k where appropriate.
15124139Sjoerg	Changed creation of distribution tar file to place everything in
15224139Sjoerg	a top level directory.
15324139Sjoerg
15424139SjoergTue Jan 30 1996 - wnl (3.4beta2)
15524139Sjoerg	Added m_aix41 module.  Added new tag type to module comments:
15624139Sjoerg	TERMCAP, which defined the library to use for a termcap library.
15724139Sjoerg	If no TERMCAP tag is found in the module's initial comment, then
15824139Sjoerg	Configure will default to "-ltermcap".  AIX needs this since it
15924139Sjoerg	put all the termcap routines in libcurses(!)
16024139Sjoerg
16124139Sjoerg	Added m_bsdos2 (found lingering in my mailbox).
16224139Sjoerg	Updated m_svr4 to include support for NCR multiprocessors.
16324139Sjoerg	Fixed small bug in utils.c
16424139Sjoerg
16524139SjoergThu Jan 25 1996 - wnl (3.4beta1)
16624139Sjoerg	Fixed m_sunos5 invocation of gettimeofday to include "NULL" as
16724139Sjoerg	second argument.  This provides compatability with the Posix-
16824139Sjoerg	compliant template provided with SunOS 5.5, but doesn't hurt
16924139Sjoerg	previous versions since they do bother with a template for that
17024139Sjoerg	function.
17124139Sjoerg
17224139Sjoerg	Made changes (recommended by net users) to hpux10, ultrix4,
17324139Sjoerg	netbsd10, aux3 (replaced aux31).  Added module for linux.
17424139Sjoerg
17524139SjoergFri Oct 10 1995 - wnl (3.4beta1)
17624139Sjoerg	Added user-contributed modules for SCO Unix, IRIX 5, HP/UX 10,
17724139Sjoerg	Pyramid DC/OSX.  Changed Configure so that it runs in environments
17824139Sjoerg	whose c-shells have no 'eval'(!).  Added support for multiple sort
17924139Sjoerg	ordering methods via the -o switch.  This option requires support
18024139Sjoerg	from the machine dependent module: such support was added to
18124139Sjoerg	sunos5 (thus sunos54) and sunos4.
18224139Sjoerg
18324139Sjoerg	display.c:  Changed CPU states display line to shorten the leading
18424139Sjoerg	tag if the data won't fit in the current width.  Fixed a divide-by-
18524139Sjoerg	zero bug that affected ultrasparc servers (and potentially other
18624139Sjoerg	systems).
18724139Sjoerg
18824139Sjoerg	m_sunos5.c: Now asks the system for the correct pagesize rather than
18924139Sjoerg	assuming it is 4K.
19024139Sjoerg
19124139SjoergThu Mar  2 1995 - wnl (3.3 RELEASE)
19224139Sjoerg	Added module netbsd10 and renamed netbsd to netbsd08.  Changed
19324139Sjoerg	Configure so that it does not use an initial default module name.
19424139Sjoerg	Made other compatability fixes to Configure.  Added comments to
19524139Sjoerg	decosf1 concerning optimizer bug.  Other documentation changes.
19624139Sjoerg	Added use of "prime.c" to Configure script.
19724139Sjoerg
19824139SjoergTue Feb  7 1995 - wnl (3.3beta6)
19924139Sjoerg	Still one more beta....
20024139Sjoerg	Fixes for sunos5 2.4 gcc core dump (it was an alignment problem).
20124139Sjoerg	Fixed and improvements for decosf1 (including use of format_k
20224139Sjoerg	for proper SIZE column formatting).  Added modules freebsd20 and
20324139Sjoerg	ncr3000.
20424139Sjoerg
20524139SjoergThu Feb  2 1995 - wnl (3.3beta5)
20624139Sjoerg	One more beta....
20724139Sjoerg	Fixed a few bugs in the sunos5 port pertaining to casting and
20824139Sjoerg	very large memory counts.  Added "ifndef HAVE_GETOPT" to getopt.c
20924139Sjoerg	to provide for conditional compilation of the getopt function.
21024139Sjoerg	Those systems that have getopt in libc can add -DHAVE_GETOPT to
21124139Sjoerg	the CFLAGS line in the module to prevent the function from being
21224139Sjoerg	compiled.  Added sunos54 module to accomodate SunOS 5.4
21324139Sjoerg	peculiarities.  Added module for aux3.1.
21424139Sjoerg
21524139SjoergWed Jan  4 1995 - wnl (3.3beta4)
21624139Sjoerg	This is really taking too long......sigh.
21724139Sjoerg	Fixed SIGWINCH handling	once and for all.  It now remembers the
21824139Sjoerg        number of processes you	want displayed even thru window resizes.
21924139Sjoerg	Fixed buffer conflict in utils.c (itoa and itoa7).
22024139Sjoerg        Lots of small improvements to the various modules were made over
22124139Sjoerg	the past month: too numberous to list here.  SunOS 5 module made
22224139Sjoerg	more secure thru use of seteuid calls (other SVR4 modules should
22324139Sjoerg	be modified similarly).  One final MP fix to sunos5, too.  Module
22424139Sjoerg	for decosf1 was modified to accomodate V3.0.
22524139Sjoerg
22624139SjoergMon Apr 18 1994 - wnl (3.3beta3)
22724139Sjoerg	I think I finally got a sunos5 module that will work on MP
22824139Sjoerg	machines.  Fixed cpu states figure in osmp41a so that 
22924139Sjoerg	percentages never exceed 100%.  Added shell script "install"
23024139Sjoerg	since Unix vendors can't seem to make up their minds on what
23124139Sjoerg	options they want to use for the one that comes with the OS.
23224139Sjoerg	Added netbsd modules from Christos.  Fixed lots of other little
23324139Sjoerg	things over the past few months that I have long since forgotten.
23424139Sjoerg
23524139SjoergWed Dec 15 1993 - wnl (3.3beta2)
23624139Sjoerg	Added module patches from various users:  hpux9, sunos5.
23724139Sjoerg	Fixed bug with batch mode (screen_width wasn't getting set).
23824139Sjoerg	Changes to accomodate 64 bit machines.
23924139Sjoerg	Fixed some bugs in command parsing ("renice 19 " did something
24024139Sjoerg	unexpected).
24124139Sjoerg
24224139SjoergMon Aug 30 1993 - wnl (3.3beta)
24324139Sjoerg	Added lots of little patches from various users.
24424139Sjoerg	Added routines to utils.c for intelligent formatting of kilobytes
24524139Sjoerg	and time.  These are intended to be used in the modules when
24624139Sjoerg	formatting a process line.  Added code to "summary_format" in
24724139Sjoerg	display.c to do intelligent formatting of memory quantities.
24824139Sjoerg	Redid display.c to allow for varying line widths and dynamic
24924139Sjoerg	reallocation of the screen buffer.
25024139Sjoerg	Added a SIGWINCH handler to top.c!
25124139Sjoerg	Added a constant, MAX_COLS, to top.h which defines the absolute
25224139Sjoerg	widest line we will ever allow.  Changed allocations of "char fmt"
25324139Sjoerg	in all machine modules to use this constant rather than an abitrary
25424139Sjoerg	number.
25524139Sjoerg
25624139SjoergFri Aug 13 1993 - wnl (3.3)
25724139Sjoerg	Changed return value definition of time-related functions in top.c,
25824139Sjoerg	display.c, and m_ultrix4.c to time_t (stuart@coral.cs.jcu.edu.au).
25924139Sjoerg	Fixed bug in display.c: line_update when start != 0.
26024139Sjoerg
26124139SjoergWed Aug  4 1993 - wnl (3.2 release)
26224139Sjoerg	Changes to Configure from Paul Vixie.  Added modules for hpux9 and
26324139Sjoerg	bsd386.
26424139Sjoerg
26524139SjoergTue Jul 13 1993 - wnl (3.1 release)
26624139Sjoerg	More small changes and minor bug fixes.  Brought bsd44 up to date
26724139Sjoerg	and added a module for svr4.2.  Changed shar packaging to use Rich
26824139Sjoerg	Salz's cshar stuff.
26924139Sjoerg
27024139SjoergWed Jul  7 1993 - wnl (3.1BETA)
27124139Sjoerg	More changes and bug fixes to Configure.  Applied some other
27224139Sjoerg	minor bug fixes and suggestions from the beta testers.  Added
27324139Sjoerg	the "metatop" shell script and the "installmeta" rule to the
27424139Sjoerg	Makefile to make handling multiple machine models and OS versions
27524139Sjoerg	easier.  Added INSTALL and FAQ files.
27624139Sjoerg
27724139SjoergTue May 18 1993 - wnl (3.1BETA)
27824139Sjoerg	Changed Configure to be compatible with most SVR4 environments
27924139Sjoerg	(differing output from "ls -lg").  Also changed Configure,
28024139Sjoerg	Makefile.X, etc., to look for module files in the subdirectory
28124139Sjoerg	"machine" (thanks to Christos Zoulas).
28224139Sjoerg
28324139SjoergTue Apr 20 1993 - wnl (3.1BETA)
28424139Sjoerg	Changed both occurences of "ls -1" in Configure to "ls".  This
28524139Sjoerg	SHOULD produce the same result, and has the advantage that it
28624139Sjoerg	doesn't produce an error on a system 5 machine.  Integrated other
28724139Sjoerg	changes recommended in the first round of beta testing.
28824139Sjoerg
28924139SjoergWed Mar 10 1993 - wnl (3.1BETA)
29024139Sjoerg	MAJOR CHANGE:  I have added a required function to all machine
29124139Sjoerg	dependent modules, called proc_owner.  It takes a pid as an argument
29224139Sjoerg	and returns the uid of the process's owner.  Such capability is 
29324139Sjoerg	necessary for top to run securely as a set-uid program, something
29424139Sjoerg	that is needed for SVR4 implementations to read /proc.  I have
29524139Sjoerg	retrofitted all modules except dgux with this function, but was
29624139Sjoerg	not able to test most of them.  Top should now run securely as
29724139Sjoerg	a setuid program.  Added 386bsd and sunos5 modules.  Added sunos4mp
29824139Sjoerg	module for MP Suns.
29924139Sjoerg
30024139SjoergSat Feb 20 1993 - wnl (3.1ALPHA)
30124139Sjoerg	Modified top.c and commands.c to compile correctly on System V
30224139Sjoerg	derived Unixes (especially SVR4), but in a way that doesn't rely
30324139Sjoerg	on an oracle-like declaration (that is, I don't use "ifdef SYSV").
30424139Sjoerg	Fixed some bugs in "Configure" and "getans".  Added inspection of
30524139Sjoerg	env variable "TOP" for options, and made -I default to showing
30624139Sjoerg	idle processes.  Added "u" command to change username restriction
30724139Sjoerg	on the fly.  Created shell script "suntop" for poor multi-version
30824139Sjoerg	SunOS folks (like myself).
30924139Sjoerg
31024139SjoergWed Jun  3 1992 - wnl (3.0)
31124139Sjoerg	"max_topn" wasn't being used everywhere it was supposed to be
31224139Sjoerg	in top.c.  Many cosmetic changes, including copyright notices in
31324139Sjoerg	all the .c files.  Version number is now handled by version.c and
31424139Sjoerg	reflects the current patchlevel (which is initially set to 0).
31524139Sjoerg	Changed Configure and Makefile to allow configurable variables for
31624139Sjoerg	certain commands:  shell, cc, awk, install.  Updated README and
31724139Sjoerg	Porting.  Ready to release to the world!
31824139Sjoerg
31924139SjoergMon May 18 1992 - wnl (2.9BETA)
32024139Sjoerg	Added modules provided by Christos Zoulas.  Replaced screen.c
32124139Sjoerg	with one modified by Christos and that will appropriately select
32224139Sjoerg	and handle the sgtty, termio, or termios system.  Integrated many
32324139Sjoerg	other changes recommended by Christos.  Fixed (I hope) the "-b"
32424139Sjoerg	batch mode display bug.  Had to change loadavg to load_avg to avoid
32524139Sjoerg	a conflict with 4.4BSD.  
32624139Sjoerg
32724139SjoergMon Apr 27 1992 - wnl (2.8BETA)
32824139Sjoerg	Added modules provided by Daniel Trinkle.  Added patchlevel.h,
32924139Sjoerg	but the patch level is not yet reflected in the version number.
33024139Sjoerg	Cleaned up m_sunos4.c a little.
33124139Sjoerg
33224139SjoergWed Apr 22 1992 - wnl (2.8BETA)
33324139Sjoerg	Major internal reorganization.  All of the system dependent stuff
33424139Sjoerg	is now really and truly separated from everything else.  The
33524139Sjoerg	system dependent functions are contained in a separate .c file
33624139Sjoerg	called a "module".  The Configure script knows how to find and
33724139Sjoerg	set up these modules, but the human installer still needs to tell
33824139Sjoerg	Configure which module to use (no automagic determination of 
33924139Sjoerg	machine type---sorry).  Added -U option to specify one user's
34024139Sjoerg	processes, but there is no corresponding command...yet.  Other
34124139Sjoerg	changes and improvements too numerous to mention here.  Currently
34224139Sjoerg	there are only two modules:  sunos4 and umax.  But after this beta
34324139Sjoerg	release is sent around, I expect more to be written.  I just hope
34424139Sjoerg	that the machine-dependent abstractions don't need to change in
34524139Sjoerg	the process.
34624139Sjoerg
34724139SjoergThu Mar 26 1992 - wnl (2.7BETA)
34824139Sjoerg	Beta release with minimal architecture support.  Updated README
34924139Sjoerg	and added a first cut at a Porting guide.  Added ioctl TIOCGWINSZ
35024139Sjoerg	code from top2.5+ (courtesy of David MacKenzie).  I didn't even
35124139Sjoerg	try porting the Ultrix support since I don't have access to an
35224139Sjoerg	Ultrix machine.
35324139Sjoerg
35424139SjoergFri Oct 11 1991 - wnl (2.6)
35524139Sjoerg	This version was not widely released.  It contained many changes.
35624139Sjoerg	Here are the major ones:
35724139Sjoerg
35824139Sjoerg	Put in Vixie's idle process hack.
35924139Sjoerg
36024139Sjoerg	Enhanced type field in new_message to handle delayed messages.
36124139Sjoerg
36224139Sjoerg	Changed u_process to automatically adjust for varying lines of
36324139Sjoerg	output.  Management of screenbuf should now be completely contained
36424139Sjoerg	in display.c.  Removed now extraneous code from CMD_number[12]
36524139Sjoerg	portion of command switch in top.c.  This was the stuff that dealt
36624139Sjoerg	with zeroing out lines in screenbuf.
36724139Sjoerg
36824139Sjoerg	Finally made it all work correctly on a 386i.  Problems I had to
36924139Sjoerg	overcome: kvm_nlist doesn't return 0 on success as advertised (it
37024139Sjoerg	returns 1 instead); the results of a kvm_nlist are different
37124139Sjoerg	(n_type can be zero even for a symbol that exists).
37224139Sjoerg
37324139Sjoerg	Serious rearrangement for processor dependent stuff.  All nlists
37424139Sjoerg	are now in separate files with the suffix ".nlist".  Most machine
37524139Sjoerg	specific code is in "machine.c" surrounded by appropriate ifdefs---
37624139Sjoerg	the goal is to eventually have all machine specific code in this
37724139Sjoerg	file.  Managed to find a way to detect SunOS 4.x at compile-time:
37824139Sjoerg	this is contained in the include file "sun.h".  Completely changed
37924139Sjoerg	the memory display line for SunOS 4.x---it now displays a far
38024139Sjoerg	more appropriate report.
38124139Sjoerg
38224139Sjoerg	Created the shell script "Configure" to aid in the configuration
38324139Sjoerg	step.
38424139Sjoerg
38524139Sjoerg	Fixed a bug in init_termcap:  it will now tolerate an environment
38624139Sjoerg	which does not have TERM defined (thanks to Sam Horrocks for
38724139Sjoerg	pointing this out).
38824139Sjoerg
38924139SjoergTue Aug  9 1988 - wnl (2.5)
39024139Sjoerg	Added changes to make top work under version 4.0 of the Sun
39124139Sjoerg	operating system.  Changes were provided by Scott Alexander of the
39224139Sjoerg	University of Pennsylvania.  Thanks!  Compile with "-Dsunos4" to
39324139Sjoerg	get them.  Virtual memory statistics are not readily accessible
39424139Sjoerg	under 4.0, so they don't show up in the output.
39524139Sjoerg
39624139SjoergThu Jul 31 1987 - wnl (2.4)
39724139Sjoerg	Fixed a problem with the 4.0 Pyramid code.  The label "cp_time"
39824139Sjoerg	doesn't exist in the 4.0 kernel anymore.  I think the code Carl
39924139Sjoerg	sent me wants "percpu" instead.  That is what I am using and it
40024139Sjoerg	appears to work.  375 code is still untested (at least by me).
40124139Sjoerg	Also picked a great deal of lint out of the source.  Lint now only
40224139Sjoerg	complains about a very few nitpicky things (there are far too many
40324139Sjoerg	calls to "printf" to put a "(void)" in front of!), at least under
40424139Sjoerg	SunOS.
40524139Sjoerg
40624139SjoergTue Jul 28 1987 - wnl (2.4a)
40724139Sjoerg	Added changes for a Symmetrics Computer Systems s/375 machine.
40824139Sjoerg	Changes were provided by Paul Vixie.  Thanks!  According to Mr.
40924139Sjoerg	Vixie:  "These changes were not made at, by, or for SCS proper.
41024139Sjoerg	SCS would probably be interested in them, but so far only the
41124139Sjoerg	users' group has them.  They were made in February, 1987, to
41224139Sjoerg	version 2.1 of the program, by Paul Vixie
41324139Sjoerg	(dual!ptsfa!vixie!paul@ucbvax.Berkeley.EDU)."  His changes were
41424139Sjoerg	integrated into version 2.3 to make version 2.4.
41524139Sjoerg
41624139Sjoerg	The SCS peculiarities are summarized in Changes.scs.
41724139Sjoerg
41824139SjoergTue Jun  9 1987 - wnl (2.3 for real)
41924139Sjoerg	Changed the includes for the extra code Carl sent me to only
42024139Sjoerg	compile on Version 4.0 Pyramid machines.  This makes top still
42124139Sjoerg	compilable on pre-4.0 Pyramids.  Specifically, this code is only
42224139Sjoerg	compiled when both "pyr" and "CPUFOUND" are defined.
42324139Sjoerg
42424139SjoergWed Jun  3 1987 - wnl (2.3 with Pyramid additions)
42524139Sjoerg	It's been a month and I still haven't done anything about
42624139Sjoerg	distributing this version.  However, Carl Gutekunst from Pyramid
42724139Sjoerg	has sent me some extra patches for some of the Pyramid code.  I
42824139Sjoerg	just added those and will make them part of 2.3.  This fixes the
42924139Sjoerg	following Pyramid problems:  adds the inclusion of <sys/systm.h>,
43024139Sjoerg	uses the correct size for getting the kernel value _ccpu (this bug
43124139Sjoerg	affected the Vax version as well), sums the elements of the percpu
43224139Sjoerg	array to calculate a cp_time value (for OSx 4.0).
43324139Sjoerg
43424139SjoergFri May  1 1987 - wnl (2.3)
43524139Sjoerg	I have finally finished all the changes for better support of
43624139Sjoerg	oddbal terminals.  Added the low-level routine "clear_eol" which
43724139Sjoerg	makes handling terminals without "ce" easy:  it uses spaces
43824139Sjoerg	instead.  All direct uses of "clear_line" outside of screen.c have
43924139Sjoerg	been changed to use this primitive.  A terminal with "os" is now
44024139Sjoerg	handled in such that all situations that need overwriting are
44124139Sjoerg	completely avoided (including several commands).  This required
44224139Sjoerg	some changes to the way commands are translated into action (in
44324139Sjoerg	"top.c").  Made several important changes to display.c to prevent
44424139Sjoerg	overflowing of any of the fields.  Specifically, more than 99
44524139Sjoerg	total processes and a cpu state that reaches 100%.  Had to make a
44624139Sjoerg	small change to two casts in top.c, because the Sun 3.2 compiler
44724139Sjoerg	was giving warnings on them.  Added the "-q" option which lets
44824139Sjoerg	root run top at a nice of -20 (in case he thinks he really needs it).
44924139Sjoerg
45024139SjoergTue Dec 30 1986 - wnl (2.2)
45124139Sjoerg	I think I fixed a bug reported by Julian Onions at Nottingham.
45224139Sjoerg	Occasionally, top will core dump when the sprintf in either
45324139Sjoerg	i_process or u_process overflows due to an exceptionally
45424139Sjoerg	unrealistic time value.  I think it highly unlikely that top can
45524139Sjoerg	get a bad proc structure (although I suppose it is possible), but
45624139Sjoerg	the process time is read from the user structure, and that can
45724139Sjoerg	sometimes be part garbage.  So, "get_ucpu" checks the value it
45824139Sjoerg	returns to make sure its formatted form will not overflow the
45924139Sjoerg	sprintf.  If this doesn't fix the bug, then more drastic measures
46024139Sjoerg	will be necessary.  I plan to make this version the official
46124139Sjoerg	"top 2.2".  [[ This version was never distributed very widely. ]]
46224139Sjoerg
46324139SjoergTue Dec  2 1986 - wnl (2.2c)
46424139Sjoerg	Added to top.c the notion of a "failed command".  When a command
46524139Sjoerg	produces a message (on the message line), an update does not
46624139Sjoerg	follow it.  Before, the message was written and a new display was
46724139Sjoerg	shown---purposefully not overwriting the message.  But the
46824139Sjoerg	improvements to handle overstriking terminals and terminals
46924139Sjoerg	without "ce" clear the screen before every display, which would
47024139Sjoerg	erase the message.  Now, the message is displayed and top waits
47124139Sjoerg	another full time interval before updating the display.  This
47224139Sjoerg	works much better all around.
47324139Sjoerg
47424139SjoergMon Nov 24 1986 - wnl (2.2b)
47524139Sjoerg	Created a new file, utils.c, and made appropriate changes to
47624139Sjoerg	Makefile.  This new file holds all utility functions that can and
47724139Sjoerg	may be used by more than one "module".  Improved i_memory and
47824139Sjoerg	u_memory (display.c) so that screen updates for the values
47924139Sjoerg	displayed are only changed when necessary.  Also made the line
48024139Sjoerg	look better:  the last fixes made for a rather ugly display.
48124139Sjoerg	Added the locally defined constant "LoadMax" and added code to
48224139Sjoerg	top.c to send the cursor home after a space command is entered if
48324139Sjoerg	the load average is higher than "LoadMax".  This provides visual
48424139Sjoerg	feedback on loaded systems.
48524139Sjoerg
48624139SjoergMon Nov  3 1986 - wnl (2.2a)
48724139Sjoerg	Widened the format for memory usage so that it can display 5
48824139Sjoerg	digits.  This makes that line look a little ugly---maybe I'll fix
48924139Sjoerg	that later.  Screen handling now understands "os" and a missing
49024139Sjoerg	"ce".  It treats them identically:  clear the screen between each
49124139Sjoerg	display.  Screen handling code now uses "cd" when appropriate
49224139Sjoerg	(i.e.:  when user has shortened the screen).  Made i_loadave clear
49324139Sjoerg	then screen and took out most of the explicit calls to "clear" in
49424139Sjoerg	top.c.  This method is cleaner, especially in conjunction with
49524139Sjoerg	"os" handling.  Added preprocessor variable "RANDOM_PW" for
49624139Sjoerg	systems that access the passwd file randomly (Sun's yp and 4.3).
49724139Sjoerg	With "RANDOM_PW" set, "getpwuid" is used instead of "getpwnam",
49824139Sjoerg	but uid->username mappings are still hashed internally (because
49924139Sjoerg	that is still faster than going to disk).
50024139Sjoerg
50124139SjoergMon Oct  6 1986 - wnl (2.1)
50224139Sjoerg	A bug with the kill command was pointed out by "dciem!tim"---
50324139Sjoerg	specifying a signal by name did not work correctly.  This bug has
50424139Sjoerg	been fixed with a simple change to commands.c.  Another bug made
50524139Sjoerg	the cpu state percentages incorrect the first time they were
50624139Sjoerg	displayed.  This bug has also been fixed (changed top.c).
50724139Sjoerg
50824139SjoergThu Sep  4 1986 - wnl (2.0, at last)
50924139Sjoerg	This is the version that will (hopefully) get released to the
51024139Sjoerg	world as top 2.0.
51124139Sjoerg	Added the "r" and "k" commands for renice and kill, respectively.
51224139Sjoerg	This required adding a way to handle system call errors, and the
51324139Sjoerg	addition of the "e" command.  Help screen and manual page were
51424139Sjoerg	changed to reflect this change.  Changed all "#ifdef SUN" directives
51524139Sjoerg	to "#ifdef sun", and changed all "#ifdef PYRAMID" directives to
51624139Sjoerg	"#ifdef pyr".  As much as I hate those choices of preprocessor
51724139Sjoerg	names (they too easily conflict with real variable names), it does
51824139Sjoerg	make automatic compilation possible---people don't have to change
51924139Sjoerg	the Makefile anymore for specific machines.  The manual page was
52024139Sjoerg	changed to automatically incorporate the defaults as set in the
52124139Sjoerg	Makefile (including an infinite value for TOPN) and the way the
52224139Sjoerg	manual page is generated by the Makefile was changed to make
52324139Sjoerg	maintenance of this information automatic.
52424139Sjoerg
52524139SjoergMon Jul 28 1986 - wnl (still pre 2.0)
52624139Sjoerg	Real close now.  I put in a new definition for the macro "pagetok"
52724139Sjoerg	that does an explicit shift of a constant expression involving
52824139Sjoerg	PGSHIFT.  Appropriate checks are made if PGSHIFT is to small.
52924139Sjoerg	"pagetok" is now used exclusively everywhere to convert kernel
53024139Sjoerg	clicks to kilobytes.  I added a full blown interactive mode with
53124139Sjoerg	the ability to change some of the runtime parameters (how many to
53224139Sjoerg	display, time delay, etc.) while top is running.  I also
53324139Sjoerg	incorporated a few ideas from the net:  control characters in the
53424139Sjoerg	command name are replaced with '?'; the '-S' option makes the
53524139Sjoerg	swapper and pager visible; options have been added to control the
53624139Sjoerg	number of displays produced (this makes it easier to make
53724139Sjoerg	performance snapshots with top).  I have also added the notion of
53824139Sjoerg	"infinite" values for number of processes and number of displays.
53924139Sjoerg	I fixed a long-standing bug in the uid to username mapping code
54024139Sjoerg	that was only aggravated on the pyramids:  it was an ill-defined
54124139Sjoerg	expression (akin to i = i++).  I tweaked the proc_compar routine
54224139Sjoerg	for qsort slightly so that stopped processes were more likely to
54324139Sjoerg	show up.  Manual page was updated to reflect all changes
54424139Sjoerg	noticeable to the user.
54524139Sjoerg
54624139SjoergTue Jul  1 1986 - wnl (pre 2.0 -- 1.9999?)
54724139Sjoerg	In the process of major revamping on the way to version 2.0.
54824139Sjoerg	I have completely done away with curses by adding my own screen
54924139Sjoerg	management routines in a separate file (screen.c).  The rationale
55024139Sjoerg	for this is that top knows a whole lot more about what is and is
55124139Sjoerg	not redundant on the screen and can compare simple integer values
55224139Sjoerg	where curses would have to compare strings.  This has turned out
55324139Sjoerg	to be a very big win speed-wise.  The proc_compar routine for
55424139Sjoerg	sorting has been rewritten to include several more keys.  I
55524139Sjoerg	decided this was necessary when I noticed that the "top" process
55624139Sjoerg	itself kept disappearing off the top 10 list on a Sun-3.  All the
55724139Sjoerg	processes had the same percentage (0%) and the sort wasn't really
55824139Sjoerg	doing anything worthwhile.  I changed the expression that computes
55924139Sjoerg	memory usage to use the ctob macro instead of just assuming that
56024139Sjoerg	pages were 512 bytes.  More work still needs to be done before
56124139Sjoerg	this version is usable.  I changed options-processing to use
56224139Sjoerg	getopt and added appropriate incantations to the Makefile.
56324139Sjoerg
56424139SjoergWed Feb 20 1985 - wnl (still 1.8)
56524139Sjoerg	Put in the ifdef FOUR_ONE statements to make top still compilable
56624139Sjoerg	on a 4.1 system.  Apparently, there are some users out there that
56724139Sjoerg	need this functionality.  Oh well.  I don't guarantee any of it,
56824139Sjoerg	since I can't test it.  Made appropriate changes to README and
56924139Sjoerg	final installation related changes to Makefile.
57024139Sjoerg
57124139SjoergSat Feb  2 1985 - wnl (1.8)
57224139Sjoerg	Removed all the ifdef FOUR_TWO statements and made "top" into a
57324139Sjoerg	4.2 only program.  If someone really wants to still run it on 4.1,
57424139Sjoerg	then they can do all the work.  We don't have a 4.1 machine
57524139Sjoerg	anymore, so I don't even know if the thing still works under 4.1.
57624139Sjoerg	Cleaned up the Makefile and the README.  Added installation rules
57724139Sjoerg	to the Makefile, as requested by several sites.  Fixed a very
57824139Sjoerg	obscure divide-by-zero bug.  Added a second "key" to the qsort
57924139Sjoerg	comparison function (proc_compar) so that comparisons are based on
58024139Sjoerg	cpu ticks if the percentages are equal (provided by Jonathon
58124139Sjoerg	Feiber at Sun).
58224139Sjoerg
58324139SjoergTue Dec 11 1984 - wnl (1.7)
58424139Sjoerg	Added the virtual and real memory status line to the header area
58524139Sjoerg	(provided by Jonathon Feiber at Sun)
58624139Sjoerg
58724139SjoergTue Nov 20 1984 - wnl (1.6)
58824139Sjoerg	Added an "exit" if sbrk's fail.  Added changes from Jonathon
58924139Sjoerg	Feiber at Sun:  ifdef SUN to make top work on Suns (they don't use
59024139Sjoerg	doubles in the proc structure), register declarations, check for
59124139Sjoerg	getting a user structure that has disappeared since the proc array
59224139Sjoerg	was read (it used to die, now it just shows the process as swapped).
59324139Sjoerg
59424139SjoergTue Nov 13 1984 - wnl (1.5)
59524139Sjoerg	If the number of displayable processes ("active_procs") was less
59624139Sjoerg	than the number of requested processes ("topn"), top would
59724139Sjoerg	segmentation fault.  This bug has been fixed.  Thanks to Prentiss
59824139Sjoerg	Riddle at ut-sally for pointing out the existence of this bug.
59924139Sjoerg
60024139SjoergTue Oct 23 1984 - wnl (1.4)
60124139Sjoerg	Finally fixed the hash table bug that caused processes owned by
60224139Sjoerg	root to sometimes appear with either no name or a different name
60324139Sjoerg	that had UID 0 (such as "operator").  Removed all the ifdef DEBUG
60424139Sjoerg	blocks to make top ready for distribution to the real world.
60524139Sjoerg
60624139SjoergSun Apr  8 1984 - wnl (still 1.3)
60724139Sjoerg	Made some slight changes to the display format.  It now looks more
60824139Sjoerg	aesthetically pleasing.  Added some preprocessor constants so that
60924139Sjoerg	the two defaults (number of processes and seconds of delay) easier
61024139Sjoerg	to change.
61124139Sjoerg
61224139SjoergThu Apr  5 1984 - wnl (1.3)
61324139Sjoerg	Changed the order in which things are done at initialization time.
61424139Sjoerg	This way, if an error occurs before starting the main loop, curses
61524139Sjoerg	will never get started.  Also changed other error handlers so that
61624139Sjoerg	endwin() is called before any flavor of exit.  Specifying a number
61724139Sjoerg	of processes that is more than the screen can handle is no longer
61824139Sjoerg	fatal.  It displays a warning message and pretends the user
61924139Sjoerg	specified the maximum for the screen.  Finally cured all the TSTP
62024139Sjoerg	blues (well, almost all).  I removed my TSTP handler and convinced
62124139Sjoerg	the system to always use the one that curses sets up.  Turns out
62224139Sjoerg	that "sleep" was stepping all over it during a pause.  So, I don't
62324139Sjoerg	use sleep anymore.  The only problem that remains with it now is
62424139Sjoerg	redrawing the old display before updating it after a pause.
62524139Sjoerg
62624139SjoergTue Apr  3 1984 - wnl (from 1.0 to 1.2)
62724139Sjoerg	I changed the format of the TIME column from just "seconds" to
62824139Sjoerg	"minutes:seconds".  I also made pausing work correctly.  Screen
62924139Sjoerg	redraws with an up to date display.  For compatibility with 4.2, I
63024139Sjoerg	changed the name of the "zero" function to "bzero".  The makefile
63124139Sjoerg	has been altered to handle versions for 4.1 and 4.2, and README
63224139Sjoerg	has been updated to reflect these recent changes.
633