Changes revision 24139
124139SjoergThu Aug 29 1996 - wnl (3.4)
224139Sjoerg	Replaced modules (from Tim Pugh): next 32, next40.
324139Sjoerg	Fixed bug in username.c: hashing negative uids.
424139Sjoerg
524139SjoergThu Aug 22 1996 - wnl (3.4beta3)
624139Sjoerg	Patched modules:  ultrix4, sunos4, sunos5, utek, decosf1, irix5.
724139Sjoerg	Added modules: next40, next32.
824139Sjoerg	Fixed procstates update bug in display.c.
924139Sjoerg	Fixed divide by zero bug in utils.c.
1024139Sjoerg	Fixed bad number in layout.h
1124139Sjoerg	Minor fixes to Configure.
1224139Sjoerg	Complete overhaul of FAQ.
1324139Sjoerg
1424139SjoergTue Feb 13 1996 - wnl (3.4beta3)
1524139Sjoerg	Added convex module from Warren Vosper (originally written by
1624139Sjoerg	William Jones).
1724139Sjoerg
1824139SjoergTue Feb 13 1996 - wnl (3.4beta2)
1924139Sjoerg	Fixed format_k in utils.c to calculate K and M values correctly.
2024139Sjoerg	Added check for gigabyte values ('G').  Changed sumamry_format
2124139Sjoerg	in display.c to use format_k where appropriate.
2224139Sjoerg	Changed creation of distribution tar file to place everything in
2324139Sjoerg	a top level directory.
2424139Sjoerg
2524139SjoergTue Jan 30 1996 - wnl (3.4beta2)
2624139Sjoerg	Added m_aix41 module.  Added new tag type to module comments:
2724139Sjoerg	TERMCAP, which defined the library to use for a termcap library.
2824139Sjoerg	If no TERMCAP tag is found in the module's initial comment, then
2924139Sjoerg	Configure will default to "-ltermcap".  AIX needs this since it
3024139Sjoerg	put all the termcap routines in libcurses(!)
3124139Sjoerg
3224139Sjoerg	Added m_bsdos2 (found lingering in my mailbox).
3324139Sjoerg	Updated m_svr4 to include support for NCR multiprocessors.
3424139Sjoerg	Fixed small bug in utils.c
3524139Sjoerg
3624139SjoergThu Jan 25 1996 - wnl (3.4beta1)
3724139Sjoerg	Fixed m_sunos5 invocation of gettimeofday to include "NULL" as
3824139Sjoerg	second argument.  This provides compatability with the Posix-
3924139Sjoerg	compliant template provided with SunOS 5.5, but doesn't hurt
4024139Sjoerg	previous versions since they do bother with a template for that
4124139Sjoerg	function.
4224139Sjoerg
4324139Sjoerg	Made changes (recommended by net users) to hpux10, ultrix4,
4424139Sjoerg	netbsd10, aux3 (replaced aux31).  Added module for linux.
4524139Sjoerg
4624139SjoergFri Oct 10 1995 - wnl (3.4beta1)
4724139Sjoerg	Added user-contributed modules for SCO Unix, IRIX 5, HP/UX 10,
4824139Sjoerg	Pyramid DC/OSX.  Changed Configure so that it runs in environments
4924139Sjoerg	whose c-shells have no 'eval'(!).  Added support for multiple sort
5024139Sjoerg	ordering methods via the -o switch.  This option requires support
5124139Sjoerg	from the machine dependent module: such support was added to
5224139Sjoerg	sunos5 (thus sunos54) and sunos4.
5324139Sjoerg
5424139Sjoerg	display.c:  Changed CPU states display line to shorten the leading
5524139Sjoerg	tag if the data won't fit in the current width.  Fixed a divide-by-
5624139Sjoerg	zero bug that affected ultrasparc servers (and potentially other
5724139Sjoerg	systems).
5824139Sjoerg
5924139Sjoerg	m_sunos5.c: Now asks the system for the correct pagesize rather than
6024139Sjoerg	assuming it is 4K.
6124139Sjoerg
6224139SjoergThu Mar  2 1995 - wnl (3.3 RELEASE)
6324139Sjoerg	Added module netbsd10 and renamed netbsd to netbsd08.  Changed
6424139Sjoerg	Configure so that it does not use an initial default module name.
6524139Sjoerg	Made other compatability fixes to Configure.  Added comments to
6624139Sjoerg	decosf1 concerning optimizer bug.  Other documentation changes.
6724139Sjoerg	Added use of "prime.c" to Configure script.
6824139Sjoerg
6924139SjoergTue Feb  7 1995 - wnl (3.3beta6)
7024139Sjoerg	Still one more beta....
7124139Sjoerg	Fixes for sunos5 2.4 gcc core dump (it was an alignment problem).
7224139Sjoerg	Fixed and improvements for decosf1 (including use of format_k
7324139Sjoerg	for proper SIZE column formatting).  Added modules freebsd20 and
7424139Sjoerg	ncr3000.
7524139Sjoerg
7624139SjoergThu Feb  2 1995 - wnl (3.3beta5)
7724139Sjoerg	One more beta....
7824139Sjoerg	Fixed a few bugs in the sunos5 port pertaining to casting and
7924139Sjoerg	very large memory counts.  Added "ifndef HAVE_GETOPT" to getopt.c
8024139Sjoerg	to provide for conditional compilation of the getopt function.
8124139Sjoerg	Those systems that have getopt in libc can add -DHAVE_GETOPT to
8224139Sjoerg	the CFLAGS line in the module to prevent the function from being
8324139Sjoerg	compiled.  Added sunos54 module to accomodate SunOS 5.4
8424139Sjoerg	peculiarities.  Added module for aux3.1.
8524139Sjoerg
8624139SjoergWed Jan  4 1995 - wnl (3.3beta4)
8724139Sjoerg	This is really taking too long......sigh.
8824139Sjoerg	Fixed SIGWINCH handling	once and for all.  It now remembers the
8924139Sjoerg        number of processes you	want displayed even thru window resizes.
9024139Sjoerg	Fixed buffer conflict in utils.c (itoa and itoa7).
9124139Sjoerg        Lots of small improvements to the various modules were made over
9224139Sjoerg	the past month: too numberous to list here.  SunOS 5 module made
9324139Sjoerg	more secure thru use of seteuid calls (other SVR4 modules should
9424139Sjoerg	be modified similarly).  One final MP fix to sunos5, too.  Module
9524139Sjoerg	for decosf1 was modified to accomodate V3.0.
9624139Sjoerg
9724139SjoergMon Apr 18 1994 - wnl (3.3beta3)
9824139Sjoerg	I think I finally got a sunos5 module that will work on MP
9924139Sjoerg	machines.  Fixed cpu states figure in osmp41a so that 
10024139Sjoerg	percentages never exceed 100%.  Added shell script "install"
10124139Sjoerg	since Unix vendors can't seem to make up their minds on what
10224139Sjoerg	options they want to use for the one that comes with the OS.
10324139Sjoerg	Added netbsd modules from Christos.  Fixed lots of other little
10424139Sjoerg	things over the past few months that I have long since forgotten.
10524139Sjoerg
10624139SjoergWed Dec 15 1993 - wnl (3.3beta2)
10724139Sjoerg	Added module patches from various users:  hpux9, sunos5.
10824139Sjoerg	Fixed bug with batch mode (screen_width wasn't getting set).
10924139Sjoerg	Changes to accomodate 64 bit machines.
11024139Sjoerg	Fixed some bugs in command parsing ("renice 19 " did something
11124139Sjoerg	unexpected).
11224139Sjoerg
11324139SjoergMon Aug 30 1993 - wnl (3.3beta)
11424139Sjoerg	Added lots of little patches from various users.
11524139Sjoerg	Added routines to utils.c for intelligent formatting of kilobytes
11624139Sjoerg	and time.  These are intended to be used in the modules when
11724139Sjoerg	formatting a process line.  Added code to "summary_format" in
11824139Sjoerg	display.c to do intelligent formatting of memory quantities.
11924139Sjoerg	Redid display.c to allow for varying line widths and dynamic
12024139Sjoerg	reallocation of the screen buffer.
12124139Sjoerg	Added a SIGWINCH handler to top.c!
12224139Sjoerg	Added a constant, MAX_COLS, to top.h which defines the absolute
12324139Sjoerg	widest line we will ever allow.  Changed allocations of "char fmt"
12424139Sjoerg	in all machine modules to use this constant rather than an abitrary
12524139Sjoerg	number.
12624139Sjoerg
12724139SjoergFri Aug 13 1993 - wnl (3.3)
12824139Sjoerg	Changed return value definition of time-related functions in top.c,
12924139Sjoerg	display.c, and m_ultrix4.c to time_t (stuart@coral.cs.jcu.edu.au).
13024139Sjoerg	Fixed bug in display.c: line_update when start != 0.
13124139Sjoerg
13224139SjoergWed Aug  4 1993 - wnl (3.2 release)
13324139Sjoerg	Changes to Configure from Paul Vixie.  Added modules for hpux9 and
13424139Sjoerg	bsd386.
13524139Sjoerg
13624139SjoergTue Jul 13 1993 - wnl (3.1 release)
13724139Sjoerg	More small changes and minor bug fixes.  Brought bsd44 up to date
13824139Sjoerg	and added a module for svr4.2.  Changed shar packaging to use Rich
13924139Sjoerg	Salz's cshar stuff.
14024139Sjoerg
14124139SjoergWed Jul  7 1993 - wnl (3.1BETA)
14224139Sjoerg	More changes and bug fixes to Configure.  Applied some other
14324139Sjoerg	minor bug fixes and suggestions from the beta testers.  Added
14424139Sjoerg	the "metatop" shell script and the "installmeta" rule to the
14524139Sjoerg	Makefile to make handling multiple machine models and OS versions
14624139Sjoerg	easier.  Added INSTALL and FAQ files.
14724139Sjoerg
14824139SjoergTue May 18 1993 - wnl (3.1BETA)
14924139Sjoerg	Changed Configure to be compatible with most SVR4 environments
15024139Sjoerg	(differing output from "ls -lg").  Also changed Configure,
15124139Sjoerg	Makefile.X, etc., to look for module files in the subdirectory
15224139Sjoerg	"machine" (thanks to Christos Zoulas).
15324139Sjoerg
15424139SjoergTue Apr 20 1993 - wnl (3.1BETA)
15524139Sjoerg	Changed both occurences of "ls -1" in Configure to "ls".  This
15624139Sjoerg	SHOULD produce the same result, and has the advantage that it
15724139Sjoerg	doesn't produce an error on a system 5 machine.  Integrated other
15824139Sjoerg	changes recommended in the first round of beta testing.
15924139Sjoerg
16024139SjoergWed Mar 10 1993 - wnl (3.1BETA)
16124139Sjoerg	MAJOR CHANGE:  I have added a required function to all machine
16224139Sjoerg	dependent modules, called proc_owner.  It takes a pid as an argument
16324139Sjoerg	and returns the uid of the process's owner.  Such capability is 
16424139Sjoerg	necessary for top to run securely as a set-uid program, something
16524139Sjoerg	that is needed for SVR4 implementations to read /proc.  I have
16624139Sjoerg	retrofitted all modules except dgux with this function, but was
16724139Sjoerg	not able to test most of them.  Top should now run securely as
16824139Sjoerg	a setuid program.  Added 386bsd and sunos5 modules.  Added sunos4mp
16924139Sjoerg	module for MP Suns.
17024139Sjoerg
17124139SjoergSat Feb 20 1993 - wnl (3.1ALPHA)
17224139Sjoerg	Modified top.c and commands.c to compile correctly on System V
17324139Sjoerg	derived Unixes (especially SVR4), but in a way that doesn't rely
17424139Sjoerg	on an oracle-like declaration (that is, I don't use "ifdef SYSV").
17524139Sjoerg	Fixed some bugs in "Configure" and "getans".  Added inspection of
17624139Sjoerg	env variable "TOP" for options, and made -I default to showing
17724139Sjoerg	idle processes.  Added "u" command to change username restriction
17824139Sjoerg	on the fly.  Created shell script "suntop" for poor multi-version
17924139Sjoerg	SunOS folks (like myself).
18024139Sjoerg
18124139SjoergWed Jun  3 1992 - wnl (3.0)
18224139Sjoerg	"max_topn" wasn't being used everywhere it was supposed to be
18324139Sjoerg	in top.c.  Many cosmetic changes, including copyright notices in
18424139Sjoerg	all the .c files.  Version number is now handled by version.c and
18524139Sjoerg	reflects the current patchlevel (which is initially set to 0).
18624139Sjoerg	Changed Configure and Makefile to allow configurable variables for
18724139Sjoerg	certain commands:  shell, cc, awk, install.  Updated README and
18824139Sjoerg	Porting.  Ready to release to the world!
18924139Sjoerg
19024139SjoergMon May 18 1992 - wnl (2.9BETA)
19124139Sjoerg	Added modules provided by Christos Zoulas.  Replaced screen.c
19224139Sjoerg	with one modified by Christos and that will appropriately select
19324139Sjoerg	and handle the sgtty, termio, or termios system.  Integrated many
19424139Sjoerg	other changes recommended by Christos.  Fixed (I hope) the "-b"
19524139Sjoerg	batch mode display bug.  Had to change loadavg to load_avg to avoid
19624139Sjoerg	a conflict with 4.4BSD.  
19724139Sjoerg
19824139SjoergMon Apr 27 1992 - wnl (2.8BETA)
19924139Sjoerg	Added modules provided by Daniel Trinkle.  Added patchlevel.h,
20024139Sjoerg	but the patch level is not yet reflected in the version number.
20124139Sjoerg	Cleaned up m_sunos4.c a little.
20224139Sjoerg
20324139SjoergWed Apr 22 1992 - wnl (2.8BETA)
20424139Sjoerg	Major internal reorganization.  All of the system dependent stuff
20524139Sjoerg	is now really and truly separated from everything else.  The
20624139Sjoerg	system dependent functions are contained in a separate .c file
20724139Sjoerg	called a "module".  The Configure script knows how to find and
20824139Sjoerg	set up these modules, but the human installer still needs to tell
20924139Sjoerg	Configure which module to use (no automagic determination of 
21024139Sjoerg	machine type---sorry).  Added -U option to specify one user's
21124139Sjoerg	processes, but there is no corresponding command...yet.  Other
21224139Sjoerg	changes and improvements too numerous to mention here.  Currently
21324139Sjoerg	there are only two modules:  sunos4 and umax.  But after this beta
21424139Sjoerg	release is sent around, I expect more to be written.  I just hope
21524139Sjoerg	that the machine-dependent abstractions don't need to change in
21624139Sjoerg	the process.
21724139Sjoerg
21824139SjoergThu Mar 26 1992 - wnl (2.7BETA)
21924139Sjoerg	Beta release with minimal architecture support.  Updated README
22024139Sjoerg	and added a first cut at a Porting guide.  Added ioctl TIOCGWINSZ
22124139Sjoerg	code from top2.5+ (courtesy of David MacKenzie).  I didn't even
22224139Sjoerg	try porting the Ultrix support since I don't have access to an
22324139Sjoerg	Ultrix machine.
22424139Sjoerg
22524139SjoergFri Oct 11 1991 - wnl (2.6)
22624139Sjoerg	This version was not widely released.  It contained many changes.
22724139Sjoerg	Here are the major ones:
22824139Sjoerg
22924139Sjoerg	Put in Vixie's idle process hack.
23024139Sjoerg
23124139Sjoerg	Enhanced type field in new_message to handle delayed messages.
23224139Sjoerg
23324139Sjoerg	Changed u_process to automatically adjust for varying lines of
23424139Sjoerg	output.  Management of screenbuf should now be completely contained
23524139Sjoerg	in display.c.  Removed now extraneous code from CMD_number[12]
23624139Sjoerg	portion of command switch in top.c.  This was the stuff that dealt
23724139Sjoerg	with zeroing out lines in screenbuf.
23824139Sjoerg
23924139Sjoerg	Finally made it all work correctly on a 386i.  Problems I had to
24024139Sjoerg	overcome: kvm_nlist doesn't return 0 on success as advertised (it
24124139Sjoerg	returns 1 instead); the results of a kvm_nlist are different
24224139Sjoerg	(n_type can be zero even for a symbol that exists).
24324139Sjoerg
24424139Sjoerg	Serious rearrangement for processor dependent stuff.  All nlists
24524139Sjoerg	are now in separate files with the suffix ".nlist".  Most machine
24624139Sjoerg	specific code is in "machine.c" surrounded by appropriate ifdefs---
24724139Sjoerg	the goal is to eventually have all machine specific code in this
24824139Sjoerg	file.  Managed to find a way to detect SunOS 4.x at compile-time:
24924139Sjoerg	this is contained in the include file "sun.h".  Completely changed
25024139Sjoerg	the memory display line for SunOS 4.x---it now displays a far
25124139Sjoerg	more appropriate report.
25224139Sjoerg
25324139Sjoerg	Created the shell script "Configure" to aid in the configuration
25424139Sjoerg	step.
25524139Sjoerg
25624139Sjoerg	Fixed a bug in init_termcap:  it will now tolerate an environment
25724139Sjoerg	which does not have TERM defined (thanks to Sam Horrocks for
25824139Sjoerg	pointing this out).
25924139Sjoerg
26024139SjoergTue Aug  9 1988 - wnl (2.5)
26124139Sjoerg	Added changes to make top work under version 4.0 of the Sun
26224139Sjoerg	operating system.  Changes were provided by Scott Alexander of the
26324139Sjoerg	University of Pennsylvania.  Thanks!  Compile with "-Dsunos4" to
26424139Sjoerg	get them.  Virtual memory statistics are not readily accessible
26524139Sjoerg	under 4.0, so they don't show up in the output.
26624139Sjoerg
26724139SjoergThu Jul 31 1987 - wnl (2.4)
26824139Sjoerg	Fixed a problem with the 4.0 Pyramid code.  The label "cp_time"
26924139Sjoerg	doesn't exist in the 4.0 kernel anymore.  I think the code Carl
27024139Sjoerg	sent me wants "percpu" instead.  That is what I am using and it
27124139Sjoerg	appears to work.  375 code is still untested (at least by me).
27224139Sjoerg	Also picked a great deal of lint out of the source.  Lint now only
27324139Sjoerg	complains about a very few nitpicky things (there are far too many
27424139Sjoerg	calls to "printf" to put a "(void)" in front of!), at least under
27524139Sjoerg	SunOS.
27624139Sjoerg
27724139SjoergTue Jul 28 1987 - wnl (2.4a)
27824139Sjoerg	Added changes for a Symmetrics Computer Systems s/375 machine.
27924139Sjoerg	Changes were provided by Paul Vixie.  Thanks!  According to Mr.
28024139Sjoerg	Vixie:  "These changes were not made at, by, or for SCS proper.
28124139Sjoerg	SCS would probably be interested in them, but so far only the
28224139Sjoerg	users' group has them.  They were made in February, 1987, to
28324139Sjoerg	version 2.1 of the program, by Paul Vixie
28424139Sjoerg	(dual!ptsfa!vixie!paul@ucbvax.Berkeley.EDU)."  His changes were
28524139Sjoerg	integrated into version 2.3 to make version 2.4.
28624139Sjoerg
28724139Sjoerg	The SCS peculiarities are summarized in Changes.scs.
28824139Sjoerg
28924139SjoergTue Jun  9 1987 - wnl (2.3 for real)
29024139Sjoerg	Changed the includes for the extra code Carl sent me to only
29124139Sjoerg	compile on Version 4.0 Pyramid machines.  This makes top still
29224139Sjoerg	compilable on pre-4.0 Pyramids.  Specifically, this code is only
29324139Sjoerg	compiled when both "pyr" and "CPUFOUND" are defined.
29424139Sjoerg
29524139SjoergWed Jun  3 1987 - wnl (2.3 with Pyramid additions)
29624139Sjoerg	It's been a month and I still haven't done anything about
29724139Sjoerg	distributing this version.  However, Carl Gutekunst from Pyramid
29824139Sjoerg	has sent me some extra patches for some of the Pyramid code.  I
29924139Sjoerg	just added those and will make them part of 2.3.  This fixes the
30024139Sjoerg	following Pyramid problems:  adds the inclusion of <sys/systm.h>,
30124139Sjoerg	uses the correct size for getting the kernel value _ccpu (this bug
30224139Sjoerg	affected the Vax version as well), sums the elements of the percpu
30324139Sjoerg	array to calculate a cp_time value (for OSx 4.0).
30424139Sjoerg
30524139SjoergFri May  1 1987 - wnl (2.3)
30624139Sjoerg	I have finally finished all the changes for better support of
30724139Sjoerg	oddbal terminals.  Added the low-level routine "clear_eol" which
30824139Sjoerg	makes handling terminals without "ce" easy:  it uses spaces
30924139Sjoerg	instead.  All direct uses of "clear_line" outside of screen.c have
31024139Sjoerg	been changed to use this primitive.  A terminal with "os" is now
31124139Sjoerg	handled in such that all situations that need overwriting are
31224139Sjoerg	completely avoided (including several commands).  This required
31324139Sjoerg	some changes to the way commands are translated into action (in
31424139Sjoerg	"top.c").  Made several important changes to display.c to prevent
31524139Sjoerg	overflowing of any of the fields.  Specifically, more than 99
31624139Sjoerg	total processes and a cpu state that reaches 100%.  Had to make a
31724139Sjoerg	small change to two casts in top.c, because the Sun 3.2 compiler
31824139Sjoerg	was giving warnings on them.  Added the "-q" option which lets
31924139Sjoerg	root run top at a nice of -20 (in case he thinks he really needs it).
32024139Sjoerg
32124139SjoergTue Dec 30 1986 - wnl (2.2)
32224139Sjoerg	I think I fixed a bug reported by Julian Onions at Nottingham.
32324139Sjoerg	Occasionally, top will core dump when the sprintf in either
32424139Sjoerg	i_process or u_process overflows due to an exceptionally
32524139Sjoerg	unrealistic time value.  I think it highly unlikely that top can
32624139Sjoerg	get a bad proc structure (although I suppose it is possible), but
32724139Sjoerg	the process time is read from the user structure, and that can
32824139Sjoerg	sometimes be part garbage.  So, "get_ucpu" checks the value it
32924139Sjoerg	returns to make sure its formatted form will not overflow the
33024139Sjoerg	sprintf.  If this doesn't fix the bug, then more drastic measures
33124139Sjoerg	will be necessary.  I plan to make this version the official
33224139Sjoerg	"top 2.2".  [[ This version was never distributed very widely. ]]
33324139Sjoerg
33424139SjoergTue Dec  2 1986 - wnl (2.2c)
33524139Sjoerg	Added to top.c the notion of a "failed command".  When a command
33624139Sjoerg	produces a message (on the message line), an update does not
33724139Sjoerg	follow it.  Before, the message was written and a new display was
33824139Sjoerg	shown---purposefully not overwriting the message.  But the
33924139Sjoerg	improvements to handle overstriking terminals and terminals
34024139Sjoerg	without "ce" clear the screen before every display, which would
34124139Sjoerg	erase the message.  Now, the message is displayed and top waits
34224139Sjoerg	another full time interval before updating the display.  This
34324139Sjoerg	works much better all around.
34424139Sjoerg
34524139SjoergMon Nov 24 1986 - wnl (2.2b)
34624139Sjoerg	Created a new file, utils.c, and made appropriate changes to
34724139Sjoerg	Makefile.  This new file holds all utility functions that can and
34824139Sjoerg	may be used by more than one "module".  Improved i_memory and
34924139Sjoerg	u_memory (display.c) so that screen updates for the values
35024139Sjoerg	displayed are only changed when necessary.  Also made the line
35124139Sjoerg	look better:  the last fixes made for a rather ugly display.
35224139Sjoerg	Added the locally defined constant "LoadMax" and added code to
35324139Sjoerg	top.c to send the cursor home after a space command is entered if
35424139Sjoerg	the load average is higher than "LoadMax".  This provides visual
35524139Sjoerg	feedback on loaded systems.
35624139Sjoerg
35724139SjoergMon Nov  3 1986 - wnl (2.2a)
35824139Sjoerg	Widened the format for memory usage so that it can display 5
35924139Sjoerg	digits.  This makes that line look a little ugly---maybe I'll fix
36024139Sjoerg	that later.  Screen handling now understands "os" and a missing
36124139Sjoerg	"ce".  It treats them identically:  clear the screen between each
36224139Sjoerg	display.  Screen handling code now uses "cd" when appropriate
36324139Sjoerg	(i.e.:  when user has shortened the screen).  Made i_loadave clear
36424139Sjoerg	then screen and took out most of the explicit calls to "clear" in
36524139Sjoerg	top.c.  This method is cleaner, especially in conjunction with
36624139Sjoerg	"os" handling.  Added preprocessor variable "RANDOM_PW" for
36724139Sjoerg	systems that access the passwd file randomly (Sun's yp and 4.3).
36824139Sjoerg	With "RANDOM_PW" set, "getpwuid" is used instead of "getpwnam",
36924139Sjoerg	but uid->username mappings are still hashed internally (because
37024139Sjoerg	that is still faster than going to disk).
37124139Sjoerg
37224139SjoergMon Oct  6 1986 - wnl (2.1)
37324139Sjoerg	A bug with the kill command was pointed out by "dciem!tim"---
37424139Sjoerg	specifying a signal by name did not work correctly.  This bug has
37524139Sjoerg	been fixed with a simple change to commands.c.  Another bug made
37624139Sjoerg	the cpu state percentages incorrect the first time they were
37724139Sjoerg	displayed.  This bug has also been fixed (changed top.c).
37824139Sjoerg
37924139SjoergThu Sep  4 1986 - wnl (2.0, at last)
38024139Sjoerg	This is the version that will (hopefully) get released to the
38124139Sjoerg	world as top 2.0.
38224139Sjoerg	Added the "r" and "k" commands for renice and kill, respectively.
38324139Sjoerg	This required adding a way to handle system call errors, and the
38424139Sjoerg	addition of the "e" command.  Help screen and manual page were
38524139Sjoerg	changed to reflect this change.  Changed all "#ifdef SUN" directives
38624139Sjoerg	to "#ifdef sun", and changed all "#ifdef PYRAMID" directives to
38724139Sjoerg	"#ifdef pyr".  As much as I hate those choices of preprocessor
38824139Sjoerg	names (they too easily conflict with real variable names), it does
38924139Sjoerg	make automatic compilation possible---people don't have to change
39024139Sjoerg	the Makefile anymore for specific machines.  The manual page was
39124139Sjoerg	changed to automatically incorporate the defaults as set in the
39224139Sjoerg	Makefile (including an infinite value for TOPN) and the way the
39324139Sjoerg	manual page is generated by the Makefile was changed to make
39424139Sjoerg	maintenance of this information automatic.
39524139Sjoerg
39624139SjoergMon Jul 28 1986 - wnl (still pre 2.0)
39724139Sjoerg	Real close now.  I put in a new definition for the macro "pagetok"
39824139Sjoerg	that does an explicit shift of a constant expression involving
39924139Sjoerg	PGSHIFT.  Appropriate checks are made if PGSHIFT is to small.
40024139Sjoerg	"pagetok" is now used exclusively everywhere to convert kernel
40124139Sjoerg	clicks to kilobytes.  I added a full blown interactive mode with
40224139Sjoerg	the ability to change some of the runtime parameters (how many to
40324139Sjoerg	display, time delay, etc.) while top is running.  I also
40424139Sjoerg	incorporated a few ideas from the net:  control characters in the
40524139Sjoerg	command name are replaced with '?'; the '-S' option makes the
40624139Sjoerg	swapper and pager visible; options have been added to control the
40724139Sjoerg	number of displays produced (this makes it easier to make
40824139Sjoerg	performance snapshots with top).  I have also added the notion of
40924139Sjoerg	"infinite" values for number of processes and number of displays.
41024139Sjoerg	I fixed a long-standing bug in the uid to username mapping code
41124139Sjoerg	that was only aggravated on the pyramids:  it was an ill-defined
41224139Sjoerg	expression (akin to i = i++).  I tweaked the proc_compar routine
41324139Sjoerg	for qsort slightly so that stopped processes were more likely to
41424139Sjoerg	show up.  Manual page was updated to reflect all changes
41524139Sjoerg	noticeable to the user.
41624139Sjoerg
41724139SjoergTue Jul  1 1986 - wnl (pre 2.0 -- 1.9999?)
41824139Sjoerg	In the process of major revamping on the way to version 2.0.
41924139Sjoerg	I have completely done away with curses by adding my own screen
42024139Sjoerg	management routines in a separate file (screen.c).  The rationale
42124139Sjoerg	for this is that top knows a whole lot more about what is and is
42224139Sjoerg	not redundant on the screen and can compare simple integer values
42324139Sjoerg	where curses would have to compare strings.  This has turned out
42424139Sjoerg	to be a very big win speed-wise.  The proc_compar routine for
42524139Sjoerg	sorting has been rewritten to include several more keys.  I
42624139Sjoerg	decided this was necessary when I noticed that the "top" process
42724139Sjoerg	itself kept disappearing off the top 10 list on a Sun-3.  All the
42824139Sjoerg	processes had the same percentage (0%) and the sort wasn't really
42924139Sjoerg	doing anything worthwhile.  I changed the expression that computes
43024139Sjoerg	memory usage to use the ctob macro instead of just assuming that
43124139Sjoerg	pages were 512 bytes.  More work still needs to be done before
43224139Sjoerg	this version is usable.  I changed options-processing to use
43324139Sjoerg	getopt and added appropriate incantations to the Makefile.
43424139Sjoerg
43524139SjoergWed Feb 20 1985 - wnl (still 1.8)
43624139Sjoerg	Put in the ifdef FOUR_ONE statements to make top still compilable
43724139Sjoerg	on a 4.1 system.  Apparently, there are some users out there that
43824139Sjoerg	need this functionality.  Oh well.  I don't guarantee any of it,
43924139Sjoerg	since I can't test it.  Made appropriate changes to README and
44024139Sjoerg	final installation related changes to Makefile.
44124139Sjoerg
44224139SjoergSat Feb  2 1985 - wnl (1.8)
44324139Sjoerg	Removed all the ifdef FOUR_TWO statements and made "top" into a
44424139Sjoerg	4.2 only program.  If someone really wants to still run it on 4.1,
44524139Sjoerg	then they can do all the work.  We don't have a 4.1 machine
44624139Sjoerg	anymore, so I don't even know if the thing still works under 4.1.
44724139Sjoerg	Cleaned up the Makefile and the README.  Added installation rules
44824139Sjoerg	to the Makefile, as requested by several sites.  Fixed a very
44924139Sjoerg	obscure divide-by-zero bug.  Added a second "key" to the qsort
45024139Sjoerg	comparison function (proc_compar) so that comparisons are based on
45124139Sjoerg	cpu ticks if the percentages are equal (provided by Jonathon
45224139Sjoerg	Feiber at Sun).
45324139Sjoerg
45424139SjoergTue Dec 11 1984 - wnl (1.7)
45524139Sjoerg	Added the virtual and real memory status line to the header area
45624139Sjoerg	(provided by Jonathon Feiber at Sun)
45724139Sjoerg
45824139SjoergTue Nov 20 1984 - wnl (1.6)
45924139Sjoerg	Added an "exit" if sbrk's fail.  Added changes from Jonathon
46024139Sjoerg	Feiber at Sun:  ifdef SUN to make top work on Suns (they don't use
46124139Sjoerg	doubles in the proc structure), register declarations, check for
46224139Sjoerg	getting a user structure that has disappeared since the proc array
46324139Sjoerg	was read (it used to die, now it just shows the process as swapped).
46424139Sjoerg
46524139SjoergTue Nov 13 1984 - wnl (1.5)
46624139Sjoerg	If the number of displayable processes ("active_procs") was less
46724139Sjoerg	than the number of requested processes ("topn"), top would
46824139Sjoerg	segmentation fault.  This bug has been fixed.  Thanks to Prentiss
46924139Sjoerg	Riddle at ut-sally for pointing out the existence of this bug.
47024139Sjoerg
47124139SjoergTue Oct 23 1984 - wnl (1.4)
47224139Sjoerg	Finally fixed the hash table bug that caused processes owned by
47324139Sjoerg	root to sometimes appear with either no name or a different name
47424139Sjoerg	that had UID 0 (such as "operator").  Removed all the ifdef DEBUG
47524139Sjoerg	blocks to make top ready for distribution to the real world.
47624139Sjoerg
47724139SjoergSun Apr  8 1984 - wnl (still 1.3)
47824139Sjoerg	Made some slight changes to the display format.  It now looks more
47924139Sjoerg	aesthetically pleasing.  Added some preprocessor constants so that
48024139Sjoerg	the two defaults (number of processes and seconds of delay) easier
48124139Sjoerg	to change.
48224139Sjoerg
48324139SjoergThu Apr  5 1984 - wnl (1.3)
48424139Sjoerg	Changed the order in which things are done at initialization time.
48524139Sjoerg	This way, if an error occurs before starting the main loop, curses
48624139Sjoerg	will never get started.  Also changed other error handlers so that
48724139Sjoerg	endwin() is called before any flavor of exit.  Specifying a number
48824139Sjoerg	of processes that is more than the screen can handle is no longer
48924139Sjoerg	fatal.  It displays a warning message and pretends the user
49024139Sjoerg	specified the maximum for the screen.  Finally cured all the TSTP
49124139Sjoerg	blues (well, almost all).  I removed my TSTP handler and convinced
49224139Sjoerg	the system to always use the one that curses sets up.  Turns out
49324139Sjoerg	that "sleep" was stepping all over it during a pause.  So, I don't
49424139Sjoerg	use sleep anymore.  The only problem that remains with it now is
49524139Sjoerg	redrawing the old display before updating it after a pause.
49624139Sjoerg
49724139SjoergTue Apr  3 1984 - wnl (from 1.0 to 1.2)
49824139Sjoerg	I changed the format of the TIME column from just "seconds" to
49924139Sjoerg	"minutes:seconds".  I also made pausing work correctly.  Screen
50024139Sjoerg	redraws with an up to date display.  For compatibility with 4.2, I
50124139Sjoerg	changed the name of the "zero" function to "bzero".  The makefile
50224139Sjoerg	has been altered to handle versions for 4.1 and 4.2, and README
50324139Sjoerg	has been updated to reflect these recent changes.
504