summaryrefslogtreecommitdiff
path: root/lib/libedit/history.c
AgeCommit message (Collapse)Author
2023-03-08Delete obsolete /* ARGSUSED */ lint comments.Philip Guenther
ok miod@ millert@
2016-04-11delete the "private" and "public" preprocessor macros, just use standard C;Ingo Schwarze
OK martijn@
2016-04-11Clean up chartype.h:Ingo Schwarze
* not used in tokenizer.c * only use it for !NARROWCHAR * no need for underscores before ct_{de,en}code_string() * make the conversion buffer resize function private OK martijn@
2016-04-11get rid of the non-standard data type "Char" in almost all files;Ingo Schwarze
ok martijn@
2016-04-11Move wrapper macros to the two files actually needing them:Ingo Schwarze
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.
2016-04-09Always compile with WIDECHAR on and delete that preprocessor switch.Ingo Schwarze
OK martijn@. Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.
2016-03-20Cleanup of standard header inclusion:Ingo Schwarze
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@
2016-03-20Use getline(3) rather than fgetln(3) because it is standardizedIngo Schwarze
and simpler and safer to use. Implemented by Christos Zoulas following my suggestion, with a bug fix by me.
2016-01-30Fifth step in synching with NetBSD:Ingo Schwarze
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@
2016-01-30Fourth step in synching with NetBSD:Ingo Schwarze
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@
2014-10-17Remove non-exposed malloc/realloc/free wrappers, and then substituteTheo de Raadt
reallocarray() where it helps. ok doug
2014-05-19Add a H_SAVE_FP operation to history() which lets the history be savedNicholas Marriott
to an open file pointer. From NetBSD via Eitan Adler. ok millert
2014-01-19Retain local changes from rev 1.13.Tobias Stoeckmann
ok deraadt@
2011-07-07sync with upstream, retaining local modifications.Okan Demirmen
ok nicm@
2010-06-30Update libedit to bring it into sync with the latest version from NetBSD.Nicholas Marriott
ok deraadt
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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
2004-08-23Fix fgetln handling and always increment the size if we need to realloc,Otto Moerbeek
Based on a diff by kjell@; latter hunk from a diff by Sergey S. Kostyliov. ok kjell@ canacar@
2003-11-25Sync libedit to NetBSD libedit as of Nov 8, 2003.Otto Moerbeek
Tested by jmc@ djm@ and myself
2003-10-31Update to NetBSD libedit (from Oct 1, 2003), adding some stringOtto Moerbeek
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@
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-05-01is -Wall clean by making rcsid constAnil Madhavapeddy
2003-04-05strcpy/strcat -> strlcpy/strlcatThierry Deval
ok tedu@, hints by deraadt@ and millert@
2002-02-19We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.Todd C. Miller
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
1997-06-29Updates from NetBSD (christos@netbsd.org)Todd C. Miller
* Portability fixes: __const -> const BADSIG -> SIG_ERR int flags -> u_int flags #if __STDC__ -> #ifdef __STDC__ * Don't allow CSWTCH to interfere with CSUSP on __SVR4 systems. * Return -1 if the terminal set operation resulted in dumb terminal settings. * Handle properly the case where the last line in the sourced file does not have a trailing '\n'. From Jeffrey C Honig. * editrc -> editline in editline(3)
1997-03-14fix el_source() - a block needed braces around it (from NetBSD)Todd C. Miller
Some strcpy() -> strncpy (from NetBSD) Some KNF Add current NetBSD tags
1997-01-16Merge in NetBSD libedit changes and new man pages. Also fix someTodd C. Miller
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)
1995-12-14update from netbsdTheo de Raadt
1995-10-18initial import of NetBSD treeTheo de Raadt