Add support for using - as shorthand for stdin/stdout in tradcpp.
authorjsg <jsg@openbsd.org>
Fri, 8 Aug 2014 12:40:26 +0000 (12:40 +0000)
committerjsg <jsg@openbsd.org>
Fri, 8 Aug 2014 12:40:26 +0000 (12:40 +0000)
commitdc9523b79494e25195311bff75491791f1d9a4a5
tree516337c466d5655b440f055da577beb82ad16d2a
parent1ad69c40f41c48743fc2a936ec067f21604a60b3
Add support for using - as shorthand for stdin/stdout in tradcpp.

When looking into switching the /usr/bin/cpp wrapper to
tradcpp I came across "| ${CPP} ${CPPFLAGS} -" in usr.bin/which.

gcc documents this behaviour for cpp here:
https://gcc.gnu.org/onlinedocs/cpp/Invocation.html

Versions of the John F. Reiser derived cpp in 32V and CSRG SCCS
accept this usage as well, as does the cpp in PCC.
libexec/tradcpp/files.c
libexec/tradcpp/main.c
libexec/tradcpp/output.c