aboutsummaryrefslogtreecommitdiff
path: root/doc2h.pl
diff options
context:
space:
mode:
Diffstat (limited to 'doc2h.pl')
-rw-r--r--doc2h.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc2h.pl b/doc2h.pl
new file mode 100644
index 0000000..9584342
--- /dev/null
+++ b/doc2h.pl
@@ -0,0 +1,16 @@
+#/usr/bin/env perl
+
+print '#define DOCSTRING "';
+while(<>){
+ s|\"|\\"|g;
+ s|\n|\\n\\\n|g;
+ print;
+}
+print '"'."\n";
+
+
+print "
+int usage(){ fprintf(stderr,\"\\n%s\\n\",rcsid);fprintf(stderr,DOCSTRING); exit(1); }
+#define CHECK_HELP if (argc > 1 && argv[1][0]=='-' && argv[1][1]=='h') usage();\n";
+
+