Deleted Added
full compact
opttbl.c (63128) opttbl.c (89019)
1/*
2 * Copyright (C) 1984-2000 Mark Nudelman
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
7 * For more information about less, or for information on how to
8 * contact the author, see the README file.

--- 28 unchanged lines hidden (view full) ---

37public int cbufs; /* Current number of buffers */
38public int autobuf; /* Automatically allocate buffers as needed */
39public int ctldisp; /* Send control chars to screen untranslated */
40public int force_open; /* Open the file even if not regular file */
41public int swindow; /* Size of scrolling window */
42public int jump_sline; /* Screen line of "jump target" */
43public int chopline; /* Truncate displayed lines at screen width */
44public int no_init; /* Disable sending ti/te termcap strings */
1/*
2 * Copyright (C) 1984-2000 Mark Nudelman
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
7 * For more information about less, or for information on how to
8 * contact the author, see the README file.

--- 28 unchanged lines hidden (view full) ---

37public int cbufs; /* Current number of buffers */
38public int autobuf; /* Automatically allocate buffers as needed */
39public int ctldisp; /* Send control chars to screen untranslated */
40public int force_open; /* Open the file even if not regular file */
41public int swindow; /* Size of scrolling window */
42public int jump_sline; /* Screen line of "jump target" */
43public int chopline; /* Truncate displayed lines at screen width */
44public int no_init; /* Disable sending ti/te termcap strings */
45public int no_keypad; /* Disable sending ks/ke termcap strings */
45public int twiddle; /* Show tildes after EOF */
46public int show_attn; /* Hilite first unread line */
47public int shift_count; /* Number of positions to shift horizontally */
48public int status_col; /* Display a status column */
49#if HILITE_SEARCH
50public int hilite_search; /* Highlight matched search patterns? */
51#endif
52

--- 44 unchanged lines hidden (view full) ---

97static struct optname x_optname = { "tabs", NULL };
98static struct optname X__optname = { "no-init", NULL };
99static struct optname y_optname = { "max-forw-scroll", NULL };
100static struct optname z_optname = { "window", NULL };
101static struct optname quote_optname = { "quotes", NULL };
102static struct optname tilde_optname = { "tilde", NULL };
103static struct optname query_optname = { "help", NULL };
104static struct optname pound_optname = { "shift", NULL };
46public int twiddle; /* Show tildes after EOF */
47public int show_attn; /* Hilite first unread line */
48public int shift_count; /* Number of positions to shift horizontally */
49public int status_col; /* Display a status column */
50#if HILITE_SEARCH
51public int hilite_search; /* Highlight matched search patterns? */
52#endif
53

--- 44 unchanged lines hidden (view full) ---

98static struct optname x_optname = { "tabs", NULL };
99static struct optname X__optname = { "no-init", NULL };
100static struct optname y_optname = { "max-forw-scroll", NULL };
101static struct optname z_optname = { "window", NULL };
102static struct optname quote_optname = { "quotes", NULL };
103static struct optname tilde_optname = { "tilde", NULL };
104static struct optname query_optname = { "help", NULL };
105static struct optname pound_optname = { "shift", NULL };
106static struct optname keypad_optname = { "no-keypad", NULL };
105
106
107/*
108 * Table of all options and their semantics.
107
108
109/*
110 * Table of all options and their semantics.
111 *
112 * For BOOL and TRIPLE options, odesc[0], odesc[1], odesc[2] are
113 * the description of the option when set to 0, 1 or 2, respectively.
114 * For NUMBER options, odesc[0] is the prompt to use when entering
115 * a new value, and odesc[1] is the description, which should contain
116 * one %d which is replaced by the value of the number.
117 * For STRING options, odesc[0] is the prompt to use when entering
118 * a new value, and odesc[1], if not NULL, is the set of characters
119 * that are valid in the string.
109 */
110static struct option option[] =
111{
112 { 'a', &a_optname,
113 BOOL, OPT_OFF, &how_search, NULL,
114 "Search includes displayed screen",
115 "Search skips displayed screen",
116 NULL

--- 21 unchanged lines hidden (view full) ---

138 BOOL|NO_TOGGLE, OPT_OFF, &know_dumb, NULL,
139 "Assume intelligent terminal",
140 "Assume dumb terminal",
141 NULL
142 },
143#if MSDOS_COMPILER
144 { 'D', &D__optname,
145 STRING|REPAINT|NO_QUERY, 0, NULL, opt_D,
120 */
121static struct option option[] =
122{
123 { 'a', &a_optname,
124 BOOL, OPT_OFF, &how_search, NULL,
125 "Search includes displayed screen",
126 "Search skips displayed screen",
127 NULL

--- 21 unchanged lines hidden (view full) ---

149 BOOL|NO_TOGGLE, OPT_OFF, &know_dumb, NULL,
150 "Assume intelligent terminal",
151 "Assume dumb terminal",
152 NULL
153 },
154#if MSDOS_COMPILER
155 { 'D', &D__optname,
156 STRING|REPAINT|NO_QUERY, 0, NULL, opt_D,
146 "color desc: ", NULL, NULL
157 "color desc: ",
158 "Ddknsu0123456789.",
159 NULL
147 },
148#endif
149 { 'e', &e_optname,
150 TRIPLE, OPT_OFF, &quit_at_eof, NULL,
151 "Don't quit at end-of-file",
152 "Quit at end-of-file",
153 "Quit immediately at end-of-file"
154 },

--- 127 unchanged lines hidden (view full) ---

282 },
283 { 'w', &w_optname,
284 TRIPLE|REPAINT, OPT_OFF, &show_attn, NULL,
285 "Don't highlight first unread line",
286 "Highlight first unread line after forward-screen",
287 "Highlight first unread line after any forward movement",
288 },
289 { 'x', &x_optname,
160 },
161#endif
162 { 'e', &e_optname,
163 TRIPLE, OPT_OFF, &quit_at_eof, NULL,
164 "Don't quit at end-of-file",
165 "Quit at end-of-file",
166 "Quit immediately at end-of-file"
167 },

--- 127 unchanged lines hidden (view full) ---

295 },
296 { 'w', &w_optname,
297 TRIPLE|REPAINT, OPT_OFF, &show_attn, NULL,
298 "Don't highlight first unread line",
299 "Highlight first unread line after forward-screen",
300 "Highlight first unread line after any forward movement",
301 },
302 { 'x', &x_optname,
290 NUMBER|REPAINT, 8, &tabstop, NULL,
303 STRING|REPAINT, 0, NULL, opt_x,
291 "Tab stops: ",
304 "Tab stops: ",
292 "Tab stops every %d spaces",
305 "0123456789,",
293 NULL
294 },
295 { 'X', &X__optname,
296 BOOL|NO_TOGGLE, OPT_OFF, &no_init, NULL,
297 "Send init/deinit strings to terminal",
298 "Don't use init/deinit strings",
299 NULL
300 },

--- 24 unchanged lines hidden (view full) ---

325 NULL, NULL, NULL
326 },
327 { '#', &pound_optname,
328 NUMBER, 0, &shift_count, NULL,
329 "Horizontal shift: ",
330 "Horizontal shift %d positions",
331 NULL
332 },
306 NULL
307 },
308 { 'X', &X__optname,
309 BOOL|NO_TOGGLE, OPT_OFF, &no_init, NULL,
310 "Send init/deinit strings to terminal",
311 "Don't use init/deinit strings",
312 NULL
313 },

--- 24 unchanged lines hidden (view full) ---

338 NULL, NULL, NULL
339 },
340 { '#', &pound_optname,
341 NUMBER, 0, &shift_count, NULL,
342 "Horizontal shift: ",
343 "Horizontal shift %d positions",
344 NULL
345 },
346 { '.', &keypad_optname,
347 BOOL|NO_TOGGLE, OPT_OFF, &no_keypad, NULL,
348 "Use keypad mode",
349 "Don't use keypad mode",
350 NULL
351 },
333 { '\0', NULL, NOVAR, 0, NULL, NULL, NULL, NULL, NULL }
334};
335
336
337/*
338 * Initialize each option to its default value.
339 */
340 public void

--- 83 unchanged lines hidden (view full) ---

424 /*
425 * Found a better match than
426 * the one we had.
427 */
428 maxo = o;
429 maxoname = oname;
430 maxlen = len;
431 ambig = 0;
352 { '\0', NULL, NOVAR, 0, NULL, NULL, NULL, NULL, NULL }
353};
354
355
356/*
357 * Initialize each option to its default value.
358 */
359 public void

--- 83 unchanged lines hidden (view full) ---

443 /*
444 * Found a better match than
445 * the one we had.
446 */
447 maxo = o;
448 maxoname = oname;
449 maxlen = len;
450 ambig = 0;
432 exact = (len == strlen(oname->oname));
451 exact = (len == (int)strlen(oname->oname));
433 }
434 if (!(o->otype & TRIPLE))
435 break;
436 }
437 }
438 }
439 if (ambig)
440 {

--- 12 unchanged lines hidden ---
452 }
453 if (!(o->otype & TRIPLE))
454 break;
455 }
456 }
457 }
458 if (ambig)
459 {

--- 12 unchanged lines hidden ---