Page MenuHomeFreeBSD

m4: Stop abbreviating builtin names
ClosedPublic

Authored by des on Mar 10 2026, 11:15 AM.
Tags
None
Referenced Files
F170053554: D55793.id174251.diff
Thu, Sep 3, 9:19 AM
F169948658: D55793.id173499.diff
Thu, Sep 3, 1:49 AM
F169916738: D55793.id173499.diff
Wed, Sep 2, 11:18 PM
Unknown Object (File)
Wed, Sep 2, 6:47 PM
Unknown Object (File)
Mon, Aug 31, 9:38 PM
Unknown Object (File)
Sat, Aug 29, 9:39 PM
Unknown Object (File)
Thu, Aug 27, 7:25 PM
Unknown Object (File)
Wed, Aug 26, 9:18 PM
Subscribers

Details

Summary
  • Stop abbreviating macro names half-randomly to 8 chars, this is no longer 1990.
  • Likewise for function names (in particular use doindex for a function that is notably different from the classic index function).
  • Rename a few things for more fidelity: eval is the builtin name, not expr and your maketemp/mkstemp conform to mkstemp semantics for better security.
  • Rewrap a few comments that were ludicrously short.

No functional changes except improved accuracy of some error messages.

MFC after: 1 week

Diff Detail

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

Event Timeline

des requested review of this revision.Mar 10 2026, 11:15 AM

remove unrelated whitespace changes

fuz added inline comments.
usr.bin/m4/main.c
114

It would be better for this to stay as EXPRTYPE. The rename seems unmotivated.

usr.bin/m4/mdef.h
44–87

Could this be changed to an enum?

usr.bin/m4/main.c
114

The proper name of this builtin is eval; expr is a non-standard alias.

usr.bin/m4/mdef.h
44–87

Yes, it could.

This revision was not accepted when it landed; it landed in state Needs Review.Mar 25 2026, 12:42 AM
This revision was automatically updated to reflect the committed changes.