3 # @(#) cpp.sh 1.3 92/01/15 21:53:22
5 # Unprototypeing preprocessor for pre-ANSI C compilers. On some systems,
6 # this script can be as simple as:
8 # /lib/cpp "$@" | unproto
10 # However, some cc(1) drivers specify output file names on the
11 # preprocessor command line, so this shell script must be prepared to
12 # intercept them. Depending on the driver program, the cpp options may
13 # even go before or after the file name argument(s). The script below
14 # tries to tackle all these cases.
16 # You may want to add -Ipath_to_stdarg.h_file, -Dvoid=, -Dvolatile=,
17 # and even -D__STDC__.
25 -*) cpp_args="$cpp_args $1";;
26 *) cpp_args="$cpp_args $1"
29 *) exec 1> $2 || exit 1; shift;;
35 /lib/cpp $cpp_args | unproto