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)
Fri, Apr 25, 1:50 AM
Unknown Object (File)
Sat, Apr 12, 2:16 PM
Unknown Object (File)
Sun, Apr 6, 6:01 PM
Unknown Object (File)
Mar 23 2025, 8:07 AM
Unknown Object (File)
Mar 7 2025, 1:02 AM
Unknown Object (File)
Feb 24 2025, 10:28 AM
Unknown Object (File)
Feb 21 2025, 6:23 AM
Unknown Object (File)
Feb 7 2025, 3:01 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 Not Applicable
Unit
Tests Not Applicable