Page MenuHomeFreeBSD

ps(1): Constify the array of valid keywords
ClosedPublic

Authored by olce on Apr 1 2025, 1:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 21, 7:26 AM
Unknown Object (File)
Mon, Jul 20, 2:32 AM
Unknown Object (File)
Wed, Jul 15, 12:40 AM
Unknown Object (File)
Sat, Jul 4, 10:37 PM
Unknown Object (File)
Sat, Jul 4, 2:46 AM
Unknown Object (File)
Fri, Jul 3, 9:29 AM
Unknown Object (File)
Thu, Jul 2, 7:05 PM
Unknown Object (File)
Sun, Jun 28, 7:42 AM
Subscribers

Details

Summary

Building on the previous commit that moved the 'width' field from VAR to
VARENT, it is now possible to constify the var[] array containing all
the recognized keywords.

As a side-effect, in parsefmt(), forget about allocating a new VAR for
the selected keyword to be pointed by the corresponding column (VARENT),
and instead just keep a pointer to that structure in var[].

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable