summaryrefslogtreecommitdiffstats
path: root/usr.bin/less/filename.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Completely clean up UTF-8 handling in the file filename.c:schwarze2019-05-071-12/+12
| | | | | | | | | | Employ the usual form of an mbtowc(3) loop, eliminating two calls to the bad function step_char() and reducing the number of nested loops by one. This also removes the last caller of the bad function binary_char(), which is consequently deleted. While here, count ASCII C0 non-whitespace control characters as binary (except backspace and, with -R only, escape). OK millert@
* To simplify the upcoming UTF-8 cleanup in less(1), delete supportschwarze2019-02-261-1/+1
| | | | | | | | | | | | | | for ANSI escape sequences introduced by an 8-bit CSI (e.g. "\23343m") because these are neither compatible with UTF-8 nor strictly compatible with pure ASCII and for those introduced by an UTF-8 CSI (e.g. "\302\23343m") because not even xterm(1) supports them at all, not even with a non-default configuration, because both forms are very rarely used, if at all, and because the current code trying to support them doesn't even appear to work according to my tests. Full support for the ESC-[ CSI (e.g. "\033[43m") remains. Tweaks and OK millert@, OK nicm@, and sthen@ agrees with the general direction.
* After fstat(2) failure, trying lseek(2) is useless, so delete it.schwarze2017-10-291-16/+1
| | | | | Based on a smaller diff from Jesper Wallin <jesper at ifconfig dot se>. OK deraadt@
* little bit more KNFderaadt2016-09-171-4/+4
|
* style(9) includesmmcc2016-03-161-2/+3
| | | | ok nicm@
* remove superfluous macrommcc2016-01-291-1/+1
| | | | ok nicm
* NULL_IFILE has no weird use patterns. NULL is sufficient.deraadt2015-11-091-3/+3
|
* use (off_t)-1 rather than a BAD_LSEEK wrapperderaadt2015-11-091-2/+2
|
* error() is not a stdarg function, so there is no reason for NULL_PARGderaadt2015-11-091-2/+2
| | | | to be special. Simply use NULL.
* replace save() with estrdup() and make estrdup() exit like all the othertedu2015-11-071-2/+2
| | | | | 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-587/+233
| | | | | | | | | | | | | 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
* Merge Less 458 plus local patchesshadchin2014-04-251-39/+55
| | | | ok guenther@, ok jmc@ for man bits
* Merge in less 444 plus local changesshadchin2011-09-161-50/+75
| | | | ok nicm@
* use SMALL_PROGRAM to knock out some codederaadt2010-07-031-0/+2
|
* Don't access buf[strlen(buf) - 1] for zero-length strings.ray2006-12-061-1/+2
| | | | OK jaredy@.
* Fix removing of trailing space in file name completion list.otto2006-05-231-1/+1
| | | | From Matthew Haub; ok krw@
* use SEEK_* for lseek()deraadt2006-04-021-2/+2
|
* Do %s replacement for LESSOPEN and LESSCLOSE ourselves insteadmillert2004-08-231-8/+32
| | | | | of using snprintf(). Based on a patch from Brent Graveland. Ok tdeval@ and otto@
* o go back to using a help file instead of embedding it in the binarymillert2003-04-141-0/+19
| | | | | | 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-290/+604
|
* more strlcpy/strlcat/snprintf, less strcpy/strcat/sprintfderaadt2003-04-061-11/+15
| | | | | reviewed by tdeval, millert, dhartmei and others. more bits coming here from some of them i think
* very simple strlcat callsderaadt2003-04-061-3/+3
|
* some more string shit; krw okderaadt2003-04-051-11/+15
|
* lots of sprintf -> snprintf and strcpy -> strlcpy; checked by teduderaadt2003-03-131-10/+10
|
* kill more registersmpech2001-11-191-11/+11
| | | | millert@ ok
* $OpenBSD$niklas2001-01-291-0/+2
|
* Import of unmolested less-290.etheisen1996-09-211-0/+715