History log of /openbsd-current/usr.bin/less/ttyin.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.13 03-Sep-2019 deraadt

less uses a correct raceless signal method of indicating signal events in
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


# 1.12 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
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.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.11 09-Nov-2015 deraadt

close_getchr() is now a noop


# 1.10 09-Nov-2015 deraadt

use STDERR_FILENO instead of 2


# 1.9 09-Nov-2015 deraadt

do not need wrappers around O_RDONLY and such


# 1.8 06-Nov-2015 nicm

Garrett D'Amore has agreed to moving his copyright line up above the
terms with the existing copyright, so it is clear it applies the same
terms.


# 1.7 05-Nov-2015 nicm

Replace less with the cleaned-up fork of less 458 maintained by Garrett
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


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.6 25-Apr-2014 shadchin

Merge Less 458 plus local patches

ok guenther@, ok jmc@ for man bits


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.5 21-Sep-2011 millert

Use volatile sig_atomic_t, not int, for the sigs variable. Also
move the call to bell() out of u_interrupt() (a signal handler).
OK and with help from deraadt@


# 1.4 16-Sep-2011 shadchin

Merge in less 444 plus local changes

ok nicm@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.3 13-Apr-2003 millert

Merge in less-381 w/ local changes and remove obsolete files.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.2 29-Jan-2001 niklas

$OpenBSD$


# 1.1 21-Sep-1996 etheisen

branches: 1.1.1;
Initial revision


# 1.12 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
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.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.11 09-Nov-2015 deraadt

close_getchr() is now a noop


# 1.10 09-Nov-2015 deraadt

use STDERR_FILENO instead of 2


# 1.9 09-Nov-2015 deraadt

do not need wrappers around O_RDONLY and such


# 1.8 06-Nov-2015 nicm

Garrett D'Amore has agreed to moving his copyright line up above the
terms with the existing copyright, so it is clear it applies the same
terms.


# 1.7 05-Nov-2015 nicm

Replace less with the cleaned-up fork of less 458 maintained by Garrett
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


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.6 25-Apr-2014 shadchin

Merge Less 458 plus local patches

ok guenther@, ok jmc@ for man bits


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.5 21-Sep-2011 millert

Use volatile sig_atomic_t, not int, for the sigs variable. Also
move the call to bell() out of u_interrupt() (a signal handler).
OK and with help from deraadt@


# 1.4 16-Sep-2011 shadchin

Merge in less 444 plus local changes

ok nicm@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.3 13-Apr-2003 millert

Merge in less-381 w/ local changes and remove obsolete files.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.2 29-Jan-2001 niklas

$OpenBSD$


# 1.1 21-Sep-1996 etheisen

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 09-Nov-2015 deraadt

close_getchr() is now a noop


# 1.10 09-Nov-2015 deraadt

use STDERR_FILENO instead of 2


# 1.9 09-Nov-2015 deraadt

do not need wrappers around O_RDONLY and such


# 1.8 06-Nov-2015 nicm

Garrett D'Amore has agreed to moving his copyright line up above the
terms with the existing copyright, so it is clear it applies the same
terms.


# 1.7 05-Nov-2015 nicm

Replace less with the cleaned-up fork of less 458 maintained by Garrett
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


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.6 25-Apr-2014 shadchin

Merge Less 458 plus local patches

ok guenther@, ok jmc@ for man bits


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.5 21-Sep-2011 millert

Use volatile sig_atomic_t, not int, for the sigs variable. Also
move the call to bell() out of u_interrupt() (a signal handler).
OK and with help from deraadt@


# 1.4 16-Sep-2011 shadchin

Merge in less 444 plus local changes

ok nicm@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.3 13-Apr-2003 millert

Merge in less-381 w/ local changes and remove obsolete files.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.2 29-Jan-2001 niklas

$OpenBSD$


# 1.1 21-Sep-1996 etheisen

branches: 1.1.1;
Initial revision