diff options
author | Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> | 2019-06-20 01:53:37 -0500 |
---|---|---|
committer | Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> | 2019-06-20 01:53:37 -0500 |
commit | b3049d9c200fc8bbb91d76b8ecdae7cc7188b3c2 (patch) | |
tree | 3c1d854400d728fe52da93137f2b816ae143fb12 /usr.bin/unifdef/unifdefall.sh | |
parent | 3a6b0bbb51eb12f9cee6948e4a6e316d195fdca3 (diff) | |
download | userland-b3049d9c200fc8bbb91d76b8ecdae7cc7188b3c2.tar.gz userland-b3049d9c200fc8bbb91d76b8ecdae7cc7188b3c2.tar.bz2 userland-b3049d9c200fc8bbb91d76b8ecdae7cc7188b3c2.tar.xz userland-b3049d9c200fc8bbb91d76b8ecdae7cc7188b3c2.zip |
usr.bin/unifdef: this somehow missed the not-POSIX purge
Diffstat (limited to 'usr.bin/unifdef/unifdefall.sh')
-rw-r--r-- | usr.bin/unifdef/unifdefall.sh | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/usr.bin/unifdef/unifdefall.sh b/usr.bin/unifdef/unifdefall.sh deleted file mode 100644 index 7c1d643..0000000 --- a/usr.bin/unifdef/unifdefall.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# remove all the #if's from a source file -# -# $dotat: things/unifdefall.sh,v 1.10 2002/09/24 19:52:11 fanf2 Exp $ -# $FreeBSD: src/usr.bin/unifdef/unifdefall.sh,v 1.2 2002/09/24 19:50:03 fanf Exp $ - -set -e - -basename=`basename $0` -tmp=`mktemp -d -t $basename` || exit 2 - -unifdef -s "$@" | sort | uniq > $tmp/ctrl -cpp -dM "$@" | sort | - sed -Ee 's/^#define[ ]+(.*[^ ])[ ]*$/\1/' > $tmp/hashdefs -sed -Ee 's/^([A-Za-z0-9_]+).*$/\1/' $tmp/hashdefs > $tmp/alldef -comm -23 $tmp/ctrl $tmp/alldef > $tmp/undef -comm -12 $tmp/ctrl $tmp/alldef > $tmp/def - -echo unifdef -k \\ > $tmp/cmd -sed -Ee 's/^(.*)$/-U\1 \\/' $tmp/undef >> $tmp/cmd -while read sym -do sed -Ee '/^('"$sym"')([(][^)]*[)])?([ ]+(.*))?$/!d;s//-D\1=\4/' $tmp/hashdefs -done < $tmp/def | - sed -Ee 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$/" \\/' >> $tmp/cmd -echo '"$@"' >> $tmp/cmd -sh $tmp/cmd "$@" - -rm -r $tmp |