2 # create macro calls for all defines in the file
6 trap "rm -f /tmp/$$" 0 1 2 3 15
9 cat "$FILE" | grep "^#define" >/tmp/$$
10 cat /tmp/$$ | sed -n 's/^#define[ ][ ]*\([a-zA-Z0-9_]*\)[ ][ ]*[^ ].*\\\\$/\1;/p'
11 cat /tmp/$$ | sed -n 's/^#define[ ][ ]*\([a-zA-Z0-9_]*\)[ ][ ]*[^ ].*[^\\\\]$/(void)\1;/p'
14 cat /tmp/$$ | sed -n 's/^#define[ ][ ]*\([a-zA-Z0-9_]*([^)]*)\).*\\\\$/\1;/p'
15 cat /tmp/$$ | sed -n 's/^#define[ ][ ]*\([a-zA-Z0-9_]*([^)]*)\).*[^\\\\]$/(=void)\1;/p'
17 sed 's/([a-zA-Z0-9_ ][a-zA-Z0-9_ ]*)/(0)/g' |
18 sed 's/([a-zA-Z0-9_ ]*,/(0,/g' |
19 sed 's/,[a-zA-Z0-9_ ]*,/,0,/g' |
20 sed 's/,[a-zA-Z0-9_ ]*)/,0)/g' |
21 sed 's/(=void)/(void)/g'