1
0
Fork 0
mirror of https://github.com/gwsw/less.git synced 2026-12-03 15:24:35 +00:00
Less - text pager
  • C 92.8%
  • Perl 3.4%
  • M4 2.6%
  • Shell 0.6%
  • Makefile 0.5%
  • Other 0.1%
Find a file
Mark Nudelman 9949a60477 v714
2026-11-23 11:31:32 -08:00
.github/workflows Extend the Windows job to also build from the Git repository 2026-07-12 12:03:07 -07:00
lesstest lesstest: add test for Unicode chars in a --cmd option. 2026-10-15 14:28:03 -07:00
unicode Update Unicode tables. 2026-11-07 17:29:04 -08:00
.gitattributes Ensure shell scripts use LF line endings 2026-09-08 11:53:11 +10:00
.gitignore Change lesstest to lesstest/lesstest in .gitignore. 2026-10-06 16:01:07 -07:00
.mailmap Add .mailmap to consolidate multiple author identities 2026-09-08 11:53:11 +10:00
brac.c Some minor type improvements. 2026-07-23 13:15:59 -07:00
buildgen.c Add lessmsg to help message for buildgen.c. 2026-07-09 17:12:07 -07:00
ch.c Fix bug seeking in a pipe. 2026-11-22 11:34:00 -08:00
charset.c Fix bad #include handling that removed call to nl_langinfo. 2026-11-21 09:45:54 -08:00
charset.h Treat Unicode chars above U+10FFFF as binary. 2026-03-31 08:59:45 -07:00
cmd.h Add support for shift-INSERT and ctrl-INSERT keys. 2026-09-27 01:38:46 -07:00
cmdbuf.c Minor style change (don't mix lbool and int). 2026-11-21 10:00:37 -08:00
command.c Make --cmd complete an unfinished command like + does. 2026-10-18 16:38:09 -07:00
compose.uni Update Unicode tables. 2026-11-07 17:29:04 -08:00
configure.ac Fix bad #include handling that removed call to nl_langinfo. 2026-11-21 09:45:54 -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 Fix some confusion about sline vs. sindex in get_scrpos. 2026-10-14 10:44:56 -07:00
defines.ds Merge branch 'master' into dos-msvc-build 2026-09-26 10:29:37 -07:00
defines.o2 OS/2: Remove unused buffer sizes for small memory machines 2026-09-26 10:43:12 -07:00
defines.o2k Add OS/2 kLIBC support 2026-10-10 08:50:49 -07:00
defines.o9 Remove unused HAVE_WCTYPE_H pre-processor define 2026-09-08 11:53:24 +10:00
defines.wn Remove unused HAVE_ANSI_PROTOS pre-processor define 2026-09-08 11:53:24 +10:00
edit.c edit: bound back_textlist null-skip to textlist start 2026-11-22 12:32:14 -08:00
evar.c Fix use-after-free in expand_evars. 2026-09-29 09:27:04 -07:00
filename.c input: handle job-control signals while waiting for preprocessors 2026-11-21 21:25:17 -08:00
fmt.uni Update Unicode tables. 2026-11-07 17:29:04 -08:00
forwback.c Add --no-underline-header option. 2026-10-28 10:38:28 -07:00
ifile.c Close LESSOPEN pipe as soon as we read EOF. 2026-08-07 10:23:18 -07:00
input.c Display @ in status column only if last match is in current file. 2026-10-16 13:18:33 -07: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 Add support for lessmsg translation files. 2026-07-04 18:31:46 -07:00
lang.h DOS: Define ssize_t as an int (16-bits) under MSVC 2026-09-08 11:54:01 +10:00
less-osc8-open.sh Prevent less-osc8-open on an OSC 8 man link from executing a shell cmd. 2026-05-26 12:35:24 -07:00
less.def.o2 OS/2: Add definition file to fix linker warning 2026-09-26 10:43:12 -07:00
less.h Use timer to distinguish kent sequence from manually entered chars. 2026-10-03 12:36:54 -07:00
less.hlp Doc (help file). 2026-11-21 13:41:35 -08:00
less.nro.VER Doc. 2026-11-19 12:47:03 -08:00
lessecho.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
lessecho.nro.VER Use (and define if needed) groff hyperlink macros. 2026-05-06 16:51:08 -07:00
lesskey.h Remove some old remnants of the obsolete lesskey program. 2026-11-22 10:14:37 -08:00
lesskey.nro.VER Doc. 2026-10-04 09:23:22 -07:00
lesskey_parse.c Add support for shift-INSERT and ctrl-INSERT keys. 2026-09-27 01:38:46 -07:00
lessmsg If we get a read error while catting a file, exit with error status. 2026-11-18 13:27:37 -08:00
lessmsg_int Add support for lessmsg translation files. 2026-07-04 18:31:46 -07: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 display: avoid hangs when prefixes consume the terminal width 2026-11-21 10:02:00 -08:00
linenum.c Add --time-file-size option. 2026-10-09 13:15:53 -07:00
lmsg.c Simplify lmsg_error by using multiple PARGs in error() call. 2026-08-09 13:53:43 -07:00
lmsg.h Use type lessmsg_id rather than int for lessmsg IDs. 2026-07-17 09:22:05 -07:00
lsystem.c Make | command print done message before reinitializing the terminal. 2026-10-13 14:31:11 -07:00
main.c output: keep file errors out of redirected stdout 2026-11-21 09:55:49 -08:00
Makefile.aut More integration of lesskey_parse.c with the rest of less. 2026-07-12 11:56:03 -07:00
Makefile.dsb Add support for lessmsg translation files. 2026-07-04 18:31:46 -07:00
Makefile.dsg Add support for lessmsg translation files. 2026-07-04 18:31:46 -07:00
Makefile.dsu DOS: Remove CC, INCDIR, and LIBDIR variables in MSVC Makefile 2026-09-08 11:54:02 +10:00
Makefile.in Add support for lessmsg translation files. 2026-07-04 18:31:46 -07:00
Makefile.o2e OS/2: Add documentation on build requirements & steps 2026-09-26 10:43:12 -07:00
Makefile.o2k Add OS/2 kLIBC support 2026-10-10 08:50:49 -07:00
Makefile.o9c Add support for lessmsg translation files. 2026-07-04 18:31:46 -07:00
Makefile.o9g Add support for lessmsg translation files. 2026-07-04 18:31:46 -07:00
Makefile.o9u Add support for lessmsg translation files. 2026-07-04 18:31:46 -07:00
Makefile.wnb Add support for lessmsg translation files. 2026-07-04 18:31:46 -07:00
Makefile.wng Doc. 2026-07-13 13:02:21 -07:00
Makefile.wnm Doc. 2026-07-13 13:02:21 -07:00
mark.c Improve error messages. 2026-11-13 17:24:19 -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 Doc. 2026-11-22 11:39:21 -08:00
omit.uni Update Unicode tables. 2026-11-07 17:29:04 -08:00
optfunc.c Remove support for binary lesskey file format. 2026-09-27 02:33:21 -07:00
option.c Remove support for binary lesskey file format. 2026-09-27 02:33:21 -07:00
option.h Use type lessmsg_id rather than int for lessmsg IDs. 2026-07-17 09:22:05 -07:00
opttbl.c Add --no-underline-header option. 2026-10-28 10:38:28 -07:00
os.c Workaround MacOS bug in tty polling. 2026-10-09 09:45:28 -07:00
output.c output: keep file errors out of redirected stdout 2026-11-21 09:55:49 -08:00
pattern.c Fix bugs related to ^S search modifier. 2026-08-05 08:34:29 -07:00
pattern.h Fix build with Watcom C compiler. 2026-05-18 14:37:58 -07:00
pckeys.h Add support for shift-INSERT and ctrl-INSERT keys. 2026-09-27 01:38:46 -07:00
position.c Fix some confusion about sline vs. sindex in get_scrpos. 2026-10-14 10:44:56 -07:00
position.h Update year in copyright notices. 2026-01-20 16:57:15 -08:00
prompt.c Change some more ints to lbools and 0/1 constants to FALSE/TRUE. 2026-08-13 11:31:26 -07:00
README Update README for OS/2 kLIBC build 2026-10-10 08:50:49 -07: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 Flush queued tty input on exit. 2026-11-14 11:26:56 -08:00
scrsize.c Update year in copyright notices. 2026-01-20 16:57:15 -08:00
search.c Fix use of '@ from a different file. 2026-10-16 10:38:58 -07:00
SECURITY.md Add SECURITY.md. 2021-10-01 15:03:23 -07:00
signal.c Use timer to distinguish kent sequence from manually entered chars. 2026-10-03 12:36:54 -07:00
tags.c Change some more ints to lbools and 0/1 constants to FALSE/TRUE. 2026-08-13 11:31:26 -07:00
ttyin.c Rearrange open_tty() to be a bit more readable. 2026-11-19 10:48:34 -08:00
ubin.uni Update Unicode tables. 2026-11-07 17:29:04 -08:00
version.c v714 2026-11-23 11:31:32 -08:00
wide.uni Update Unicode tables. 2026-11-07 17:29:04 -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.



=======================================================================
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 or kLIBC 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 for EMX or defines.o2k for kLIBC
   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. Ensure that shell used by make should be
   cmd.exe compatible.

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 or kLIBC runtime installed. You need
   the emx DLLs emx.dll and emxlibcs.dll for EMX, or libcn0.dll for kLIBC,
   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.

9. For kLIBC, if you want to use configure,
   type "sh ./configure", "make", and "make install" with setting
   MAKESHELL=sh.exe.



=======================================================================
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.