File: insert_api.sh

package info (click to toggle)
libaqbanking 5.4.3beta-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 15,244 kB
  • ctags: 6,703
  • sloc: ansic: 119,813; sh: 11,218; xml: 9,839; makefile: 2,357; cpp: 2,233; perl: 278; pascal: 115
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