1
0
Fork 0
mirror of https://github.com/gwsw/less.git synced 2026-03-06 19:50:20 +00:00
Less - text pager
Find a file
Mark Nudelman fa091e85ec Doc.
2026-03-06 11:35:01 -08:00
lesstest lesstest: rebuild tests invalidated by recent message change. 2026-02-15 09:58:28 -08:00
unicode Update Unicode tables. 2025-11-27 17:31:53 -08:00
.gitignore lesstest: Add README, extract and ltview to release. 2023-11-10 07:38:34 -08:00
brac.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
buildgen.c windows: msvc: Makefile.wnm: allow generating funcs.h, help.c 2023-11-06 11:54:50 -08:00
ch.c Don't retry read after a read error. 2026-02-28 22:14:22 -08:00
charset.c lesstest: don't use system locale when running a lesstest. 2026-01-26 09:01:20 -08:00
charset.h Update year in copyright notices. 2026-01-20 16:57:15 -08:00
cmd.h Revert HOME/END to pre-691 behavior. 2026-01-28 13:32:00 -08:00
cmdbuf.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
command.c Allow numeric arg on m and M commands. 2026-02-16 06:16:48 -08:00
compose.uni Update Unicode tables. 2025-11-27 17:31:53 -08:00
configure.ac Update year in copyright notices. 2026-01-20 16:57:15 -08:00
COPYING Update text of GPL. 2021-08-21 12:53:29 -07:00
copyright Update copyright date. 2021-01-09 11:44:56 -08:00
cvt.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
decode.c Another rewrite of the command parser. 2026-02-11 09:59:55 -08:00
defines.ds Update year in copyright notices. 2026-01-20 16:57:15 -08:00
defines.o2 Update year in copyright notices. 2026-01-20 16:57:15 -08:00
defines.o9 Update year in copyright notices. 2026-01-20 16:57:15 -08:00
defines.wn Update year in copyright notices. 2026-01-20 16:57:15 -08:00
edit.c Fix for previous commit. 2026-01-29 19:17:24 -08:00
evar.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
filename.c Fix end-of-buffer issue in bin_file. 2026-01-25 10:17:38 -08:00
fmt.uni Update Unicode tables. 2025-11-27 17:31:53 -08:00
forwback.c Fix regression in bc798f824 using ESC-SPACE. 2026-02-16 11:24:14 -08:00
ifile.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
input.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
INSTALL Clarify that README has more specific instructions than INSTALL. 2021-02-22 11:12:50 -08:00
install.sh Fixed file modes (#98) 2020-11-29 15:11:48 -08:00
jump.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
lang.h Update year in copyright notices. 2026-01-20 16:57:15 -08:00
less.h Don't use u numeric suffix. 2026-02-14 15:54:08 -08:00
less.hlp Allow numeric arg on m and M commands. 2026-02-16 06:16:48 -08:00
less.nro.VER Doc. 2026-03-06 11:35:01 -08:00
lessecho.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
lessecho.nro.VER Revise lessecho(1) synopsis. 2025-10-12 03:46:39 -05:00
lesskey.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
lesskey.h Update year in copyright notices. 2026-01-20 16:57:15 -08:00
lesskey.nro.VER Revert HOME/END to pre-691 behavior. 2026-01-28 13:32:00 -08:00
lesskey_parse.c Revert HOME/END to pre-691 behavior. 2026-01-28 13:32:00 -08:00
lglob.h Update year in copyright notices. 2026-01-20 16:57:15 -08:00
LICENSE Update year in copyright notices. 2026-01-20 16:57:15 -08:00
line.c Add -DT option to format tilde lines. 2026-02-14 09:53:56 -08:00
linenum.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
lsystem.c Make | command pipe one line if marked line is at top of screen. 2026-02-15 10:23:56 -08:00
main.c Display error messages on stderr if stdout is redirected. 2026-01-31 13:13:40 -08:00
Makefile.aut Add copyright notice to some files from which it is missing. 2026-01-20 16:55:57 -08:00
Makefile.dsb Fix non-autoconf Makefiles. 2023-11-05 16:41:37 -08:00
Makefile.dsg dos: fix djgpp build 2024-04-11 19:51:10 -07:00
Makefile.dsu Fix non-autoconf Makefiles. 2023-11-05 16:41:37 -08:00
Makefile.in Ensure that "make check" rebuilds less if necessary. 2026-01-21 11:43:12 -08:00
Makefile.o2e Fix non-autoconf Makefiles. 2023-11-05 16:41:37 -08:00
Makefile.o9c Fix non-autoconf Makefiles. 2023-11-05 16:41:37 -08:00
Makefile.o9g Fix non-autoconf Makefiles. 2023-11-05 16:41:37 -08:00
Makefile.o9u Fix non-autoconf Makefiles. 2023-11-05 16:41:37 -08:00
Makefile.wnb Make SECURE_COMPILE work for Borland compiler (Makefile.wnb). 2025-12-20 15:20:31 -08:00
Makefile.wng windows: mingw: Makefile.wng: allow extra CFLAGS/LDFLAGS/LDLIBS 2026-01-03 10:27:56 -08:00
Makefile.wnm Fix SECURE build; allow SECURE build on Windows. 2025-12-19 15:57:14 -08:00
mark.c Fix extra tilde when jumping to $ mark. 2026-02-21 10:40:35 -08:00
mkhelp.pl Fixed support of old Perl interpreters 2026-01-26 09:28:55 -08:00
mkhelp.py Use SOURCE_DATE_EPOCH to build man pages. 2024-10-26 11:55:23 -07:00
mkhelp.sh windows: mingw: Makefile.wng: use mkhelp.sh if perl is missing 2023-09-25 13:38:24 -07:00
mkinstalldirs Reconstruct version 394. 2007-01-12 05:16:37 +00:00
mkutable Delete emoji modifier characters from output. 2025-08-19 19:48:57 -07:00
NEWS Don't retry read after a read error. 2026-02-28 22:14:22 -08:00
omit.uni Update Unicode tables. 2025-11-27 17:31:53 -08:00
optfunc.c Merge branch 'post692' of https://github.com/gwsw/less into post692 2026-02-14 09:54:53 -08:00
option.c Fix -z option with negative values. 2026-01-21 09:04:10 -08:00
option.h Fix -z option with negative values. 2026-01-21 09:04:10 -08:00
opttbl.c Fix reversed status messages for --use-backslash. 2026-02-16 06:07:40 -08:00
os.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
output.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
pattern.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
pattern.h Update year in copyright notices. 2026-01-20 16:57:15 -08:00
pckeys.h Revert HOME/END to pre-691 behavior. 2026-01-28 13:32:00 -08:00
position.c Allow numeric arg on m and M commands. 2026-02-16 06:16:48 -08:00
position.h Update year in copyright notices. 2026-01-20 16:57:15 -08:00
prompt.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
README Doc. 2025-12-20 19:45:24 -08:00
ready_to_release Fixed typo 2023-09-25 13:34:46 -07:00
regexp.c V8 regexp.c: use libc strstr instead of NIH code 2026-02-28 18:53:12 -08:00
regexp.h V8 regexp.c: use libc strstr instead of NIH code 2026-02-28 18:53:12 -08:00
screen.c Fix bug when setting attributes on a --color value. 2026-02-13 16:59:02 -08:00
scrsize.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
search.c Display search pattern in "Pattern not found" message. 2026-02-14 11:55:08 -08:00
SECURITY.md Add SECURITY.md. 2021-10-01 15:03:23 -07:00
signal.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
tags.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
ttyin.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
ubin.uni Update Unicode tables. 2025-11-27 17:31:53 -08:00
version.c Don't retry read after a read error. 2026-02-28 22:14:22 -08:00
wide.uni Update Unicode tables. 2025-11-27 17:31:53 -08:00
xbuf.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
xbuf.h Update year in copyright notices. 2026-01-20 16:57:15 -08:00

    This is the source code distribution of "less".
    This program is part of the GNU project (https://www.gnu.org).

    This program is free software.  You may redistribute it and/or
    modify it under the terms of either:

    1. The GNU General Public License, as published by the Free
       Software Foundation; either version 3, or (at your option) any
       later version.  A copy of this license is in the file COPYING.
    or
    2. The Less License, in the file LICENSE.

    Please report any problems at https://github.com/gwsw/less/issues.
    See https://greenwoodsoftware.com/less for the latest info.
    Source repository is at https://github.com/gwsw/less.git.

=========================================================================

You should build from a clone of a git repository 
ONLY IF you are doing development on the less source itself.
If you are merely using less as a tool, you should download a release
from https://greenwoodsoftware.com and NOT from github.

The formatted manual page is in less.man.
The manual page nroff source is in less.nro.
Major changes made since the last posted version are in NEWS.

=======================================================================
INSTALLATION (Unix & Linux systems only):

1. Move the distributed source to its own directory and unpack it,
   if you have not already done so.  

2. If you are building from a clone of a git repository,
   type "make -f Makefile.aut distfiles".
   If you are building from a numbered release package (a tar or 
   zip file with a name like less-999.tar.gz or less-999.zip downloaded 
   from greenwoodsoftware.com, not from github), you should skip this step. 

3. Type "sh configure".
   This will generate a Makefile and a defines.h.
   Warning: if you have a GNU sed, make sure it is version 2.05 or later.

   The file INSTALL describes the usage of the configure program in
   general.  In addition, these options to configure are supported:

   --with-editor=program
     Specifies the default editor program used by the "v" command.
     The default is "vi".

   --with-regex=lib
     Specifies the regular expression library used by less for pattern
     matching.  The default is "auto", which means the configure program 
     finds a regular expression library automatically.  Other values are:
        gnu            Use the GNU regex library.
        pcre           Use the PCRE library.
        pcre2          Use the PCRE2 library.
        posix          Use the POSIX-compatible regcomp.
        regcmp         Use the regcmp library.
        re_comp        Use the re_comp library.
        regcomp        Use the V8-compatible regcomp.
        regcomp-local  Use Henry Spencer's V8-compatible regcomp
                       (source is supplied with less).
        none           No regular expressions, only simple string matching.

   --with-secure
     Builds a "secure" version of less, with some features disabled
     to prevent users from viewing other files, accessing shell
     commands, etc.


4. It is a good idea to look over the generated Makefile and defines.h
   and make sure they look ok.  If you know of any peculiarities of
   your system that configure might not have detected, you may fix the
   Makefile now.  Take particular notice of the list of "terminal" 
   libraries in the LIBS definition in the Makefile; these may need 
   to be edited.  The terminal libraries will be some subset of
    -ltinfo -ltinfow -lxcurses -lncursesw -lncurses -lcurses -ltermcap -ltermlib

   If you wish, you may edit defines.h to remove some optional features.
   If you choose not to include some features in your version, you may
   wish to edit the manual page "less.nro" and the help page "less.hlp" 
   to remove the descriptions of the features which you are removing.
   If you edit less.hlp, you should run "make -f Makefile.aut help.c".

5. Type "make" and watch the fun.

6. If the make succeeds, it will generate the programs "less",
   "lesskey" and "lessecho" in your current directory.  Test the 
   generated programs.

7. When satisfied that it works, if you wish to install it
   in a public place, type "make install".

   The default install destinations are:
        Executables (less, lesskey, lessecho) in /usr/local/bin
        Documentation (less.nro, lesskey.nro) in /usr/local/man/man1
   If you want to install any of these files elsewhere, define
   bindir and/or mandir to the appropriate directories.


Note to hackers: comments noting possible improvements are enclosed
in double curly brackets {{ like this }}.

(Note that the above note was originally written at a time when 
"hackers" most commonly meant "enthusiastic and dedicated computer 
programmers", not "persons who attempt to circumvent computer security".)



=======================================================================
INSTALLATION (Windows-95, Windows-98 and Windows-NT systems only,
              with Microsoft Visual C++, mingw, or Borland C)

1. Move the distributed source to its own directory.

2. If you wish, you may edit defines.wn to remove some optional features.
   If you choose not to include some features in your version, you may
   wish to edit the manual page less.man and the help page help.c
   to remove the descriptions of the features which you are removing.

3. If you are using Microsoft Visual C++, run "nmake -f Makefile.wnm".
   If you are using mingw, run "make -f Makefile.wng".
   If you are using Borland C, run "make -f Makefile.wnb".

   If the environment variable SECURE_COMPILE is to 1 during the make,
   a "secure" version of less is built, with some features disabled.

4. If the make succeeds, it will generate the programs "less.exe" and
   "lesskey.exe" in your current directory.  Test the generated programs.



=======================================================================
INSTALLATION (MS-DOS systems only,
              with Microsoft C, Borland C, or DJGPP)

1. Move the distributed source to its own directory.
   Depending on your compiler, you may need to convert the source 
   to have CR-LF rather than LF as line terminators.

2. If you are using Microsoft C, rename MAKEFILE.DSU to MAKEFILE.
   If you are using Borland C, rename MAKEFILE.DSB to MAKEFILE.
   If you are using DJGPP, rename MAKEFILE.DSG to MAKEFILE.

3. Look at MAKEFILE to make sure that the definitions for CC and LIBDIR
   are correct.  CC should be the name of your C compiler and
   LIBDIR should be the directory where the C libraries reside (for
   Microsoft C only).  If these definitions need to be changed, you can
   either modify the definitions directly in MAKEFILE, or set your
   environment variables CC and/or LIBDIR to override the definitions
   in MAKEFILE.

4. If you wish, you may edit DEFINES.DS to remove some optional features.
   If you choose not to include some features in your version, you may
   wish to edit the manual page LESS.MAN and the help page HELP.C
   to remove the descriptions of the features which you are removing.

5. Run your "make" program and watch the fun.
   If your "make" requires a flag to import environment variables,
   you should use that flag.
   If your compiler runs out of memory, try running "make -n >cmds.bat" 
   and then run cmds.bat.

6. If the make succeeds, it will generate the programs "LESS.EXE" and
   "LESSKEY.EXE" in your current directory.  Test the generated programs.

7. When satisfied that it works, you may wish to install LESS.EXE and
   LESSKEY.EXE in a directory which is included in your PATH.



=======================================================================
INSTALLATION (OS/2 systems only,
              with EMX C)

1. Move the distributed source to its own directory.

2. Rename Makefile.o2e to Makefile.

3. Check the Makefile to make sure the definitions look ok.

4. If you wish, you may edit defines.o2 to remove some optional features.
   If you choose not to include some features in your version, you may
   wish to edit the manual page less.man and the help page help.c
   to remove the descriptions of the features which you are removing.

5. Type "make" and watch the fun.

6. If the make succeeds, it will generate the programs "less.exe" and
   "lesskey.exe" in your current directory.  Test the generated programs.

7. Make sure you have the emx runtime installed. You need the emx DLLs
   emx.dll and emxlibcs.dll and also the termcap database, termcap.dat.
   Make sure you have termcap.dat either in the default location or
   somewhere in a directory listed in the PATH or INIT environment 
   variables.

8. When satisfied that it works, you may wish to install less.exe,
   lesskey.exe and scrsize.exe in a directory which is included in 
   your PATH.  scrsize.exe is required only if you use a terminal
   emulator such as xterm or rxvt.



=======================================================================
INSTALLATION (OS-9 systems only,
              with Microware C or Ultra C)

1. Move the distributed source to its own directory.

2. If you are using Microware C, rename Makefile.o9c to Makefile.
   If you are using Ultra C, rename Makefile.o9u to Makefile.

3. Check the Makefile to make sure the definitions look ok.

4. If you wish, you may edit defines.o9 to remove some optional features.
   If you choose not to include some features in your version, you may
   wish to edit the manual page less.man and the help page help.c
   to remove the descriptions of the features which you are removing.

5. Type "dmake" and watch the fun.
   The standard OS-9 "make" will probably not work.  If you don't
   have dmake, you can get a copy from os9archive.rtsi.com.

6. If the make succeeds, it will generate the programs "less" and
   "lesskey" in your current directory.  Test the generated programs.

7. When satisfied that it works, if you wish to install it
   in a public place, type "dmake install".
   See step 6 of the Unix installation instructions for details
   on how to change the default installation directories.