]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cal: don't print terminal control characters unless stdout is a TTY
authorAlan Somers <asomers@FreeBSD.org>
Fri, 13 Jan 2023 20:19:03 +0000 (13:19 -0700)
committerAlan Somers <asomers@FreeBSD.org>
Fri, 27 Jan 2023 19:30:53 +0000 (12:30 -0700)
commit0811d18fea9177b8c378d9d28ea34d6d3c81a5f6
treed2d5fee4e8ef13560c926c9799230eb48cdf5ec5
parent8b7b81fd64ec054e6cbe0f1a817bad44aa355669
cal: don't print terminal control characters unless stdout is a TTY

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>
Sponsored by: Axcient
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D38045

(cherry picked from commit 92e978439f0c3139775ad96d412959f5a74b17b6)
usr.bin/ncal/ncal.c