summaryrefslogtreecommitdiffhomepage
path: root/src/skin
diff options
context:
space:
mode:
Diffstat (limited to 'src/skin')
-rw-r--r--src/skin/pe_skin_ar.c35
-rw-r--r--src/skin/pe_skin_default.c47
-rw-r--r--src/skin/pe_skin_perk.c55
3 files changed, 95 insertions, 42 deletions
diff --git a/src/skin/pe_skin_ar.c b/src/skin/pe_skin_ar.c
new file mode 100644
index 0000000..4bdce0e
--- /dev/null
+++ b/src/skin/pe_skin_ar.c
@@ -0,0 +1,35 @@
+#include "perk_driver_impl.h"
+#include "perk_visibility_impl.h"
+#include "argv/argv.h"
+
+const perk_hidden struct argv_option pe_ar_options[] = {
+ {"Wversion", 'V',TAG_VERSION,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,0,0,
+ "show version information"},
+
+ {"Whelp", 'h',TAG_HELP,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,0,0,
+ "show usage information"},
+
+ {"Wverbose", 'v',TAG_VERBOSE,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,0,0,
+ "provide verbose output"},
+
+ {"Wprint", 'p',TAG_AR_PRINT_MEMBERS,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,0,0,
+ "print archive members"},
+
+ {"Wlist", 't',TAG_AR_LIST_MEMBERS,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,0,0,
+ "list archive members; names only be default, "
+ "or otherwise a detailed table of contents in "
+ "verbose mode"},
+
+ {"Wpretty", 0,TAG_PRETTY,ARGV_OPTARG_REQUIRED,
+ ARGV_OPTION_HYBRID_ONLY|ARGV_OPTION_HYBRID_EQUAL,
+ "yaml|posix|hexdata",0,
+ "list archive members or print content "
+ "using the %s format specification"},
+
+ {0,0,0,0,0,0,0,0}
+};
diff --git a/src/skin/pe_skin_default.c b/src/skin/pe_skin_default.c
index 963af6e..95024c7 100644
--- a/src/skin/pe_skin_default.c
+++ b/src/skin/pe_skin_default.c
@@ -1,54 +1,17 @@
#include "perk_driver_impl.h"
+#include "perk_visibility_impl.h"
#include "argv/argv.h"
-const struct argv_option pe_default_options[] = {
+const perk_hidden struct argv_option pe_default_options[] = {
{"version", 'v',TAG_VERSION,ARGV_OPTARG_NONE,0,0,0,
"show version information"},
{"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0,
"show usage information [listing %s options only]"},
- {"pretty", 'p',TAG_PRETTY,ARGV_OPTARG_REQUIRED,0,"yaml|dlltool",0,
- "format output for parsing by %s"},
-
- {"category", 'y',TAG_CATEGORY,ARGV_OPTARG_NONE,0,0,0,
- "print image category"},
-
- {"sections", 'c',TAG_SECTIONS,ARGV_OPTARG_NONE,0,0,0,
- "list image sections"},
-
- {"symbols", 'm',TAG_SYMBOLS,ARGV_OPTARG_NONE,0,0,0,
- "list symbols found in the coff symbol table"},
-
- {"strings", 's',TAG_STRINGS,ARGV_OPTARG_NONE,0,0,0,
- "list strings found in the coff string table"},
-
- {"expsyms", 'e',TAG_EXPSYMS,ARGV_OPTARG_NONE,0,0,0,
- "list exported symbols" },
-
- {"implibs", 'i',TAG_IMPLIBS,ARGV_OPTARG_NONE,0,0,0,
- "list .idata dependency libraries"},
-
- {"impsyms", 'I',TAG_IMPSYMS,ARGV_OPTARG_NONE,0,0,0,
- "list .idata dependency libraries "
- "along with imported symbols"},
-
- {"dsolibs", 'd',TAG_DSOLIBS,ARGV_OPTARG_NONE,0,0,0,
- "list .dsometa (mdso) dependency libraries"},
-
- {"dsosyms", 'D',TAG_DSOSYMS,ARGV_OPTARG_NONE,0,0,0,
- "list .dsometa (mdso) dependency libraries "
- "along with referenced symbols"},
-
- {"hdrdump", 'X',TAG_HDRDUMP,ARGV_OPTARG_OPTIONAL,0,
- "dos|image.dos|"
- "coff|coff.image|coff.object|coff.optional|"
- "sectbl|section.table|"
- "exphdr|export.header|"
- "imptbl|import.table",0,
- "output struct-based information for "
- "either all headers (the default) "
- "or a specific header"},
+ {"cmd", 0,TAG_CMD,ARGV_OPTARG_REQUIRED,0,
+ "perk|ar",0,
+ "invoke one of the following perk commands: {%s}"},
{0,0,0,0,0,0,0,0}
};
diff --git a/src/skin/pe_skin_perk.c b/src/skin/pe_skin_perk.c
new file mode 100644
index 0000000..a6ea35f
--- /dev/null
+++ b/src/skin/pe_skin_perk.c
@@ -0,0 +1,55 @@
+#include "perk_driver_impl.h"
+#include "perk_visibility_impl.h"
+#include "argv/argv.h"
+
+const perk_hidden struct argv_option pe_perk_options[] = {
+ {"version", 'v',TAG_VERSION,ARGV_OPTARG_NONE,0,0,0,
+ "show version information"},
+
+ {"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0,
+ "show usage information [listing %s options only]"},
+
+ {"pretty", 'p',TAG_PRETTY,ARGV_OPTARG_REQUIRED,0,"yaml|dlltool",0,
+ "format output for parsing by %s"},
+
+ {"category", 'y',TAG_CATEGORY,ARGV_OPTARG_NONE,0,0,0,
+ "print image category"},
+
+ {"sections", 'c',TAG_SECTIONS,ARGV_OPTARG_NONE,0,0,0,
+ "list image sections"},
+
+ {"symbols", 'm',TAG_SYMBOLS,ARGV_OPTARG_NONE,0,0,0,
+ "list symbols found in the coff symbol table"},
+
+ {"strings", 's',TAG_STRINGS,ARGV_OPTARG_NONE,0,0,0,
+ "list strings found in the coff string table"},
+
+ {"expsyms", 'e',TAG_EXPSYMS,ARGV_OPTARG_NONE,0,0,0,
+ "list exported symbols" },
+
+ {"implibs", 'i',TAG_IMPLIBS,ARGV_OPTARG_NONE,0,0,0,
+ "list .idata dependency libraries"},
+
+ {"impsyms", 'I',TAG_IMPSYMS,ARGV_OPTARG_NONE,0,0,0,
+ "list .idata dependency libraries "
+ "along with imported symbols"},
+
+ {"dsolibs", 'd',TAG_DSOLIBS,ARGV_OPTARG_NONE,0,0,0,
+ "list .dsometa (mdso) dependency libraries"},
+
+ {"dsosyms", 'D',TAG_DSOSYMS,ARGV_OPTARG_NONE,0,0,0,
+ "list .dsometa (mdso) dependency libraries "
+ "along with referenced symbols"},
+
+ {"hdrdump", 'X',TAG_HDRDUMP,ARGV_OPTARG_OPTIONAL,0,
+ "dos|image.dos|"
+ "coff|coff.image|coff.object|coff.optional|"
+ "sectbl|section.table|"
+ "exphdr|export.header|"
+ "imptbl|import.table",0,
+ "output struct-based information for "
+ "either all headers (the default) "
+ "or a specific header"},
+
+ {0,0,0,0,0,0,0,0}
+};