1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/bin/sh
# -------------------------------------------------------------------------
# This tool inserts export declarations into declarations of classes. e.g.
# class MYCLASS : SOMECLASS
# { lalala
# ...
# would become
# class QBANKING_API MYCLASS : SOMECLASS
# { lalala
# ...
# when used for QBanking.
# The first (and only) argument is the export declaration to insert.
# It reads from stdin and writes to stdout.
#
# (c) 2006 Martin Preuss
#
fapi=$1
while read line; do
case "$line" in
class\ *\ :*)
line=`echo "$line" | sed "s/class /class $fapi /"`
;;
esac
echo "$line"
done
|