MFV: less v453.
This commit is contained in:
commit
4cc5fc9a0c
@ -9,6 +9,22 @@
|
|||||||
|
|
||||||
To report bugs, suggestions or comments, send email to bug-less@gnu.org.
|
To report bugs, suggestions or comments, send email to bug-less@gnu.org.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
|
||||||
|
Major changes between "less" versions 451 and 453
|
||||||
|
|
||||||
|
* Allow backslash escaping of metacharacters in LESS environment variable.
|
||||||
|
|
||||||
|
* Don't quit if syntax errors are found in command line options.
|
||||||
|
|
||||||
|
* Increase sizes of some internal buffers.
|
||||||
|
|
||||||
|
* Fix configure bug with --with-regex=none.
|
||||||
|
|
||||||
|
* Fix crash with "stty rows 0".
|
||||||
|
|
||||||
|
* Fix Win32 attribute display bug.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
|
|
||||||
Major changes between "less" versions 444 and 451
|
Major changes between "less" versions 444 and 451
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
**************************************************************************
|
**************************************************************************
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
|
||||||
Less, version 451
|
Less, version 453
|
||||||
|
|
||||||
This is the distribution of less, version 451, released 21 Jul 2012.
|
This is the distribution of less, version 453, released 27 Oct 2012.
|
||||||
This program is part of the GNU project (http://www.gnu.org).
|
This program is part of the GNU project (http://www.gnu.org).
|
||||||
|
|
||||||
This program is free software. You may redistribute it and/or
|
This program is free software. You may redistribute it and/or
|
||||||
|
156
contrib/less/configure
vendored
156
contrib/less/configure
vendored
@ -5188,8 +5188,7 @@ fi
|
|||||||
# Checks for regular expression functions.
|
# Checks for regular expression functions.
|
||||||
have_regex=no
|
have_regex=no
|
||||||
have_posix_regex=unknown
|
have_posix_regex=unknown
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcomp" >&5
|
supported_regex=""
|
||||||
$as_echo_n "checking for regcomp... " >&6; }
|
|
||||||
|
|
||||||
# Select a regular expression library.
|
# Select a regular expression library.
|
||||||
WANT_REGEX=auto
|
WANT_REGEX=auto
|
||||||
@ -5204,6 +5203,8 @@ if test $have_regex = no; then
|
|||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
|
||||||
# Some versions of Solaris have a regcomp() function, but it doesn't work!
|
# Some versions of Solaris have a regcomp() function, but it doesn't work!
|
||||||
# So we run a test program. If we're cross-compiling, do it the old way.
|
# So we run a test program. If we're cross-compiling, do it the old way.
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX regcomp" >&5
|
||||||
|
$as_echo_n "checking for POSIX regcomp... " >&6; }
|
||||||
if test "$cross_compiling" = yes; then :
|
if test "$cross_compiling" = yes; then :
|
||||||
have_posix_regex=unknown
|
have_posix_regex=unknown
|
||||||
else
|
else
|
||||||
@ -5232,10 +5233,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_posix_regex = yes; then
|
if test $have_posix_regex = yes; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using POSIX regcomp" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
$as_echo "using POSIX regcomp" >&6; }
|
$as_echo "yes" >&6; }
|
||||||
$as_echo "#define HAVE_POSIX_REGCOMP 1" >>confdefs.h
|
$as_echo "#define HAVE_POSIX_REGCOMP 1" >>confdefs.h
|
||||||
|
supported_regex="$supported_regex posix"
|
||||||
have_regex=yes
|
have_regex=yes
|
||||||
elif test $have_posix_regex = unknown; then
|
elif test $have_posix_regex = unknown; then
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
@ -5252,10 +5253,10 @@ regex_t *r; regfree(r);
|
|||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using POSIX regcomp" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
$as_echo "using POSIX regcomp" >&6; }
|
$as_echo "yes" >&6; }
|
||||||
$as_echo "#define HAVE_POSIX_REGCOMP 1" >>confdefs.h
|
$as_echo "#define HAVE_POSIX_REGCOMP 1" >>confdefs.h
|
||||||
have_regex=yes
|
have_regex=yes; supported_regex="$supported_regex posix"
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
@ -5266,53 +5267,6 @@ fi
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no; then
|
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = gnu; then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for re_compile_pattern in -lc" >&5
|
|
||||||
$as_echo_n "checking for re_compile_pattern in -lc... " >&6; }
|
|
||||||
if ${ac_cv_lib_c_re_compile_pattern+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
ac_check_lib_save_LIBS=$LIBS
|
|
||||||
LIBS="-lc $LIBS"
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
/* Override any GCC internal prototype to avoid an error.
|
|
||||||
Use char because int might match the return type of a GCC
|
|
||||||
builtin and then its argument prototype would still apply. */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
char re_compile_pattern ();
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
return re_compile_pattern ();
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
ac_cv_lib_c_re_compile_pattern=yes
|
|
||||||
else
|
|
||||||
ac_cv_lib_c_re_compile_pattern=no
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
LIBS=$ac_check_lib_save_LIBS
|
|
||||||
fi
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_re_compile_pattern" >&5
|
|
||||||
$as_echo "$ac_cv_lib_c_re_compile_pattern" >&6; }
|
|
||||||
if test "x$ac_cv_lib_c_re_compile_pattern" = xyes; then :
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using gnu" >&5
|
|
||||||
$as_echo "using gnu" >&6; }; $as_echo "#define HAVE_GNU_REGEX 1" >>confdefs.h
|
|
||||||
have_regex=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $have_regex = no; then
|
if test $have_regex = no; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = pcre; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = pcre; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
|
||||||
@ -5352,9 +5306,54 @@ fi
|
|||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5
|
||||||
$as_echo "$ac_cv_lib_pcre_pcre_compile" >&6; }
|
$as_echo "$ac_cv_lib_pcre_pcre_compile" >&6; }
|
||||||
if test "x$ac_cv_lib_pcre_pcre_compile" = xyes; then :
|
if test "x$ac_cv_lib_pcre_pcre_compile" = xyes; then :
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using pcre" >&5
|
$as_echo "#define HAVE_PCRE 1" >>confdefs.h
|
||||||
$as_echo "using pcre" >&6; }; $as_echo "#define HAVE_PCRE 1" >>confdefs.h
|
LIBS="$LIBS -lpcre" have_regex=yes; supported_regex="$supported_regex pcre"
|
||||||
LIBS="$LIBS -lpcre" have_regex=yes
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $have_regex = no; then
|
||||||
|
if test $WANT_REGEX = auto -o $WANT_REGEX = gnu; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for re_compile_pattern in -lc" >&5
|
||||||
|
$as_echo_n "checking for re_compile_pattern in -lc... " >&6; }
|
||||||
|
if ${ac_cv_lib_c_re_compile_pattern+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
LIBS="-lc $LIBS"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
/* Override any GCC internal prototype to avoid an error.
|
||||||
|
Use char because int might match the return type of a GCC
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
char re_compile_pattern ();
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return re_compile_pattern ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
ac_cv_lib_c_re_compile_pattern=yes
|
||||||
|
else
|
||||||
|
ac_cv_lib_c_re_compile_pattern=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_re_compile_pattern" >&5
|
||||||
|
$as_echo "$ac_cv_lib_c_re_compile_pattern" >&6; }
|
||||||
|
if test "x$ac_cv_lib_c_re_compile_pattern" = xyes; then :
|
||||||
|
$as_echo "#define HAVE_GNU_REGEX 1" >>confdefs.h
|
||||||
|
have_regex=yes; supported_regex="$supported_regex gnu"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -5364,9 +5363,8 @@ if test $have_regex = no; then
|
|||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = regcmp; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = regcmp; then
|
||||||
ac_fn_c_check_func "$LINENO" "regcmp" "ac_cv_func_regcmp"
|
ac_fn_c_check_func "$LINENO" "regcmp" "ac_cv_func_regcmp"
|
||||||
if test "x$ac_cv_func_regcmp" = xyes; then :
|
if test "x$ac_cv_func_regcmp" = xyes; then :
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using regcmp" >&5
|
$as_echo "#define HAVE_REGCMP 1" >>confdefs.h
|
||||||
$as_echo "using regcmp" >&6; }; $as_echo "#define HAVE_REGCMP 1" >>confdefs.h
|
have_regex=yes; supported_regex="$supported_regex regcmp"
|
||||||
have_regex=yes
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -5374,6 +5372,8 @@ fi
|
|||||||
|
|
||||||
if test $have_regex = no; then
|
if test $have_regex = no; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for V8 regcomp" >&5
|
||||||
|
$as_echo_n "checking for V8 regcomp... " >&6; }
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
@ -5387,9 +5387,12 @@ regcomp("");
|
|||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using V8 regcomp" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
$as_echo "using V8 regcomp" >&6; }; $as_echo "#define HAVE_V8_REGCOMP 1" >>confdefs.h
|
$as_echo "yes" >&6; }; $as_echo "#define HAVE_V8_REGCOMP 1" >>confdefs.h
|
||||||
have_regex=yes
|
have_regex=yes; supported_regex="$supported_regex regcomp"
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
@ -5400,18 +5403,21 @@ if test $have_regex = no && test -f ${srcdir}/regexp.c; then
|
|||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp-local; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp-local; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using V8 regcomp -- local source" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using V8 regcomp -- local source" >&5
|
||||||
$as_echo "using V8 regcomp -- local source" >&6; }; $as_echo "#define HAVE_V8_REGCOMP 1" >>confdefs.h
|
$as_echo "using V8 regcomp -- local source" >&6; }; $as_echo "#define HAVE_V8_REGCOMP 1" >>confdefs.h
|
||||||
$as_echo "#define HAVE_REGEXEC2 1" >>confdefs.h
|
|
||||||
|
supported_regex="$supported_regex regcomp-local"
|
||||||
|
$as_echo "#define HAVE_REGEXEC2 1" >>confdefs.h
|
||||||
REGEX_O='regexp.$(O)' have_regex=yes
|
REGEX_O='regexp.$(O)' have_regex=yes
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no; then
|
if test $have_regex = no; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = re_comp; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = re_comp; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using re_comp" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for re_comp" >&5
|
||||||
$as_echo "using re_comp" >&6; }; ac_fn_c_check_func "$LINENO" "re_comp" "ac_cv_func_re_comp"
|
$as_echo_n "checking for re_comp... " >&6; }
|
||||||
|
ac_fn_c_check_func "$LINENO" "re_comp" "ac_cv_func_re_comp"
|
||||||
if test "x$ac_cv_func_re_comp" = xyes; then :
|
if test "x$ac_cv_func_re_comp" = xyes; then :
|
||||||
$as_echo "#define HAVE_RE_COMP 1" >>confdefs.h
|
$as_echo "#define HAVE_RE_COMP 1" >>confdefs.h
|
||||||
have_regex=yes
|
have_regex=yes; supported_regex="$supported_regex re_comp"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -5420,15 +5426,17 @@ fi
|
|||||||
if test $have_regex = no; then
|
if test $have_regex = no; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = none; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = none; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using no regex" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using no regex" >&5
|
||||||
$as_echo "using no regex" >&6; }; have_regex=yes;
|
$as_echo "using no regex" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find regular expression library" >&5
|
||||||
|
$as_echo "$as_me: WARNING: cannot find regular expression library" >&2;}
|
||||||
fi
|
fi
|
||||||
|
$as_echo "#define NO_REGEX 1" >>confdefs.h
|
||||||
|
supported_regex="$supported_regex none"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no; then
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: regular expression library: $supported_regex" >&5
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find regular expression library" >&5
|
$as_echo "regular expression library: $supported_regex" >&6; }
|
||||||
$as_echo "cannot find regular expression library" >&6; }; $as_echo "#define NO_REGEX 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-editor was given.
|
# Check whether --with-editor was given.
|
||||||
|
@ -383,7 +383,7 @@ fi
|
|||||||
# Checks for regular expression functions.
|
# Checks for regular expression functions.
|
||||||
have_regex=no
|
have_regex=no
|
||||||
have_posix_regex=unknown
|
have_posix_regex=unknown
|
||||||
AC_MSG_CHECKING(for regcomp)
|
supported_regex=""
|
||||||
|
|
||||||
# Select a regular expression library.
|
# Select a regular expression library.
|
||||||
WANT_REGEX=auto
|
WANT_REGEX=auto
|
||||||
@ -395,6 +395,7 @@ if test $have_regex = no; then
|
|||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
|
||||||
# Some versions of Solaris have a regcomp() function, but it doesn't work!
|
# Some versions of Solaris have a regcomp() function, but it doesn't work!
|
||||||
# So we run a test program. If we're cross-compiling, do it the old way.
|
# So we run a test program. If we're cross-compiling, do it the old way.
|
||||||
|
AC_MSG_CHECKING(for POSIX regcomp)
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
@ -409,16 +410,16 @@ if (rm.rm_sp != text + 1) exit(1); /* check for correct offset */
|
|||||||
exit(0); }],
|
exit(0); }],
|
||||||
have_posix_regex=yes, have_posix_regex=no, have_posix_regex=unknown)
|
have_posix_regex=yes, have_posix_regex=no, have_posix_regex=unknown)
|
||||||
if test $have_posix_regex = yes; then
|
if test $have_posix_regex = yes; then
|
||||||
AC_MSG_RESULT(using POSIX regcomp)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_POSIX_REGCOMP)
|
AC_DEFINE(HAVE_POSIX_REGCOMP) supported_regex="$supported_regex posix"
|
||||||
have_regex=yes
|
have_regex=yes
|
||||||
elif test $have_posix_regex = unknown; then
|
elif test $have_posix_regex = unknown; then
|
||||||
AC_TRY_LINK([
|
AC_TRY_LINK([
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <regex.h>],
|
#include <regex.h>],
|
||||||
[regex_t *r; regfree(r);],
|
[regex_t *r; regfree(r);],
|
||||||
AC_MSG_RESULT(using POSIX regcomp)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes)
|
AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes; supported_regex="$supported_regex posix")
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
@ -426,55 +427,61 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no; then
|
if test $have_regex = no; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = gnu; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = pcre; then
|
||||||
AC_CHECK_LIB(c, re_compile_pattern,
|
AC_CHECK_LIB(pcre, pcre_compile,
|
||||||
[AC_MSG_RESULT(using gnu); AC_DEFINE(HAVE_GNU_REGEX) have_regex=yes], [])
|
[AC_DEFINE(HAVE_PCRE) LIBS="$LIBS -lpcre" have_regex=yes; supported_regex="$supported_regex pcre"], [])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no; then
|
if test $have_regex = no; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = pcre; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = gnu; then
|
||||||
AC_CHECK_LIB(pcre, pcre_compile,
|
AC_CHECK_LIB(c, re_compile_pattern,
|
||||||
[AC_MSG_RESULT(using pcre); AC_DEFINE(HAVE_PCRE) LIBS="$LIBS -lpcre" have_regex=yes], [])
|
[AC_DEFINE(HAVE_GNU_REGEX) have_regex=yes; supported_regex="$supported_regex gnu"], [])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no; then
|
if test $have_regex = no; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = regcmp; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = regcmp; then
|
||||||
AC_CHECK_FUNC(regcmp,
|
AC_CHECK_FUNC(regcmp,
|
||||||
AC_MSG_RESULT(using regcmp); AC_DEFINE(HAVE_REGCMP) have_regex=yes)
|
[AC_DEFINE(HAVE_REGCMP) have_regex=yes; supported_regex="$supported_regex regcmp"],[])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no; then
|
if test $have_regex = no; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp; then
|
||||||
|
AC_MSG_CHECKING(for V8 regcomp)
|
||||||
AC_TRY_LINK([
|
AC_TRY_LINK([
|
||||||
#include "regexp.h"], [regcomp("");],
|
#include "regexp.h"], [regcomp("");],
|
||||||
AC_MSG_RESULT(using V8 regcomp); AC_DEFINE(HAVE_V8_REGCOMP) have_regex=yes)
|
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_V8_REGCOMP) have_regex=yes; supported_regex="$supported_regex regcomp"],[AC_MSG_RESULT(no)])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no && test -f ${srcdir}/regexp.c; then
|
if test $have_regex = no && test -f ${srcdir}/regexp.c; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp-local; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp-local; then
|
||||||
AC_MSG_RESULT(using V8 regcomp -- local source); AC_DEFINE(HAVE_V8_REGCOMP) AC_DEFINE(HAVE_REGEXEC2) REGEX_O='regexp.$(O)' AC_SUBST(REGEX_O) have_regex=yes
|
AC_MSG_RESULT(using V8 regcomp -- local source); AC_DEFINE(HAVE_V8_REGCOMP)
|
||||||
|
supported_regex="$supported_regex regcomp-local"
|
||||||
|
AC_DEFINE(HAVE_REGEXEC2) REGEX_O='regexp.$(O)' AC_SUBST(REGEX_O) have_regex=yes
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no; then
|
if test $have_regex = no; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = re_comp; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = re_comp; then
|
||||||
AC_MSG_RESULT(using re_comp); AC_CHECK_FUNC(re_comp, AC_DEFINE(HAVE_RE_COMP) have_regex=yes)
|
AC_MSG_CHECKING(for re_comp)
|
||||||
|
AC_CHECK_FUNC(re_comp,
|
||||||
|
[AC_DEFINE(HAVE_RE_COMP) have_regex=yes; supported_regex="$supported_regex re_comp"],[])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no; then
|
if test $have_regex = no; then
|
||||||
if test $WANT_REGEX = auto -o $WANT_REGEX = none; then
|
if test $WANT_REGEX = auto -o $WANT_REGEX = none; then
|
||||||
AC_MSG_RESULT(using no regex); have_regex=yes;
|
AC_MSG_RESULT(using no regex)
|
||||||
|
else
|
||||||
|
AC_MSG_WARN(cannot find regular expression library)
|
||||||
fi
|
fi
|
||||||
|
AC_DEFINE(NO_REGEX) supported_regex="$supported_regex none"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $have_regex = no; then
|
AC_MSG_RESULT(regular expression library: $supported_regex)
|
||||||
AC_MSG_RESULT(cannot find regular expression library); AC_DEFINE(NO_REGEX)
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_WITH(editor,
|
AC_ARG_WITH(editor,
|
||||||
[ --with-editor=PROGRAM use PROGRAM as the default editor [vi]],
|
[ --with-editor=PROGRAM use PROGRAM as the default editor [vi]],
|
||||||
@ -662,6 +669,7 @@ AH_TOP([
|
|||||||
/*
|
/*
|
||||||
* Sizes of various buffers.
|
* Sizes of various buffers.
|
||||||
*/
|
*/
|
||||||
|
#if 0 /* old sizes for small memory machines
|
||||||
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
||||||
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
||||||
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
||||||
@ -671,6 +679,17 @@ AH_TOP([
|
|||||||
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
||||||
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
||||||
|
#else /* more reasonable sizes for modern machines */
|
||||||
|
#define CMDBUF_SIZE 2048 /* Buffer for multichar commands */
|
||||||
|
#define UNGOT_SIZE 200 /* Max chars to unget() */
|
||||||
|
#define LINEBUF_SIZE 1024 /* Initial max size of line in input file */
|
||||||
|
#define OUTBUF_SIZE 1024 /* Output buffer */
|
||||||
|
#define PROMPT_SIZE 2048 /* Max size of prompt string */
|
||||||
|
#define TERMBUF_SIZE 2048 /* Termcap buffer for tgetent */
|
||||||
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
|
#define TAGLINE_SIZE 1024 /* Max size of line in tags file */
|
||||||
|
#define TABSTOP_MAX 128 /* Max number of custom tab stops */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Settings automatically determined by configure. */
|
/* Settings automatically determined by configure. */
|
||||||
])
|
])
|
||||||
|
@ -185,6 +185,7 @@
|
|||||||
/*
|
/*
|
||||||
* Sizes of various buffers.
|
* Sizes of various buffers.
|
||||||
*/
|
*/
|
||||||
|
#if 0 /* old sizes for small memory machines
|
||||||
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
||||||
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
||||||
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
||||||
@ -194,6 +195,17 @@
|
|||||||
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
||||||
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
||||||
|
#else /* more reasonable sizes for modern machines */
|
||||||
|
#define CMDBUF_SIZE 2048 /* Buffer for multichar commands */
|
||||||
|
#define UNGOT_SIZE 200 /* Max chars to unget() */
|
||||||
|
#define LINEBUF_SIZE 1024 /* Initial max size of line in input file */
|
||||||
|
#define OUTBUF_SIZE 1024 /* Output buffer */
|
||||||
|
#define PROMPT_SIZE 2048 /* Max size of prompt string */
|
||||||
|
#define TERMBUF_SIZE 2048 /* Termcap buffer for tgetent */
|
||||||
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
|
#define TAGLINE_SIZE 1024 /* Max size of line in tags file */
|
||||||
|
#define TABSTOP_MAX 128 /* Max number of custom tab stops */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||||
#if MSDOS_COMPILER==BORLANDC
|
#if MSDOS_COMPILER==BORLANDC
|
||||||
|
@ -182,6 +182,7 @@
|
|||||||
/*
|
/*
|
||||||
* Sizes of various buffers.
|
* Sizes of various buffers.
|
||||||
*/
|
*/
|
||||||
|
#if 0 /* old sizes for small memory machines
|
||||||
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
||||||
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
||||||
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
||||||
@ -191,6 +192,17 @@
|
|||||||
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
||||||
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
||||||
|
#else /* more reasonable sizes for modern machines */
|
||||||
|
#define CMDBUF_SIZE 2048 /* Buffer for multichar commands */
|
||||||
|
#define UNGOT_SIZE 200 /* Max chars to unget() */
|
||||||
|
#define LINEBUF_SIZE 1024 /* Initial max size of line in input file */
|
||||||
|
#define OUTBUF_SIZE 1024 /* Output buffer */
|
||||||
|
#define PROMPT_SIZE 2048 /* Max size of prompt string */
|
||||||
|
#define TERMBUF_SIZE 2048 /* Termcap buffer for tgetent */
|
||||||
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
|
#define TAGLINE_SIZE 1024 /* Max size of line in tags file */
|
||||||
|
#define TABSTOP_MAX 128 /* Max number of custom tab stops */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Settings automatically determined by configure. */
|
/* Settings automatically determined by configure. */
|
||||||
|
|
||||||
|
@ -166,6 +166,7 @@
|
|||||||
/*
|
/*
|
||||||
* Sizes of various buffers.
|
* Sizes of various buffers.
|
||||||
*/
|
*/
|
||||||
|
#if 0 /* old sizes for small memory machines
|
||||||
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
||||||
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
||||||
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
||||||
@ -175,6 +176,17 @@
|
|||||||
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
||||||
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
||||||
|
#else /* more reasonable sizes for modern machines */
|
||||||
|
#define CMDBUF_SIZE 2048 /* Buffer for multichar commands */
|
||||||
|
#define UNGOT_SIZE 200 /* Max chars to unget() */
|
||||||
|
#define LINEBUF_SIZE 1024 /* Initial max size of line in input file */
|
||||||
|
#define OUTBUF_SIZE 1024 /* Output buffer */
|
||||||
|
#define PROMPT_SIZE 2048 /* Max size of prompt string */
|
||||||
|
#define TERMBUF_SIZE 2048 /* Termcap buffer for tgetent */
|
||||||
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
|
#define TAGLINE_SIZE 1024 /* Max size of line in tags file */
|
||||||
|
#define TABSTOP_MAX 128 /* Max number of custom tab stops */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||||
/* #define off_t long */
|
/* #define off_t long */
|
||||||
|
@ -173,6 +173,7 @@
|
|||||||
/*
|
/*
|
||||||
* Sizes of various buffers.
|
* Sizes of various buffers.
|
||||||
*/
|
*/
|
||||||
|
#if 0 /* old sizes for small memory machines
|
||||||
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
||||||
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
||||||
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
||||||
@ -182,6 +183,17 @@
|
|||||||
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
||||||
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
||||||
|
#else /* more reasonable sizes for modern machines */
|
||||||
|
#define CMDBUF_SIZE 2048 /* Buffer for multichar commands */
|
||||||
|
#define UNGOT_SIZE 200 /* Max chars to unget() */
|
||||||
|
#define LINEBUF_SIZE 1024 /* Initial max size of line in input file */
|
||||||
|
#define OUTBUF_SIZE 1024 /* Output buffer */
|
||||||
|
#define PROMPT_SIZE 2048 /* Max size of prompt string */
|
||||||
|
#define TERMBUF_SIZE 2048 /* Termcap buffer for tgetent */
|
||||||
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
|
#define TAGLINE_SIZE 1024 /* Max size of line in tags file */
|
||||||
|
#define TABSTOP_MAX 128 /* Max number of custom tab stops */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||||
#define off_t long
|
#define off_t long
|
||||||
|
@ -167,6 +167,7 @@
|
|||||||
/*
|
/*
|
||||||
* Sizes of various buffers.
|
* Sizes of various buffers.
|
||||||
*/
|
*/
|
||||||
|
#if 0 /* old sizes for small memory machines
|
||||||
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
||||||
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
||||||
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
||||||
@ -176,6 +177,17 @@
|
|||||||
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
||||||
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
||||||
|
#else /* more reasonable sizes for modern machines */
|
||||||
|
#define CMDBUF_SIZE 2048 /* Buffer for multichar commands */
|
||||||
|
#define UNGOT_SIZE 200 /* Max chars to unget() */
|
||||||
|
#define LINEBUF_SIZE 1024 /* Initial max size of line in input file */
|
||||||
|
#define OUTBUF_SIZE 1024 /* Output buffer */
|
||||||
|
#define PROMPT_SIZE 2048 /* Max size of prompt string */
|
||||||
|
#define TERMBUF_SIZE 2048 /* Termcap buffer for tgetent */
|
||||||
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
|
#define TAGLINE_SIZE 1024 /* Max size of line in tags file */
|
||||||
|
#define TABSTOP_MAX 128 /* Max number of custom tab stops */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||||
/* #define off_t long */
|
/* #define off_t long */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
.TH LESS 1 "Version 451: 21 Jul 2012"
|
.TH LESS 1 "Version 453: 27 Oct 2012"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
less \- opposite of more
|
less \- opposite of more
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -455,13 +455,20 @@ If an option appears in the LESS variable, it can be reset
|
|||||||
to its default value on the command line by beginning the command
|
to its default value on the command line by beginning the command
|
||||||
line option with "\-+".
|
line option with "\-+".
|
||||||
.sp
|
.sp
|
||||||
For options like \-P or \-D which take a following string,
|
Some options like \-k or \-D require a string to follow the option letter.
|
||||||
a dollar sign ($) must be used to signal the end of the string.
|
The string for that option is considered to end when a space, tab,
|
||||||
For example, to set two \-D options on MS-DOS, you must have
|
dash or dollar sign ($) is found.
|
||||||
a dollar sign between them, like this:
|
For example, to set two \-D options on MS-DOS,
|
||||||
|
you can separate them with a dollar sign, like this:
|
||||||
.sp
|
.sp
|
||||||
LESS="-Dn9.1$-Ds4.1"
|
LESS="Dn9.1$Ds4.1"
|
||||||
.sp
|
.sp
|
||||||
|
or a space like this:
|
||||||
|
.sp
|
||||||
|
LESS="Dn9.1 Ds4.1"
|
||||||
|
.sp
|
||||||
|
Any character may be included literally in an option string
|
||||||
|
by preceding it with a backslash.
|
||||||
.IP "\-? or \-\-help"
|
.IP "\-? or \-\-help"
|
||||||
This option displays a summary of the commands accepted by
|
This option displays a summary of the commands accepted by
|
||||||
.I less
|
.I less
|
||||||
@ -1739,9 +1746,9 @@ See the GNU General Public License for more details.
|
|||||||
|
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
.PP
|
.PP
|
||||||
Mark Nudelman <bug-less@gnu.org>
|
Mark Nudelman
|
||||||
.br
|
.br
|
||||||
Send bug reports or comments to bug-less@gnu.org.
|
Send bug reports or comments to <bug-less@gnu.org>
|
||||||
.br
|
.br
|
||||||
See http://www.greenwoodsoftware.com/less/bugs.html for the latest list of known bugs in less.
|
See http://www.greenwoodsoftware.com/less/bugs.html for the latest list of known bugs in less.
|
||||||
.br
|
.br
|
||||||
|
@ -51,4 +51,4 @@ LESSECHO(1) LESSECHO(1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Version 451: 21 Jul 2012 LESSECHO(1)
|
Version 453: 27 Oct 2012 LESSECHO(1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH LESSECHO 1 "Version 451: 21 Jul 2012"
|
.TH LESSECHO 1 "Version 453: 27 Oct 2012"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lessecho \- expand metacharacters
|
lessecho \- expand metacharacters
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -353,4 +353,4 @@ LESSKEY(1) LESSKEY(1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Version 451: 21 Jul 2012 LESSKEY(1)
|
Version 453: 27 Oct 2012 LESSKEY(1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH LESSKEY 1 "Version 451: 21 Jul 2012"
|
.TH LESSKEY 1 "Version 453: 27 Oct 2012"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lesskey \- specify key bindings for less
|
lesskey \- specify key bindings for less
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -146,10 +146,13 @@ scan_option(s)
|
|||||||
*/
|
*/
|
||||||
plusoption = TRUE;
|
plusoption = TRUE;
|
||||||
s = optstring(s, &str, propt('+'), NULL);
|
s = optstring(s, &str, propt('+'), NULL);
|
||||||
|
if (s == NULL)
|
||||||
|
return;
|
||||||
if (*str == '+')
|
if (*str == '+')
|
||||||
every_first_cmd = save(++str);
|
every_first_cmd = save(++str);
|
||||||
else
|
else
|
||||||
ungetsc(str);
|
ungetsc(str);
|
||||||
|
free(str);
|
||||||
continue;
|
continue;
|
||||||
case '0': case '1': case '2': case '3': case '4':
|
case '0': case '1': case '2': case '3': case '4':
|
||||||
case '5': case '6': case '7': case '8': case '9':
|
case '5': case '6': case '7': case '8': case '9':
|
||||||
@ -202,7 +205,7 @@ scan_option(s)
|
|||||||
parg.p_string = printopt;
|
parg.p_string = printopt;
|
||||||
error("The %s option should not be followed by =",
|
error("The %s option should not be followed by =",
|
||||||
&parg);
|
&parg);
|
||||||
quit(QUIT_ERROR);
|
return;
|
||||||
}
|
}
|
||||||
s++;
|
s++;
|
||||||
} else
|
} else
|
||||||
@ -223,7 +226,7 @@ scan_option(s)
|
|||||||
else
|
else
|
||||||
error("There is no %s option (\"less --help\" for help)",
|
error("There is no %s option (\"less --help\" for help)",
|
||||||
&parg);
|
&parg);
|
||||||
quit(QUIT_ERROR);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
str = NULL;
|
str = NULL;
|
||||||
@ -260,6 +263,8 @@ scan_option(s)
|
|||||||
while (*s == ' ')
|
while (*s == ' ')
|
||||||
s++;
|
s++;
|
||||||
s = optstring(s, &str, printopt, o->odesc[1]);
|
s = optstring(s, &str, printopt, o->odesc[1]);
|
||||||
|
if (s == NULL)
|
||||||
|
return;
|
||||||
break;
|
break;
|
||||||
case NUMBER:
|
case NUMBER:
|
||||||
if (*s == '\0')
|
if (*s == '\0')
|
||||||
@ -275,6 +280,8 @@ scan_option(s)
|
|||||||
*/
|
*/
|
||||||
if (o->ofunc != NULL)
|
if (o->ofunc != NULL)
|
||||||
(*o->ofunc)(INIT, str);
|
(*o->ofunc)(INIT, str);
|
||||||
|
if (str != NULL)
|
||||||
|
free(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,35 +565,34 @@ optstring(s, p_str, printopt, validchars)
|
|||||||
char *validchars;
|
char *validchars;
|
||||||
{
|
{
|
||||||
register char *p;
|
register char *p;
|
||||||
|
register char *out;
|
||||||
|
|
||||||
if (*s == '\0')
|
if (*s == '\0')
|
||||||
{
|
{
|
||||||
nostring(printopt);
|
nostring(printopt);
|
||||||
quit(QUIT_ERROR);
|
return (NULL);
|
||||||
}
|
}
|
||||||
*p_str = s;
|
/* Alloc could be more than needed, but not worth trimming. */
|
||||||
|
*p_str = (char *) ecalloc(strlen(s)+1, sizeof(char));
|
||||||
|
out = *p_str;
|
||||||
|
|
||||||
for (p = s; *p != '\0'; p++)
|
for (p = s; *p != '\0'; p++)
|
||||||
{
|
{
|
||||||
if (*p == END_OPTION_STRING ||
|
if (*p == '\\' && p[1] != '\0')
|
||||||
(validchars != NULL && strchr(validchars, *p) == NULL))
|
|
||||||
{
|
{
|
||||||
switch (*p)
|
/* Take next char literally. */
|
||||||
{
|
++p;
|
||||||
case END_OPTION_STRING:
|
} else
|
||||||
case ' ': case '\t': case '-':
|
{
|
||||||
/* Replace the char with a null to terminate string. */
|
if (*p == END_OPTION_STRING ||
|
||||||
*p++ = '\0';
|
*p == ' ' || *p == '\t' || *p == '-' ||
|
||||||
|
(validchars != NULL && strchr(validchars, *p) == NULL))
|
||||||
|
/* End of option string. */
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
/* Cannot replace char; make a copy of the string. */
|
|
||||||
*p_str = (char *) ecalloc(p-s+1, sizeof(char));
|
|
||||||
strncpy(*p_str, s, p-s);
|
|
||||||
(*p_str)[p-s] = '\0';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
*out++ = *p;
|
||||||
}
|
}
|
||||||
|
*out = '\0';
|
||||||
return (p);
|
return (p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -609,8 +615,6 @@ num_error(printopt, errp)
|
|||||||
parg.p_string = printopt;
|
parg.p_string = printopt;
|
||||||
error("Number is required after %s", &parg);
|
error("Number is required after %s", &parg);
|
||||||
}
|
}
|
||||||
quit(QUIT_ERROR);
|
|
||||||
/* NOTREACHED */
|
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,8 +278,13 @@ flush()
|
|||||||
*/
|
*/
|
||||||
if (p[-2] == '[')
|
if (p[-2] == '[')
|
||||||
{
|
{
|
||||||
|
#if MSDOS_COMPILER==WIN32C
|
||||||
|
fg |= FOREGROUND_INTENSITY;
|
||||||
|
bg |= BACKGROUND_INTENSITY;
|
||||||
|
#else
|
||||||
fg = bo_fg_color;
|
fg = bo_fg_color;
|
||||||
bg = bo_bg_color;
|
bg = bo_bg_color;
|
||||||
|
#endif
|
||||||
} else
|
} else
|
||||||
fg |= 8;
|
fg |= 8;
|
||||||
} else if (at & 2)
|
} else if (at & 2)
|
||||||
|
@ -162,7 +162,7 @@ empty_lines(s, e)
|
|||||||
register int i;
|
register int i;
|
||||||
|
|
||||||
for (i = s; i <= e; i++)
|
for (i = s; i <= e; i++)
|
||||||
if (table[i] != NULL_POSITION)
|
if (table[i] != NULL_POSITION && table[i] != 0)
|
||||||
return (0);
|
return (0);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
@ -802,7 +802,7 @@ scrsize()
|
|||||||
else if ((n = ltgetnum("li")) > 0)
|
else if ((n = ltgetnum("li")) > 0)
|
||||||
sc_height = n;
|
sc_height = n;
|
||||||
#endif
|
#endif
|
||||||
else
|
if (sc_height <= 0)
|
||||||
sc_height = DEF_SC_HEIGHT;
|
sc_height = DEF_SC_HEIGHT;
|
||||||
|
|
||||||
if (sys_width > 0)
|
if (sys_width > 0)
|
||||||
@ -813,7 +813,7 @@ scrsize()
|
|||||||
else if ((n = ltgetnum("co")) > 0)
|
else if ((n = ltgetnum("co")) > 0)
|
||||||
sc_width = n;
|
sc_width = n;
|
||||||
#endif
|
#endif
|
||||||
else
|
if (sc_width <= 0)
|
||||||
sc_width = DEF_SC_WIDTH;
|
sc_width = DEF_SC_WIDTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -753,6 +753,10 @@ v448 6/15/12 Print name of regex library in version message.
|
|||||||
v449 6/23/12 Allow config option --with-regex=none.
|
v449 6/23/12 Allow config option --with-regex=none.
|
||||||
v450 7/4/12 Fix EOF bug with ESC-F.
|
v450 7/4/12 Fix EOF bug with ESC-F.
|
||||||
v451 7/20/12 Fix typo.
|
v451 7/20/12 Fix typo.
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
v452 10/19/12 Fix --with-regex=none, fix "stty 0", fix Win32.
|
||||||
|
Don't quit if errors in cmd line options.
|
||||||
|
v453 10/27/12 Increase buffer sizes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char version[] = "451";
|
char version[] = "453";
|
||||||
|
@ -184,6 +184,7 @@
|
|||||||
/*
|
/*
|
||||||
* Sizes of various buffers.
|
* Sizes of various buffers.
|
||||||
*/
|
*/
|
||||||
|
#if 0 /* old sizes for small memory machines
|
||||||
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
#define CMDBUF_SIZE 512 /* Buffer for multichar commands */
|
||||||
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
#define UNGOT_SIZE 100 /* Max chars to unget() */
|
||||||
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
#define LINEBUF_SIZE 1024 /* Max size of line in input file */
|
||||||
@ -193,6 +194,17 @@
|
|||||||
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
#define TAGLINE_SIZE 512 /* Max size of line in tags file */
|
||||||
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
#define TABSTOP_MAX 32 /* Max number of custom tab stops */
|
||||||
|
#else /* more reasonable sizes for modern machines */
|
||||||
|
#define CMDBUF_SIZE 2048 /* Buffer for multichar commands */
|
||||||
|
#define UNGOT_SIZE 200 /* Max chars to unget() */
|
||||||
|
#define LINEBUF_SIZE 1024 /* Initial max size of line in input file */
|
||||||
|
#define OUTBUF_SIZE 1024 /* Output buffer */
|
||||||
|
#define PROMPT_SIZE 2048 /* Max size of prompt string */
|
||||||
|
#define TERMBUF_SIZE 2048 /* Termcap buffer for tgetent */
|
||||||
|
#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */
|
||||||
|
#define TAGLINE_SIZE 1024 /* Max size of line in tags file */
|
||||||
|
#define TABSTOP_MAX 128 /* Max number of custom tab stops */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Settings automatically determined by configure. */
|
/* Settings automatically determined by configure. */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user