summaryrefslogtreecommitdiffstats
path: root/usr.bin/less/edit.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* less uses a correct raceless signal method of indicating signal events inderaadt2019-09-031-2/+1
| | | | | | | | a volatile sig_atomic_t variable, and then processing events in the mainloop. But only one variable was used for 3 signals, with |= bit operations which are signal interruptable! Rewrite the code to use 3 independent variables and cleanup how the mainloop observes indications. ok schwarze
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-1/+1
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* little bit more KNFderaadt2016-09-171-1/+1
|
* style(9) includesmmcc2016-03-161-1/+2
| | | | ok nicm@
* remove lint annotationsmmcc2016-01-121-1/+0
| | | | ok nicm@
* Add a flag argument to flush() to stop it calling quit() on error, thennicm2015-11-131-2/+2
| | | | | | 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
* NULL_IFILE has no weird use patterns. NULL is sufficient.deraadt2015-11-091-15/+15
|
* use (off_t)-1 rather than a BAD_LSEEK wrapperderaadt2015-11-091-1/+1
|
* error() is not a stdarg function, so there is no reason for NULL_PARGderaadt2015-11-091-3/+3
| | | | to be special. Simply use NULL.
* use open() with flags instead of creat()deraadt2015-11-091-1/+1
|
* do not need wrappers around O_RDONLY and suchderaadt2015-11-091-2/+2
|
* replace save() with estrdup() and make estrdup() exit like all the othertedu2015-11-071-1/+1
| | | | | 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.
* Replace less with the cleaned-up fork of less 458 maintained by Garrettnicm2015-11-051-244/+142
| | | | | | | | | | | | | 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
* Give more(1) its own help file, shorter than the one for less(1).schwarze2014-05-101-1/+1
| | | | | The helpfile itself was prepared by jmc@, the glue by me. OK millert@ jmc@
* Merge Less 458 plus local patchesshadchin2014-04-251-3/+6
| | | | ok guenther@, ok jmc@ for man bits
* Use volatile sig_atomic_t, not int, for the sigs variable. Alsomillert2011-09-211-1/+1
| | | | | move the call to bell() out of u_interrupt() (a signal handler). OK and with help from deraadt@
* Merge in less 444 plus local changesshadchin2011-09-161-14/+69
| | | | ok nicm@
* use SMALL_PROGRAM to knock out some codederaadt2010-07-031-0/+4
|
* use SEEK_* for lseek()deraadt2006-04-021-1/+1
|
* o go back to using a help file instead of embedding it in the binarymillert2003-04-141-19/+4
| | | | | | 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-93/+214
|
* kill more registersmpech2001-11-191-4/+4
| | | | millert@ ok
* $OpenBSD$niklas2001-01-291-0/+2
|
* Import of unmolested less-290.etheisen1996-09-211-0/+656