From owner-svn-src-all@FreeBSD.ORG Mon Jul 27 07:05:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E42B41065670; Mon, 27 Jul 2009 07:05:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D07C18FC08; Mon, 27 Jul 2009 07:05:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6R758vE091851; Mon, 27 Jul 2009 07:05:08 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6R758M9091813; Mon, 27 Jul 2009 07:05:08 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200907270705.n6R758M9091813@svn.freebsd.org> From: Xin LI Date: Mon, 27 Jul 2009 07:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195902 - vendor/less/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 07:05:09 -0000 Author: delphij Date: Mon Jul 27 07:05:08 2009 New Revision: 195902 URL: http://svn.freebsd.org/changeset/base/195902 Log: Vendor import of less v436. Added: vendor/less/dist/cvt.c vendor/less/dist/pattern.c vendor/less/dist/pattern.h Modified: vendor/less/dist/LICENSE vendor/less/dist/Makefile.aut vendor/less/dist/Makefile.dsb vendor/less/dist/Makefile.dsg vendor/less/dist/Makefile.dsu vendor/less/dist/Makefile.in vendor/less/dist/Makefile.o2e vendor/less/dist/Makefile.o9c vendor/less/dist/Makefile.o9u vendor/less/dist/Makefile.wnb vendor/less/dist/Makefile.wnm vendor/less/dist/NEWS vendor/less/dist/README vendor/less/dist/brac.c vendor/less/dist/ch.c vendor/less/dist/charset.c vendor/less/dist/charset.h vendor/less/dist/cmd.h vendor/less/dist/cmdbuf.c vendor/less/dist/command.c vendor/less/dist/configure.ac vendor/less/dist/decode.c vendor/less/dist/defines.ds vendor/less/dist/defines.o2 vendor/less/dist/defines.o9 vendor/less/dist/defines.wn vendor/less/dist/edit.c vendor/less/dist/filename.c vendor/less/dist/forwback.c vendor/less/dist/funcs.h vendor/less/dist/ifile.c vendor/less/dist/input.c vendor/less/dist/jump.c vendor/less/dist/less.h vendor/less/dist/less.man vendor/less/dist/less.nro vendor/less/dist/lessecho.c vendor/less/dist/lessecho.man vendor/less/dist/lessecho.nro vendor/less/dist/lesskey.c vendor/less/dist/lesskey.h vendor/less/dist/lesskey.man vendor/less/dist/lesskey.nro vendor/less/dist/lglob.h vendor/less/dist/line.c vendor/less/dist/linenum.c vendor/less/dist/lsystem.c vendor/less/dist/main.c vendor/less/dist/mark.c vendor/less/dist/mkhelp.c vendor/less/dist/optfunc.c vendor/less/dist/option.c vendor/less/dist/option.h vendor/less/dist/opttbl.c vendor/less/dist/os.c vendor/less/dist/output.c vendor/less/dist/pckeys.h vendor/less/dist/position.c vendor/less/dist/position.h vendor/less/dist/prompt.c vendor/less/dist/screen.c vendor/less/dist/scrsize.c vendor/less/dist/search.c vendor/less/dist/signal.c vendor/less/dist/tags.c vendor/less/dist/ttyin.c vendor/less/dist/version.c Modified: vendor/less/dist/LICENSE ============================================================================== --- vendor/less/dist/LICENSE Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/LICENSE Mon Jul 27 07:05:08 2009 (r195902) @@ -2,7 +2,7 @@ ------------ Less -Copyright (C) 1984-2008 Mark Nudelman +Copyright (C) 1984-2009 Mark Nudelman Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: vendor/less/dist/Makefile.aut ============================================================================== --- vendor/less/dist/Makefile.aut Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/Makefile.aut Mon Jul 27 07:05:08 2009 (r195902) @@ -10,10 +10,10 @@ srcdir = . SRC = \ main.c screen.c brac.c ch.c charset.c cmdbuf.c \ - command.c decode.c edit.c filename.c forwback.c \ + command.c cvt.c decode.c edit.c filename.c forwback.c \ help.c ifile.c input.c jump.c line.c linenum.c \ lsystem.c mark.c optfunc.c option.c opttbl.c os.c \ - output.c position.c prompt.c search.c signal.c \ + output.c pattern.c position.c prompt.c search.c signal.c \ tags.c ttyin.c version.c DISTFILES_W = \ defines.ds Makefile.dsb Makefile.dsg Makefile.dsu \ @@ -24,7 +24,8 @@ DISTFILES = \ ${SRC} regexp.c regexp.h \ COPYING INSTALL LICENSE Makefile.in Makefile.aut NEWS README \ configure configure.ac lesskey.c lessecho.c scrsize.c \ - charset.h cmd.h funcs.h lglob.h less.h lesskey.h option.h pckeys.h position.h \ + charset.h cmd.h funcs.h lglob.h less.h lesskey.h option.h \ + pckeys.h pattern.h position.h \ install.sh defines.h.in mkinstalldirs \ less.nro less.man lesskey.nro lesskey.man lessecho.nro lessecho.man \ less.hlp \ @@ -109,6 +110,8 @@ dist: ${DISTFILES} cd $$REL; chmod +w ${DISTFILES_W}; cd ..; \ echo "Creating release/$$REL/$$REL.tar.gz"; \ tar -cf - $$REL | gzip -c >release/$$REL/$$REL.tar.gz; \ + echo "Signing release/$$REL/$$REL.tar.gz"; \ + gpg --detach-sign release/$$REL/$$REL.tar.gz; \ echo "Creating release/$$REL/$$REL.zip"; \ zip -rq release/$$REL/$$REL.zip $$REL; \ rm -rf $$REL Modified: vendor/less/dist/Makefile.dsb ============================================================================== --- vendor/less/dist/Makefile.dsb Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/Makefile.dsb Mon Jul 27 07:05:08 2009 (r195902) @@ -18,12 +18,13 @@ EXT = .EXE .c.obj: $(CC) -c -I. $(CPPFLAGS) $(CFLAGS) $< -OBJ = main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj command.obj \ - decode.obj edit.obj filename.obj forwback.obj help.obj ifile.obj \ - input.obj jump.obj line.obj linenum.obj lsystem.obj \ - mark.obj optfunc.obj option.obj opttbl.obj os.obj output.obj \ - position.obj prompt.obj search.obj signal.obj tags.obj \ - ttyin.obj version.obj +OBJ = \ + main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj \ + command.obj cvt.obj decode.obj edit.obj filename.obj forwback.obj \ + help.obj ifile.obj input.obj jump.obj line.obj linenum.obj \ + lsystem.obj mark.obj optfunc.obj option.obj opttbl.obj os.obj \ + output.obj pattern.obj position.obj prompt.obj search.obj signal.obj \ + tags.obj ttyin.obj version.obj all: less$(EXT) lesskey$(EXT) Modified: vendor/less/dist/Makefile.dsg ============================================================================== --- vendor/less/dist/Makefile.dsg Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/Makefile.dsg Mon Jul 27 07:05:08 2009 (r195902) @@ -33,11 +33,12 @@ manext = 1 .c.o: ${CC} -I. ${CFLAGS_COMPILE_ONLY} -DBINDIR=\"${bindir}\" -DSYSDIR=\"${sysconfdir}\" ${CPPFLAGS} ${CFLAGS} $< -OBJ = main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \ - command.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \ +OBJ = \ + main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \ + command.${O} cvt.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \ help.${O} ifile.${O} input.${O} jump.${O} line.${O} linenum.${O} \ lsystem.${O} mark.${O} optfunc.${O} option.${O} opttbl.${O} os.${O} \ - output.${O} position.${O} prompt.${O} search.${O} signal.${O} \ + output.${O} pattern.${O} position.${O} prompt.${O} search.${O} signal.${O} \ tags.${O} ttyin.${O} version.${O} all: less lesskey lessecho Modified: vendor/less/dist/Makefile.dsu ============================================================================== --- vendor/less/dist/Makefile.dsu Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/Makefile.dsu Mon Jul 27 07:05:08 2009 (r195902) @@ -27,12 +27,13 @@ LIBS = $(LIBDIR)\llibce.lib $(LIBDIR)\gr .c.obj: $(CC) -c -I. -I$(INCDIR) $(CPPFLAGS) $(CFLAGS) $< -OBJ = main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj command.obj \ - decode.obj edit.obj filename.obj forwback.obj help.obj ifile.obj \ - input.obj jump.obj line.obj linenum.obj lsystem.obj \ - mark.obj optfunc.obj option.obj opttbl.obj os.obj output.obj \ - position.obj prompt.obj search.obj signal.obj tags.obj \ - ttyin.obj version.obj +OBJ = \ + main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj \ + command.obj cvt.obj decode.obj edit.obj filename.obj forwback.obj \ + help.obj ifile.obj input.obj jump.obj line.obj linenum.obj \ + lsystem.obj mark.obj optfunc.obj option.obj opttbl.obj os.obj \ + output.obj pattern.obj position.obj prompt.obj search.obj signal.obj \ + tags.obj ttyin.obj version.obj all: less lesskey Modified: vendor/less/dist/Makefile.in ============================================================================== --- vendor/less/dist/Makefile.in Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/Makefile.in Mon Jul 27 07:05:08 2009 (r195902) @@ -43,11 +43,12 @@ SHELL = /bin/sh .c.o: ${CC} -I. ${CFLAGS_COMPILE_ONLY} -DBINDIR=\"${bindir}\" -DSYSDIR=\"${sysconfdir}\" ${CPPFLAGS} ${CFLAGS} $< -OBJ = main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \ - command.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \ +OBJ = \ + main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \ + command.${O} cvt.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \ help.${O} ifile.${O} input.${O} jump.${O} line.${O} linenum.${O} \ lsystem.${O} mark.${O} optfunc.${O} option.${O} opttbl.${O} os.${O} \ - output.${O} position.${O} prompt.${O} search.${O} signal.${O} \ + output.${O} pattern.${O} position.${O} prompt.${O} search.${O} signal.${O} \ tags.${O} ttyin.${O} version.${O} @REGEX_O@ all: less$(EXEEXT) lesskey$(EXEEXT) lessecho$(EXEEXT) Modified: vendor/less/dist/Makefile.o2e ============================================================================== --- vendor/less/dist/Makefile.o2e Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/Makefile.o2e Mon Jul 27 07:05:08 2009 (r195902) @@ -18,11 +18,12 @@ O = obj .c.${O}: ${CC} -c ${CPPFLAGS} ${CFLAGS} $< -OBJ = main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \ - command.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \ +OBJ = \ + main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \ + command.${O} cvt.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \ help.${O} ifile.${O} input.${O} jump.${O} line.${O} linenum.${O} \ lsystem.${O} mark.${O} optfunc.${O} option.${O} opttbl.${O} os.${O} \ - output.${O} position.${O} prompt.${O} search.${O} signal.${O} \ + output.${O} pattern.${O} position.${O} prompt.${O} search.${O} signal.${O} \ tags.${O} ttyin.${O} version.${O} regexp.${O} all: less.exe lesskey.exe scrsize.exe Modified: vendor/less/dist/Makefile.o9c ============================================================================== --- vendor/less/dist/Makefile.o9c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/Makefile.o9c Mon Jul 27 07:05:08 2009 (r195902) @@ -22,11 +22,12 @@ O = r .c.${O}: ${CC} ${CFLAGS_COMPILE_ONLY} ${CPPFLAGS} ${CFLAGS} $< -OBJ = main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \ - command.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \ +OBJ = \ + main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \ + command.${O} cvt.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \ help.${O} ifile.${O} input.${O} jump.${O} line.${O} linenum.${O} \ lsystem.${O} mark.${O} optfunc.${O} option.${O} opttbl.${O} os.${O} \ - output.${O} position.${O} prompt.${O} search.${O} signal.${O} \ + output.${O} pattern.${O} position.${O} prompt.${O} search.${O} signal.${O} \ tags.${O} ttyin.${O} version.${O} regexp.${O} all: less lessecho lesskey Modified: vendor/less/dist/Makefile.o9u ============================================================================== --- vendor/less/dist/Makefile.o9u Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/Makefile.o9u Mon Jul 27 07:05:08 2009 (r195902) @@ -21,11 +21,12 @@ O = r .c.${O}: ${CC} ${CFLAGS_COMPILE_ONLY} ${CPPFLAGS} ${CFLAGS} $< -OBJ = main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \ - command.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \ +OBJ = \ + main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \ + command.${O} cvt.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \ help.${O} ifile.${O} input.${O} jump.${O} line.${O} linenum.${O} \ lsystem.${O} mark.${O} optfunc.${O} option.${O} opttbl.${O} os.${O} \ - output.${O} position.${O} prompt.${O} search.${O} signal.${O} \ + output.${O} pattern.${O} position.${O} prompt.${O} search.${O} signal.${O} \ tags.${O} ttyin.${O} version.${O} regexp.${O} all: less lesskey Modified: vendor/less/dist/Makefile.wnb ============================================================================== --- vendor/less/dist/Makefile.wnb Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/Makefile.wnb Mon Jul 27 07:05:08 2009 (r195902) @@ -25,12 +25,13 @@ LIBS = ${LIBDIR}\import32.lib ${LIBDIR}\ .c.obj: ${CC} -c -I. ${CPPFLAGS} ${CFLAGS} $< -OBJ = main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj command.obj \ - decode.obj edit.obj filename.obj forwback.obj help.obj ifile.obj \ - input.obj jump.obj line.obj linenum.obj lsystem.obj \ - mark.obj optfunc.obj option.obj opttbl.obj os.obj output.obj \ - position.obj prompt.obj search.obj signal.obj tags.obj \ - ttyin.obj version.obj regexp.obj +OBJ = \ + main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj \ + command.obj cvt.obj decode.obj edit.obj filename.obj forwback.obj \ + help.obj ifile.obj input.obj jump.obj line.obj linenum.obj \ + lsystem.obj mark.obj optfunc.obj option.obj opttbl.obj os.obj \ + output.obj pattern.obj position.obj prompt.obj search.obj signal.obj \ + tags.obj ttyin.obj version.obj regexp.obj all: less lesskey lessecho Modified: vendor/less/dist/Makefile.wnm ============================================================================== --- vendor/less/dist/Makefile.wnm Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/Makefile.wnm Mon Jul 27 07:05:08 2009 (r195902) @@ -23,12 +23,13 @@ LIBS = user32.lib .c.obj: $(CC) $(CFLAGS) $< -OBJ = main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj command.obj \ - decode.obj edit.obj filename.obj forwback.obj help.obj ifile.obj \ - input.obj jump.obj line.obj linenum.obj lsystem.obj \ - mark.obj optfunc.obj option.obj opttbl.obj os.obj output.obj \ - position.obj prompt.obj search.obj signal.obj tags.obj \ - ttyin.obj version.obj regexp.obj +OBJ = \ + main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj \ + command.obj cvt.obj decode.obj edit.obj filename.obj forwback.obj \ + help.obj ifile.obj input.obj jump.obj line.obj linenum.obj \ + lsystem.obj mark.obj optfunc.obj option.obj opttbl.obj os.obj \ + output.obj pattern.obj position.obj prompt.obj search.obj signal.obj \ + tags.obj ttyin.obj version.obj regexp.obj all: less.exe lesskey.exe Modified: vendor/less/dist/NEWS ============================================================================== --- vendor/less/dist/NEWS Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/NEWS Mon Jul 27 07:05:08 2009 (r195902) @@ -12,6 +12,18 @@ ====================================================================== + Major changes between "less" versions 429 and 436 + +* Don't pass "-" to non-pipe LESSOPEN unless it starts with "-". + +* Allow a fraction as the argument to the -# (--shift) option. + +* Fix highlight bug when underlined/overstruck text matches at end of line. + +* Fix non-regex searches with ctrl-R. + +====================================================================== + Major changes between "less" versions 424 and 429 * LESSOPEN pipe will now be used on standard input, if the LESSOPEN Modified: vendor/less/dist/README ============================================================================== --- vendor/less/dist/README Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/README Mon Jul 27 07:05:08 2009 (r195902) @@ -1,7 +1,7 @@ - Less, version 429 + Less, version 436 - This is the distribution of less, version 429, released 11 Apr 2009. + This is the distribution of less, version 436, released 07 Jul 2009. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or Modified: vendor/less/dist/brac.c ============================================================================== --- vendor/less/dist/brac.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/brac.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/ch.c ============================================================================== --- vendor/less/dist/ch.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/ch.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/charset.c ============================================================================== --- vendor/less/dist/charset.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/charset.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. @@ -425,7 +425,7 @@ prchar(c) c &= 0377; if ((c < 128 || !utf_mode) && !control_char(c)) - SNPRINTF1(buf, sizeof(buf), "%c", c); + SNPRINTF1(buf, sizeof(buf), "%c", (int) c); else if (c == ESC) strcpy(buf, "ESC"); #if IS_EBCDIC_HOST @@ -442,7 +442,7 @@ prchar(c) "..V....D....TU.Z"[c]); #else else if (c < 128 && !control_char(c ^ 0100)) - SNPRINTF1(buf, sizeof(buf), "^%c", c ^ 0100); + SNPRINTF1(buf, sizeof(buf), "^%c", (int) (c ^ 0100)); #endif else SNPRINTF1(buf, sizeof(buf), binfmt, c); Modified: vendor/less/dist/charset.h ============================================================================== --- vendor/less/dist/charset.h Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/charset.h Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2008 Mark Nudelman + * Copyright (C) 2005-2009 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. Modified: vendor/less/dist/cmd.h ============================================================================== --- vendor/less/dist/cmd.h Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/cmd.h Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/cmdbuf.c ============================================================================== --- vendor/less/dist/cmdbuf.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/cmdbuf.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/command.c ============================================================================== --- vendor/less/dist/command.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/command.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/configure.ac ============================================================================== --- vendor/less/dist/configure.ac Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/configure.ac Mon Jul 27 07:05:08 2009 (r195902) @@ -1,6 +1,6 @@ # Process this file with autoconf to produce a configure script. -# Copyright (C) 1984-2008 Mark Nudelman +# Copyright (C) 1984-2009 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. Added: vendor/less/dist/cvt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/less/dist/cvt.c Mon Jul 27 07:05:08 2009 (r195902) @@ -0,0 +1,120 @@ +/* + * Copyright (C) 1984-2009 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. + */ + +/* + * Routines to convert text in various ways. Used by search. + */ + +#include "less.h" +#include "charset.h" + +extern int utf_mode; + +/* + * Get the length of a buffer needed to convert a string. + */ + public int +cvt_length(len, ops) + int len; + int ops; +{ + if (utf_mode) + /* + * Just copying a string in UTF-8 mode can cause it to grow + * in length. + * Four output bytes for one input byte is the worst case. + */ + len *= 4; + return (len + 1); +} + +/* + * Allocate a chpos array for use by cvt_text. + */ + public int * +cvt_alloc_chpos(len) + int len; +{ + int i; + int *chpos = (int *) ecalloc(sizeof(int), len); + /* Initialize all entries to an invalid position. */ + for (i = 0; i < len; i++) + chpos[i] = -1; + return (chpos); +} + +/* + * Convert text. Perform the transformations specified by ops. + * Returns converted text in odst. The original offset of each + * odst character (when it was in osrc) is returned in the chpos array. + */ + public void +cvt_text(odst, osrc, chpos, lenp, ops) + char *odst; + char *osrc; + int *chpos; + int *lenp; + int ops; +{ + char *dst; + char *src; + register char *src_end; + LWCHAR ch; + + if (lenp != NULL) + src_end = osrc + *lenp; + else + src_end = osrc + strlen(osrc); + + for (src = osrc, dst = odst; src < src_end; ) + { + int src_pos = src - osrc; + int dst_pos = dst - odst; + ch = step_char(&src, +1, src_end); + if ((ops & CVT_BS) && ch == '\b' && dst > odst) + { + /* Delete backspace and preceding char. */ + do { + dst--; + } while (dst > odst && + !IS_ASCII_OCTET(*dst) && !IS_UTF8_LEAD(*dst)); + } else if ((ops & CVT_ANSI) && IS_CSI_START(ch)) + { + /* Skip to end of ANSI escape sequence. */ + src++; /* skip the CSI start char */ + while (src < src_end) + if (!is_ansi_middle(*src++)) + break; + } else + { + /* Just copy the char to the destination buffer. */ + if ((ops & CVT_TO_LC) && IS_UPPER(ch)) + ch = TO_LOWER(ch); + put_wchar(&dst, ch); + /* + * Record the original position of the char. + * But if we've already recorded a position + * for this char (due to a backspace), leave + * it alone; if multiple source chars map to + * one destination char, we want the position + * of the first one. + */ + if (chpos != NULL && chpos[dst_pos] < 0) + chpos[dst_pos] = src_pos; + } + } + if ((ops & CVT_CRLF) && dst > odst && dst[-1] == '\r') + dst--; + *dst = '\0'; + if (lenp != NULL) + *lenp = dst - odst; + if (chpos != NULL) + chpos[dst - odst] = src - osrc; +} Modified: vendor/less/dist/decode.c ============================================================================== --- vendor/less/dist/decode.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/decode.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/defines.ds ============================================================================== --- vendor/less/dist/defines.ds Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/defines.ds Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/defines.o2 ============================================================================== --- vendor/less/dist/defines.o2 Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/defines.o2 Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/defines.o9 ============================================================================== --- vendor/less/dist/defines.o9 Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/defines.o9 Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/defines.wn ============================================================================== --- vendor/less/dist/defines.wn Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/defines.wn Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/edit.c ============================================================================== --- vendor/less/dist/edit.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/edit.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/filename.c ============================================================================== --- vendor/less/dist/filename.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/filename.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. @@ -843,17 +843,17 @@ open_altfile(filename, pf, pfd) #else lessopen++; returnfd = 1; - if (*lessopen == '-') { - /* - * Lessopen preprocessor will accept "-" as a filename. - */ - lessopen++; - } else { - if (strcmp(filename, "-") == 0) - return (NULL); - } #endif } + if (*lessopen == '-') { + /* + * Lessopen preprocessor will accept "-" as a filename. + */ + lessopen++; + } else { + if (strcmp(filename, "-") == 0) + return (NULL); + } len = strlen(lessopen) + strlen(filename) + 2; cmd = (char *) ecalloc(len, sizeof(char)); Modified: vendor/less/dist/forwback.c ============================================================================== --- vendor/less/dist/forwback.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/forwback.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/funcs.h ============================================================================== --- vendor/less/dist/funcs.h Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/funcs.h Mon Jul 27 07:05:08 2009 (r195902) @@ -83,6 +83,9 @@ public void ungetcc (); public void ungetsc (); public void commands (); + public int cvt_length (); + public int * cvt_alloc_chpos (); + public void cvt_text (); public void init_cmds (); public void add_fcmd_table (); public void add_ecmd_table (); @@ -193,6 +196,8 @@ public void opt_l (); public void opt_j (); public void calc_jump_sline (); + public void opt_shift (); + public void calc_shift_count (); public void opt_k (); public void opt_t (); public void opt__T (); @@ -233,6 +238,10 @@ public void error (); public void ierror (); public int query (); + public int compile_pattern (); + public void uncompile_pattern (); + public int is_null_pattern (); + public int match_pattern (); public POSITION position (); public void add_forw_pos (); public void add_back_pos (); @@ -248,6 +257,7 @@ public char * eq_message (); public char * pr_string (); public char * wait_message (); + public void init_search (); public void repaint_hilite (); public void clear_attn (); public void undo_search (); Modified: vendor/less/dist/ifile.c ============================================================================== --- vendor/less/dist/ifile.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/ifile.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/input.c ============================================================================== --- vendor/less/dist/input.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/input.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. @@ -196,7 +196,7 @@ get_forw_line: c = ch_forw_get(); } - pdone(endline, c); + pdone(endline, 1); #if HILITE_SEARCH if (is_filtered(base_pos)) @@ -398,7 +398,7 @@ get_back_line: } } while (new_pos < curr_pos); - pdone(endline, ch_forw_get()); + pdone(endline, 0); #if HILITE_SEARCH if (is_filtered(base_pos)) Modified: vendor/less/dist/jump.c ============================================================================== --- vendor/less/dist/jump.c Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/jump.c Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. Modified: vendor/less/dist/less.h ============================================================================== --- vendor/less/dist/less.h Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/less.h Mon Jul 27 07:05:08 2009 (r195902) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2008 Mark Nudelman + * Copyright (C) 1984-2009 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. @@ -488,6 +488,12 @@ struct textlist #define FAKE_HELPFILE "@/\\less/\\help/\\file/\\@" +/* Flags for cvt_text */ +#define CVT_TO_LC 01 /* Convert upper-case to lower-case */ +#define CVT_BS 02 /* Do backspace processing */ +#define CVT_CRLF 04 /* Remove CR after LF */ +#define CVT_ANSI 010 /* Remove ANSI escape sequences */ + #include "funcs.h" /* Functions not included in funcs.h */ Modified: vendor/less/dist/less.man ============================================================================== --- vendor/less/dist/less.man Mon Jul 27 04:41:04 2009 (r195901) +++ vendor/less/dist/less.man Mon Jul 27 07:05:08 2009 (r195902) @@ -809,51 +809,58 @@ LESS(1) Specifies the default number of positions to scroll horizontally in the RIGHTARROW and LEFTARROW commands. If the number speci- fied is zero, it sets the default number of positions to one - half of the screen width. + half of the screen width. Alternately, the number may be speci- + fied as a fraction of the width of the screen, starting with a + decimal point: .5 is half of the screen width, .3 is three + tenths of the screen width, and so on. If the number is speci- + fied as a fraction, the actual number of scroll positions is + recalculated if the terminal window is resized, so that the + actual scroll remains at the specified fraction of the screen + width. --no-keypad - Disables sending the keypad initialization and deinitialization + Disables sending the keypad initialization and deinitialization strings to the terminal. This is sometimes useful if the keypad strings make the numeric keypad behave in an undesirable manner. --follow-name - Normally, if the input file is renamed while an F command is - executing, less will continue to display the contents of the - original file despite its name change. If --follow-name is + Normally, if the input file is renamed while an F command is + executing, less will continue to display the contents of the + original file despite its name change. If --follow-name is specified, during an F command less will periodically attempt to reopen the file by name. If the reopen succeeds and the file is - a different file from the original (which means that a new file - has been created with the same name as the original (now + a different file from the original (which means that a new file + has been created with the same name as the original (now renamed) file), less will display the contents of that new file. - -- A command line argument of "--" marks the end of option argu- - ments. Any arguments following this are interpreted as file- + -- A command line argument of "--" marks the end of option argu- + ments. Any arguments following this are interpreted as file- names. This can be useful when viewing a file whose name begins with a "-" or "+". - + If a command line option begins with +, the remainder of that - option is taken to be an initial command to less. For example, - +G tells less to start at the end of the file rather than the - beginning, and +/xyz tells it to start at the first occurrence - of "xyz" in the file. As a special case, + acts like + + If a command line option begins with +, the remainder of that + option is taken to be an initial command to less. For example, + +G tells less to start at the end of the file rather than the + beginning, and +/xyz tells it to start at the first occurrence + of "xyz" in the file. As a special case, + acts like +g; that is, it starts the display at the specified line - number (however, see the caveat under the "g" command above). - If the option starts with ++, the initial command applies to - every file being viewed, not just the first one. The + command + number (however, see the caveat under the "g" command above). + If the option starts with ++, the initial command applies to + every file being viewed, not just the first one. The + command described previously may also be used to set (or change) an ini- tial command for every file. LINE EDITING - When entering command line at the bottom of the screen (for example, a + When entering command line at the bottom of the screen (for example, a filename for the :e command, or the pattern for a search command), cer- - tain keys can be used to manipulate the command line. Most commands - have an alternate form in [ brackets ] which can be used if a key does - not exist on a particular keyboard. (Note that the forms beginning - with ESC do not work in some MS-DOS and Windows systems because ESC is - the line erase character.) Any of these special keys may be entered - literally by preceding it with the "literal" character, either ^V or - ^A. A backslash itself may also be entered literally by entering two + tain keys can be used to manipulate the command line. Most commands + have an alternate form in [ brackets ] which can be used if a key does + not exist on a particular keyboard. (Note that the forms beginning + with ESC do not work in some MS-DOS and Windows systems because ESC is + the line erase character.) Any of these special keys may be entered + literally by preceding it with the "literal" character, either ^V or + ^A. A backslash itself may also be entered literally by entering two backslashes. LEFTARROW [ ESC-h ] @@ -863,7 +870,7 @@ LESS(1) Move the cursor one space to the right. ^LEFTARROW [ ESC-b or ESC-LEFTARROW ] - (That is, CONTROL and LEFTARROW simultaneously.) Move the cur- + (That is, CONTROL and LEFTARROW simultaneously.) Move the cur- sor one word to the left. ^RIGHTARROW [ ESC-w or ESC-RIGHTARROW ] @@ -877,18 +884,18 @@ LESS(1) Move the cursor to the end of the line. BACKSPACE - Delete the character to the left of the cursor, or cancel the + Delete the character to the left of the cursor, or cancel the command if the command line is empty. DELETE or [ ESC-x ] Delete the character under the cursor. ^BACKSPACE [ ESC-BACKSPACE ] - (That is, CONTROL and BACKSPACE simultaneously.) Delete the + (That is, CONTROL and BACKSPACE simultaneously.) Delete the word to the left of the cursor. ^DELETE [ ESC-X or ESC-DELETE ] - (That is, CONTROL and DELETE simultaneously.) Delete the word + (That is, CONTROL and DELETE simultaneously.) Delete the word under the cursor. UPARROW [ ESC-k ] @@ -897,96 +904,96 @@ LESS(1) DOWNARROW [ ESC-j ] Retrieve the next command line. - TAB Complete the partial filename to the left of the cursor. If it - matches more than one filename, the first match is entered into - the command line. Repeated TABs will cycle thru the other + TAB Complete the partial filename to the left of the cursor. If it + matches more than one filename, the first match is entered into + the command line. Repeated TABs will cycle thru the other matching filenames. If the completed filename is a directory, a - "/" is appended to the filename. (On MS-DOS systems, a "\" is - appended.) The environment variable LESSSEPARATOR can be used - to specify a different character to append to a directory name. + "/" is appended to the filename. (On MS-DOS systems, a "\" is + appended.) The environment variable LESSSEPARATOR can be used + to specify a different character to append to a directory name. BACKTAB [ ESC-TAB ] Like, TAB, but cycles in the reverse direction thru the matching filenames. - ^L Complete the partial filename to the left of the cursor. If it + ^L Complete the partial filename to the left of the cursor. If it matches more than one filename, all matches are entered into the command line (if they fit). ^U (Unix and OS/2) or ESC (MS-DOS) - Delete the entire command line, or cancel the command if the + Delete the entire command line, or cancel the command if the command line is empty. If you have changed your line-kill char- acter in Unix to something other than ^U, that character is used instead of ^U. KEY BINDINGS - You may define your own less commands by using the program lesskey (1) - to create a lesskey file. This file specifies a set of command keys - and an action associated with each key. You may also use lesskey to + You may define your own less commands by using the program lesskey (1) + to create a lesskey file. This file specifies a set of command keys + and an action associated with each key. You may also use lesskey to change the line-editing keys (see LINE EDITING), and to set environment - variables. If the environment variable LESSKEY is set, less uses that - as the name of the lesskey file. Otherwise, less looks in a standard - place for the lesskey file: On Unix systems, less looks for a lesskey - file called "$HOME/.less". On MS-DOS and Windows systems, less looks - for a lesskey file called "$HOME/_less", and if it is not found there, + variables. If the environment variable LESSKEY is set, less uses that + as the name of the lesskey file. Otherwise, less looks in a standard + place for the lesskey file: On Unix systems, less looks for a lesskey + file called "$HOME/.less". On MS-DOS and Windows systems, less looks + for a lesskey file called "$HOME/_less", and if it is not found there, then looks for a lesskey file called "_less" in any directory specified - in the PATH environment variable. On OS/2 systems, less looks for a - lesskey file called "$HOME/less.ini", and if it is not found, then - looks for a lesskey file called "less.ini" in any directory specified + in the PATH environment variable. On OS/2 systems, less looks for a + lesskey file called "$HOME/less.ini", and if it is not found, then + looks for a lesskey file called "less.ini" in any directory specified in the INIT environment variable, and if it not found there, then looks - for a lesskey file called "less.ini" in any directory specified in the - PATH environment variable. See the lesskey manual page for more + for a lesskey file called "less.ini" in any directory specified in the + PATH environment variable. See the lesskey manual page for more details. - A system-wide lesskey file may also be set up to provide key bindings. + A system-wide lesskey file may also be set up to provide key bindings. If a key is defined in both a local lesskey file and in the system-wide - file, key bindings in the local file take precedence over those in the - system-wide file. If the environment variable LESSKEY_SYSTEM is set, + file, key bindings in the local file take precedence over those in the + system-wide file. If the environment variable LESSKEY_SYSTEM is set, less uses that as the name of the system-wide lesskey file. Otherwise, - less looks in a standard place for the system-wide lesskey file: On - Unix systems, the system-wide lesskey file is /usr/local/etc/sysless. - (However, if less was built with a different sysconf directory than + less looks in a standard place for the system-wide lesskey file: On + Unix systems, the system-wide lesskey file is /usr/local/etc/sysless. + (However, if less was built with a different sysconf directory than /usr/local/etc, that directory is where the sysless file is found.) On - MS-DOS and Windows systems, the system-wide lesskey file is c:\_sys- + MS-DOS and Windows systems, the system-wide lesskey file is c:\_sys- less. On OS/2 systems, the system-wide lesskey file is c:\sysless.ini. INPUT PREPROCESSOR - You may define an "input preprocessor" for less. Before less opens a + You may define an "input preprocessor" for less. Before less opens a file, it first gives your input preprocessor a chance to modify the way - the contents of the file are displayed. An input preprocessor is sim- - ply an executable program (or shell script), which writes the contents + the contents of the file are displayed. An input preprocessor is sim- + ply an executable program (or shell script), which writes the contents of the file to a different file, called the replacement file. The con- - tents of the replacement file are then displayed in place of the con- - tents of the original file. However, it will appear to the user as if - the original file is opened; that is, less will display the original + tents of the replacement file are then displayed in place of the con- + tents of the original file. However, it will appear to the user as if + the original file is opened; that is, less will display the original filename as the name of the current file. - An input preprocessor receives one command line argument, the original - filename, as entered by the user. It should create the replacement - file, and when finished, print the name of the replacement file to its - standard output. If the input preprocessor does not output a replace- - ment filename, less uses the original file, as normal. The input pre- - processor is not called when viewing standard input. To set up an - input preprocessor, set the LESSOPEN environment variable to a command - line which will invoke your input preprocessor. This command line - should include one occurrence of the string "%s", which will be - replaced by the filename when the input preprocessor command is + An input preprocessor receives one command line argument, the original + filename, as entered by the user. It should create the replacement + file, and when finished, print the name of the replacement file to its + standard output. If the input preprocessor does not output a replace- + ment filename, less uses the original file, as normal. The input pre- + processor is not called when viewing standard input. To set up an + input preprocessor, set the LESSOPEN environment variable to a command + line which will invoke your input preprocessor. This command line + should include one occurrence of the string "%s", which will be + replaced by the filename when the input preprocessor command is invoked. When less closes a file opened in such a way, it will call another pro- - gram, called the input postprocessor, which may perform any desired - clean-up action (such as deleting the replacement file created by + gram, called the input postprocessor, which may perform any desired + clean-up action (such as deleting the replacement file created by LESSOPEN). This program receives two command line arguments, the orig- - inal filename as entered by the user, and the name of the replacement - file. To set up an input postprocessor, set the LESSCLOSE environment - variable to a command line which will invoke your input postprocessor. - It may include two occurrences of the string "%s"; the first is - replaced with the original name of the file and the second with the + inal filename as entered by the user, and the name of the replacement + file. To set up an input postprocessor, set the LESSCLOSE environment + variable to a command line which will invoke your input postprocessor. + It may include two occurrences of the string "%s"; the first is + replaced with the original name of the file and the second with the name of the replacement file, which was output by LESSOPEN. - For example, on many Unix systems, these two scripts will allow you to + For example, on many Unix systems, these two scripts will allow you to keep files in compressed format, but still let less view them directly: lessopen.sh: @@ -1005,25 +1012,25 @@ LESS(1) #! /bin/sh rm $2 - To use these scripts, put them both where they can be executed and set + To use these scripts, put them both where they can be executed and set LESSOPEN="lessopen.sh %s", and LESSCLOSE="lessclose.sh %s %s". More - complex LESSOPEN and LESSCLOSE scripts may be written to accept other + complex LESSOPEN and LESSCLOSE scripts may be written to accept other types of compressed files, and so on. - It is also possible to set up an input preprocessor to pipe the file - data directly to less, rather than putting the data into a replacement + It is also possible to set up an input preprocessor to pipe the file + data directly to less, rather than putting the data into a replacement file. This avoids the need to decompress the entire file before start- ing to view it. An input preprocessor that works this way is called an - input pipe. An input pipe, instead of writing the name of a replace- - ment file on its standard output, writes the entire contents of the - replacement file on its standard output. If the input pipe does not - write any characters on its standard output, then there is no replace- - ment file and less uses the original file, as normal. To use an input - pipe, make the first character in the LESSOPEN environment variable a - vertical bar (|) to signify that the input preprocessor is an input + input pipe. An input pipe, instead of writing the name of a replace- + ment file on its standard output, writes the entire contents of the + replacement file on its standard output. If the input pipe does not + write any characters on its standard output, then there is no replace- + ment file and less uses the original file, as normal. To use an input + pipe, make the first character in the LESSOPEN environment variable a + vertical bar (|) to signify that the input preprocessor is an input pipe. - For example, on many Unix systems, this script will work like the pre- + For example, on many Unix systems, this script will work like the pre- vious example scripts: lesspipe.sh: @@ -1034,15 +1041,21 @@ LESS(1) esac To use this script, put it where it can be executed and set - LESSOPEN="|lesspipe.sh %s". When an input pipe is used, a LESSCLOSE - postprocessor can be used, but it is usually not necessary since there + LESSOPEN="|lesspipe.sh %s". When an input pipe is used, a LESSCLOSE + postprocessor can be used, but it is usually not necessary since there is no replacement file to clean up. In this case, the replacement file name passed to the LESSCLOSE postprocessor is "-". - For compatibility with previous versions of less, the input pipe is not - used if less is viewing standard input. However, if the character - after the vertical bar is a dash (-), the input pipe is used on stan- - dard input as well as other files. + For compatibility with previous versions of less, the input preproces- + sor or pipe is not used if less is viewing standard input. However, if + the first character of LESSOPEN is a dash (-), the input preprocessor + is used on standard input as well as other files. In this case, the + dash is not considered to be part of the preprocessor command. If *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***