File: insert_api.sh

package info (click to toggle)
libaqbanking 6.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,824 kB
  • sloc: ansic: 151,683; xml: 19,426; sh: 4,512; makefile: 4,010; cpp: 329; perl: 267
file content (31 lines) | stat: -rwxr-xr-x 635 bytes parent folder | download | duplicates (16)
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