summaryrefslogtreecommitdiffstats
path: root/lib/libedit/terminal.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Initialize the line buffer by zero when allocation. This fixes theyasuoka2019-08-071-5/+5
| | | | | | | problem a crash happens after the window size change. Worked and discussed with asou and schwarze. ok schwarze
* Use calloc(3) and recallocarray(3) instead of *alloc* + memset(0).tb2017-04-121-5/+3
| | | | ok deraadt
* Replace the generated file "fcns.c" by a simpler header "func.h"schwarze2016-05-061-1/+2
| | | | | | | | | | | 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 "private" and "public" preprocessor macros, just use standard C;schwarze2016-04-111-23/+23
| | | | OK martijn@
* get rid of the non-standard data type "Char" in almost all files;schwarze2016-04-111-29/+29
| | | | ok martijn@
* Move wrapper macros to the two files actually needing them:schwarze2016-04-111-18/+18
| | | | | | | | | | | 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-16/+16
| | | | | | | | 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-7/+1
| | | | | OK martijn@. Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.
* format string fixes in debug code;schwarze2016-03-221-2/+2
| | | | committing right away because this code is not even compiled by default
* Fix an obvious typo in a NUL check;schwarze2016-03-221-2/+2
| | | | | | bug reported by David Binderman http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=50880 fix suggested by me, NetBSD rev. 1.23 and rev. 1.24.
* Cleanup of standard header inclusion:schwarze2016-03-201-9/+9
| | | | | | | | | | | | | 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@
* minor simplifactions, style fixes, and trivial syncs from NetBSDschwarze2016-03-201-10/+8
|
* Delete the useless Int datatype and always use the standard wint_tschwarze2016-03-201-4/+4
| | | | | | | | 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@
* Fifth step in synching with NetBSD:schwarze2016-01-301-11/+11
| | | | | | | | | 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-38/+38
| | | | | | | 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@
* delete "#ifdef notdef" code that is no longer present in NetBSD;schwarze2016-01-301-99/+1
| | | | no change in the generated source files
* Third step in synching with NetBSD:schwarze2016-01-301-241/+249
| | | | | | | | | | | * rename fkey_t to funckey_t and el_term_t to el_terminal_t * rename struct editline member el_term to el_terminal * rename many functions in terminal.c from term_*() to terminal_*(), for consistency with the file name and to not look related to <term.h> No functional change. This makes refresh.c and sig.c almost identical to the NetBSD versions. It reduces the remaining diff from +2446 -1805 to +2053 -1420. OK czarkoff@
* Second step in synching with NetBSD:schwarze2016-01-291-35/+35
| | | | | | | | | | | * 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/+1758
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.