aboutsummaryrefslogtreecommitdiff
path: root/lib/libedit/map.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r352136, r352204, r352275, r352341Baptiste Daroussin2020-02-191-1429/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r352136: Import libedit 2019-09-10 Compared to current version in base: - great improvements on the Unicode support - full support for filename completion including quoting which means we do not need anymore our custom addition) - Improved readline compatiblity Upgrading libedit has been a pain in the past, because somehow we never managed to properly cleanup the tree in lib/libedit and each merge has always been very painful. After years of fighting give up and refresh a merge from scrarch properly in contrib. Note that the switch to this version will be done in another commit. r352204: Readd _el_fn_sh_complete for backward compatibility This function is not needed anymore, it allows old sh binary to continue to run and avoid breaking backward compatibility. Note that is now just calls the regular _el_fn_complete which does a proper job at quoting. Discussed with: jilles r352275: Update libedit to a snapshot from 2019-09-10 This version bring many fixes regarding unicode support It also adds proper support for filename completion (we do not need our custom patches anymore) Improves the libreadline compatibility Note that the same work was done by Yuichiro Naito in https://reviews.freebsd.org/D21196 the main difference is in this case we have reimported libedit in contrib to fix a long standing mess in the previous merges which prevented a proper update workflow. (discussed long ago with pfg@) The only difference with upstream libedit is we have added a compatibility shim for the _elf_fn_sh_complete function which we previously added to support quoting in filename completion and is not needed anymore. This was added to continue supported old /bin/sh binaries and not break backward compatibility (as discussed with jilles@) Reviewed by: Yuichiro Naito <naito.yuichiro_gmail.com> Differential Revision: https://reviews.freebsd.org/D21584 r352341: Fix arm and aarch64 builds of libedit after r352275 On arm and arm64, where chars are unsigned by default, buildworld dies with: --- terminal.o --- /usr/src/contrib/libedit/terminal.c:569:41: error: comparison of integers of different signs: 'wint_t' (aka 'int') and 'wchar_t' (aka 'unsigned int') [-Werror,-Wsign-compare] el->el_cursor.v][where & 0370] != ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /usr/src/contrib/libedit/terminal.c:659:28: error: comparison of integers of different signs: 'wint_t' (aka 'int') and 'wchar_t' (aka 'unsigned int') [-Werror,-Wsign-compare] [el->el_cursor.h] == MB_FILL_CHAR) ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~ Fix this by making MB_FILL_CHAR a wint_t, so no casting is needed. Note that in https://reviews.freebsd.org/D21584 this was also proposed by Yuichiro Naito <naito.yuichiro_gmail.com>. Reviewed by: bapt Subscribers: naito.yuichiro_gmail.com, ml_vishwin.info X-MFC-With: r352275 Differential Revision: https://reviews.freebsd.org/D21657 Notes: svn path=/stable/12/; revision=358113
* lib: Fix several typos and minor errorsEitan Adler2017-12-271-1/+1
| | | | | | | | | | | - duplicate words - typos - references to old versions of FreeBSD Reviewed by: imp, benno Notes: svn path=/head/; revision=327232
* MFV r312996:Pedro F. Giffuni2017-01-301-14/+19
| | | | | | | | | | | | | | Re-import libedit 2016-02-27 This reverts r296435: the issues related to lldb and this update appear to have been identified (in lldb). Obtained from: NetBSD Reported by: emaste MFC after: 3 weeks Notes: svn path=/head/; revision=312997
* Revert r296175Pedro F. Giffuni2016-03-061-19/+14
| | | | | | | | | | | | | Undo update of libedit 2016-02-27 Something in libedit appears to be causing breakage in lldb38. The changes are not generally huge but they are suficient to to justify reverting for now. Reported by: novel, bapt Notes: svn path=/head/; revision=296435
* MFV r296159Pedro F. Giffuni2016-02-291-14/+19
| | | | | | | | | Sync our libedit with NetBSD's libedit 2016-02-27. Obtained from: NetBSD Notes: svn path=/head/; revision=296175
* Synchronize libedit with NetBSDBaptiste Daroussin2015-05-181-4/+4
| | | | | | | | It incorporates and fixes our patches to get el_gets return the proper count of characters in unicode mode. Notes: svn path=/head/; revision=283084
* Synchronize libedit with NetBSD and activate UTF-8 support [1]Baptiste Daroussin2015-01-091-110/+114
| | | | | | | | | | | | | | | | | Differences with NetBSD Reapply our local patches on top of it Fix Unicode environement detection Fix reading a line in unicode environment. It allows /bin/sh to works in UTF-8 envs Differential Revision: https://reviews.freebsd.org/D1455 Reviewed by: jilles, pfg Obtained from: NetBSD [1] MFC after: 1 month Relnotes: yes Notes: svn path=/head/; revision=276881
* libedit: bind the correct command when using "bind -k".Pedro F. Giffuni2013-01-011-2/+2
| | | | | | | | | | | | | | "ed-argument-digit" (i. e. command 0) was incorrectly used instead. This bug comes from the original sources imported in 1994 and has been confirmed in upstream NetBSD. Reported by: Yamagi Burmeister Submitted by: Christoph Mallon MFC after: 3 days Notes: svn path=/head/; revision=244941
* Merge the following changes from NetBSD:Stefan Farfeleder2007-03-111-2/+2
| | | | | | | | | | | | | | | | history.c 1.32: # Fix memory leak found by valgrind (Julien Torres) map.c 1.24: # fix debugging printf format. read.c 1.40: # Fix bug with multiple pending el_pushes. Reported by Julien Torres. tty.c 1.24: # Coverity CID 1216: Prevent negative index use. MFC after: 3 weeks Notes: svn path=/head/; revision=167464
* Merge the following changes from NetBSD:Stefan Farfeleder2007-03-111-14/+21
| | | | | | | | | | | | | | | | | | | | chared.h 1.17, common.c 1.19, emacs.c 1.21, key.c 1.18, key.h 1.9, map.c 1.23, term.c 1.42, term.h 1.17, vi.c 1.25: # Print the actual eofc, instead of ^D\b\b. # Change internal character decoding to prevent buffer oveflows. key.c 1.19, key.h 1.10: # move declaration to header file. term.c 1.43: # Coverity CID 806: Prevent NULL deref term.c 1.44: # Coverity CID 1668: Plug memory leak. term.c 1.45: # Fix compilation. MFC after: 3 weeks Notes: svn path=/head/; revision=167457
* Merge makelist rev 1.10 and map.c rev 1.22 from NetBSD. They just patch theStefan Farfeleder2005-10-041-12/+13
| | | | | | | | bug fixed in the last commit to map.c in a different way. Follow NetBSD to facilitate future merges. Notes: svn path=/head/; revision=150947
* Don't forget to copy the sentinel into the `help' array. It's expected toStefan Farfeleder2005-08-081-2/+2
| | | | | | | | | | be there. Submitted by: Björn König PR: 82381 Notes: svn path=/head/; revision=148847
* Sync libedit with recent NetBSD developments. Including improvements to theStefan Farfeleder2005-08-071-157/+153
| | | | | | | | | | vi-mode, removal of clause 3, cleanups and the export of the tokenization functions. Not included: config.h, filecomplete.{c,h} Notes: svn path=/head/; revision=148834
* Revert the replacement of realloc() with reallocf() (el.h:1.2, map.c:1.5 andStefan Farfeleder2005-08-071-2/+2
| | | | | | | | | tokenizer.c:1.3). Contrary to the commit log there were no memory leaks, but the change introduced a bug because the free'd pointer was not zeroed and calling the appropriate _end() function would call free() a second time. Notes: svn path=/head/; revision=148814
* Fix ID's after a total boch CVS merge due to multiple people makingDavid E. O'Brien2001-10-011-2/+0
| | | | | | | | | | | commits to these files. As I sing to CVS: Have I told you lately that I hate your guts? Have I told you all SCM's are above you? You fill my heart with pain, take away all my merging joy, grow my troubles that's what you do." Notes: svn path=/head/; revision=84334
* + Sync with NetBSD, bringing in feature enhancements.David E. O'Brien2001-10-011-1180/+1199
| | | | | | | | | | + Convert to ANSI-C function definitions + style(9) Submitted by: kris Notes: svn path=/head/; revision=84260
* Add __FBSDID()s to libeditMatthew Dillon2001-09-301-0/+2
| | | | Notes: svn path=/head/; revision=84201
* Replace memory leaking instances of realloc with non-leaking reallocf.Warner Losh1998-09-161-2/+2
| | | | | | | | | | | | | | In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but... Notes: svn path=/head/; revision=39327
* Fixes assorted problems with the history edit functions in libedit. ThisBrian Somers1998-06-271-1/+1
| | | | | | | | | | affects sh, ftp (and others?). Submitted by: Max Euston <meuston@jmrodgers.com> PR: 6516 Notes: svn path=/head/; revision=37199
* Update libedit with changes from NetBSD. Includes history load/save,Mike Smith1997-06-251-1/+1
| | | | | | | | | | some buffer overflow guards and some stylistic cleanups. Also adds manpages. Obtained from: NetBSD Notes: svn path=/head/; revision=26926
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-25/+25
| | | | Notes: svn path=/head/; revision=8870
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+1397
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573