#!/bin/sh
case "$1" in
-l) list=true
	shift
	;;
esac
unknown=''
case "$list$#" in
1|2)
	for sym do
		if grep "^$1$" Cppsym.true >/dev/null 2>&1; then
			exit 0
		elif grep "^$1$" Cppsym.know >/dev/null 2>&1; then
			:
		else
			unknown="$unknown $sym"
		fi
	done
	set X $unknown
	shift
	;;
esac
case $# in
0) exit 1;;
esac
echo $* | /usr/bin/tr ' ' '\012' | /bin/sed -e 's/\(.*\)/\
#ifdef \1\
exit 0; _ _ _ _\1\	 \1\
#endif\
/' >Cppsym$$
echo "exit 1; _ _ _" >>Cppsym$$
cc -E - <Cppsym$$ | /bin/grep '^exit [01]; _ _'  >Cppsym2$$
case "$list" in
true) /usr/bin/awk 'NF > 5 {print substr($6,2,100)}' <Cppsym2$$ ;;
*)
	sh Cppsym2$$
	status=$?
	;;
esac
/bin/rm -f Cppsym$$ Cppsym2$$
exit $status
