From 500892b2ae64676d1855d8a357cd39e8a9e7f6c2 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 1 Nov 2024 00:49:32 +0100 Subject: Add support for $GRAB_TABSIZE --- src/main.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index e004f1e..221e795 100644 --- a/src/main.c +++ b/src/main.c @@ -23,7 +23,7 @@ #include "work.h" #define MAIN_C 1 -#include "flags.h" +#include "globals.h" static bool use_color_p(void); static op_t *pattern_comp(u8view_t pat); @@ -31,15 +31,6 @@ static op_t *pattern_comp(u8view_t pat); static FILE *getfstream(int globc, char **globv); #endif -atomic_int rv = EXIT_NOMATCH; -op_t *ops; -/* For use in diagnostic messages */ -const char *lquot = "`", *rquot = "'"; - -/* We need to use different matching functions depending on if we’re using JIT - matching or not */ -typeof(pcre2_match) *pcre2_match_fn; - /* TODO: Use the LUT in work.c */ static const bool opchars[] = { ['g'] = true, @@ -72,6 +63,8 @@ main(int argc, char **argv) rquot = u8"’"; } + grab_tabsize = getenv_posnum("GRAB_TABSIZE", 8); + optparser_t parser = mkoptparser(argv); static const cli_opt_t opts[] = { {'b', U8C("byte-offset"), CLI_NONE}, -- cgit v1.2.3