summaryrefslogtreecommitdiff
path: root/gnu/egcs/gcc/sort-protos
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-05-26 13:38:57 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-05-26 13:38:57 +0000
commit0126e157b87f137fc08dc7f46f6c291b9d06ac5d (patch)
treef8555e3e504eb82b4cd3cba5cec20ae4ce8124ff /gnu/egcs/gcc/sort-protos
parentff8e9a4356e55ed142306c3a375fa280800abc86 (diff)
egcs projects compiler system
Exact copy of the snapshot, except for the removal of texinfo/ gcc/ch/ libchill/
Diffstat (limited to 'gnu/egcs/gcc/sort-protos')
-rw-r--r--gnu/egcs/gcc/sort-protos9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/egcs/gcc/sort-protos b/gnu/egcs/gcc/sort-protos
new file mode 100644
index 00000000000..493e9f08a8f
--- /dev/null
+++ b/gnu/egcs/gcc/sort-protos
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Sort the sys-protos.h file in its usual order.
+# Invoke as `sort-protos sys-protos.h'.
+
+input=$1
+
+sed 's/\(.*[ \*]\)\([a-zA-Z0-9_][a-zA-Z0-9_]*\)[ ]*\(([^\*].*\)$/\2%\1%\3/' $input | sort -u | awk -F% '{printf "%-30.30s%s%s\n", $2, $1, $3}' > tmp.$input
+
+mv -f tmp.$input $input