diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-11-01 00:49:32 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-11-01 00:49:32 +0100 |
commit | 500892b2ae64676d1855d8a357cd39e8a9e7f6c2 (patch) | |
tree | 2ab4ea40675d15a66d4a0c4295818f9f83e8c1b1 /src/main.c | |
parent | 26a95b35414d0d4b729f3fd5da010debb70b412b (diff) |
Add support for $GRAB_TABSIZE
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -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}, |