summaryrefslogtreecommitdiffstats
path: root/lib/libedit/common.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Improve modularization at the chared/read boundary, no functional change.schwarze2016-05-221-2/+2
| | | | | | | | | | | | Stop the read.c module from poking the el_chared.c_macro data structure that used to belong to the chared.c module. Given that no other module, not even chared itself, is using that data, move it into the read modules's own opaque data structure, struct el_read_t. That gets rid of one struct, one #define, one struct member, and one function argument in the chared.h interface. OK czarkoff@
* 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 redundant, empty callbacks;schwarze2016-04-181-93/+5
| | | | | | no functional change, minus hundred lines of code. OK martijn@; also proof-read by Christian Heckendorf <mbie at ulmus dot me>.
* get rid of the non-standard data type "Char" in almost all files;schwarze2016-04-111-9/+9
| | | | ok martijn@
* Move wrapper macros to the two files actually needing them:schwarze2016-04-111-6/+6
| | | | | | | | | | | 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-6/+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>.
* format string fixes in debug code;schwarze2016-03-221-3/+4
| | | | committing right away because this code is not even compiled by default
* Reduce the FUN() macro madness by no longer applying it to el_[w]getc(3).schwarze2016-03-211-4/+2
| | | | | | | | | 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-11/+13
| | | | | | | | | | | | | 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 useless "typedef int bool_t", use int directly;schwarze2016-03-201-4/+4
| | | | OK czarkoff@
* Cleanup of private header inclusion:schwarze2016-03-201-1/+4
| | | | | | | | | | | | | | 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 useless Int datatype and always use the standard wint_tschwarze2016-03-201-36/+36
| | | | | | | | 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@
* Fourth step in synching with NetBSD:schwarze2016-01-301-65/+65
| | | | | | | 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@
* 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@
* Update libedit to bring it into sync with the latest version from NetBSD.nicm2010-06-301-66/+65
| | | | ok deraadt
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-8/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* Update to NetBSD libedit (from Oct 1, 2003), adding some stringotto2003-10-311-574/+500
| | | | | | | | | | | | | | | | | | cleaning and history bug fixes. The code includes GNU libreadline functionality, but the corresponding header files are not installed, since some libreadline functions are missing. There are some minor API changes, notably: old: EditLine *el_init(const char *, FILE *, FILE *); new: EditLine *el_init(const char *, FILE *, FILE *, FILE *); old: HistEvent *history(History *h, int op, ...); new: int history(History *h, HistEvent *ev, int op, ...); plus some changes in operation names. See editline(3) for details. Tested by djm@, mouring@, jmc@. ok deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* is -Wall clean by making rcsid constavsm2003-05-011-2/+2
|
* fix el_source() - a block needed braces around it (from NetBSD)millert1997-03-141-11/+12
| | | | | | Some strcpy() -> strncpy (from NetBSD) Some KNF Add current NetBSD tags
* Merge in NetBSD libedit changes and new man pages. Also fix somemillert1997-01-161-5/+11
| | | | | | | | | | | | | | | | | | strncpy() usage in their code. NetBSD change log was: * add a man page for the editline routines * add a man page describing editrc * fix bugs in el_parse(): * didn't execute command when program name matched (test reversed) * was checking against empty string instead of program name * after checks, command to run also pointed to empty string * document ^char and \ escape sequences * when parsing ^char control chars, check the correct char when determining validity (previously, ^char was a NOP interpreted as the literal string because of this bug) * Implement CC_REDISPLAY, which (unlike CC_REFRESH) redraws the entire input * line (a la ^R). This is useful if the binding outputs information and * mucks up the input line. To be used in ``list-choices'' bindings (refer * to the ^D binding in csh when filec is set)
* initial import of NetBSD treederaadt1995-10-181-0/+994