diff -ru lv451-orig/lv.1 lv451/lv.1 --- lv451-orig/lv.1 2004-01-16 21:23:33.000000000 +0900 +++ lv451/lv.1 2007-01-21 18:03:59.392625000 +0900 @@ -213,6 +213,8 @@ Prefix each line of output with the line number within its input file on lgrep. .IP "-v" Invert the sense of matching on lgrep. +.IP "-x<\fInumber\fP>" +Set the tab width. (Default: 8) .IP "-z" Enable HZ auto-detection (also enabled by run-time C-t). .br diff -ru lv451-orig/lv.hlp lv451/lv.hlp --- lv451-orig/lv.hlp 2004-01-16 21:24:09.000000000 +0900 +++ lv451/lv.hlp 2007-01-21 18:03:59.611375000 +0900 @@ -218,6 +218,9 @@ -v Invert the sense of matching on lgrep. + -x<_n_u_m_b_e_r> + Set the tab width. (Default: 8) + -z Enable HZ auto-detection (also enabled by run-time C-t). diff -ru lv451-orig/src/conf.c lv451/src/conf.c --- lv451-orig/src/conf.c 2004-01-05 16:23:29.000000000 +0900 +++ lv451/src/conf.c 2007-01-21 18:06:24.877000000 +0900 @@ -70,6 +70,8 @@ #define LV_HELP "lv.hlp" /*#define LV_HELP_PATH "/usr/local/lib/lv/"*/ /* now defined through make */ +public int g_htab_width = 8; + private byte *lvHelpFile[ 2 ]; private void ConfInitArgs( conf_t *conf ) @@ -276,6 +278,13 @@ strcpy( editor_program, s + 1 ); } break; + case 'x': + g_htab_width = atoi( s + 1 ); + if ( g_htab_width < 1 || 8 < g_htab_width ) { + fprintf( stderr, "lv: wrong tab width %s in %s\n", s + 1, location ); + exit( -1 ); + } + break; #ifndef MSDOS /* IF NOT DEFINED */ case 'T': unicode_width_threshold = (ic_t)atoi( s + 1 ); break; case 'm': unimap_iso8859 = TRUE; s++; continue; diff -ru lv451-orig/src/ichar.h lv451/src/ichar.h --- lv451-orig/src/ichar.h 2003-11-13 12:08:19.000000000 +0900 +++ lv451/src/ichar.h 2007-01-21 18:06:42.064500000 +0900 @@ -20,7 +20,8 @@ #define CNTRLWIDTH_MIDDLEFORM 2 /* 0x20 .. 0x7e */ #define CNTRLWIDTH_LONGFORM 4 /* 0x7f .. 0xff */ -#define HTAB_WIDTH 8 +public int g_htab_width; +#define HTAB_WIDTH (g_htab_width) #define HTAB_INTERNAL_WIDTH 2 #define MakeByte1( ic ) ( (byte)( (ic) >> 8 ) )