From 5ea1d7cd4b630a91b4a72fb722a937a107d76fc0 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 13 Jul 2024 05:03:48 +0000 Subject: driver: -s support: implementation and integration. --- src/internal/tpax_driver_impl.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/internal') diff --git a/src/internal/tpax_driver_impl.h b/src/internal/tpax_driver_impl.h index d340748..3df8244 100644 --- a/src/internal/tpax_driver_impl.h +++ b/src/internal/tpax_driver_impl.h @@ -7,6 +7,7 @@ #ifndef TPAX_DRIVER_IMPL_H #define TPAX_DRIVER_IMPL_H +#include #include #include #include @@ -31,6 +32,9 @@ #define TPAX_ITEM_SYMLINK 0X4 #define TPAX_ITEM_NAMEREF 0x8 +#define TPAX_REPL_GLOBAL 0x01 +#define TPAX_REPL_PRINT 0x02 + extern const struct argv_option tpax_default_options[]; enum app_tags { @@ -45,6 +49,7 @@ enum app_tags { TAG_FORMAT, TAG_BLKSIZE, TAG_OPTIONS, + TAG_REPLSTR, TAG_RECURSE, TAG_NORECURSE, TAG_STRICT_PATH, @@ -74,6 +79,14 @@ struct tpax_dirent_buffer { struct tpax_dirent dbuf[]; }; +struct tpax_replstr { + const char * replarg; + const char * replstr; + const char * regexp; + regex_t regex; + uint32_t flags; +}; + struct tpax_driver_ctx_impl { const char * file; struct tpax_common_ctx cctx; @@ -82,6 +95,8 @@ struct tpax_driver_ctx_impl { const struct tpax_unit_ctx * euctx; const char * eunit; struct argv_keyval ** keyvalv; + struct tpax_replstr * replstrv; + char * replstrs; struct tpax_error_info ** errinfp; struct tpax_error_info ** erricap; struct tpax_error_info * erriptr[64]; -- cgit v1.2.3