Reid Spencer | 2461b73 | 2006-11-04 00:49:52 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # Program: notcast |
| 4 | # |
| 5 | # Synopsis: Returns 0 if the input does not contain a cast operator |
| 6 | # |
Reid Spencer | 023fa41 | 2006-11-04 00:58:39 +0000 | [diff] [blame] | 7 | # Syntax: notcast tailexpr |
| 8 | # |
Reid Spencer | 5d52894 | 2006-11-04 01:11:19 +0000 | [diff] [blame] | 9 | # postpat - optionally allows a regular expression to go at the end |
| 10 | # prepat - optionally allow a regular expression to go at the start |
Reid Spencer | 023fa41 | 2006-11-04 00:58:39 +0000 | [diff] [blame] | 11 | # |
Reid Spencer | 2461b73 | 2006-11-04 00:49:52 +0000 | [diff] [blame] | 12 | |
Reid Spencer | 28fa65b | 2006-11-13 16:11:14 +0000 | [diff] [blame] | 13 | if grep "$2"'\(\([sz]ext\)\|\(trunc\)\|\(fpto[us]i\)\|\([us]itofp\)\|\(bitcast\)\|\(fpext\)\|\(fptrunc\)\|\(ptrtoint\)\|\(inttoptr\)\|\(cast\)\)'"$1" |
Reid Spencer | 2461b73 | 2006-11-04 00:49:52 +0000 | [diff] [blame] | 14 | then exit 1 |
| 15 | else exit 0 |
| 16 | fi |