ps(1): Keywords: New UNSPEC type, rename 'alias', re-order fields
This is in preparation for a change in how aliases are resolved, itself
in preparation for being able to quickly identify columns displaying the
same information (same final keyword).
Add the new UNSPEC ("unspecified") type, as the keywords' type field is
only used by the kvar() and rvar() output routines, and has no meaning
for alias keywords. In particular, this will allow to check that no
specific type is associated to any alias. An immediate benefit is that
now most keywords have UNSPEC as their "type", which now makes
kvar()/rvar() explicitly fail (instead of trying to print a character,
as the previous CHAR type was requesting). A developer introducing new
keywords via copy-paste will thus be reminded that it also needs to set
'type' meaningfully if using kvar()/rvar() as the output routine.
Rename field 'alias' of keywords ('VAR' type) into 'aliased'. Move it
just after the keyword's name, as it makes it easier to spot aliases in
the list. Make it a union, as a subsequent commit will... alias it with
a pointer to another 'VAR' structure. Turn aliases' header string (""
for all aliases) into NULL. It is currently not used, but will be when
introducing the new "merge" procedure for aliases (where it will mean:
Use the header of the aliased keyword).
While here, rename vars[] into the more descriptive keywords[].
MFC after: 3 days
Sponsored by: The FreeBSD Foundation