This is a version of less forked and optimized for use on POSIX SUSv3 systems (incl. as "more")
Switch branches/tags
Nothing to show
Clone or download
skotchandsoda and gdamore Fire "Calculating" echo with monotonic clock
If the system clock is rolled back after the timeout
is set, the echo may not fire.

Using a monotonic clock ensures that it fires at or
after LONGTIME has elapsed.
Latest commit 778b24c Nov 29, 2017
Permalink
Failed to load latest commit information.
.gitignore CMake build improvments. Aug 3, 2017
CHANGES CMake build improvments. Aug 3, 2017
CMakeLists.txt CMake build improvments. Aug 3, 2017
LICENSE drop incorrect executable bit from non-executable files Nov 6, 2015
Makefile CMake build improvments. Aug 3, 2017
README.md Fixup the README with cmake info. Aug 3, 2017
brac.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
ch.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
charset.c Carefully handle '\0' in strchr arguments. Nov 15, 2015
charset.h Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
cmd.h Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
cmdbuf.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
command.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
cvt.c Remove macro aliases for wctype.h functions Jan 20, 2016
decode.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
defines.h CMake build improvments. Aug 3, 2017
edit.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
filename.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
forwback.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
funcs.h time(NULL) returns time_t which may not be long (it is int64_t on Ope… Nov 6, 2015
ifile.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
input.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
jump.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
less.1 less.1: SECURE mode is not a compile-time option Dec 19, 2015
less.h Remove macro aliases for wctype.h functions Jan 20, 2016
less.hlp drop incorrect executable bit from non-executable files Nov 6, 2015
lesskey.1 Use mdocml sources. Oct 25, 2014
lesskey.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
lesskey.h Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
line.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
linenum.c Fire "Calculating" echo with monotonic clock Nov 29, 2017
lsystem.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
main.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
mark.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
mkhelp.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
more.1 Use mdocml sources. Oct 25, 2014
more.hlp Updated less to behave as POSIX 1003.1-2008 compliant more(1) Sep 10, 2014
optfunc.c Update copyright and indicate POSIX compliance. Aug 3, 2017
option.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
option.h Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
opttbl.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
os.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
output.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
pattern.c Fix segfault on inverted search Aug 2, 2017
pattern.h Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
position.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
position.h Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
prompt.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
screen.c Pass errret to setupterm Jun 17, 2016
search.c Fix segfault on inverted search Aug 2, 2017
signal.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
strlcat.c Add strlcpy.c and strlcat.c from OpenBSD as fallbacks for platforms w… Nov 5, 2015
strlcpy.c Add strlcpy.c and strlcat.c from OpenBSD as fallbacks for platforms w… Nov 5, 2015
tags.c Plug memory leak Apr 29, 2017
ttyin.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015
version.c Move copyright addition so that it is above the terms and it is clear… Nov 6, 2015

README.md

LESS FORK

License

This version of Less (which is a fork, see below), is made available under the terms of the Less License, located in the file LICENSE. Some of the source files may be also distributed under the GPLv3, and the implementations of strlcpy and strlcat (which will not be used if your platform supplies them) are provided courtesy of OpenBSD under an MIT-style license. (See the source code files for more specific details.)

The original Less v458 carried the following notice:

This is the distribution of less, version 458, released 04 Apr 2013.
This program is part of the GNU project (http://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.

This modified distribution is generally made available under the terms of Less License, and we have chosen the Less License as the terms under which we distribute our changes.

About

This is a version of LESS, a file viewer, that has been modified heavily. It is based on Mark Nudelman's original program, Less v458. The original less is located at http://www.greenwoodsoftware.com/less/

This version is modified to work better on POSIX systems, and uses APIs that older systems and non-POSIX platforms might lack. In many cases these newer APIs have improved safety or performance.

It is also modified to substantially improve its compliance with the POSIX specifications when running as more. We believe that when called as more, less fully implements both Issue 6 and Issue 7 specified behaviors of the more utility.

Finally, substantial effort has been invested to improve the readability and maintainability of the code, and to avoid reimplementing library functions found on standard systems.

An incomplete list of changes is located in the file CHANGES.

Acknowledgements

Mark Nudelman created the original Less program, which we have used for many years on many platforms.

The OpenBSD team has contributed a number of improvements, mostly oriented around safety and hardening of the code.

Building

If you have CMake 3.1 or newer, then that is probably the best option:

$ mkdir build
$ cd build
$ cmake ..
$ make

Alternatively, you can use the Makefile where we have some default targets based on build type. Use make STD=<x> where x is one of:

  • ILLUMOS
  • MACOS
  • SUSv4
  • SUSv3
  • SUSv2

See the Makefile for more details. There is a STD=default option you can try if your platform isn't listed. (CMake is more likely to yield a positive result in this case, however.)

Enjoy!

- Garrett D'Amore <garrett@damore.org>, Aug. 3, 2017