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)
Fri, Aug 14, 5:56 AM
Unknown Object (File)
Tue, Aug 11, 2:53 PM
Unknown Object (File)
Tue, Aug 11, 2:52 PM
Unknown Object (File)
Tue, Aug 11, 8:12 AM
Unknown Object (File)
Tue, Aug 11, 1:25 AM
Unknown Object (File)
Sun, Aug 9, 11:07 PM
Unknown Object (File)
Sun, Aug 9, 2:18 PM
Unknown Object (File)
Wed, Aug 5, 7:08 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