File: mycppfilt.sh

package info (click to toggle)
lcov 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,464 kB
  • sloc: perl: 27,911; sh: 7,320; xml: 6,982; python: 1,152; makefile: 597; cpp: 520; ansic: 176
file content (25 lines) | stat: -rwxr-xr-x 404 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env bash
#
# Dummy c++filt replacement for testing purpose
#

# Skip over any valid options
while [[ $1 =~ ^- ]] ; do
	shift
done

if [[ -n "$*" ]] ; then
	PREFIX="$*"
else
	PREFIX="aaa"
fi

while read LINE ; do
	echo $LINE | perl -pe "s/^FN(DA)?:([^,]+),(.+)$/FN\1:\2,${PREFIX}\3/";
	unset LINE
done

# Last line isn't newline-terminated
[[ -n "${LINE}" ]] && echo "${PREFIX}${LINE}"

exit 0