summaryrefslogtreecommitdiffstats
path: root/lib/libedit/eln.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* delete the "private" and "public" preprocessor macros, just use standard C;schwarze2016-04-111-7/+7
| | | | OK martijn@
* get rid of the non-standard data type "Char" in almost all files;schwarze2016-04-111-2/+2
| | | | ok martijn@
* Move wrapper macros to the two files actually needing them:schwarze2016-04-111-7/+7
| | | | | | | | | | | 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-3/+1
| | | | | OK martijn@. Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.
* Add NULL checkmartijn2016-03-221-2/+3
| | | | OK schwarze@
* Christos Zoulas just rescinded clauses 3 & 4 of his licenses, seeschwarze2016-03-211-8/+1
| | | | | NetBSD chartype.c rev. 1.23, chartype.h rev. 1.25, eln.c rev. 1.28. No code change.
* Make the read_char() function always take a wchar_t * argument.schwarze2016-03-211-4/+1
| | | | | | | | | | | On first sight, it might look as if this required a bump because it seems to change the public type el_rfunc_t. But we only compile with WIDECHAR, and in that case, there is no change in the interface. This also simplifies some logic by getting rid of the NARROW_READ flag which was broken anyway. OK czarkoff@
* Reduce the FUN() macro madness by no longer applying it to el_[w]getc(3).schwarze2016-03-211-1/+3
| | | | | | | | | 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 private header inclusion:schwarze2016-03-201-4/+3
| | | | | | | | | | | | | | 1. Do not include private headers from "chared.h", "hist.h", "prompt.h", "refresh.h", "search.h", "sig.h", "terminal.h", "tty.h". The only private header having to include other private headers is "el.h". 2. Do not include "common.h", "parse.h", "help.h" from "el.h", and do not include "emacs.h" and "vi.h" from "chared.h", include them directly where needed. 3. Do include "fcns.h" from "el.h" because el_func_t is needed for "map.h". 4. Do not include private headers again that are already included by "el.h". 5. Include private headers after standard headers. OK czarkoff@
* Delete the weird IGNORE_EXTCHARS flag, simplifying the codeschwarze2016-03-201-3/+17
| | | | | | | | in the generic low-level function read_char(). Until we fully enable UTF-8 support, instead filter out non-ASCII characters in the more logical place in the high-level function el_gets(3). OK czarkoff@.
* Fix the public interface function el_getc(3).schwarze2016-03-201-10/+14
| | | | | | | | | | | On OpenBSD, the effects are to set the return argument to the NUL byte in case of a read failure (for robustness) and to properly set errno when the character is out of range and cannot be stored in a byte. Once we enable UTF-8, this will be needed to avoid returning bogus bytes for valid Unicode characters. On systems where the internal representation of wchar_t doesn't match UCS-4, breakage was potentially even worse. OK czarkoff@.
* Fifth step in synching with NetBSD:schwarze2016-01-301-2/+2
| | | | | | | | | 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@
* Third step in synching with NetBSD:schwarze2016-01-301-5/+5
| | | | | | | | | | | * 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@
* The argv[] used for el_set() EL_BIND, EL_SETTY, etc should be terminatednicm2014-05-201-5/+5
| | | | | | | by NULL. Fix from NetBSD via yasuoka@ but changed by me not to walk off the end of array with >20 arguments. ok yasuoka
* Don't segfault when trying to bind to an invalid command. While here,pascal2011-11-271-2/+2
| | | | | | kill a C++-style comment. ok nicm@
* sync with upstream, retaining local modifications.okan2011-07-071-6/+11
| | | | ok nicm@
* Update libedit to bring it into sync with the latest version from NetBSD.nicm2010-06-301-0/+364
ok deraadt