1221167SgnnThu Mar 30 2000 - wnl (3.5beta12)
2221167Sgnn	Updated modules: m_aix41.c, m_aix43.c, m_mtxinu.c, m_sco5.c,
3221167Sgnn	and m_ultrix4.c.
4221167Sgnn	Included m_irixsgi.c from some source that's been floating around
5221167Sgnn	SGI.  Don't yet know how it compares to m_irix62.
6221167Sgnn
7221167SgnnFri Mar 10 2000 - wnl (3.5beta11)
8221167Sgnn	top.c: avoid potential loop if stdout gets closed, use macro
9221167Sgnn	for p_active to avoid collision with system macros.
10221167Sgnn	m_sunos5: widened some fields to accomodate 5.8.
11221167Sgnn	m_decosf1: added ordering support
12221167Sgnn	m_irix62_64: provides 64-bit module based on m_irix62.
13221167Sgnn	m_irix62: skip bogus files in /proc directory
14221167Sgnn	m_svr42MP and m_svr5: complete replacement with updated copies
15221167Sgnn	m_mtxinu: complete replacement with updated copies
16221167Sgnn	m_aix43: new module for 4.3
17221167Sgnn	getans: replaced with a Bourne shell script
18221167Sgnn
19221167SgnnMon Mar  6 2000 - wnl (3.5beta10)
20221167Sgnn	m_sunos5.c: workaround for curses bug: ensure that TERMINFO has
21221167Sgnn	a value.
22221167Sgnn
23221167SgnnFri Jan 15 1999 - wnl (3.5beta10)
24221167Sgnn	top.c: now check return code from read to avoid looping on eof.
25221167Sgnn	top.c: delay of 0 now only valid for root.
26221167Sgnn	decosf1.c: patches from Rainer Orth should fix most of the
27221167Sgnn	problems with this module (including the display of certain
28221167Sgnn	processes and runtime errors).
29221167Sgnn	sunos5.c: Rainer insisted on putting the slash back in the
30221167Sgnn	state field ("run/4") and widened the field to accomodate it.
31221167Sgnn	aix.c: widened PID field for 6-digit pids (shortened NICE field)
32221167Sgnn	module macosx added, thanks to Andrew Townley.
33221167Sgnn
34221167SgnnFri Dec 18 1998 - wnl (3.5beta9)
35221167Sgnn	Configure checks status of "make" and complains if it fails.
36221167Sgnn
37221167SgnnThu Dec 17 1998 - wnl (3.5beta9)
38221167Sgnn	Added module sco5 from Mike Hopkirk.
39221167Sgnn	Added module netbsd132 from moto kawasaki.
40221167Sgnn
41221167SgnnSun Oct 25 1998 - wnl (3.5beta9)
42221167Sgnn	Added Casper's patches for sunos5 for the following:
43221167Sgnn	produce same results as swap -s (5.5 and higher),
44221167Sgnn	don't use system_pages kstat when /dev/kmem can be opened,
45221167Sgnn	skip . and .. when reading /proc, replace use of SOLARIS24
46221167Sgnn	with OSREV.
47221167Sgnn
48221167SgnnFri Sep 11 1998 - wnl (3.5beta9)
49221167Sgnn	Added workaround to getans for the absence of $< in SCO Unix.
50221167Sgnn
51221167SgnnWed Jul  1 1998 - wnl (3.5beta9)
52221167Sgnn	Changed structure member "errno" to "errnum" in commands.c.
53221167Sgnn	Replaced hpux10 module with one from John Haxby.
54221167Sgnn
55221167SgnnFri Apr 17 1998 - wnl (3.5beta8)
56221167Sgnn	Moved definition of _KMEMUSER earlier in m_sunos5.c.  This should
57221167Sgnn	fix the compilation problem with gnu 2.7.2.3, obviating the need
58221167Sgnn	for the fixinc.svr4 patch, but hopefully will not affect anything
59221167Sgnn	else.
60221167Sgnn	Added -DORDER to m_sunos4mp.c
61221167Sgnn
62221167SgnnTue Nov 18 1997 - wnl (3.5beta7)
63221167Sgnn	Added gcc 2.7.2.3 patch for fixinc.svr4 and changed INSTALL and
64221167Sgnn	FAQ to refer to it.
65221167Sgnn	Added NetBSD HP9000 fix.  Hopefully it doesn't break other 
66221167Sgnn	NetBSD platforms.
67221167Sgnn
68221167SgnnFri Oct 24 1997 - wnl (3.5beta7)
69221167Sgnn	Modified m_dcosx.c to change uses of procdir to xprocdir, avoiding
70221167Sgnn	a name clash with an include file (Bryn Parrott)
71221167Sgnn
72221167SgnnSat Oct 11 1997 - wnl (3.5beta6)
73221167Sgnn	Incorporated Casper's patches for Solaris 2.6 and for the multi-
74221167Sgnn	processor bug ("kstat finds too many cpus").
75221167Sgnn
76221167SgnnSun Jan 20 1996 - wnl (3.5beta5)
77221167Sgnn	Fixed Casper's m_sunos5 module: there was a poor interaction with 
78221167Sgnn	his use of OSREV and SunOS 5.5.1.
79221167Sgnn
80221167SgnnFri Dec 20 1996 - wnl (3.5beta4)
81221167Sgnn	Replaced m_sunos5 with a reworked version by Casper Dik.  This one
82221167Sgnn	should work under 2.6 and may not require that top be run setuid
83221167Sgnn	to root under 2.5 or 2.6.  This also fixed a bug in m_sunos5 that
84221167Sgnn	was introduced in beta3.
85221167Sgnn	Fixed calculation of OSREV in Configure.
86221167Sgnn
87221167SgnnWed Nov 20 1996 - wnl (3.5beta3)
88221167Sgnn	Incorporated contributed fixes to:  bsdos2, irix62, freebsd20,
89221167Sgnn	ultrix4, sunos5.  Changed calculation of swap area in sunos5 (now
90221167Sgnn	uses swapctl).  sunos5 now understands idled processors.  Changed
91221167Sgnn	Configure to determine os revision using uname (when available)
92221167Sgnn	and adding it to machine.c compiliation in Makefile as -DOSREV.
93221167Sgnn	Changed calls to "exit" in modules to use "quit" instead.
94221167Sgnn
95221167SgnnOct 20 1996 - wnl (3.5beta3)
96221167Sgnn	Removed "time" from list of ordering choices:  there's no easy way
97221167Sgnn	to get cpu time for all processes (it's in the u area).
98221167Sgnn
99221167SgnnFri Oct 18 1996 - wnl (3.5beta3)
100221167Sgnn	hpux10 and hpux9: using a better means for determining when a
101221167Sgnn	process is idle.
102221167Sgnn	decosf1 now includes utils.h.
103221167Sgnn
104221167SgnnFri Sep 13 1996 - wnl (3.5beta2)
105221167Sgnn	Fixed Configure to build Make.desc in such a way that doesn't
106221167Sgnn	require a long argument to sed.
107221167Sgnn
108221167SgnnThu Sep 12 1996 - wnl (3.5beta2)
109221167Sgnn	Fixed bug in display.c that affected empty cpustate names.
110221167Sgnn	Created hpux1010 module - a variant of hpux10 that does not use
111221167Sgnn	struct proc or struct user (suitable for HP/UX 10.10).
112221167Sgnn
113221167SgnnWed Sep 11 1996 - wnl (3.5beta2)
114221167Sgnn	Changes to sunos5 module:  Removed WCPU column since it is meaningless
115221167Sgnn	on a SVR4-based system.  Added THR column to show number of threads
116221167Sgnn	for each process.  This was not straightforward: the information is
117221167Sgnn	not stored in prpsinfo but rather in prstatus.
118221167Sgnn
119221167SgnnTue Sep 10 1996 - wnl (3.5beta1)
120221167Sgnn	Added patches for sunos4mp to provide order support.
121221167Sgnn	Added irix62 module.
122221167Sgnn	Changed prime.c to include stdio.h for printf prototype.
123221167Sgnn	Added conditional code to os.h and utils.c to handle systems
124221167Sgnn	where sys_errlist is defined in stdio.h (such as NetBSD).
125221167Sgnn
126221167SgnnMon Sep 09 1996 - wnl (3.5beta1)
127221167Sgnn	Removed tar and shar rules from Makefile.X -- don't need them anymore.
128221167Sgnn	Added -v option to display version number.  Updated man page.
129221167Sgnn
130221167SgnnThu Aug 29 1996 - wnl (3.4)
131221167Sgnn	Replaced modules (from Tim Pugh): next 32, next40.
132221167Sgnn	Fixed bug in username.c: hashing negative uids.
133221167Sgnn
134221167SgnnThu Aug 22 1996 - wnl (3.4beta3)
135221167Sgnn	Patched modules:  ultrix4, sunos4, sunos5, utek, decosf1, irix5.
136221167Sgnn	Added modules: next40, next32.
137221167Sgnn	Fixed procstates update bug in display.c.
138221167Sgnn	Fixed divide by zero bug in utils.c.
139221167Sgnn	Fixed bad number in layout.h
140221167Sgnn	Minor fixes to Configure.
141221167Sgnn	Complete overhaul of FAQ.
142221167Sgnn
143221167SgnnTue Feb 13 1996 - wnl (3.4beta3)
144221167Sgnn	Added convex module from Warren Vosper (originally written by
145221167Sgnn	William Jones).
146221167Sgnn
147221167SgnnTue Feb 13 1996 - wnl (3.4beta2)
148221167Sgnn	Fixed format_k in utils.c to calculate K and M values correctly.
149221167Sgnn	Added check for gigabyte values ('G').  Changed sumamry_format
150221167Sgnn	in display.c to use format_k where appropriate.
151221167Sgnn	Changed creation of distribution tar file to place everything in
152221167Sgnn	a top level directory.
153221167Sgnn
154221167SgnnTue Jan 30 1996 - wnl (3.4beta2)
155221167Sgnn	Added m_aix41 module.  Added new tag type to module comments:
156221167Sgnn	TERMCAP, which defined the library to use for a termcap library.
157221167Sgnn	If no TERMCAP tag is found in the module's initial comment, then
158221167Sgnn	Configure will default to "-ltermcap".  AIX needs this since it
159221167Sgnn	put all the termcap routines in libcurses(!)
160221167Sgnn
161221167Sgnn	Added m_bsdos2 (found lingering in my mailbox).
162221167Sgnn	Updated m_svr4 to include support for NCR multiprocessors.
163221167Sgnn	Fixed small bug in utils.c
164221167Sgnn
165221167SgnnThu Jan 25 1996 - wnl (3.4beta1)
166221167Sgnn	Fixed m_sunos5 invocation of gettimeofday to include "NULL" as
167221167Sgnn	second argument.  This provides compatability with the Posix-
168221167Sgnn	compliant template provided with SunOS 5.5, but doesn't hurt
169221167Sgnn	previous versions since they do bother with a template for that
170221167Sgnn	function.
171221167Sgnn
172221167Sgnn	Made changes (recommended by net users) to hpux10, ultrix4,
173221167Sgnn	netbsd10, aux3 (replaced aux31).  Added module for linux.
174221167Sgnn
175221167SgnnFri Oct 10 1995 - wnl (3.4beta1)
176221167Sgnn	Added user-contributed modules for SCO Unix, IRIX 5, HP/UX 10,
177221167Sgnn	Pyramid DC/OSX.  Changed Configure so that it runs in environments
178221167Sgnn	whose c-shells have no 'eval'(!).  Added support for multiple sort
179221167Sgnn	ordering methods via the -o switch.  This option requires support
180221167Sgnn	from the machine dependent module: such support was added to
181221167Sgnn	sunos5 (thus sunos54) and sunos4.
182221167Sgnn
183221167Sgnn	display.c:  Changed CPU states display line to shorten the leading
184221167Sgnn	tag if the data won't fit in the current width.  Fixed a divide-by-
185221167Sgnn	zero bug that affected ultrasparc servers (and potentially other
186221167Sgnn	systems).
187221167Sgnn
188221167Sgnn	m_sunos5.c: Now asks the system for the correct pagesize rather than
189221167Sgnn	assuming it is 4K.
190221167Sgnn
191221167SgnnThu Mar  2 1995 - wnl (3.3 RELEASE)
192221167Sgnn	Added module netbsd10 and renamed netbsd to netbsd08.  Changed
193221167Sgnn	Configure so that it does not use an initial default module name.
194221167Sgnn	Made other compatability fixes to Configure.  Added comments to
195221167Sgnn	decosf1 concerning optimizer bug.  Other documentation changes.
196221167Sgnn	Added use of "prime.c" to Configure script.
197221167Sgnn
198221167SgnnTue Feb  7 1995 - wnl (3.3beta6)
199221167Sgnn	Still one more beta....
200221167Sgnn	Fixes for sunos5 2.4 gcc core dump (it was an alignment problem).
201221167Sgnn	Fixed and improvements for decosf1 (including use of format_k
202221167Sgnn	for proper SIZE column formatting).  Added modules freebsd20 and
203221167Sgnn	ncr3000.
204221167Sgnn
205221167SgnnThu Feb  2 1995 - wnl (3.3beta5)
206221167Sgnn	One more beta....
207221167Sgnn	Fixed a few bugs in the sunos5 port pertaining to casting and
208221167Sgnn	very large memory counts.  Added "ifndef HAVE_GETOPT" to getopt.c
209221167Sgnn	to provide for conditional compilation of the getopt function.
210221167Sgnn	Those systems that have getopt in libc can add -DHAVE_GETOPT to
211221167Sgnn	the CFLAGS line in the module to prevent the function from being
212221167Sgnn	compiled.  Added sunos54 module to accomodate SunOS 5.4
213221167Sgnn	peculiarities.  Added module for aux3.1.
214221167Sgnn
215221167SgnnWed Jan  4 1995 - wnl (3.3beta4)
216221167Sgnn	This is really taking too long......sigh.
217221167Sgnn	Fixed SIGWINCH handling	once and for all.  It now remembers the
218221167Sgnn        number of processes you	want displayed even thru window resizes.
219221167Sgnn	Fixed buffer conflict in utils.c (itoa and itoa7).
220221167Sgnn        Lots of small improvements to the various modules were made over
221221167Sgnn	the past month: too numberous to list here.  SunOS 5 module made
222221167Sgnn	more secure thru use of seteuid calls (other SVR4 modules should
223221167Sgnn	be modified similarly).  One final MP fix to sunos5, too.  Module
224221167Sgnn	for decosf1 was modified to accomodate V3.0.
225221167Sgnn
226221167SgnnMon Apr 18 1994 - wnl (3.3beta3)
227221167Sgnn	I think I finally got a sunos5 module that will work on MP
228221167Sgnn	machines.  Fixed cpu states figure in osmp41a so that 
229221167Sgnn	percentages never exceed 100%.  Added shell script "install"
230221167Sgnn	since Unix vendors can't seem to make up their minds on what
231221167Sgnn	options they want to use for the one that comes with the OS.
232221167Sgnn	Added netbsd modules from Christos.  Fixed lots of other little
233221167Sgnn	things over the past few months that I have long since forgotten.
234221167Sgnn
235221167SgnnWed Dec 15 1993 - wnl (3.3beta2)
236221167Sgnn	Added module patches from various users:  hpux9, sunos5.
237221167Sgnn	Fixed bug with batch mode (screen_width wasn't getting set).
238221167Sgnn	Changes to accomodate 64 bit machines.
239221167Sgnn	Fixed some bugs in command parsing ("renice 19 " did something
240221167Sgnn	unexpected).
241221167Sgnn
242221167SgnnMon Aug 30 1993 - wnl (3.3beta)
243221167Sgnn	Added lots of little patches from various users.
244221167Sgnn	Added routines to utils.c for intelligent formatting of kilobytes
245221167Sgnn	and time.  These are intended to be used in the modules when
246221167Sgnn	formatting a process line.  Added code to "summary_format" in
247221167Sgnn	display.c to do intelligent formatting of memory quantities.
248221167Sgnn	Redid display.c to allow for varying line widths and dynamic
249221167Sgnn	reallocation of the screen buffer.
250221167Sgnn	Added a SIGWINCH handler to top.c!
251221167Sgnn	Added a constant, MAX_COLS, to top.h which defines the absolute
252221167Sgnn	widest line we will ever allow.  Changed allocations of "char fmt"
253221167Sgnn	in all machine modules to use this constant rather than an abitrary
254221167Sgnn	number.
255221167Sgnn
256221167SgnnFri Aug 13 1993 - wnl (3.3)
257221167Sgnn	Changed return value definition of time-related functions in top.c,
258221167Sgnn	display.c, and m_ultrix4.c to time_t (stuart@coral.cs.jcu.edu.au).
259221167Sgnn	Fixed bug in display.c: line_update when start != 0.
260221167Sgnn
261221167SgnnWed Aug  4 1993 - wnl (3.2 release)
262221167Sgnn	Changes to Configure from Paul Vixie.  Added modules for hpux9 and
263221167Sgnn	bsd386.
264221167Sgnn
265221167SgnnTue Jul 13 1993 - wnl (3.1 release)
266221167Sgnn	More small changes and minor bug fixes.  Brought bsd44 up to date
267221167Sgnn	and added a module for svr4.2.  Changed shar packaging to use Rich
268221167Sgnn	Salz's cshar stuff.
269221167Sgnn
270221167SgnnWed Jul  7 1993 - wnl (3.1BETA)
271221167Sgnn	More changes and bug fixes to Configure.  Applied some other
272221167Sgnn	minor bug fixes and suggestions from the beta testers.  Added
273221167Sgnn	the "metatop" shell script and the "installmeta" rule to the
274221167Sgnn	Makefile to make handling multiple machine models and OS versions
275221167Sgnn	easier.  Added INSTALL and FAQ files.
276221167Sgnn
277221167SgnnTue May 18 1993 - wnl (3.1BETA)
278221167Sgnn	Changed Configure to be compatible with most SVR4 environments
279221167Sgnn	(differing output from "ls -lg").  Also changed Configure,
280221167Sgnn	Makefile.X, etc., to look for module files in the subdirectory
281221167Sgnn	"machine" (thanks to Christos Zoulas).
282221167Sgnn
283221167SgnnTue Apr 20 1993 - wnl (3.1BETA)
284221167Sgnn	Changed both occurences of "ls -1" in Configure to "ls".  This
285221167Sgnn	SHOULD produce the same result, and has the advantage that it
286221167Sgnn	doesn't produce an error on a system 5 machine.  Integrated other
287221167Sgnn	changes recommended in the first round of beta testing.
288221167Sgnn
289221167SgnnWed Mar 10 1993 - wnl (3.1BETA)
290221167Sgnn	MAJOR CHANGE:  I have added a required function to all machine
291221167Sgnn	dependent modules, called proc_owner.  It takes a pid as an argument
292221167Sgnn	and returns the uid of the process's owner.  Such capability is 
293221167Sgnn	necessary for top to run securely as a set-uid program, something
294221167Sgnn	that is needed for SVR4 implementations to read /proc.  I have
295221167Sgnn	retrofitted all modules except dgux with this function, but was
296221167Sgnn	not able to test most of them.  Top should now run securely as
297221167Sgnn	a setuid program.  Added 386bsd and sunos5 modules.  Added sunos4mp
298221167Sgnn	module for MP Suns.
299221167Sgnn
300221167SgnnSat Feb 20 1993 - wnl (3.1ALPHA)
301221167Sgnn	Modified top.c and commands.c to compile correctly on System V
302221167Sgnn	derived Unixes (especially SVR4), but in a way that doesn't rely
303221167Sgnn	on an oracle-like declaration (that is, I don't use "ifdef SYSV").
304221167Sgnn	Fixed some bugs in "Configure" and "getans".  Added inspection of
305221167Sgnn	env variable "TOP" for options, and made -I default to showing
306221167Sgnn	idle processes.  Added "u" command to change username restriction
307221167Sgnn	on the fly.  Created shell script "suntop" for poor multi-version
308221167Sgnn	SunOS folks (like myself).
309221167Sgnn
310221167SgnnWed Jun  3 1992 - wnl (3.0)
311221167Sgnn	"max_topn" wasn't being used everywhere it was supposed to be
312221167Sgnn	in top.c.  Many cosmetic changes, including copyright notices in
313221167Sgnn	all the .c files.  Version number is now handled by version.c and
314221167Sgnn	reflects the current patchlevel (which is initially set to 0).
315221167Sgnn	Changed Configure and Makefile to allow configurable variables for
316221167Sgnn	certain commands:  shell, cc, awk, install.  Updated README and
317221167Sgnn	Porting.  Ready to release to the world!
318221167Sgnn
319221167SgnnMon May 18 1992 - wnl (2.9BETA)
320221167Sgnn	Added modules provided by Christos Zoulas.  Replaced screen.c
321221167Sgnn	with one modified by Christos and that will appropriately select
322221167Sgnn	and handle the sgtty, termio, or termios system.  Integrated many
323221167Sgnn	other changes recommended by Christos.  Fixed (I hope) the "-b"
324221167Sgnn	batch mode display bug.  Had to change loadavg to load_avg to avoid
325221167Sgnn	a conflict with 4.4BSD.  
326221167Sgnn
327221167SgnnMon Apr 27 1992 - wnl (2.8BETA)
328221167Sgnn	Added modules provided by Daniel Trinkle.  Added patchlevel.h,
329221167Sgnn	but the patch level is not yet reflected in the version number.
330221167Sgnn	Cleaned up m_sunos4.c a little.
331221167Sgnn
332221167SgnnWed Apr 22 1992 - wnl (2.8BETA)
333221167Sgnn	Major internal reorganization.  All of the system dependent stuff
334221167Sgnn	is now really and truly separated from everything else.  The
335221167Sgnn	system dependent functions are contained in a separate .c file
336221167Sgnn	called a "module".  The Configure script knows how to find and
337221167Sgnn	set up these modules, but the human installer still needs to tell
338221167Sgnn	Configure which module to use (no automagic determination of 
339221167Sgnn	machine type---sorry).  Added -U option to specify one user's
340221167Sgnn	processes, but there is no corresponding command...yet.  Other
341221167Sgnn	changes and improvements too numerous to mention here.  Currently
342221167Sgnn	there are only two modules:  sunos4 and umax.  But after this beta
343221167Sgnn	release is sent around, I expect more to be written.  I just hope
344221167Sgnn	that the machine-dependent abstractions don't need to change in
345221167Sgnn	the process.
346221167Sgnn
347221167SgnnThu Mar 26 1992 - wnl (2.7BETA)
348221167Sgnn	Beta release with minimal architecture support.  Updated README
349221167Sgnn	and added a first cut at a Porting guide.  Added ioctl TIOCGWINSZ
350221167Sgnn	code from top2.5+ (courtesy of David MacKenzie).  I didn't even
351221167Sgnn	try porting the Ultrix support since I don't have access to an
352221167Sgnn	Ultrix machine.
353221167Sgnn
354221167SgnnFri Oct 11 1991 - wnl (2.6)
355221167Sgnn	This version was not widely released.  It contained many changes.
356221167Sgnn	Here are the major ones:
357221167Sgnn
358221167Sgnn	Put in Vixie's idle process hack.
359221167Sgnn
360221167Sgnn	Enhanced type field in new_message to handle delayed messages.
361221167Sgnn
362221167Sgnn	Changed u_process to automatically adjust for varying lines of
363221167Sgnn	output.  Management of screenbuf should now be completely contained
364221167Sgnn	in display.c.  Removed now extraneous code from CMD_number[12]
365221167Sgnn	portion of command switch in top.c.  This was the stuff that dealt
366221167Sgnn	with zeroing out lines in screenbuf.
367221167Sgnn
368221167Sgnn	Finally made it all work correctly on a 386i.  Problems I had to
369221167Sgnn	overcome: kvm_nlist doesn't return 0 on success as advertised (it
370221167Sgnn	returns 1 instead); the results of a kvm_nlist are different
371221167Sgnn	(n_type can be zero even for a symbol that exists).
372221167Sgnn
373221167Sgnn	Serious rearrangement for processor dependent stuff.  All nlists
374221167Sgnn	are now in separate files with the suffix ".nlist".  Most machine
375221167Sgnn	specific code is in "machine.c" surrounded by appropriate ifdefs---
376221167Sgnn	the goal is to eventually have all machine specific code in this
377221167Sgnn	file.  Managed to find a way to detect SunOS 4.x at compile-time:
378221167Sgnn	this is contained in the include file "sun.h".  Completely changed
379221167Sgnn	the memory display line for SunOS 4.x---it now displays a far
380221167Sgnn	more appropriate report.
381221167Sgnn
382221167Sgnn	Created the shell script "Configure" to aid in the configuration
383221167Sgnn	step.
384221167Sgnn
385221167Sgnn	Fixed a bug in init_termcap:  it will now tolerate an environment
386221167Sgnn	which does not have TERM defined (thanks to Sam Horrocks for
387221167Sgnn	pointing this out).
388221167Sgnn
389221167SgnnTue Aug  9 1988 - wnl (2.5)
390221167Sgnn	Added changes to make top work under version 4.0 of the Sun
391221167Sgnn	operating system.  Changes were provided by Scott Alexander of the
392221167Sgnn	University of Pennsylvania.  Thanks!  Compile with "-Dsunos4" to
393221167Sgnn	get them.  Virtual memory statistics are not readily accessible
394221167Sgnn	under 4.0, so they don't show up in the output.
395221167Sgnn
396221167SgnnThu Jul 31 1987 - wnl (2.4)
397221167Sgnn	Fixed a problem with the 4.0 Pyramid code.  The label "cp_time"
398221167Sgnn	doesn't exist in the 4.0 kernel anymore.  I think the code Carl
399221167Sgnn	sent me wants "percpu" instead.  That is what I am using and it
400221167Sgnn	appears to work.  375 code is still untested (at least by me).
401221167Sgnn	Also picked a great deal of lint out of the source.  Lint now only
402221167Sgnn	complains about a very few nitpicky things (there are far too many
403221167Sgnn	calls to "printf" to put a "(void)" in front of!), at least under
404221167Sgnn	SunOS.
405221167Sgnn
406221167SgnnTue Jul 28 1987 - wnl (2.4a)
407221167Sgnn	Added changes for a Symmetrics Computer Systems s/375 machine.
408221167Sgnn	Changes were provided by Paul Vixie.  Thanks!  According to Mr.
409221167Sgnn	Vixie:  "These changes were not made at, by, or for SCS proper.
410221167Sgnn	SCS would probably be interested in them, but so far only the
411221167Sgnn	users' group has them.  They were made in February, 1987, to
412221167Sgnn	version 2.1 of the program, by Paul Vixie
413221167Sgnn	(dual!ptsfa!vixie!paul@ucbvax.Berkeley.EDU)."  His changes were
414221167Sgnn	integrated into version 2.3 to make version 2.4.
415221167Sgnn
416221167Sgnn	The SCS peculiarities are summarized in Changes.scs.
417221167Sgnn
418221167SgnnTue Jun  9 1987 - wnl (2.3 for real)
419221167Sgnn	Changed the includes for the extra code Carl sent me to only
420221167Sgnn	compile on Version 4.0 Pyramid machines.  This makes top still
421221167Sgnn	compilable on pre-4.0 Pyramids.  Specifically, this code is only
422221167Sgnn	compiled when both "pyr" and "CPUFOUND" are defined.
423221167Sgnn
424221167SgnnWed Jun  3 1987 - wnl (2.3 with Pyramid additions)
425221167Sgnn	It's been a month and I still haven't done anything about
426221167Sgnn	distributing this version.  However, Carl Gutekunst from Pyramid
427221167Sgnn	has sent me some extra patches for some of the Pyramid code.  I
428221167Sgnn	just added those and will make them part of 2.3.  This fixes the
429221167Sgnn	following Pyramid problems:  adds the inclusion of <sys/systm.h>,
430221167Sgnn	uses the correct size for getting the kernel value _ccpu (this bug
431221167Sgnn	affected the Vax version as well), sums the elements of the percpu
432221167Sgnn	array to calculate a cp_time value (for OSx 4.0).
433221167Sgnn
434221167SgnnFri May  1 1987 - wnl (2.3)
435221167Sgnn	I have finally finished all the changes for better support of
436221167Sgnn	oddbal terminals.  Added the low-level routine "clear_eol" which
437221167Sgnn	makes handling terminals without "ce" easy:  it uses spaces
438221167Sgnn	instead.  All direct uses of "clear_line" outside of screen.c have
439221167Sgnn	been changed to use this primitive.  A terminal with "os" is now
440221167Sgnn	handled in such that all situations that need overwriting are
441221167Sgnn	completely avoided (including several commands).  This required
442221167Sgnn	some changes to the way commands are translated into action (in
443221167Sgnn	"top.c").  Made several important changes to display.c to prevent
444221167Sgnn	overflowing of any of the fields.  Specifically, more than 99
445221167Sgnn	total processes and a cpu state that reaches 100%.  Had to make a
446221167Sgnn	small change to two casts in top.c, because the Sun 3.2 compiler
447221167Sgnn	was giving warnings on them.  Added the "-q" option which lets
448221167Sgnn	root run top at a nice of -20 (in case he thinks he really needs it).
449221167Sgnn
450221167SgnnTue Dec 30 1986 - wnl (2.2)
451221167Sgnn	I think I fixed a bug reported by Julian Onions at Nottingham.
452221167Sgnn	Occasionally, top will core dump when the sprintf in either
453221167Sgnn	i_process or u_process overflows due to an exceptionally
454221167Sgnn	unrealistic time value.  I think it highly unlikely that top can
455221167Sgnn	get a bad proc structure (although I suppose it is possible), but
456221167Sgnn	the process time is read from the user structure, and that can
457221167Sgnn	sometimes be part garbage.  So, "get_ucpu" checks the value it
458221167Sgnn	returns to make sure its formatted form will not overflow the
459221167Sgnn	sprintf.  If this doesn't fix the bug, then more drastic measures
460221167Sgnn	will be necessary.  I plan to make this version the official
461221167Sgnn	"top 2.2".  [[ This version was never distributed very widely. ]]
462221167Sgnn
463221167SgnnTue Dec  2 1986 - wnl (2.2c)
464221167Sgnn	Added to top.c the notion of a "failed command".  When a command
465221167Sgnn	produces a message (on the message line), an update does not
466221167Sgnn	follow it.  Before, the message was written and a new display was
467221167Sgnn	shown---purposefully not overwriting the message.  But the
468221167Sgnn	improvements to handle overstriking terminals and terminals
469221167Sgnn	without "ce" clear the screen before every display, which would
470221167Sgnn	erase the message.  Now, the message is displayed and top waits
471221167Sgnn	another full time interval before updating the display.  This
472221167Sgnn	works much better all around.
473221167Sgnn
474221167SgnnMon Nov 24 1986 - wnl (2.2b)
475221167Sgnn	Created a new file, utils.c, and made appropriate changes to
476221167Sgnn	Makefile.  This new file holds all utility functions that can and
477221167Sgnn	may be used by more than one "module".  Improved i_memory and
478221167Sgnn	u_memory (display.c) so that screen updates for the values
479221167Sgnn	displayed are only changed when necessary.  Also made the line
480221167Sgnn	look better:  the last fixes made for a rather ugly display.
481221167Sgnn	Added the locally defined constant "LoadMax" and added code to
482221167Sgnn	top.c to send the cursor home after a space command is entered if
483221167Sgnn	the load average is higher than "LoadMax".  This provides visual
484221167Sgnn	feedback on loaded systems.
485221167Sgnn
486221167SgnnMon Nov  3 1986 - wnl (2.2a)
487221167Sgnn	Widened the format for memory usage so that it can display 5
488221167Sgnn	digits.  This makes that line look a little ugly---maybe I'll fix
489221167Sgnn	that later.  Screen handling now understands "os" and a missing
490221167Sgnn	"ce".  It treats them identically:  clear the screen between each
491221167Sgnn	display.  Screen handling code now uses "cd" when appropriate
492221167Sgnn	(i.e.:  when user has shortened the screen).  Made i_loadave clear
493221167Sgnn	then screen and took out most of the explicit calls to "clear" in
494221167Sgnn	top.c.  This method is cleaner, especially in conjunction with
495221167Sgnn	"os" handling.  Added preprocessor variable "RANDOM_PW" for
496221167Sgnn	systems that access the passwd file randomly (Sun's yp and 4.3).
497221167Sgnn	With "RANDOM_PW" set, "getpwuid" is used instead of "getpwnam",
498221167Sgnn	but uid->username mappings are still hashed internally (because
499221167Sgnn	that is still faster than going to disk).
500221167Sgnn
501221167SgnnMon Oct  6 1986 - wnl (2.1)
502221167Sgnn	A bug with the kill command was pointed out by "dciem!tim"---
503221167Sgnn	specifying a signal by name did not work correctly.  This bug has
504221167Sgnn	been fixed with a simple change to commands.c.  Another bug made
505221167Sgnn	the cpu state percentages incorrect the first time they were
506221167Sgnn	displayed.  This bug has also been fixed (changed top.c).
507221167Sgnn
508221167SgnnThu Sep  4 1986 - wnl (2.0, at last)
509221167Sgnn	This is the version that will (hopefully) get released to the
510221167Sgnn	world as top 2.0.
511221167Sgnn	Added the "r" and "k" commands for renice and kill, respectively.
512221167Sgnn	This required adding a way to handle system call errors, and the
513221167Sgnn	addition of the "e" command.  Help screen and manual page were
514221167Sgnn	changed to reflect this change.  Changed all "#ifdef SUN" directives
515221167Sgnn	to "#ifdef sun", and changed all "#ifdef PYRAMID" directives to
516221167Sgnn	"#ifdef pyr".  As much as I hate those choices of preprocessor
517221167Sgnn	names (they too easily conflict with real variable names), it does
518221167Sgnn	make automatic compilation possible---people don't have to change
519221167Sgnn	the Makefile anymore for specific machines.  The manual page was
520221167Sgnn	changed to automatically incorporate the defaults as set in the
521221167Sgnn	Makefile (including an infinite value for TOPN) and the way the
522221167Sgnn	manual page is generated by the Makefile was changed to make
523221167Sgnn	maintenance of this information automatic.
524221167Sgnn
525221167SgnnMon Jul 28 1986 - wnl (still pre 2.0)
526221167Sgnn	Real close now.  I put in a new definition for the macro "pagetok"
527221167Sgnn	that does an explicit shift of a constant expression involving
528221167Sgnn	PGSHIFT.  Appropriate checks are made if PGSHIFT is to small.
529221167Sgnn	"pagetok" is now used exclusively everywhere to convert kernel
530221167Sgnn	clicks to kilobytes.  I added a full blown interactive mode with
531221167Sgnn	the ability to change some of the runtime parameters (how many to
532221167Sgnn	display, time delay, etc.) while top is running.  I also
533221167Sgnn	incorporated a few ideas from the net:  control characters in the
534221167Sgnn	command name are replaced with '?'; the '-S' option makes the
535221167Sgnn	swapper and pager visible; options have been added to control the
536221167Sgnn	number of displays produced (this makes it easier to make
537221167Sgnn	performance snapshots with top).  I have also added the notion of
538221167Sgnn	"infinite" values for number of processes and number of displays.
539221167Sgnn	I fixed a long-standing bug in the uid to username mapping code
540221167Sgnn	that was only aggravated on the pyramids:  it was an ill-defined
541221167Sgnn	expression (akin to i = i++).  I tweaked the proc_compar routine
542221167Sgnn	for qsort slightly so that stopped processes were more likely to
543221167Sgnn	show up.  Manual page was updated to reflect all changes
544221167Sgnn	noticeable to the user.
545221167Sgnn
546221167SgnnTue Jul  1 1986 - wnl (pre 2.0 -- 1.9999?)
547221167Sgnn	In the process of major revamping on the way to version 2.0.
548221167Sgnn	I have completely done away with curses by adding my own screen
549221167Sgnn	management routines in a separate file (screen.c).  The rationale
550221167Sgnn	for this is that top knows a whole lot more about what is and is
551221167Sgnn	not redundant on the screen and can compare simple integer values
552221167Sgnn	where curses would have to compare strings.  This has turned out
553221167Sgnn	to be a very big win speed-wise.  The proc_compar routine for
554221167Sgnn	sorting has been rewritten to include several more keys.  I
555221167Sgnn	decided this was necessary when I noticed that the "top" process
556221167Sgnn	itself kept disappearing off the top 10 list on a Sun-3.  All the
557221167Sgnn	processes had the same percentage (0%) and the sort wasn't really
558221167Sgnn	doing anything worthwhile.  I changed the expression that computes
559221167Sgnn	memory usage to use the ctob macro instead of just assuming that
560221167Sgnn	pages were 512 bytes.  More work still needs to be done before
561221167Sgnn	this version is usable.  I changed options-processing to use
562221167Sgnn	getopt and added appropriate incantations to the Makefile.
563221167Sgnn
564221167SgnnWed Feb 20 1985 - wnl (still 1.8)
565221167Sgnn	Put in the ifdef FOUR_ONE statements to make top still compilable
566221167Sgnn	on a 4.1 system.  Apparently, there are some users out there that
567221167Sgnn	need this functionality.  Oh well.  I don't guarantee any of it,
568221167Sgnn	since I can't test it.  Made appropriate changes to README and
569221167Sgnn	final installation related changes to Makefile.
570221167Sgnn
571221167SgnnSat Feb  2 1985 - wnl (1.8)
572221167Sgnn	Removed all the ifdef FOUR_TWO statements and made "top" into a
573221167Sgnn	4.2 only program.  If someone really wants to still run it on 4.1,
574221167Sgnn	then they can do all the work.  We don't have a 4.1 machine
575221167Sgnn	anymore, so I don't even know if the thing still works under 4.1.
576221167Sgnn	Cleaned up the Makefile and the README.  Added installation rules
577221167Sgnn	to the Makefile, as requested by several sites.  Fixed a very
578221167Sgnn	obscure divide-by-zero bug.  Added a second "key" to the qsort
579221167Sgnn	comparison function (proc_compar) so that comparisons are based on
580221167Sgnn	cpu ticks if the percentages are equal (provided by Jonathon
581221167Sgnn	Feiber at Sun).
582221167Sgnn
583221167SgnnTue Dec 11 1984 - wnl (1.7)
584221167Sgnn	Added the virtual and real memory status line to the header area
585221167Sgnn	(provided by Jonathon Feiber at Sun)
586221167Sgnn
587221167SgnnTue Nov 20 1984 - wnl (1.6)
588221167Sgnn	Added an "exit" if sbrk's fail.  Added changes from Jonathon
589221167Sgnn	Feiber at Sun:  ifdef SUN to make top work on Suns (they don't use
590221167Sgnn	doubles in the proc structure), register declarations, check for
591221167Sgnn	getting a user structure that has disappeared since the proc array
592221167Sgnn	was read (it used to die, now it just shows the process as swapped).
593221167Sgnn
594221167SgnnTue Nov 13 1984 - wnl (1.5)
595221167Sgnn	If the number of displayable processes ("active_procs") was less
596221167Sgnn	than the number of requested processes ("topn"), top would
597221167Sgnn	segmentation fault.  This bug has been fixed.  Thanks to Prentiss
598221167Sgnn	Riddle at ut-sally for pointing out the existence of this bug.
599221167Sgnn
600221167SgnnTue Oct 23 1984 - wnl (1.4)
601221167Sgnn	Finally fixed the hash table bug that caused processes owned by
602221167Sgnn	root to sometimes appear with either no name or a different name
603221167Sgnn	that had UID 0 (such as "operator").  Removed all the ifdef DEBUG
604221167Sgnn	blocks to make top ready for distribution to the real world.
605221167Sgnn
606221167SgnnSun Apr  8 1984 - wnl (still 1.3)
607221167Sgnn	Made some slight changes to the display format.  It now looks more
608221167Sgnn	aesthetically pleasing.  Added some preprocessor constants so that
609221167Sgnn	the two defaults (number of processes and seconds of delay) easier
610221167Sgnn	to change.
611221167Sgnn
612221167SgnnThu Apr  5 1984 - wnl (1.3)
613221167Sgnn	Changed the order in which things are done at initialization time.
614221167Sgnn	This way, if an error occurs before starting the main loop, curses
615221167Sgnn	will never get started.  Also changed other error handlers so that
616221167Sgnn	endwin() is called before any flavor of exit.  Specifying a number
617221167Sgnn	of processes that is more than the screen can handle is no longer
618221167Sgnn	fatal.  It displays a warning message and pretends the user
619221167Sgnn	specified the maximum for the screen.  Finally cured all the TSTP
620221167Sgnn	blues (well, almost all).  I removed my TSTP handler and convinced
621221167Sgnn	the system to always use the one that curses sets up.  Turns out
622221167Sgnn	that "sleep" was stepping all over it during a pause.  So, I don't
623221167Sgnn	use sleep anymore.  The only problem that remains with it now is
624221167Sgnn	redrawing the old display before updating it after a pause.
625221167Sgnn
626221167SgnnTue Apr  3 1984 - wnl (from 1.0 to 1.2)
627221167Sgnn	I changed the format of the TIME column from just "seconds" to
628221167Sgnn	"minutes:seconds".  I also made pausing work correctly.  Screen
629221167Sgnn	redraws with an up to date display.  For compatibility with 4.2, I
630221167Sgnn	changed the name of the "zero" function to "bzero".  The makefile
631221167Sgnn	has been altered to handle versions for 4.1 and 4.2, and README
632221167Sgnn	has been updated to reflect these recent changes.
633221167Sgnn