summaryrefslogtreecommitdiffstats
path: root/lib/libedit/keymacro.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Saving errno in el_errno is only needed for one purpose:schwarze2016-05-251-7/+5
| | | | | | | | | | | | | | | | | Restoring the original errno found in el_wgetc() after el_wgets() did some cleanup that may have changed errno. Improve clarity and robustness of the code by not setting and inspecting el_errno where it isn't needed; in particular, let keymacro_get() properly report read failure to read_getcmd(). Move el_errno to el_read_t because it's only used in read.c. Never set errno back to zero. Checked with a test program installing a USR1 signal handler without SA_RESTART, for the cases read_getcmd(), ed_quoted_insert(), keymacro_get(), ed_command(), and EL_EDITMODE=0. OK czarkoff@
* Replace the generated file "fcns.c" by a simpler header "func.h"schwarze2016-05-061-2/+3
| | | | | | | | | | | included only in the one file needing it, "map.c". That allows to define el_action_t directly in "map.h", which in turn allows to stop including "fcns.h" from "el.h" and include it only in the modules needing it. Now we no longer autogenerate any C files. Feedback and OK martijn@. First version also proofread by Christian Heckendorf <mbie at ulmus dot me>.
* * Delete the unimplemented feature XK_EXE.schwarze2016-04-121-8/+4
| | | | | | * Delete the unused macro MIN(). No functional change. OK czarkoff@ martijn@
* delete the "private" and "public" preprocessor macros, just use standard C;schwarze2016-04-111-18/+18
| | | | OK martijn@
* get rid of the non-standard data type "Char" in almost all files;schwarze2016-04-111-26/+29
| | | | ok martijn@
* Move wrapper macros to the two files actually needing them:schwarze2016-04-111-2/+2
| | | | | | | | | | | FUNW, Strlen, Strdup, Strcmp, Strncmp, Strncpy, Strncat -> history.c Strchr, tok_strdup -> tokenizer.c FUN, TYPE, STR -> both of these files OK martijn@ Also proofread by Christian Heckendorf <mbie at ulmus dot me> who reported some whitespace issues in parse.c.
* Delete 26 wrapper macros and two wrapper functions that are noschwarze2016-04-091-5/+5
| | | | | | | | longer needed now that we always compile with wide character support, reducing code obfuscation. OK czarkoff@ martijn@. Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.
* Always compile with WIDECHAR on and delete that preprocessor switch.schwarze2016-04-091-4/+2
| | | | | OK martijn@. Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.
* Reduce the FUN() macro madness by no longer applying it to el_[w]getc(3).schwarze2016-03-211-3/+5
| | | | | | | | | Always use el_wgetc(3) internally. In the !WIDECHAR case, casting the result to (Char) is safe because the function returns a byte rather than a character in that case. No functional change except for fixing a printf(3) format string issue when compiled with DEBUG_READ and WIDECHAR. OK czarkoff@
* Cleanup of standard header inclusion:schwarze2016-03-201-8/+8
| | | | | | | | | | | | | 1. Add the missing <errno.h> to sig.c. 2. Do not include standard headers from private headers "chared.h" and "el.h", include them directly where needed. 3. Delete a few needless inclusions of <ctype.h>. 4. Sort the standard headers. 5. Delete _GNU_SOURCE weirdness from histedit.h, that file doesn't even need the access to wcsdup(3) mentioned in the comment. 6. Delete some trailing blanks and blanks before tabs. OK czarkoff@
* Delete the useless Int datatype and always use the standard wint_tschwarze2016-03-201-3/+3
| | | | | | | | directly. This is not a problem because <wchar_t> is required all over the place anyway, even when WIDECHAR is not defined. No functional change except that it fixes a few printf(3) format string issues, %c vs. %lc. OK czarkoff@
* remove some whitespace differences with NetBSD; no change with diff -bschwarze2016-01-311-3/+3
|
* Fifth step in synching with NetBSD:schwarze2016-01-301-7/+7
| | | | | | | | | Delete the silly ptr_t and ioctl_t typedefs and delete some "#ifdef notdef" code from "sys.h". No functional change. This makes hist.h identical to the NetBSD version. It reduces the remaining diff from +1526 -734 to +1430 -592. OK czarkoff@
* Fourth step in synching with NetBSD:schwarze2016-01-301-27/+27
| | | | | | | KNF: Remove parentheses from return lines. No object change. This makes emacs.c and prompt.c identical to the NetBSD versions. It reduces the remaining diff from +2053 -1261 to +1526 -734. OK czarkoff@
* Second step in synching with NetBSD:schwarze2016-01-291-115/+119
| | | | | | | | | | | * Rename some types from *key*_t to *keymacro*_t. * Rename struct editline member el_key to el_keymacro. * Rename some functions in keymacro.c from key*() to keymacro*(). This removes the conflict of key_clear(), key_end(), and key_print() with macros in <term.h>. No functional change. This makes keymacro.h identical to the NetBSD version. It reduces the remaining diff from +2640 -1998 to +2446 -1805. OK czarkoff@
* Start synching with NetBSD:schwarze2016-01-291-0/+660
Rename the files key.[hc] to keymacro.[hc] and term.[hc] to terminal.[hc]. The change makes sense because "term.h" conflicts with <term.h> and the functions key_clear(), key_end(), and key_print() in "key.h" conflict with macros in <term.h>. No content change yet, no binary change in *.o after "strip -d". This reduces the remaining diff from +4634 -3992 to +2640 -1998. OK czarkoff@, and mmcc@ agrees with the direction.