summaryrefslogtreecommitdiffstats
path: root/usr.bin/less/main.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* asprintf returns -1, not an arbitrary value < 0. Also upon error thederaadt2019-06-281-1/+1
| | | | | | | (very sloppy specification) leaves an undefined value in *ret, so it is wrong to inspect it, the error condition is enough. discussed a little with nicm, and then much more with millert until we were exasperated
* Split only LESS on $.krw2018-03-171-2/+2
| | | | | | As guenther@ said "STOP SPLITTING ANYTHING BUT $LESS ON '$' !". anton@ came up with the same diff. ok nicm@
* little bit more KNFderaadt2016-09-171-1/+1
|
* Check the MORE (or LESS) environment variables after forcing the variousnicm2016-08-281-4/+4
| | | | | more(1) options, so it is possible to change them using MORE. From Ross L Richardson. ok deraadt millert
* style(9) includesmmcc2016-03-161-1/+3
| | | | ok nicm@
* remove lint annotationsmmcc2016-01-121-3/+0
| | | | ok nicm@
* spacesderaadt2015-11-201-1/+1
|
* Correct check flipped in earlier commit.guenther2015-11-141-4/+3
| | | | | | Eliminate unnecessary isupper() tests before tolower() use ok millert@
* Add a flag argument to flush() to stop it calling quit() on error, thennicm2015-11-131-1/+1
| | | | | | use this from quit() to stop less blowing up the stack looping through quit()/flush() if stderr is closed (for example "less /missing 2</dev/null"). ok millert
* exit if pledge failsderaadt2015-11-111-3/+9
|
* use perror() instead, as in lesskeyderaadt2015-11-091-3/+3
|
* stop acting like "more" if progname is "page"; ok millertderaadt2015-11-091-3/+2
|
* NULL_IFILE has no weird use patterns. NULL is sufficient.deraadt2015-11-091-4/+4
|
* error() is not a stdarg function, so there is no reason for NULL_PARGderaadt2015-11-091-5/+5
| | | | to be special. Simply use NULL.
* 3 pledge calls; 2 are for secure mode and will help track down if thisderaadt2015-11-091-0/+13
| | | | | code really meets the promise of "no writes". Some hints from nicm and semarie.
* do not save history in secure modederaadt2015-11-091-1/+2
|
* close_getchr() is now a noopderaadt2015-11-091-1/+0
|
* replace save() with estrdup() and make estrdup() exit like all the othertedu2015-11-071-17/+6
| | | | | ecalloc, etc. functions do. ok mmcc nicm
* Garrett D'Amore has agreed to moving his copyright line up above thenicm2015-11-061-4/+2
| | | | | terms with the existing copyright, so it is clear it applies the same terms.
* whitespacederaadt2015-11-051-3/+3
|
* Replace less with the cleaned-up fork of less 458 maintained by Garrettnicm2015-11-051-197/+162
| | | | | | | | | | | | | D'Amore at https://github.com/gdamore/less-fork. This has significantly less portability goop, has a tidied up code style, uses terminfo instead of termcap, and is has stricter POSIX compliance. Many of our local changes have been accepted upstream: substantial remaining local changes are code to read help files from /usr/share rather than compiling them in, man page and help improvements, and some tweaks to the default options. Review and testing by millert, ok deraadt
* All callers of helpfile() are #ifdef SMALL so only define thatmillert2014-05-131-0/+2
| | | | function when SMALL is not defined. OK guenther@
* Give more(1) its own help file, shorter than the one for less(1).schwarze2014-05-101-1/+7
| | | | | The helpfile itself was prepared by jmc@, the glue by me. OK millert@ jmc@
* Make more(1) POSIX compliant with respect to the -e option.schwarze2014-04-251-4/+0
| | | | | | | | | | | | By default, "more" now works like "less -e", and "more -e" now works like "less -E", and more never exits just because the file fits on the first screen, like "less -F" would. While documenting this, add some text to the DESCRIPTION explaining how paging works. That allows a very concise description of -e. code change ok millert@ manual page joint work with and ok jmc@
* Merge Less 458 plus local patchesshadchin2014-04-251-3/+3
| | | | ok guenther@, ok jmc@ for man bits
* Reverse the default of the -c flag from off to on to prevent the textnicm2012-03-271-0/+1
| | | | | | | being displayed in the wrong place initially and then jumping when first redrawn (such as when searching). ok deraadt sthen
* Merge in less 444 plus local changesshadchin2011-09-161-22/+45
| | | | ok nicm@
* use SMALL_PROGRAM to knock out some codederaadt2010-07-031-0/+2
|
* It turns out that POSIX specifies more should prompt with the file name,millert2003-06-041-0/+1
| | | | | not --More-- like the old UCB more did. Back out a hack I did to make the prompt look like the old UCB more.
* o go back to using a help file instead of embedding it in the binarymillert2003-04-141-3/+0
| | | | | | o deal with HELPFILE not being defined o add a SMALL definition to make a smaller less for the boot floppies This still needs to be pared down a bit for the SMALL case
* Merge in less-381 w/ local changes and remove obsolete files.millert2003-04-131-94/+137
|
* some more string shit; krw okderaadt2003-04-051-3/+5
|
* kill more registersmpech2001-11-191-4/+4
| | | | millert@ ok
* $OpenBSD$niklas2001-01-291-0/+2
|
* provide support for -- argument seperatorderaadt1999-03-051-1/+7
|
* Incorporate less modifications for more and our bug fixes from previousetheisen1996-09-211-2/+14
| | | | version.
* Import of unmolested less-290.etheisen1996-09-211-0/+337