summaryrefslogtreecommitdiffstats
path: root/bin/csh/file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* typo fix.nayden2019-11-291-2/+2
| | | | ok deraadt@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-2/+2
| | | | | | 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.
* In revision 1.35 of file.c, tenex() was modified to respect the inputline_sizeanton2017-11-161-2/+2
| | | | | argument but I forgot to adapt one conditional. Still no functional change since tenex() only has one call site where `inputline_size == sizeof(buf)`.
* Zap a redundant cast.anton2017-11-161-3/+2
|
* Respect inputline_size argument. No functional change since tenex() only has oneanton2017-08-301-1/+3
| | | | call site where `inputline_size == sizeof(buf)`.
* Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminatinganton2017-08-301-4/+14
| | | | | | | | | 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).
* Align variables and put logical operators at EOL. No binary change.anton2017-07-261-12/+12
|
* Postpone printing of prompt if filec is enabled in csh. Any I/O should beanton2017-07-261-1/+3
| | | | | | | 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@
* Restore tty when aborting loop.anton2017-07-181-2/+4
| | | | ok deraadt@
* Switch TIOCSTAT to _IO(). Two decades ago it was mistakenly defined toderaadt2017-06-291-4/+2
| | | | take an argument. Discussed with millert and tedu.
* Tweak previous: align declarations and rename local variable.anton2017-06-271-6/+6
|
* in recently commited TIOCSTI replacement code, do not assumederaadt2017-06-271-7/+9
| | | | | little-endian or unsigned char :-) ok anton
* Make sure to abort loops when pressing ^C in csh.anton2017-06-221-1/+6
| | | | Regression found by deraadt@
* Minor style(9) corrections and whitespace cleanup to csh.anton2017-06-211-10/+9
| | | | ok deraadt@ tb@
* Replace usage of TIOCSTI in csh using a more common IO-loop where ICANON isanton2017-06-211-175/+344
| | | | | | | 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@
* Move win variable.anton2017-06-171-3/+2
| | | | ok deraadt@ tb@
* Replace handrolled xfree() function by directly using free(3)mestre2015-12-261-3/+3
| | | | OK mmcc@
* unifdef BUILTIN (unused), NLS (always set), SHORT_STRINGS (always set)naddy2015-10-261-4/+1
| | | | and remove a few unused defines; no binary changes; ok tedu@ zhuk@
* remove -DFILEC; code does not compile for the -UFILEC case, and anyways,deraadt2015-06-171-3/+1
| | | | | who wants csh without FILEC?? from Peter Brottveit Bock, but redone using unifdef
* better description of internal copyn() functionderaadt2015-06-031-3/+2
|
* delete lots of unnecessary ptr_t casts, and drop a little NULL in as welltedu2015-02-081-4/+4
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-8/+9
| | | | | | | | | 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)
* Use reallocarray() and remove a few archaic memory allocation practices.deraadt2014-10-161-8/+3
| | | | ok deraadt
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-9/+1
| | | | | | | 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
* de-register and ansify functionsderaadt2003-06-111-67/+40
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* bring in strlcpy and strlcat-like things for dealing with Char types,deraadt2003-01-081-8/+11
| | | | | | this fixes at least 15 buffer overflows; some help from dhartmei. Anyone want to go do the same in ksh, and help with some of the while (*s++ = *p++) loops in here?
* Fix a bug I inadvertanly introduced while fixing the last problem in here.millert2002-07-241-11/+12
| | | | | | | | | | The item list really did want to be zero-filled since free_items() relies on this to find the end point. However, this is really pretty dumb since we *know* how many items are in the list. This highlights the elusive bug I was trying to fix--free_items() expects the list to be NULL-terminated which was not the case if the list was full. The fix is to simply pass free_items() the number of elements in the list.
* Remove 1024 directory entry limit for tenex-style file completion.millert2002-07-151-16/+11
| | | | | This fixes a mysterious segv when doing file completion twice in directories w/ more than 1024 files.
* knftodd2002-06-091-3/+3
|
* We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.millert2002-02-191-7/+3
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-22/+22
|
* KNFderaadt2001-12-011-4/+4
|
* MAXPATHLEN not MAXPATHLEN+1deraadt1998-05-181-3/+3
|
* spellingtodd1997-11-151-3/+3
|
* #if __STDC__ --> #ifdef __STDC__mickey1997-07-251-3/+3
|
* use TCSADRAIN instead of TCSANOW, to avoid dropping characters.millert1996-12-041-8/+8
| | | | Fix from NetBSD (christos), reported by Chris Torek.
* update rcsidderaadt1996-06-231-1/+2
|
* initial import of NetBSD treederaadt1995-10-181-0/+696