summaryrefslogtreecommitdiffstats
path: root/bin/ksh/edit.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-3/+3
| | | | | | 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.
* Some asprintf() calls were checked < 0, rather than the precise == -1.deraadt2019-06-271-3/+3
| | | | ok millert nicm tb, etc
* Delete unnecessary <libgen.h> #includesguenther2018-12-301-2/+1
| | | | ok deraadt@
* Add clear-screen emacs editing command, currently not bound to amillert2018-06-181-3/+3
| | | | | key by default. The shell will query the terminfo database to find the escape sequence to clear the screen. OK deraadt@
* Support 64 bit integers on 32 bit architectures.tobias2018-04-091-3/+3
| | | | | | | No binary change on amd64 and there should be no differences on any other 64 bit architecture either (because long = int64_t). ok cheloha, tb
* Favor usage of __func__ in warning/error messages. Some of them referred to theanton2018-03-151-2/+2
| | | | | | | wrong function and fix the rest for consistency. Diff from Michael W. Bombardieri with some cosmetic cleanup applied. ok benno@ tb@
* Introduce internal_warningf() and mark internal_errorf() as noreturnjca2018-01-161-4/+4
| | | | | This helps tools like scan-build, and follows the example of warningf() and errorf(). ok anton@
* Stop pretending we support building ksh without EDIT/HISTORY supportjca2018-01-151-3/+1
| | | | ok anton@
* Bring back the sign compare changes, this time with a fix from otto@millert2018-01-061-5/+5
| | | | that fixes the issues seen on hppa. OK deraadt@ otto@
* Back out sign compare changes that appear to cause problems on hppa.millert2018-01-041-5/+5
| | | | Requested by deraadt@
* Add WARNINGS=yes to ksh and fix the resulting sign compare warnings.millert2018-01-011-5/+5
| | | | OK tb@
* Add -Wshadow to Makefile and fix the resulting warnings. Many ofmillert2017-12-271-3/+3
| | | | | | | the warnings are due to the use of globals with generic names, specifically "options" and "path". I've renamed "options" to "sh_options" since it holds the shell options and "path" to "search_path". OK jca@ tb@
* Don't try to look up array names for complete_* that aren'tnicm2016-09-081-3/+6
| | | | alphanumeric, spotted by and ok sthen
* remove unused variable 'last'dcoppa2016-09-071-2/+2
| | | | ok nicm@
* Allow simple custom completions by creating an array namednicm2016-09-041-4/+79
| | | | | | | | | | | "complete_commandname_argnum", for example: set -A complete_kill_1 -- -9 -HUP -INFO -KILL -TERM To set completions for the first argument to kill(1). If no complete_* arrays are present, the normal filename completion is offered. positive comments from many; man page ok/tweaks jmc; ok tedu
* Avoid a compiler warning about use of uninitialized l.beg emittedtb2016-08-161-11/+13
| | | | | | | | when ksh is compiled with -Os (done in distrib/special): move the bit using XPptrv(l) (which expands to l.beg) where it is actually used and clearly initialized. ok tedu, tweak + ok millert
* remove some ARGSUSEDmmcc2016-03-171-2/+1
|
* rename global "e" to genv to avoid accidental shadowing and aliasing.tedu2015-12-301-2/+2
| | | | ok millert nicm tb
* Move system headers from sh.h to those files that actually need them.tb2015-12-141-1/+4
| | | | ok mmcc@ a while ago
* Add uses of areallocarray(). mksh and Bitrig ksh already have similarmmcc2015-11-011-2/+3
| | | | | | functions. With help from Theo Buehler. ok nicm@
* Assign pointer to NULL rather than 0.mmcc2015-10-211-2/+2
| | | | ok nicm@
* Move string.h include from sh.h to the files that use it.mmcc2015-10-191-1/+2
| | | | ok nicm@
* Apply style(9) to header includes.mmcc2015-10-191-5/+7
| | | | ok nicm@
* remove null check before afree. from Michael McConvilletedu2015-10-091-3/+2
|
* Remove EXTERN from edit.[ch], from Michael McConville.nicm2015-09-261-3/+2
|
* Last of the (thing *)0 -> NULL, from Michael McConville. No binarynicm2015-09-181-3/+3
| | | | change.
* Remove unnecessary casts, from Michael McConville. No binary change.nicm2015-09-171-3/+3
|
* correct spelling of NULL from (char *)0. from Michael McConville.tedu2015-09-151-7/+7
| | | | ok md5
* remove casts and null checks before free. from Michael McConvilletedu2015-09-011-2/+2
| | | | ok deraadt
* Escape ! characters for tab-completion, required for "set -o csh-history" users.sthen2015-03-121-2/+2
| | | | Tweak to maintain ascii ordering suggested by Simon Nicolussi. OK halex@
* ctype cleanups. Repeated re-audits of this sensitive area by okan andderaadt2013-12-171-2/+3
| | | | | myself, with a variety of other people spending some time as well. Thanks.
* add : to special chars.tedu2013-06-031-2/+2
| | | | identical diffs from plhk sdf.org and leva ecentrum.hu. ok deraadt.
* revert the tweak part of the last commit which, apart from thehalex2013-01-211-3/+2
| | | | | | | | questionable functionality of being able to expand environment variables that did not match a filename, preserved the annoyance of having stuff like "~/nonexistant" expanded to "~/nonexistant\* " ok stsp@ mpi@
* Fix backslash escaping during filename tab-completion in ksh.stsp2013-01-201-24/+8
| | | | | | | Diff originally submitted by Alexander Polakov, with a small tweak from me to avoid breaking tab-completion of environment variables (problem pointed out by bentley). ok sthen halex mpi
* fake a sigwinch after each job, so if the terminal changes size,tedu2012-09-101-2/+2
| | | | we'll notice and update
* Escape "=", remove if 0'd out code and simplify check in x_print_expansions.fgsch2010-05-201-31/+6
| | | | millert@ ok some time ago.
* fix memory leaks and one potential null deref found by coverity. from netbsd.fgsch2007-08-021-2/+8
| | | | millert@ ok
* escape [, ], and ? as well. from cbiere@netbsd.fgsch2007-08-011-2/+2
| | | | millert@ ok.
* fix a few name clashes with libc; found by lint. ok deraadt@otto2005-12-111-2/+2
|
* Process window size changes after xread(). [change window size]otto2005-09-111-4/+2
| | | | | echo $COLUMS $LINES; will now print the new sizes immediately, instead of after the second echo. ok millert@
* use STD{IN,OUT,ERR}_FILENOderaadt2005-04-131-2/+2
|
* lots of indentation cleanup, now ksh is readable like our other code.deraadt2005-03-301-36/+30
| | | | double checked to make sure no binaries change, and eyed by niallo
* knfderaadt2005-02-251-1/+2
|
* Use stdbool.h instead of rolling our own bools.millert2004-12-221-12/+12
|
* Ansification plus some minor knf. No binary change on i386 andotto2004-12-201-91/+32
| | | | | sparc64, binary change in lex.o on macppc due to introduction of dopprompt() prototype. ok millert@
* spacingderaadt2004-12-191-4/+4
|
* Use struct termios instead of TTY_state typedefmillert2004-12-181-5/+4
| | | | Use tc[gs]etattr() instead of [gs]et_tty() abstraction
* Flags set in signal handlers should be volatile sig_atomic_tmillert2004-12-181-2/+2
|
* Use _POSIX_VDISABLE directly instead of assigning it to a variable.millert2004-12-181-13/+9
|
* Remove unused OS dependent #ifdef blocks, #defines and macro abstraction.millert2004-12-181-128/+32
| | | | First step in making the ksh code easier to read. From Matthias Kilian