summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-03 03:57:35 +0000
committermidipix <writeonce@midipix.org>2024-02-03 03:57:35 +0000
commit8868650e2edf08dac6d2472a6ead903db48d12f7 (patch)
tree89558de412501d58658e486fffb410309c6c83d2 /src
parentef5cd3159e27beed97276db4ae33ea54558fb0fe (diff)
downloadslibtool-8868650e2edf08dac6d2472a6ead903db48d12f7.tar.bz2
slibtool-8868650e2edf08dac6d2472a6ead903db48d12f7.tar.xz
ar mode: driver: added the -Wposix and -Wyaml shorthand switches.
Diffstat (limited to 'src')
-rw-r--r--src/internal/slibtool_driver_impl.h2
-rw-r--r--src/logic/slbt_exec_ar.c10
-rw-r--r--src/skin/slbt_skin_ar.c8
3 files changed, 20 insertions, 0 deletions
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index 58fa17e..c72f19e 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -87,6 +87,8 @@ enum app_tags {
TAG_AR_CHECK,
TAG_AR_PRINT,
TAG_AR_PRETTY,
+ TAG_AR_POSIX,
+ TAG_AR_YAML,
TAG_AR_VERBOSE,
};
diff --git a/src/logic/slbt_exec_ar.c b/src/logic/slbt_exec_ar.c
index d3715a8..17ad439 100644
--- a/src/logic/slbt_exec_ar.c
+++ b/src/logic/slbt_exec_ar.c
@@ -215,6 +215,16 @@ int slbt_exec_ar(
break;
+ case TAG_AR_POSIX:
+ ictx->cctx.fmtflags &= ~(uint64_t)SLBT_PRETTY_FLAGS;
+ ictx->cctx.fmtflags |= SLBT_PRETTY_POSIX;
+ break;
+
+ case TAG_AR_YAML:
+ ictx->cctx.fmtflags &= ~(uint64_t)SLBT_PRETTY_FLAGS;
+ ictx->cctx.fmtflags |= SLBT_PRETTY_YAML;
+ break;
+
case TAG_AR_VERBOSE:
ictx->cctx.fmtflags |= SLBT_PRETTY_VERBOSE;
break;
diff --git a/src/skin/slbt_skin_ar.c b/src/skin/slbt_skin_ar.c
index 7346626..5108554 100644
--- a/src/skin/slbt_skin_ar.c
+++ b/src/skin/slbt_skin_ar.c
@@ -29,6 +29,14 @@ const struct argv_option slbt_ar_options[] = {
"'hexdata' for yaml-formatted data with additional "
"hexdump output"},
+ {"Wposix", 0,TAG_AR_POSIX,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,0,0,
+ "a shorthand for -Wpretty=posix"},
+
+ {"Wyaml", 0,TAG_AR_YAML,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,0,0,
+ "a shorthand for -Wpretty=yaml"},
+
{"Wverbose", 0,TAG_AR_VERBOSE,ARGV_OPTARG_NONE,
ARGV_OPTION_HYBRID_ONLY,0,0,
"produce verbose output; "