summaryrefslogtreecommitdiffstats
path: root/funtools/inc.sed
diff options
context:
space:
mode:
Diffstat (limited to 'funtools/inc.sed')
-rwxr-xr-xfuntools/inc.sed12
1 files changed, 12 insertions, 0 deletions
diff --git a/funtools/inc.sed b/funtools/inc.sed
new file mode 100755
index 0000000..b550331
--- /dev/null
+++ b/funtools/inc.sed
@@ -0,0 +1,12 @@
+:
+NAME="$1"
+sed '
+1i\
+static char *XXXX="\\n
+
+s/"/\\"/g
+s/\\n/\\\\n/g
+s/$/\\n/
+$a\
+\"
+' | sed "s/XXXX/$NAME/" | awk '{printf("%s", $0)};END{printf(";\n")}'