summaryrefslogtreecommitdiffhomepage
path: root/src/internal/perk_ar_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/perk_ar_impl.h')
-rw-r--r--src/internal/perk_ar_impl.h52
1 files changed, 34 insertions, 18 deletions
diff --git a/src/internal/perk_ar_impl.h b/src/internal/perk_ar_impl.h
index 323dc56..0da7559 100644
--- a/src/internal/perk_ar_impl.h
+++ b/src/internal/perk_ar_impl.h
@@ -20,6 +20,22 @@
/* initial number of elements in the transient, on-stack vector */
# define AR_STACK_VECTOR_ELEMENTS (0x200)
+/* bit mask to indicate that the first non-option argument is <posname> */
+#define AR_POSNAME_MASK (PERK_DRIVER_AR_POSITION_AFTER \
+ |PERK_DRIVER_AR_POSITION_BEFORE)
+
+#define AR_UPDATE_MASK (PERK_DRIVER_AR_UPDATE_MEMBERS \
+ |PERK_DRIVER_AR_REPLACE_MEMBERS)
+
+#define AR_ACTION_MASK (PERK_DRIVER_AR_LIST_MEMBERS \
+ |PERK_DRIVER_AR_MOVE_MEMBERS \
+ |PERK_DRIVER_AR_UPDATE_MEMBERS \
+ |PERK_DRIVER_AR_DELETE_MEMBERS \
+ |PERK_DRIVER_AR_APPEND_MEMBERS \
+ |PERK_DRIVER_AR_REPLACE_MEMBERS \
+ |PERK_DRIVER_AR_EXTRACT_MEMBERS \
+ |PERK_DRIVER_AR_PRINT_MEMBERS)
+
extern const struct argv_option pe_ar_options[];
struct ar_armaps_impl {
@@ -35,8 +51,8 @@ struct ar_armaps_impl {
};
struct pe_archive_meta_impl {
- const struct pe_driver_ctx * dctx;
- struct pe_archive_ctx * actx;
+ const struct pe_driver_ctx * dctx;
+ struct pe_archive_ctx * actx;
size_t ofmtattr;
size_t nentries;
void * hdrinfov;
@@ -50,40 +66,40 @@ struct pe_archive_meta_impl {
struct ar_meta_member_info ** memberv;
struct ar_meta_member_info * members;
struct ar_armaps_impl armaps;
- struct pe_txtfile_ctx * nminfo;
- struct pe_archive_meta armeta;
+ struct pe_txtfile_ctx * nminfo;
+ struct pe_archive_meta armeta;
};
struct ar_meta_member_info * pe_archive_member_from_offset(
- struct pe_archive_meta_impl * meta,
+ struct pe_archive_meta_impl * meta,
off_t offset);
int pe_ar_parse_primary_armap_bsd_32(
- const struct pe_driver_ctx * dctx,
- struct pe_archive_meta_impl * m);
+ const struct pe_driver_ctx * dctx,
+ struct pe_archive_meta_impl * m);
int pe_ar_parse_primary_armap_bsd_64(
- const struct pe_driver_ctx * dctx,
- struct pe_archive_meta_impl * m);
+ const struct pe_driver_ctx * dctx,
+ struct pe_archive_meta_impl * m);
int pe_ar_parse_primary_armap_sysv_32(
- const struct pe_driver_ctx * dctx,
- struct pe_archive_meta_impl * m);
+ const struct pe_driver_ctx * dctx,
+ struct pe_archive_meta_impl * m);
int pe_ar_parse_primary_armap_sysv_64(
- const struct pe_driver_ctx * dctx,
- struct pe_archive_meta_impl * m);
+ const struct pe_driver_ctx * dctx,
+ struct pe_archive_meta_impl * m);
int pe_update_mapstrv(
- const struct pe_driver_ctx * dctx,
- struct pe_archive_meta_impl * m);
+ const struct pe_driver_ctx * dctx,
+ struct pe_archive_meta_impl * m);
int pe_ar_update_syminfo(
- struct pe_archive_ctx * actx);
+ struct pe_archive_ctx * actx);
int pe_ar_update_syminfo_ex(
- struct pe_archive_ctx * actx,
- int fdout);
+ struct pe_archive_ctx * actx,
+ int fdout);
static inline struct pe_archive_meta_impl * pe_archive_meta_ictx(const struct pe_archive_meta * meta)
{