History log of /freebsd-current/usr.bin/top/screen.c
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 17be5f23 22-Aug-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): Use warnx and errx instead of fprintf

This also makes make "-v" exit without error, since it isn't.


# 32497673 26-Jul-2018 Daichi GOTO <daichi@FreeBSD.org>

top(1): fixed the empty output problem in non-interactive mode (-n, -b) regressed in r336028

PR: 229842
Reported by: Ali Abdallah <aliovx@gmail.com>
Reviewed by: eadler, cy
Approved by: gnn (mentor)
Differential Revision: https://reviews.freebsd.org/D16455


# 0a59db87 05-Jul-2018 Daichi GOTO <daichi@FreeBSD.org>

Changed to eliminate the upper limit of command length displayed
by "-a" and expand to match terminal width

Reviewed by: eadler
Approved by: gnn (mentor)
Differential Revision: https://reviews.freebsd.org/D16083


# 5c66dcc0 22-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): remove special handling of load > 5

When the load is "high" (an arbitrary value) top(1) previously moved the
cursor to the top-left of the screen as an acknowledgment. In practice,
on modern machines, even relatively slow ones, it looked more like a
glitch. Remove the logic.


# c8aa5e52 12-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): move command mapping to commands.c

This eliminates the difficult to follow mapping of a string list. It
moves numbers from "#define" into (more) debuggable enums. More
generally, it follows the trend of moving more data into a more central
mechanism.

The help output is a little worse: " " is not rendered well, and there
are duplicate entries, but that will be fixed in a followup.


# c51e28f4 02-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): Fix two speeling errors I introduced


# 4fedcd49 02-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): cleanup memory allocation and warnings

- Prefer calloc over malloc. This is more predicable and we're not in a
performance sensitive context. [1]
- Remove bogus comment (obsolete from prior commit). [2]
- Remove void casts and type casts of NULL
- Remove redundant declaration of 'quit'
- Add additional const

Reported by: kib [1], vangyzen [2]


# 2c1fdbac 02-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): remove wrapper around putchar

This appears to have been written for portability which we no longer
need.


# 0059e710 01-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): clean up a bit

- remove unused defines
- use standard defines for STDOUT
- don't cast for memset
- avoid using (void) cast


# 19789395 01-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): Use uid_t for uid rather than 'int'

Remove unneeded define while here.


# 0b2f6ed1 01-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): Use standard boolean rather than homegrown alternative


# f6234b51 01-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): ansify, style(9). and nits

- Prefer using ansi prototypes rather than C prototypes
- Keep type on separate line from name of function
- Try to keep things const where possible. This will help get to WARNS=6
- switch to "bool" where it makes sense


# 1b7645c6 21-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): modernize a bit; reduce warnings

- Replace caddr_t with "void *". This reduces
the number of warnings at WARNS=6
- use "static" where possible
- sprinkle const where possible

This leaves at WARNS=6:
35 warnings in top.c
88 warnings in machine.c
7 warnings in commands.c

all of which are either "incompatible-pointer-types-discards-qualifiers"
or "cast-qual"


# 00157b4c 21-May-2018 Eitan Adler <eadler@FreeBSD.org>

Revert r333969 which contained one too many changes


# bfb79c2c 21-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): modernize a bit; reduce warnings

- Replace caddr_t with "void *". This reduces
the number of warnings at WARNS=6
- use "static" where possible
- sprinkle const where possible

This leaves at WARNS=6:
35 warnings in top.c
72 warnings in machine.c
5 warnings in commands.c

all of which are either "incompatible-pointer-types-discards-qualifiers"
or "cast-qual"


# a5ca08ed 20-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): fix several more warnings


# 666cf873 20-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): clean much of WARNS=3 issues

There is still one glaring issue: new_message is not a protoype, but
can't be trivially converted since it uses K&R style var-args.


# 4901ca08 20-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): build with WARN=2


# f11066ef 20-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): unconditionally assume we are on FreeBSD (more unifdef)

Now that we're our own upstream, remove useless ifdefs.


# cebbed43 20-May-2018 Eitan Adler <eadler@FreeBSD.org>

Retry revert

I had a local modification before my revert. Try reverting one more time.


# 500cd2d6 20-May-2018 Eitan Adler <eadler@FreeBSD.org>

revert r333928

I had missed a file when testing this, and it does not build. Will try again.


# caee4883 19-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): unconditionally assume we are running on FreeBSD

This allows us to remove a special header and more specifically just the
system headers we want.


# 3be6ef06 19-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): Migrate top to usr.bin

We've been maintaining top(1) for a long time, and the upstream
hasn't existed/been used in similarly as long. Make it clear that we own
top(1)

Tested with 'make universe'. Everything passed except MIPS which failed
for unrelated reasons. Install also tested for amd64.

Reviewed by: sbruno
No objections: imp, mmacy
Differential Revision: https://reviews.freebsd.org/D15387