master
Revert CHAR_T removal. Some signedness flaws were introduced. Found the hard way by jca@
satisfy -fno-common by repairing one enum decl ok mortimer
free(NULL) is ok so use it; from Michael W. Bombardieri
Fix segfault which could be triggered by deleting a backwards sentence if cursor's current line was blank:
fix fd leaks in error paths ok miod@
Fix vi recovery mode.
v_event_get: check qp->output for NULL before passing to e_memcmp(). Other users of qp->output already include a NULL check. Avoids a crash when cursor key support is disabled in cl/cl_term.c. From Jeremy Mates. OK tb@
$OpenBSD$
For open/openat, if the flags parameter does not contain O_CREAT, the 3rd (variadic) mode_t parameter is irrelevant. Many developers in the past have passed mode_t (0, 044, 0644, or such), which might lead future people to copy this broken idiom, and perhaps even believe this parameter has some meaning or implication or application. Delete them all. This comes out of a conversation where tb@ noticed that a strange (but intentional) pledge behaviour is to always knock-out high-bits from mode_t on a number of system calls as a safety factor, and his bewilderment that this appeared to be happening against valid modes (at least visually), but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef. ok millert
Fix a check in ADD_SPACE_{GOTO,RET} that potentially allowed for a NULL-dereference.
spelling fixes; from paul tagliamonte amendments to his diff are noted on tech
Enable the awk scripts to generate ex_def.h and options_def.h. These scripts generate the enums required for the ex commands and vi options. Before these lists had to be maintained either by hand or someone had to stumble upon these scripts and figure out how to use them. By enabling them these headers are now always in sync based on the comments in the corresponding source files, which are a lot harder to miss during an update than an extra file.
Add showfilename set option
Remove settings that were unimplemented for 20 years; update STANDARDS.
Also apply stricter pledge when secure mode is set via rc file or command.
ex_range: fix handling of escaped backslashes. If there are two consecutive backslashes, skip past both so the second is not mistakenly treated as an escape character. This is consistent with how escaped backslashes are treated in ex_substitute() and global(). From Bosco G. G.
Remove an old and false comment. REALLOC now free(3)s the code if realloc fails.