summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-27 04:38:44 +0000
committermidipix <writeonce@midipix.org>2024-01-27 04:43:28 +0000
commit72214ba6ee6c61b4a196a9230546b908d3879d24 (patch)
tree818136f04863100fda338e5b865898b6a0e878f5
parent8567ecfb6516fbb46270886462e46251143c66fd (diff)
downloadslibtool-72214ba6ee6c61b4a196a9230546b908d3879d24.tar.bz2
slibtool-72214ba6ee6c61b4a196a9230546b908d3879d24.tar.xz
archiver api: provide macros for print actions and output formatting.
-rw-r--r--include/slibtool/slibtool_output.h19
-rw-r--r--project/headers.mk1
2 files changed, 20 insertions, 0 deletions
diff --git a/include/slibtool/slibtool_output.h b/include/slibtool/slibtool_output.h
new file mode 100644
index 0000000..cf94180
--- /dev/null
+++ b/include/slibtool/slibtool_output.h
@@ -0,0 +1,19 @@
+#ifndef SLIBTOOL_OUTPUT_H
+#define SLIBTOOL_OUTPUT_H
+
+#include <stdint.h>
+
+#define SLBT_PRETTY(x) ((uint64_t)x << 32)
+
+/* output actions */
+#define SLBT_OUTPUT_ARCHIVE_MEMBERS 0x00000001
+#define SLBT_OUTPUT_ARCHIVE_HEADERS 0x00000002
+#define SLBT_OUTPUT_ARCHIVE_SYMBOLS 0x00000004
+#define SLBT_OUTPUT_ARCHIVE_ARMAPS 0x00000008
+
+/* pretty-printer flags */
+#define SLBT_PRETTY_YAML SLBT_PRETTY(0x00000001)
+#define SLBT_PRETTY_POSIX SLBT_PRETTY(0x00000002)
+#define SLBT_PRETTY_HEXDATA SLBT_PRETTY(0x00000004)
+
+#endif
diff --git a/project/headers.mk b/project/headers.mk
index 71b49aa..2e7a0af 100644
--- a/project/headers.mk
+++ b/project/headers.mk
@@ -2,6 +2,7 @@ API_HEADERS = \
$(PROJECT_DIR)/include/$(PACKAGE)/slibtool.h \
$(PROJECT_DIR)/include/$(PACKAGE)/slibtool_api.h \
$(PROJECT_DIR)/include/$(PACKAGE)/slibtool_arbits.h \
+ $(PROJECT_DIR)/include/$(PACKAGE)/slibtool_output.h \
INTERNAL_HEADERS = \
$(PROJECT_DIR)/src/internal/argv/argv.h \