Page MenuHomeFreeBSD

m4: Stop abbreviating builtin names
Needs ReviewPublic

Authored by des on Tue, Mar 10, 11:15 AM.
Tags
None
Referenced Files
F148174202: D55793.diff
Mon, Mar 16, 6:51 AM
Unknown Object (File)
Wed, Mar 11, 9:40 PM
Unknown Object (File)
Wed, Mar 11, 1:12 PM
Unknown Object (File)
Wed, Mar 11, 12:49 PM
Unknown Object (File)
Wed, Mar 11, 7:06 AM
Unknown Object (File)
Wed, Mar 11, 4:11 AM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 71310
Build 68193: arc lint + arc unit

Event Timeline

des requested review of this revision.Tue, Mar 10, 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

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

Yes, it could.