2006-11-04 08:49:52 +08:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Program: notcast
|
|
|
|
#
|
|
|
|
# Synopsis: Returns 0 if the input does not contain a cast operator
|
|
|
|
#
|
2006-11-04 08:58:39 +08:00
|
|
|
# Syntax: notcast tailexpr
|
|
|
|
#
|
2006-11-04 09:11:19 +08:00
|
|
|
# postpat - optionally allows a regular expression to go at the end
|
|
|
|
# prepat - optionally allow a regular expression to go at the start
|
2006-11-04 08:58:39 +08:00
|
|
|
#
|
2006-11-04 08:49:52 +08:00
|
|
|
|
2006-11-14 00:11:14 +08:00
|
|
|
if grep "$2"'\(\([sz]ext\)\|\(trunc\)\|\(fpto[us]i\)\|\([us]itofp\)\|\(bitcast\)\|\(fpext\)\|\(fptrunc\)\|\(ptrtoint\)\|\(inttoptr\)\|\(cast\)\)'"$1"
|
2006-11-04 08:49:52 +08:00
|
|
|
then exit 1
|
|
|
|
else exit 0
|
|
|
|
fi
|