2006-11-04 00:49:52 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Program: notcast
|
|
|
|
#
|
|
|
|
# Synopsis: Returns 0 if the input does not contain a cast operator
|
|
|
|
#
|
2006-11-04 00:58:39 +00:00
|
|
|
# Syntax: notcast tailexpr
|
|
|
|
#
|
2006-11-04 01:11:19 +00: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 00:58:39 +00:00
|
|
|
#
|
2006-11-04 00:49:52 +00:00
|
|
|
|
2006-11-13 16:11:14 +00:00
|
|
|
if grep "$2"'\(\([sz]ext\)\|\(trunc\)\|\(fpto[us]i\)\|\([us]itofp\)\|\(bitcast\)\|\(fpext\)\|\(fptrunc\)\|\(ptrtoint\)\|\(inttoptr\)\|\(cast\)\)'"$1"
|
2006-11-04 00:49:52 +00:00
|
|
|
then exit 1
|
|
|
|
else exit 0
|
|
|
|
fi
|