summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdefine.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/define.sh b/define.sh
new file mode 100755
index 0000000..e45b058
--- /dev/null
+++ b/define.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# define.sh - creates an include file full of #defines
+#
+# SYNOPSIS
+#
+# define.sh POSIX_ME_HARDER ...
+#
+# <GPL>
+
+for i ; do
+ case $1 in
+ !!*!!)
+ echo "// #define" `echo $1 | sed 's/^!!\(.*\)!!$/\1/'`
+ shift
+ ;;
+ *)
+ echo "#define $1"
+ shift
+ ;;
+ esac
+done
+
+# </GPL>