Page MenuHomeFreeBSD

col: respect POSIX
ClosedPublic

Authored by bapt on May 1 2015, 5:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 25 2024, 12:38 AM
Unknown Object (File)
May 2 2024, 9:44 PM
Unknown Object (File)
May 2 2024, 8:24 PM
Unknown Object (File)
May 2 2024, 8:23 PM
Unknown Object (File)
May 2 2024, 3:27 PM
Unknown Object (File)
Feb 3 2024, 3:15 AM
Unknown Object (File)
Dec 24 2023, 9:20 PM
Unknown Object (File)
Nov 2 2023, 8:59 AM

Details

Summary

Makes col(1) respect posix again for escape sequences as decribed in its manpage
The bug was introduced in CSRG in 1991
This also reverts r280911

Test Plan

using heirloom doctools's tbl and nroff rendering share/doc/usd/10.exref/summary/ex.summary
tbl -Tlp ex.summary | nroff -Tlp -ms | /usr/bin/col -x | less

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bapt retitled this revision from to col: respect POSIX.
bapt updated this object.
bapt edited the test plan for this revision. (Show Details)
bapt added a reviewer: jhb.
eadler added inline comments.
usr.bin/col/col.c
380–381 ↗(On Diff #5141)

having these as named constants would be nice.

jhb edited edge metadata.

It was broken in 1990 instead of 1991. :)

usr.bin/col/col.c
380 ↗(On Diff #5141)

I wonder if this shouldn't be using the constants here (ESC, FHLF, etc.). I think it might be clearer if it did?

This revision is now accepted and ready to land.May 1 2015, 5:12 PM
usr.bin/col/col.c
380–381 ↗(On Diff #5141)

None of the PUTC uses the name constant so one would have to go through the whole code to change it everywhere while this is a good idea it should be done in a separate commit

eadler added a reviewer: eadler.
This revision was automatically updated to reflect the committed changes.

You say "reverts r280911" but it is removing casts. I don't see that in your diff.

head/usr.bin/col/col.c
381

Any reason not to use FHLF instead of the bare '9' here?

I wanted to separate in 2 commits, now it uses the defines for all PUTC where accurate