diff options
author | Alexandr Shadchin <shadchin@cvs.openbsd.org> | 2011-09-16 17:47:08 +0000 |
---|---|---|
committer | Alexandr Shadchin <shadchin@cvs.openbsd.org> | 2011-09-16 17:47:08 +0000 |
commit | 4af7a7ecf9fc85f91bf2f75612d6044a70b2c90b (patch) | |
tree | c0f7aff8ad4d1b35b6e60ba4eeb13e21eba5a625 /usr.bin/less | |
parent | f82380c703a1bf166b19e0228a10cfcf400046b4 (diff) |
Import of Less 444
ok nicm@
Diffstat (limited to 'usr.bin/less')
-rw-r--r-- | usr.bin/less/charset.h | 5 | ||||
-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 |
8 files changed, 35 insertions, 101 deletions
diff --git a/usr.bin/less/charset.h b/usr.bin/less/charset.h index 7df4df62c20..8ccf748df09 100644 --- a/usr.bin/less/charset.h +++ b/usr.bin/less/charset.h @@ -1,10 +1,11 @@ /* - * Copyright (C) 1984-2012 Mark Nudelman + * Copyright (C) 2005-2011 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, see the README file. + * For more information about less, or for information on how to + * contact the author, see the README file. */ #define IS_ASCII_OCTET(c) (((c) & 0x80) == 0) diff --git a/usr.bin/less/defines.ds b/usr.bin/less/defines.ds index d85f479454a..4dbbd6518a1 100644 --- a/usr.bin/less/defines.ds +++ b/usr.bin/less/defines.ds @@ -1,10 +1,11 @@ /* - * Copyright (C) 1984-2012 Mark Nudelman + * Copyright (C) 1984-2011 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, see the README file. + * For more information about less, or for information on how to + * contact the author, see the README file. */ @@ -185,7 +186,6 @@ /* * 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,17 +195,6 @@ #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 @@ -333,9 +322,6 @@ /* 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 578091d1967..0fd8cc73503 100644 --- a/usr.bin/less/defines.o2 +++ b/usr.bin/less/defines.o2 @@ -1,10 +1,11 @@ /* - * Copyright (C) 1984-2012 Mark Nudelman + * Copyright (C) 1984-2011 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, see the README file. + * For more information about less, or for information on how to + * contact the author, see the README file. */ @@ -166,7 +167,6 @@ /* * 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,17 +176,6 @@ #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 507ec198d22..3bb1d2cb8ca 100644 --- a/usr.bin/less/defines.o9 +++ b/usr.bin/less/defines.o9 @@ -1,10 +1,11 @@ /* - * Copyright (C) 1984-2012 Mark Nudelman + * Copyright (C) 1984-2011 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, see the README file. + * For more information about less, or for information on how to + * contact the author, see the README file. */ @@ -173,7 +174,6 @@ /* * 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,17 +183,6 @@ #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 dd92261e821..416a548e745 100644 --- a/usr.bin/less/defines.wn +++ b/usr.bin/less/defines.wn @@ -1,10 +1,11 @@ /* - * Copyright (C) 1984-2012 Mark Nudelman + * Copyright (C) 1984-2011 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, see the README file. + * For more information about less, or for information on how to + * contact the author, see the README file. */ @@ -167,7 +168,6 @@ /* * 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,17 +177,6 @@ #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 470a00e87e1..682b0bd835e 100644 --- a/usr.bin/less/lessecho.man +++ b/usr.bin/less/lessecho.man @@ -10,18 +10,12 @@ LESSECHO(1) LESSECHO(1) [1mDESCRIPTION[0m [4mlessecho[24m is a program that simply echos its arguments on standard out- - put. But any metacharacter in the output is preceded by an "escape" - character, which by default is a backslash. + put. But any argument containing spaces is enclosed in quotes. [1mOPTIONS[0m A summary of options is included below. - [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-ox [22mSpecifies "x" to be the open quote character. [1m-cx [22mSpecifies "x" to be the close quote character. @@ -29,26 +23,27 @@ 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. By default, no characters are - considered metachars. + [1m-mx [22mSpecifies "x" to be a metachar. [1m-nn [22mSpecifies "n" to be a metachar, as an integer. - [1m-fn [22mSpecifies "n" to be the escape char for metachars, as an inte- + [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- ger. - [1m-a [22mSpecifies that all arguments are to be quoted. The default is - that only arguments containing metacharacters are quoted + [1m-a [22mSpecifies that all arguments are to be quoted. The default is + that only arguments containing spaces 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 458: 04 Apr 2013 LESSECHO(1) + Version 444: 09 Jun 2011 LESSECHO(1) diff --git a/usr.bin/less/lessecho.nro b/usr.bin/less/lessecho.nro index d7fb390993c..46540e8bcca 100644 --- a/usr.bin/less/lessecho.nro +++ b/usr.bin/less/lessecho.nro @@ -1,4 +1,4 @@ -.TH LESSECHO 1 "Version 458: 04 Apr 2013" +.TH LESSECHO 1 "Version 444: 09 Jun 2011" .SH NAME lessecho \- expand metacharacters .SH SYNOPSIS @@ -7,19 +7,12 @@ lessecho \- expand metacharacters .SH "DESCRIPTION" .I lessecho is a program that simply echos its arguments on standard output. -But any metacharacter in the output is preceded by an "escape" -character, which by default is a backslash. +But any argument containing spaces is enclosed in quotes. .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", rather than double-quote, to be the open quote character, -which is used if the -e- option is specified. +Specifies "x" to be the open quote character. .TP .B \-cx Specifies "x" to be the close quote character. @@ -32,17 +25,19 @@ 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 metacharacters are quoted +The default is that only arguments containing spaces are quoted. .SH "SEE ALSO" less(1) .SH AUTHOR diff --git a/usr.bin/less/pattern.h b/usr.bin/less/pattern.h index 7d05fdeb88e..3b44e2ddedb 100644 --- a/usr.bin/less/pattern.h +++ b/usr.bin/less/pattern.h @@ -1,19 +1,13 @@ /* - * Copyright (C) 1984-2012 Mark Nudelman + * Copyright (C) 1984-2011 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, see the README file. + * For more information about less, or for information on how to + * contact the author, 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 @@ -52,7 +46,3 @@ extern char *__loc1; #define CLEAR_PATTERN(name) name = NULL #endif -#if NO_REGEX -#define DEFINE_PATTERN(name) -#define CLEAR_PATTERN(name) -#endif |