aboutsummaryrefslogtreecommitdiff
path: root/mkusage.pl
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-12-16 06:22:56 -0500
committerB. Watson <urchlay@slackware.uk>2024-12-16 06:22:56 -0500
commit8994b9d28ebe5b6c3c90330a32d8317cd7299d9b (patch)
treeacc5779128fa5870bda0d5e14aab9622c9a13bc9 /mkusage.pl
parent09cda6bf8feda34b581040dc3a9cfb0e50c7a88e (diff)
downloaduxd-8994b9d28ebe5b6c3c90330a32d8317cd7299d9b.tar.gz
add options to --help message.
Diffstat (limited to 'mkusage.pl')
-rw-r--r--mkusage.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/mkusage.pl b/mkusage.pl
new file mode 100644
index 0000000..f8fe485
--- /dev/null
+++ b/mkusage.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -w
+
+print "char *usage_opts[] = {\n";
+
+while(<>) {
+ chomp;
+ if(/^-[a-zA-Z]/) {
+ $opt = $_;
+ next;
+ }
+ if($opt && (/^\.\. (.*)$/)) {
+ print "\t\" $opt: $1\",\n";
+ undef $opt;
+ }
+}
+
+# don't use NULL, it's not defined.
+print "\t(char *)0\n};\n";