History log of /openbsd-src/bin/csh/file.c (Results 1 – 25 of 40)
Revision Date Author Comments
# 157d47b0 06-Oct-2020 deraadt <deraadt@openbsd.org>

I observed "csh i < file-containing-^T" to hit tenex(), which proceeds to
perform tty(4) ioctl operations against a non-tty. That is a pledge
violation, you can only do a subset of tty(4) ioctl agai

I observed "csh i < file-containing-^T" to hit tenex(), which proceeds to
perform tty(4) ioctl operations against a non-tty. That is a pledge
violation, you can only do a subset of tty(4) ioctl against a fd which
references a tty device. Sidestep this problem if the input descriptor is
not a tty
ok anton millert

show more ...


# b11b5bab 29-Nov-2019 nayden <nayden@openbsd.org>

typo fix.

ok deraadt@


# 3aaa63eb 28-Jun-2019 deraadt <deraadt@openbsd.org>

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

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.

show more ...


# 6505547e 16-Nov-2017 anton <anton@openbsd.org>

In revision 1.35 of file.c, tenex() was modified to respect the inputline_size
argument but I forgot to adapt one conditional. Still no functional change since
tenex() only has one call site where `i

In revision 1.35 of file.c, tenex() was modified to respect the inputline_size
argument but I forgot to adapt one conditional. Still no functional change since
tenex() only has one call site where `inputline_size == sizeof(buf)`.

show more ...


# 246157c1 16-Nov-2017 anton <anton@openbsd.org>

Zap a redundant cast.


# 7d12c80a 30-Aug-2017 anton <anton@openbsd.org>

Respect inputline_size argument. No functional change since tenex() only has one
call site where `inputline_size == sizeof(buf)`.


# 4a8db713 30-Aug-2017 anton <anton@openbsd.org>

Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminating
the input buffer instructs csh that the buffer contains a complete command. This
is wrong and should only happen when bu

Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminating
the input buffer instructs csh that the buffer contains a complete command. This
is wrong and should only happen when buffer is not full, otherwise more data has
to be read in order form a complete command.

While here, do not print the prompt again when the input exceeds the input
buffer and while inserting a line continuation (backslash).

show more ...


# d417edc4 26-Jul-2017 anton <anton@openbsd.org>

Align variables and put logical operators at EOL. No binary change.


# fc253c1d 26-Jul-2017 anton <anton@openbsd.org>

Postpone printing of prompt if filec is enabled in csh. Any I/O should be
performed first when canonical mode has been disabled on the tty just like ksh
does. Discovered by the regress tests.

Joint

Postpone printing of prompt if filec is enabled in csh. Any I/O should be
performed first when canonical mode has been disabled on the tty just like ksh
does. Discovered by the regress tests.

Joint work with bluhm@, ok deraadt@

show more ...


# d8e3aed7 18-Jul-2017 anton <anton@openbsd.org>

Restore tty when aborting loop.

ok deraadt@


# 6b4ead63 29-Jun-2017 deraadt <deraadt@openbsd.org>

Switch TIOCSTAT to _IO(). Two decades ago it was mistakenly defined to
take an argument. Discussed with millert and tedu.


# 21aa5442 27-Jun-2017 anton <anton@openbsd.org>

Tweak previous: align declarations and rename local variable.


# c51b6a6d 27-Jun-2017 deraadt <deraadt@openbsd.org>

in recently commited TIOCSTI replacement code, do not assume
little-endian or unsigned char :-)
ok anton


# 046eeb90 22-Jun-2017 anton <anton@openbsd.org>

Make sure to abort loops when pressing ^C in csh.

Regression found by deraadt@


# 9448619a 21-Jun-2017 anton <anton@openbsd.org>

Minor style(9) corrections and whitespace cleanup to csh.

ok deraadt@ tb@


# c0d918cd 21-Jun-2017 anton <anton@openbsd.org>

Replace usage of TIOCSTI in csh using a more common IO-loop where ICANON is
disabled and a single char of input is read at a time. This requires the line
editing capabilities provided when ICANON is

Replace usage of TIOCSTI in csh using a more common IO-loop where ICANON is
disabled and a single char of input is read at a time. This requires the line
editing capabilities provided when ICANON is enabled to be implemented.

With help and feedback from deraadt@

show more ...


# 0134f510 17-Jun-2017 anton <anton@openbsd.org>

Move win variable.

ok deraadt@ tb@


# acdb3202 26-Dec-2015 mestre <mestre@openbsd.org>

Replace handrolled xfree() function by directly using free(3)

OK mmcc@


# c38c44c7 26-Oct-2015 naddy <naddy@openbsd.org>

unifdef BUILTIN (unused), NLS (always set), SHORT_STRINGS (always set)
and remove a few unused defines; no binary changes; ok tedu@ zhuk@


# 2e7c3a37 17-Jun-2015 deraadt <deraadt@openbsd.org>

remove -DFILEC; code does not compile for the -UFILEC case, and anyways,
who wants csh without FILEC??
from Peter Brottveit Bock, but redone using unifdef


# aead66f0 03-Jun-2015 deraadt <deraadt@openbsd.org>

better description of internal copyn() function


# f4d574c6 08-Feb-2015 tedu <tedu@openbsd.org>

delete lots of unnecessary ptr_t casts, and drop a little NULL in as well


# b9fc9a72 16-Jan-2015 deraadt <deraadt@openbsd.org>

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_N

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

show more ...


# a8627d2c 16-Oct-2014 deraadt <deraadt@openbsd.org>

Use reallocarray() and remove a few archaic memory allocation practices.
ok deraadt


# 043fbe51 27-Oct-2009 deraadt <deraadt@openbsd.org>

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(th

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

show more ...


12