summaryrefslogtreecommitdiff
path: root/tool/tostr.awk
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2012-03-30 20:42:12 -0400
committerHans-Christoph Steiner <hans@eds.org>2012-03-30 20:42:12 -0400
commit7bb481fda9ecb134804b49c2ce77ca28f7eea583 (patch)
tree31b520b9914d3e2453968abe375f2c102772c3dc /tool/tostr.awk
Imported Upstream version 2.0.3
Diffstat (limited to 'tool/tostr.awk')
-rw-r--r--tool/tostr.awk8
1 files changed, 8 insertions, 0 deletions
diff --git a/tool/tostr.awk b/tool/tostr.awk
new file mode 100644
index 0000000..b4f48d3
--- /dev/null
+++ b/tool/tostr.awk
@@ -0,0 +1,8 @@
+#!/usr/bin/awk
+#
+# Convert input text into a C string
+#
+{
+ gsub(/\"/,"\\\"");
+ print "\"" $0 "\\n\"";
+}