"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "opttbl.c" between
less-530.tar.gz and less-548.tar.gz

About: less is a file pager (a program that displays text files similar to "more" or "pg"). Beta version.

opttbl.c  (less-530):opttbl.c  (less-548)
/* /*
* Copyright (C) 1984-2017 Mark Nudelman * Copyright (C) 1984-2018 Mark Nudelman
* *
* You may distribute under the terms of either the GNU General Public * You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file. * License or the Less License, as specified in the README file.
* *
* For more information, see the README file. * For more information, see the README file.
*/ */
/* /*
* The option table. * The option table.
*/ */
skipping to change at line 55 skipping to change at line 55
public int no_keypad; /* Disable sending ks/ke termcap strings */ public int no_keypad; /* Disable sending ks/ke termcap strings */
public int twiddle; /* Show tildes after EOF */ public int twiddle; /* Show tildes after EOF */
public int show_attn; /* Hilite first unread line */ public int show_attn; /* Hilite first unread line */
public int shift_count; /* Number of positions to shift horizonta lly */ public int shift_count; /* Number of positions to shift horizonta lly */
public int status_col; /* Display a status column */ public int status_col; /* Display a status column */
public int use_lessopen; /* Use the LESSOPEN filter */ public int use_lessopen; /* Use the LESSOPEN filter */
public int quit_on_intr; /* Quit on interrupt */ public int quit_on_intr; /* Quit on interrupt */
public int follow_mode; /* F cmd Follows file desc or file name? */ public int follow_mode; /* F cmd Follows file desc or file name? */
public int oldbot; /* Old bottom of screen behavior {{REMOVE}} */ public int oldbot; /* Old bottom of screen behavior {{REMOVE}} */
public int opt_use_backslash; /* Use backslash escaping in option parsing */ public int opt_use_backslash; /* Use backslash escaping in option parsing */
public LWCHAR rscroll_char; /* Char which marks chopped lines with -S */ public char rscroll_char; /* Char which marks chopped lines with -S */
public int rscroll_attr; /* Attribute of rscroll_char */ public int rscroll_attr; /* Attribute of rscroll_char */
public int no_hist_dups; /* Remove dups from history list */
public int mousecap; /* Allow mouse for scrolling */
public int wheel_lines; /* Number of lines to scroll on mouse whe
el scroll */
public int perma_marks; /* Save marks in history file */
#if HILITE_SEARCH #if HILITE_SEARCH
public int hilite_search; /* Highlight matched search patterns? */ public int hilite_search; /* Highlight matched search patterns? */
#endif #endif
public int less_is_more = 0; /* Make compatible with POSIX more */ public int less_is_more = 0; /* Make compatible with POSIX more */
/* /*
* Long option names. * Long option names.
*/ */
static struct optname a_optname = { "search-skip-screen", NULL }; static struct optname a_optname = { "search-skip-screen", NULL };
skipping to change at line 122 skipping to change at line 126
static struct optname z_optname = { "window", NULL }; static struct optname z_optname = { "window", NULL };
static struct optname quote_optname = { "quotes", NULL }; static struct optname quote_optname = { "quotes", NULL };
static struct optname tilde_optname = { "tilde", NULL }; static struct optname tilde_optname = { "tilde", NULL };
static struct optname query_optname = { "help", NULL }; static struct optname query_optname = { "help", NULL };
static struct optname pound_optname = { "shift", NULL }; static struct optname pound_optname = { "shift", NULL };
static struct optname keypad_optname = { "no-keypad", NULL }; static struct optname keypad_optname = { "no-keypad", NULL };
static struct optname oldbot_optname = { "old-bot", NULL }; static struct optname oldbot_optname = { "old-bot", NULL };
static struct optname follow_optname = { "follow-name", NULL }; static struct optname follow_optname = { "follow-name", NULL };
static struct optname use_backslash_optname = { "use-backslash", NULL }; static struct optname use_backslash_optname = { "use-backslash", NULL };
static struct optname rscroll_optname = { "rscroll", NULL }; static struct optname rscroll_optname = { "rscroll", NULL };
static struct optname nohistdups_optname = { "no-histdups", NULL };
static struct optname mousecap_optname = { "mouse", NULL };
static struct optname wheel_lines_optname = { "wheel-lines", NULL };
static struct optname perma_marks_optname = { "save-marks", NULL };
/* /*
* Table of all options and their semantics. * Table of all options and their semantics.
* *
* For BOOL and TRIPLE options, odesc[0], odesc[1], odesc[2] are * For BOOL and TRIPLE options, odesc[0], odesc[1], odesc[2] are
* the description of the option when set to 0, 1 or 2, respectively. * the description of the option when set to 0, 1 or 2, respectively.
* For NUMBER options, odesc[0] is the prompt to use when entering * For NUMBER options, odesc[0] is the prompt to use when entering
* a new value, and odesc[1] is the description, which should contain * a new value, and odesc[1] is the description, which should contain
* one %d which is replaced by the value of the number. * one %d which is replaced by the value of the number.
* For STRING options, odesc[0] is the prompt to use when entering * For STRING options, odesc[0] is the prompt to use when entering
skipping to change at line 464 skipping to change at line 472
{ {
"Use backslash escaping in command line parameters", "Use backslash escaping in command line parameters",
"Don't use backslash escaping in command line parameters" , "Don't use backslash escaping in command line parameters" ,
NULL NULL
} }
}, },
{ OLETTER_NONE, &rscroll_optname, { OLETTER_NONE, &rscroll_optname,
STRING|REPAINT|INIT_HANDLER, 0, NULL, opt_rscroll, STRING|REPAINT|INIT_HANDLER, 0, NULL, opt_rscroll,
{ "right scroll character: ", NULL, NULL } { "right scroll character: ", NULL, NULL }
}, },
{ OLETTER_NONE, &nohistdups_optname,
BOOL, OPT_OFF, &no_hist_dups, NULL,
{
"Allow duplicates in history list",
"Remove duplicates from history list",
NULL
}
},
{ OLETTER_NONE, &mousecap_optname,
TRIPLE, OPT_OFF, &mousecap, opt_mousecap,
{
"Ignore mouse input",
"Use the mouse for scrolling",
"Use the mouse for scrolling (reverse)"
}
},
{ OLETTER_NONE, &wheel_lines_optname,
NUMBER|INIT_HANDLER, 0, &wheel_lines, opt_wheel_lines,
{
"Lines to scroll on mouse wheel: ",
"Scroll %d line(s) on mouse wheel",
NULL
}
},
{ OLETTER_NONE, &perma_marks_optname,
BOOL, OPT_OFF, &perma_marks, NULL,
{
"Don't save marks in history file",
"Save marks in history file",
NULL
}
},
{ '\0', NULL, NOVAR, 0, NULL, NULL, { NULL, NULL, NULL } } { '\0', NULL, NOVAR, 0, NULL, NULL, { NULL, NULL, NULL } }
}; };
/* /*
* Initialize each option to its default value. * Initialize each option to its default value.
*/ */
public void public void
init_option() init_option()
{ {
struct loption *o; struct loption *o;
char *p; char *p;
p = lgetenv("LESS_IS_MORE"); p = lgetenv("LESS_IS_MORE");
if (p != NULL && *p != '\0') if (!isnullenv(p))
less_is_more = 1; less_is_more = 1;
for (o = option; o->oletter != '\0'; o++) for (o = option; o->oletter != '\0'; o++)
{ {
/* /*
* Set each variable to its default. * Set each variable to its default.
*/ */
if (o->ovar != NULL) if (o->ovar != NULL)
*(o->ovar) = o->odefault; *(o->ovar) = o->odefault;
if (o->otype & INIT_HANDLER) if (o->otype & INIT_HANDLER)
 End of changes. 6 change blocks. 
3 lines changed or deleted 44 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)