Debian Codegraph @

subprojects/fontconfig/src/makealias

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 SRCDIR=$1
3 shift
4 HEAD=$1
5 shift
6 TAIL=$1
7 shift
8 rmscip-shell system . . rm. -f $HEAD $TAIL
9 echoscip-shell system . . echo. "#if HAVE_GNUC_ATTRIBUTE" >> $TAIL
10 catscip-shell system . . cat. "$@" | grepscip-shell system . . grep. '^Fc[^ ]* *(' | sedscip-shell system . . sed. -e 's/ *(.*$//' |
11 while read name; do
12 case $name in
13 FcCacheDir|FcCacheSubdir)
14 ;;
15 *)
16 alias="IA__$name"
17 hattr='FC_ATTRIBUTE_VISIBILITY_HIDDEN'
18 echoscip-shell system . . echo. "extern __typeof ($name) $alias $hattr;" >> $HEAD
19 echoscip-shell system . . echo. "#define $name $alias" >> $HEAD
20 ifdef=`grepscip-shell system . . grep. -l '^'$name'[ (]' "$SRCDIR"/*.c | sedscip-shell system . . sed. -n 1p | sedscip-shell system . . sed. -e 's/^.*\/\([^.]*\)\.c/__\1__/'`
21 if [scip-shell system . . `[`. -z "$ifdef" ] ; then
22 echoscip-shell system . . echo. "error: could not locate $name in src/*.c" 1>&2
23 exit 1
24 fi
25 if [scip-shell system . . `[`. "$ifdef" != "$last" ] ; then
26 [scip-shell system . . `[`. -n "$last" ] && echoscip-shell system . . echo. "#endif /* $last */" >> $TAIL
27 echoscip-shell system . . echo. "#ifdef $ifdef" >> $TAIL
28 last=$ifdef
29 fi
30 echoscip-shell system . . echo. "# undef $name" >> $TAIL
31 cattr='__attribute((alias("'$alias'"))) FC_ATTRIBUTE_VISIBILITY_EXPORT'
32 echoscip-shell system . . echo. "extern __typeof ($name) $name $cattr;" >> $TAIL
33 ;;
34 esac
35 done
36 [scip-shell system . . `[`. $? -ne 0 ] && exit 1
37 echoscip-shell system . . echo. "#endif /* $ifdef */" >> $TAIL
38 echoscip-shell system . . echo. "#endif /* HAVE_GNUC_ATTRIBUTE */" >> $TAIL