diff options
author | Alexandr Shadchin <shadchin@cvs.openbsd.org> | 2014-04-25 13:33:53 +0000 |
---|---|---|
committer | Alexandr Shadchin <shadchin@cvs.openbsd.org> | 2014-04-25 13:33:53 +0000 |
commit | ae43ffa8613fad7c10b8fc0e854327378d434317 (patch) | |
tree | d9b286ac21c74d5dfaac9325d2412baf327b73be /usr.bin | |
parent | aee3df47ac999fe520936c17c3086a1ed4772534 (diff) |
Import of Less 458
ok guenther@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/less/LICENSE | 2 | ||||
-rw-r--r-- | usr.bin/less/Makefile.aut | 5 | ||||
-rw-r--r-- | usr.bin/less/charset.h | 5 | ||||
-rw-r--r-- | usr.bin/less/configure.ac | 66 | ||||
-rw-r--r-- | usr.bin/less/defines.ds | 20 | ||||
-rw-r--r-- | usr.bin/less/defines.o2 | 17 | ||||
-rw-r--r-- | usr.bin/less/defines.o9 | 17 | ||||
-rw-r--r-- | usr.bin/less/defines.wn | 17 | ||||
-rw-r--r-- | usr.bin/less/lessecho.man | 25 | ||||
-rw-r--r-- | usr.bin/less/lessecho.nro | 19 | ||||
-rw-r--r-- | usr.bin/less/pattern.h | 16 | ||||
-rw-r--r-- | usr.bin/less/pckeys.h | 5 | ||||
-rw-r--r-- | usr.bin/less/scrsize.c | 5 |
13 files changed, 157 insertions, 62 deletions
diff --git a/usr.bin/less/LICENSE b/usr.bin/less/LICENSE index c7168e71827..3fe715f1706 100644 --- a/usr.bin/less/LICENSE +++ b/usr.bin/less/LICENSE @@ -2,7 +2,7 @@ ------------ Less -Copyright (C) 1984-2011 Mark Nudelman +Copyright (C) 1984-2012 Mark Nudelman Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/usr.bin/less/Makefile.aut b/usr.bin/less/Makefile.aut index b3ee3f4639d..f7026249e66 100644 --- a/usr.bin/less/Makefile.aut +++ b/usr.bin/less/Makefile.aut @@ -1,6 +1,6 @@ # Makefile for authoring less. -EMAIL = markn@greenwoodsoftware.com +EMAIL = bug-less@gnu.org HOMEPAGE = http://www.greenwoodsoftware.com/less SHELL = /bin/sh RCS = rcs @@ -112,8 +112,7 @@ dist: ${DISTFILES} echo "Preparing $$REL"; \ rm -rf $$REL; mkdir $$REL; \ for file in ${DISTFILES}; do \ - cp -p $$file $$REL; \ - chmod -w $$REL/$$file; \ + ./add_copyright $$file $$REL; \ done; \ cd $$REL; chmod +w ${DISTFILES_W}; cd ..; \ echo "Creating release/$$REL/$$REL.tar.gz"; \ diff --git a/usr.bin/less/charset.h b/usr.bin/less/charset.h index 8ccf748df09..7df4df62c20 100644 --- a/usr.bin/less/charset.h +++ b/usr.bin/less/charset.h @@ -1,11 +1,10 @@ /* - * Copyright (C) 2005-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ #define IS_ASCII_OCTET(c) (((c) & 0x80) == 0) diff --git a/usr.bin/less/configure.ac b/usr.bin/less/configure.ac index 0b386b07572..4ac9a351ddd 100644 --- a/usr.bin/less/configure.ac +++ b/usr.bin/less/configure.ac @@ -30,11 +30,9 @@ AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no]) AC_CHECK_LIB(curses, initscr, [have_curses=yes], [have_curses=no]) AC_CHECK_LIB(termcap, tgetent, [have_termcap=yes], [have_termcap=no]) AC_CHECK_LIB(termlib, tgetent, [have_termlib=yes], [have_termlib=no]) -# Regular expressions (regcmp) are in -lgen on Solaris 2, -# and in -lintl on SCO Unix. -AC_CHECK_LIB(gen, regcmp) -AC_CHECK_LIB(intl, regcmp) -AC_CHECK_LIB(PW, regcmp) +# Regular expressions (regcmp) are in -lgen on Solaris 2, (but in libc +# at least on Solaris 10 (2.10)) and in -lintl on SCO Unix. +AC_SEARCH_LIBS([regcmp], [gen intl PW]) # Checks for terminal libraries AC_MSG_CHECKING([for working terminal libraries]) @@ -179,6 +177,8 @@ AC_TYPE_SIZE_T AC_HEADER_TIME # Autoheader templates for symbols defined later by AC_DEFINE. +AH_TEMPLATE([HAVE_GNU_REGEX], + [GNU regex library]) AH_TEMPLATE([HAVE_POSIX_REGCOMP], [POSIX regcomp() and regex.h]) AH_TEMPLATE([HAVE_PCRE], @@ -383,18 +383,19 @@ fi # Checks for regular expression functions. have_regex=no have_posix_regex=unknown -AC_MSG_CHECKING(for regcomp) +supported_regex="" # Select a regular expression library. WANT_REGEX=auto AC_ARG_WITH(regex, - [ --with-regex={auto,pcre,posix,regcmp,re_comp,regcomp,regcomp-local} Select a regular expression library [auto]], + [ --with-regex={auto,gnu,pcre,posix,regcmp,re_comp,regcomp,regcomp-local,none} Select a regular expression library [auto]], WANT_REGEX="$withval") if test $have_regex = no; then if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then # 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. +AC_MSG_CHECKING(for POSIX regcomp) AC_TRY_RUN([ #include <sys/types.h> #include <regex.h> @@ -409,16 +410,16 @@ if (rm.rm_sp != text + 1) exit(1); /* check for correct offset */ exit(0); }], have_posix_regex=yes, have_posix_regex=no, have_posix_regex=unknown) if test $have_posix_regex = yes; then - AC_MSG_RESULT(using POSIX regcomp) - AC_DEFINE(HAVE_POSIX_REGCOMP) + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_POSIX_REGCOMP) supported_regex="$supported_regex posix" have_regex=yes elif test $have_posix_regex = unknown; then AC_TRY_LINK([ #include <sys/types.h> #include <regex.h>], [regex_t *r; regfree(r);], - AC_MSG_RESULT(using POSIX regcomp) - AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes) + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes; supported_regex="$supported_regex posix") else AC_MSG_RESULT(no) fi @@ -428,41 +429,60 @@ fi if test $have_regex = no; then if test $WANT_REGEX = auto -o $WANT_REGEX = pcre; then AC_CHECK_LIB(pcre, pcre_compile, -[AC_MSG_RESULT(using pcre); AC_DEFINE(HAVE_PCRE) LIBS="$LIBS -lpcre" have_regex=yes], []) +[AC_DEFINE(HAVE_PCRE) LIBS="$LIBS -lpcre" have_regex=yes; supported_regex="$supported_regex pcre"], []) +fi +fi + +if test $have_regex = no; then +if test $WANT_REGEX = auto -o $WANT_REGEX = gnu; then +AC_CHECK_LIB(c, re_compile_pattern, +[AC_DEFINE(HAVE_GNU_REGEX) have_regex=yes; supported_regex="$supported_regex gnu"], []) fi fi if test $have_regex = no; then if test $WANT_REGEX = auto -o $WANT_REGEX = regcmp; then 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 if test $have_regex = no; then if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp; then +AC_MSG_CHECKING(for V8 regcomp) AC_TRY_LINK([ #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 if test $have_regex = no && test -f ${srcdir}/regexp.c; 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 if test $have_regex = no; 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 if test $have_regex = no; then -AC_MSG_RESULT(cannot find regular expression library); AC_DEFINE(NO_REGEX) +if test $WANT_REGEX = auto -o $WANT_REGEX = none; then +AC_MSG_RESULT(using no regex) +else +AC_MSG_WARN(cannot find regular expression library) +fi +AC_DEFINE(NO_REGEX) supported_regex="$supported_regex none" fi +AC_MSG_RESULT(regular expression library: $supported_regex) + AC_ARG_WITH(editor, [ --with-editor=PROGRAM use PROGRAM as the default editor [vi]], AC_DEFINE_UNQUOTED(EDIT_PGM, "$withval"), AC_DEFINE(EDIT_PGM, "vi")) @@ -649,6 +669,7 @@ AH_TOP([ /* * Sizes of various buffers. */ +#if 0 /* old sizes for small memory machines */ #define CMDBUF_SIZE 512 /* Buffer for multichar commands */ #define UNGOT_SIZE 100 /* Max chars to unget() */ #define LINEBUF_SIZE 1024 /* Max size of line in input file */ @@ -658,6 +679,17 @@ AH_TOP([ #define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */ #define TAGLINE_SIZE 512 /* Max size of line in tags file */ #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. */ ]) diff --git a/usr.bin/less/defines.ds b/usr.bin/less/defines.ds index 4dbbd6518a1..d85f479454a 100644 --- a/usr.bin/less/defines.ds +++ b/usr.bin/less/defines.ds @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ @@ -186,6 +185,7 @@ /* * Sizes of various buffers. */ +#if 0 /* old sizes for small memory machines #define CMDBUF_SIZE 512 /* Buffer for multichar commands */ #define UNGOT_SIZE 100 /* Max chars to unget() */ #define LINEBUF_SIZE 1024 /* Max size of line in input file */ @@ -195,6 +195,17 @@ #define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */ #define TAGLINE_SIZE 512 /* Max size of line in tags file */ #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. */ #if MSDOS_COMPILER==BORLANDC @@ -322,6 +333,9 @@ /* Define if you have the <fcntl.h> header file. */ #define HAVE_FCNTL_H 1 +/* Define HAVE_FLOAT if your compiler supports the "double" type. */ +#define HAVE_FLOAT 1 + /* Define if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 diff --git a/usr.bin/less/defines.o2 b/usr.bin/less/defines.o2 index 0fd8cc73503..578091d1967 100644 --- a/usr.bin/less/defines.o2 +++ b/usr.bin/less/defines.o2 @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ @@ -167,6 +166,7 @@ /* * Sizes of various buffers. */ +#if 0 /* old sizes for small memory machines #define CMDBUF_SIZE 512 /* Buffer for multichar commands */ #define UNGOT_SIZE 100 /* Max chars to unget() */ #define LINEBUF_SIZE 1024 /* Max size of line in input file */ @@ -176,6 +176,17 @@ #define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */ #define TAGLINE_SIZE 512 /* Max size of line in tags file */ #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 off_t long */ diff --git a/usr.bin/less/defines.o9 b/usr.bin/less/defines.o9 index 3bb1d2cb8ca..507ec198d22 100644 --- a/usr.bin/less/defines.o9 +++ b/usr.bin/less/defines.o9 @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ @@ -174,6 +173,7 @@ /* * Sizes of various buffers. */ +#if 0 /* old sizes for small memory machines #define CMDBUF_SIZE 512 /* Buffer for multichar commands */ #define UNGOT_SIZE 100 /* Max chars to unget() */ #define LINEBUF_SIZE 1024 /* Max size of line in input file */ @@ -183,6 +183,17 @@ #define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */ #define TAGLINE_SIZE 512 /* Max size of line in tags file */ #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 off_t long diff --git a/usr.bin/less/defines.wn b/usr.bin/less/defines.wn index 416a548e745..dd92261e821 100644 --- a/usr.bin/less/defines.wn +++ b/usr.bin/less/defines.wn @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ @@ -168,6 +167,7 @@ /* * Sizes of various buffers. */ +#if 0 /* old sizes for small memory machines #define CMDBUF_SIZE 512 /* Buffer for multichar commands */ #define UNGOT_SIZE 100 /* Max chars to unget() */ #define LINEBUF_SIZE 1024 /* Max size of line in input file */ @@ -177,6 +177,17 @@ #define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */ #define TAGLINE_SIZE 512 /* Max size of line in tags file */ #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 off_t long */ diff --git a/usr.bin/less/lessecho.man b/usr.bin/less/lessecho.man index 682b0bd835e..470a00e87e1 100644 --- a/usr.bin/less/lessecho.man +++ b/usr.bin/less/lessecho.man @@ -10,12 +10,18 @@ LESSECHO(1) LESSECHO(1) [1mDESCRIPTION[0m [4mlessecho[24m is a program that simply echos its arguments on standard out- - put. But any argument containing spaces is enclosed in quotes. + put. But any metacharacter in the output is preceded by an "escape" + character, which by default is a backslash. [1mOPTIONS[0m A summary of options is included below. - [1m-ox [22mSpecifies "x" to be the open quote character. + [1m-ex [22mSpecifies "x", rather than backslash, to be the escape char for + metachars. If x is "-", no escape char is used and arguments + containing metachars are surrounded by quotes instead. + + [1m-ox [22mSpecifies "x", rather than double-quote, to be the open quote + character, which is used if the -e- option is specified. [1m-cx [22mSpecifies "x" to be the close quote character. @@ -23,27 +29,26 @@ LESSECHO(1) LESSECHO(1) [1m-dn [22mSpecifies "n" to be the close quote character, as an integer. - [1m-mx [22mSpecifies "x" to be a metachar. + [1m-mx [22mSpecifies "x" to be a metachar. By default, no characters are + considered metachars. [1m-nn [22mSpecifies "n" to be a metachar, as an integer. - [1m-ex [22mSpecifies "x" to be the escape char for metachars. - - [1m-fn [22mSpecifies "n" to be the escape char for metachars, as an inte- + [1m-fn [22mSpecifies "n" to be the escape char for metachars, as an inte- ger. - [1m-a [22mSpecifies that all arguments are to be quoted. The default is - that only arguments containing spaces are quoted. + [1m-a [22mSpecifies that all arguments are to be quoted. The default is + that only arguments containing metacharacters are quoted [1mSEE ALSO[0m less(1) [1mAUTHOR[0m - This manual page was written by Thomas Schoepf <schoepf@debian.org>, + This manual page was written by Thomas Schoepf <schoepf@debian.org>, for the Debian GNU/Linux system (but may be used by others). Send bug reports or comments to bug-less@gnu.org. - Version 444: 09 Jun 2011 LESSECHO(1) + Version 458: 04 Apr 2013 LESSECHO(1) diff --git a/usr.bin/less/lessecho.nro b/usr.bin/less/lessecho.nro index 46540e8bcca..d7fb390993c 100644 --- a/usr.bin/less/lessecho.nro +++ b/usr.bin/less/lessecho.nro @@ -1,4 +1,4 @@ -.TH LESSECHO 1 "Version 444: 09 Jun 2011" +.TH LESSECHO 1 "Version 458: 04 Apr 2013" .SH NAME lessecho \- expand metacharacters .SH SYNOPSIS @@ -7,12 +7,19 @@ lessecho \- expand metacharacters .SH "DESCRIPTION" .I lessecho is a program that simply echos its arguments on standard output. -But any argument containing spaces is enclosed in quotes. +But any metacharacter in the output is preceded by an "escape" +character, which by default is a backslash. .SH OPTIONS A summary of options is included below. .TP +.B \-ex +Specifies "x", rather than backslash, to be the escape char for metachars. +If x is "-", no escape char is used and arguments containing metachars +are surrounded by quotes instead. +.TP .B \-ox -Specifies "x" to be the open quote character. +Specifies "x", rather than double-quote, to be the open quote character, +which is used if the -e- option is specified. .TP .B \-cx Specifies "x" to be the close quote character. @@ -25,19 +32,17 @@ Specifies "n" to be the close quote character, as an integer. .TP .B \-mx Specifies "x" to be a metachar. +By default, no characters are considered metachars. .TP .B \-nn Specifies "n" to be a metachar, as an integer. .TP -.B \-ex -Specifies "x" to be the escape char for metachars. -.TP .B \-fn Specifies "n" to be the escape char for metachars, as an integer. .TP .B \-a Specifies that all arguments are to be quoted. -The default is that only arguments containing spaces are quoted. +The default is that only arguments containing metacharacters are quoted .SH "SEE ALSO" less(1) .SH AUTHOR diff --git a/usr.bin/less/pattern.h b/usr.bin/less/pattern.h index 3b44e2ddedb..7d05fdeb88e 100644 --- a/usr.bin/less/pattern.h +++ b/usr.bin/less/pattern.h @@ -1,13 +1,19 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ +#if HAVE_GNU_REGEX +#define __USE_GNU 1 +#include <regex.h> +#define DEFINE_PATTERN(name) struct re_pattern_buffer *name +#define CLEAR_PATTERN(name) name = NULL +#endif + #if HAVE_POSIX_REGCOMP #include <regex.h> #ifdef REG_EXTENDED @@ -46,3 +52,7 @@ extern char *__loc1; #define CLEAR_PATTERN(name) name = NULL #endif +#if NO_REGEX +#define DEFINE_PATTERN(name) +#define CLEAR_PATTERN(name) +#endif diff --git a/usr.bin/less/pckeys.h b/usr.bin/less/pckeys.h index 3708d85f43d..b6737568308 100644 --- a/usr.bin/less/pckeys.h +++ b/usr.bin/less/pckeys.h @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ diff --git a/usr.bin/less/scrsize.c b/usr.bin/less/scrsize.c index 05d041ee5fb..9f786fecbb9 100644 --- a/usr.bin/less/scrsize.c +++ b/usr.bin/less/scrsize.c @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ /* |