summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/driver/pe_driver_ctx.c8
-rw-r--r--src/internal/perk_driver_impl.h1
-rw-r--r--src/skin/pe_skin_perk.c4
3 files changed, 13 insertions, 0 deletions
diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c
index 5e2f8ee..279527d 100644
--- a/src/driver/pe_driver_ctx.c
+++ b/src/driver/pe_driver_ctx.c
@@ -191,6 +191,7 @@ static int pe_cctx_update(
const char * cmdarg)
{
struct argv_entry * entry;
+ struct argv_entry * fmtarg;
const char * pretty;
pretty = 0;
@@ -221,6 +222,10 @@ static int pe_cctx_update(
cctx->drvflags |= PERK_DRIVER_VERSION;
break;
+ case TAG_YAML:
+ fmtarg = entry;
+ break;
+
case TAG_PRETTY:
pretty = entry->arg;
break;
@@ -327,6 +332,9 @@ static int pe_cctx_update(
} else if (pretty && !strcmp(pretty,"dlltool")) {
cctx->fmtflags |= PERK_PRETTY_DLLTOOL;
+
+ } else if (fmtarg && (fmtarg->tag == TAG_YAML)) {
+ cctx->fmtflags |= PERK_PRETTY_YAML;
}
return 0;
diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h
index 22e7894..5cd0d73 100644
--- a/src/internal/perk_driver_impl.h
+++ b/src/internal/perk_driver_impl.h
@@ -20,6 +20,7 @@ enum app_tags {
TAG_HELP,
TAG_VERSION,
TAG_CMD,
+ TAG_YAML,
TAG_PRETTY,
TAG_VERBOSE,
TAG_CATEGORY,
diff --git a/src/skin/pe_skin_perk.c b/src/skin/pe_skin_perk.c
index 6a96c6b..3678341 100644
--- a/src/skin/pe_skin_perk.c
+++ b/src/skin/pe_skin_perk.c
@@ -54,5 +54,9 @@ const perk_hidden struct argv_option pe_perk_options[] = {
"either all headers (the default) "
"or a specific header"},
+ {"yaml", 'Y',TAG_YAML,ARGV_OPTARG_NONE,0,0,0,
+ "produce output in yaml format "
+ "(same as --pretty=yaml)"},
+
{0,0,0,0,0,0,0,0}
};