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 | # |
| 9 | # tailexpr - optionally allows a regular expression to go at the end |
| 10 | # |
Reid Spencer | 2461b73 | 2006-11-04 00:49:52 +0000 | [diff] [blame] | 11 | |
Reid Spencer | 023fa41 | 2006-11-04 00:58:39 +0000 | [diff] [blame^] | 12 | if grep '\(\([sz]ext\)\|\(trunc\)\|\(fp2[us]int\)\|\([us]int2fp\)\|\(bitconvert\)\|\(fpext\)\|\(fptrunc\)\)'"$1" |
Reid Spencer | 2461b73 | 2006-11-04 00:49:52 +0000 | [diff] [blame] | 13 | then exit 1 |
| 14 | else exit 0 |
| 15 | fi |