From 8994b9d28ebe5b6c3c90330a32d8317cd7299d9b Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 16 Dec 2024 06:22:56 -0500 Subject: add options to --help message. --- mkusage.pl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 mkusage.pl (limited to 'mkusage.pl') 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"; -- cgit v1.2.3