~ubuntu-branches/ubuntu/gutsy/libpgjava/gutsy

« back to all changes in this revision

Viewing changes to src/tools/pginclude/pgdefine

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2005-04-21 14:25:11 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050421142511-wibh5vc31fkrorx7
Tags: 7.4.7-3
Built with sources...

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
:
 
2
# create macro calls for all defines in the file
 
3
 
 
4
trap "rm -f /tmp/$$" 0 1 2 3 15
 
5
for FILE
 
6
do
 
7
        cat "$FILE" | grep "^#define" >/tmp/$$
 
8
        cat /tmp/$$ | sed -n 's/^#define[       ][      ]*\([a-zA-Z0-9_]*\)[    ][      ]*[^    ].*$/(void)\1;/p'
 
9
        cat /tmp/$$ | sed -n 's/^#define[       ][      ]*\([a-zA-Z0-9_]*([^)]*)\).*$/(=void)\1;/p' |
 
10
        sed 's/([a-zA-Z0-9_ ][a-zA-Z0-9_ ]*)/(0)/g' |
 
11
        sed 's/([a-zA-Z0-9_ ]*,/(0,/g' |
 
12
        sed 's/,[a-zA-Z0-9_ ]*,/,0,/g' |
 
13
        sed 's/,[a-zA-Z0-9_ ]*)/,0)/g' |
 
14
        sed 's/(=void)/(void)/g'
 
15
done