"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "optfunc.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.

optfunc.c  (less-530):optfunc.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.
*/ */
/* /*
* Handling functions for command line options. * Handling functions for command line options.
* *
skipping to change at line 52 skipping to change at line 52
extern char *eqproto; extern char *eqproto;
extern char *hproto; extern char *hproto;
extern char *wproto; extern char *wproto;
extern char *every_first_cmd; extern char *every_first_cmd;
extern IFILE curr_ifile; extern IFILE curr_ifile;
extern char version[]; extern char version[];
extern int jump_sline; extern int jump_sline;
extern long jump_sline_fraction; extern long jump_sline_fraction;
extern int shift_count; extern int shift_count;
extern long shift_count_fraction; extern long shift_count_fraction;
extern LWCHAR rscroll_char; extern char rscroll_char;
extern int rscroll_attr; extern int rscroll_attr;
extern int mousecap;
extern int wheel_lines;
extern int less_is_more; extern int less_is_more;
#if LOGFILE #if LOGFILE
extern char *namelogfile; extern char *namelogfile;
extern int force_logfile; extern int force_logfile;
extern int logfile; extern int logfile;
#endif #endif
#if TAGS #if TAGS
public char *tagoption = NULL; public char *tagoption = NULL;
extern char *tags; extern char *tags;
extern char ztags[]; extern char ztags[];
skipping to change at line 510 skipping to change at line 512
dispversion(); dispversion();
break; break;
case INIT: case INIT:
/* /*
* Force output to stdout per GNU standard for --version output. * Force output to stdout per GNU standard for --version output.
*/ */
any_display = 1; any_display = 1;
putstr("less "); putstr("less ");
putstr(version); putstr(version);
putstr(" ("); putstr(" (");
#if HAVE_GNU_REGEX putstr(pattern_lib_name());
putstr("GNU "); putstr(" regular expressions)\n");
#endif putstr("Copyright (C) 1984-2018 Mark Nudelman\n\n");
#if HAVE_POSIX_REGCOMP
putstr("POSIX ");
#endif
#if HAVE_PCRE
putstr("PCRE ");
#endif
#if HAVE_RE_COMP
putstr("BSD ");
#endif
#if HAVE_REGCMP
putstr("V8 ");
#endif
#if HAVE_V8_REGCOMP
putstr("Spencer V8 ");
#endif
#if !HAVE_GNU_REGEX && !HAVE_POSIX_REGCOMP && !HAVE_PCRE && !HAVE_RE_COMP && !HA
VE_REGCMP && !HAVE_V8_REGCOMP
putstr("no ");
#endif
putstr("regular expressions)\n");
putstr("Copyright (C) 1984-2017 Mark Nudelman\n\n");
putstr("less comes with NO WARRANTY, to the extent permitted by l aw.\n"); putstr("less comes with NO WARRANTY, to the extent permitted by l aw.\n");
putstr("For information about the terms of redistribution,\n"); putstr("For information about the terms of redistribution,\n");
putstr("see the file named README in the less distribution.\n"); putstr("see the file named README in the less distribution.\n");
putstr("Homepage: http://www.greenwoodsoftware.com/less\n"); putstr("Home page: http://www.greenwoodsoftware.com/less\n");
quit(QUIT_OK); quit(QUIT_OK);
break; break;
} }
} }
#if MSDOS_COMPILER #if MSDOS_COMPILER
/* /*
* Parse an MSDOS color descriptor. * Parse an MSDOS color descriptor.
*/ */
static void static void
skipping to change at line 809 skipping to change at line 791
case QUERY: case QUERY:
case TOGGLE: case TOGGLE:
error("Use \"h\" for help", NULL_PARG); error("Use \"h\" for help", NULL_PARG);
break; break;
case INIT: case INIT:
dohelp = 1; dohelp = 1;
} }
} }
/* /*
* Handler for the --mouse option.
*/
/*ARGSUSED*/
public void
opt_mousecap(type, s)
int type;
char *s;
{
switch (type)
{
case TOGGLE:
if (mousecap == OPT_OFF)
deinit_mouse();
else
init_mouse();
break;
case INIT:
case QUERY:
break;
}
}
/*
* Handler for the --wheel-lines option.
*/
/*ARGSUSED*/
public void
opt_wheel_lines(type, s)
int type;
char *s;
{
switch (type)
{
case INIT:
case TOGGLE:
if (wheel_lines <= 0)
wheel_lines = default_wheel_lines();
break;
case QUERY:
break;
}
}
/*
* Get the "screen window" size. * Get the "screen window" size.
*/ */
public int public int
get_swindow() get_swindow()
{ {
if (swindow > 0) if (swindow > 0)
return (swindow); return (swindow);
return (sc_height + swindow); return (sc_height + swindow);
} }
 End of changes. 6 change blocks. 
27 lines changed or deleted 52 lines changed or added

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