Page MenuHomeFreeBSD

cal: don't print terminal control characters unless stdout is a TTY
ClosedPublic

Authored by asomers on Jan 13 2023, 8:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 3, 3:38 AM
Unknown Object (File)
Wed, Nov 26, 2:25 PM
Unknown Object (File)
Sat, Nov 22, 3:52 PM
Unknown Object (File)
Thu, Nov 20, 12:42 AM
Unknown Object (File)
Nov 8 2025, 7:44 AM
Unknown Object (File)
Nov 6 2025, 4:18 AM
Unknown Object (File)
Oct 29 2025, 10:20 PM
Unknown Object (File)
Oct 27 2025, 10:58 AM
Subscribers
None

Details

Summary

A similar change was made in svn r223931, but it was incomplete, working
only when the utility was invoked as "ncal". Fix the same issue when
invoking as "cal".

PR: 268936
Reported by: Ray Bellis <ray@bellis.me.uk>
MFC after: 2 weeks
Sponsored by: Axcient

Test Plan

manually tested with "cal | xxd"

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 49098
Build 45987: arc lint + arc unit