aboutsummaryrefslogtreecommitdiff
path: root/bin/9c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-03-18 19:32:06 +0000
committerrsc <devnull@localhost>2005-03-18 19:32:06 +0000
commiteacba19d744bd77a4df5452cfc5839c269e22ae3 (patch)
tree8a776040270728078d29fb0e38d6351fed7c1b36 /bin/9c
parentb636466107aa6b1d7802ecd67527d6b854203793 (diff)
downloadplan9port-eacba19d744bd77a4df5452cfc5839c269e22ae3.tar.gz
plan9port-eacba19d744bd77a4df5452cfc5839c269e22ae3.tar.bz2
plan9port-eacba19d744bd77a4df5452cfc5839c269e22ae3.zip
add uniq
Diffstat (limited to 'bin/9c')
-rwxr-xr-xbin/9c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/9c b/bin/9c
index a3ccd493..91576e04 100755
--- a/bin/9c
+++ b/bin/9c
@@ -55,11 +55,14 @@ case "$tag" in
esac
# N.B. Must use temp file to avoid pipe; pipe loses status.
+# The uniq at the end is for gcc's strcmp/etc. built-in nonsense,
+# which multiplies single errors as a result of its expansion.
xtmp=/tmp/9c.$$.$USER.out
$cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" >$xtmp 2>&1
status=$?
grep -v '__p9l_autolib_' $xtmp |
egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|: In function `|: At top level:' |
-sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g'
+sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' |
+uniq
rm -f $xtmp $xtmp.status
exit $status