Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Sep 2019 06:50:02 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r352275 - in head/lib/libedit: . TEST edit readline
Message-ID:  <201909130650.x8D6o2fb037276@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Fri Sep 13 06:50:02 2019
New Revision: 352275
URL: https://svnweb.freebsd.org/changeset/base/352275

Log:
  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>
  MFC after:	3 weeks
  Differential Revision:	https://reviews.freebsd.org/D21584

Added:
  head/lib/libedit/readline/
  head/lib/libedit/readline/Makefile   (contents, props changed)
     - copied unchanged from r352274, head/lib/libedit/edit/readline/history.h
     - copied unchanged from r352274, head/lib/libedit/edit/readline/tilde.h
Directory Properties:
  head/lib/libedit/readline/history.h   (props changed)
  head/lib/libedit/readline/tilde.h   (props changed)
Deleted:
  head/lib/libedit/Makefile.depend
  head/lib/libedit/TEST/
  head/lib/libedit/chared.c
  head/lib/libedit/chared.h
  head/lib/libedit/chartype.c
  head/lib/libedit/chartype.h
  head/lib/libedit/common.c
  head/lib/libedit/config.h
  head/lib/libedit/edit/
  head/lib/libedit/editline.3
  head/lib/libedit/editrc.5
  head/lib/libedit/el.c
  head/lib/libedit/el.h
  head/lib/libedit/eln.c
  head/lib/libedit/emacs.c
  head/lib/libedit/filecomplete.c
  head/lib/libedit/filecomplete.h
  head/lib/libedit/hist.c
  head/lib/libedit/hist.h
  head/lib/libedit/histedit.h
  head/lib/libedit/history.c
  head/lib/libedit/keymacro.c
  head/lib/libedit/keymacro.h
  head/lib/libedit/makelist
  head/lib/libedit/map.c
  head/lib/libedit/map.h
  head/lib/libedit/parse.c
  head/lib/libedit/parse.h
  head/lib/libedit/prompt.c
  head/lib/libedit/prompt.h
  head/lib/libedit/read.c
  head/lib/libedit/read.h
  head/lib/libedit/readline.c
  head/lib/libedit/refresh.c
  head/lib/libedit/refresh.h
  head/lib/libedit/search.c
  head/lib/libedit/search.h
  head/lib/libedit/sig.c
  head/lib/libedit/sig.h
  head/lib/libedit/sys.h
  head/lib/libedit/terminal.c
  head/lib/libedit/terminal.h
  head/lib/libedit/tokenizer.c
  head/lib/libedit/tty.c
  head/lib/libedit/tty.h
  head/lib/libedit/vi.c
Modified:
  head/lib/libedit/Makefile

Modified: head/lib/libedit/Makefile
==============================================================================
--- head/lib/libedit/Makefile	Fri Sep 13 06:36:24 2019	(r352274)
+++ head/lib/libedit/Makefile	Fri Sep 13 06:50:02 2019	(r352275)
@@ -4,6 +4,9 @@
 
 PACKAGE=clibs
 
+EDITDIR=	${SRCTOP}/contrib/libedit
+.PATH: ${EDITDIR}
+
 SHLIB_MAJOR=	7
 SHLIBDIR?= /lib
 
@@ -12,75 +15,83 @@ LIB=	edit
 
 LIBADD=	ncursesw
 
-OSRCS=	chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \
-	hist.c keymacro.c map.c chartype.c \
-	parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
+SRCS=	chared.c chartype.c common.c el.c eln.c emacs.c filecomplete.c \
+	hist.c history.c historyn.c keymacro.c literal.c map.c \
+	parse.c prompt.c read.c readline.c refresh.c search.c sig.c \
+	terminal.c tokenizer.c tokenizern.c tty.c vi.c
 
-MAN=	editline.3 editrc.5
 
-MLINKS=	editline.3 el_deletestr.3 editline.3 el_end.3 editline.3 el_init.3 \
-	editline.3 el_get.3 editline.3 el_getc.3 editline.3 el_gets.3 \
-	editline.3 history.3 editline.3 history_end.3 \
-	editline.3 history_init.3 editline.3 el_insertstr.3 \
-	editline.3 el_line.3 editline.3 el_parse.3 editline.3 el_push.3 \
-	editline.3 el_reset.3 editline.3 el_resize.3 editline.3 el_set.3 \
+MAN=	editline.3 editrc.5 editline.7
+
+MLINKS=	\
+	editline.3 el_deletestr.3 \
+	editline.3 el_end.3 \
+	editline.3 el_get.3 \
+	editline.3 el_getc.3 \
+	editline.3 el_gets.3 \
+	editline.3 el_init.3 \
+	editline.3 el_init_fd.3 \
+	editline.3 el_insertstr.3 \
+	editline.3 el_line.3 \
+	editline.3 el_parse.3 \
+	editline.3 el_push.3 \
+	editline.3 el_reset.3 \
+	editline.3 el_resize.3 \
+	editline.3 el_set.3 \
 	editline.3 el_source.3 \
-	editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \
-	editline.3 tok_line.3 editline.3 tok_str.3
+	editline.3 history.3 \
+	editline.3 history_end.3 \
+	editline.3 history_init.3 \
+	editline.3 tok_end.3 \
+	editline.3 tok_init.3 \
+	editline.3 tok_line.3 \
+	editline.3 tok_reset.3 \
+	editline.3 tok_str.3 \
+	editline.3 el_wdeletestr.3 \
+	editline.3 el_wget.3 \
+	editline.3 el_wgetc.3 \
+	editline.3 el_wgets.3 \
+	editline.3 el_winsertstr.3 \
+	editline.3 el_wline.3 \
+	editline.3 el_wparse.3 \
+	editline.3 el_wpush.3 \
+	editline.3 el_wset.3 \
+	editline.3 history_w.3 \
+	editline.3 history_wend.3 \
+	editline.3 history_winit.3 \
+	editline.3 tok_wend.3 \
+	editline.3 tok_winit.3 \
+	editline.3 tok_wline.3 \
+	editline.3 tok_wreset.3 \
+	editline.3 tok_wstr.3
 
-# For speed and debugging
-#SRCS=   ${OSRCS} readline.c tokenizer.c history.c
-# For protection
-SRCS=	editline.c readline.c tokenizer.c history.c	
-SRCS+=	common.h emacs.h fcns.h help.h vi.h
-
-# Widechar
-SRCS+=	tokenizern.c historyn.c
-CLEANFILES+=	tokenizern.c historyn.c
-
 INCS=	histedit.h
 
-CLEANFILES+= common.h editline.c emacs.h fcns.c fcns.h help.c help.h vi.h
-CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR
-#CFLAGS+= -DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
-#CFLAGS+= -DDEBUG_PASTE -DDEBUG_EDIT
+SRCS+=	common.h emacs.h fcns.h func.h help.h vi.h
+CLEANFILES+= common.h emacs.h fcns.h func.h help.h vi.h
 
+CFLAGS+= -I. -I${EDITDIR} -I${EDITDIR}/readline
+
 AHDR=	vi.h emacs.h common.h
-ASRC=	${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
+ASRC=	${EDITDIR}/vi.c ${EDITDIR}/emacs.c ${EDITDIR}/common.c
 
-SUBDIR= edit/readline
+SUBDIR= readline
 
 .for hdr in vi emacs common
 ${hdr}.h: ${hdr}.c makelist
-	sh ${.CURDIR}/makelist -h ${.CURDIR}/${hdr}.c > ${.TARGET}
+	sh ${EDITDIR}/makelist -h ${EDITDIR}/${hdr}.c > ${.TARGET}
 .endfor
 
 fcns.h: ${AHDR} makelist
-	sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
+	sh ${EDITDIR}/makelist -fh ${AHDR} > ${.TARGET}
 
-fcns.c: ${AHDR} fcns.h makelist
-	sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
+func.h: ${AHDR} makelist
+	sh ${EDITDIR}/makelist -fc ${AHDR} > ${.TARGET}
 
-help.c: ${ASRC} makelist
-	sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
-
 help.h: ${ASRC} makelist
-	sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
+	sh ${EDITDIR}/makelist -bh ${ASRC} > ${.TARGET}
 
-editline.c: ${OSRCS}
-	sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET}
-
-tokenizern.c: makelist Makefile
-	sh ${.CURDIR}/makelist -n tokenizer.c > ${.TARGET}
-
-historyn.c: makelist Makefile
-	sh ${.CURDIR}/makelist -n history.c > ${.TARGET}
-
-# minimal dependency to make "make depend" optional
-editline.o editline.po editline.pico editline.ln:	\
-	common.h emacs.h fcns.c fcns.h help.c help.h vi.h
-
-tc1.o: ${.CURDIR}/TEST/tc1.c
+tc1.o: ${EDITDIR}/TEST/tc1.c
 
 test: tc1.o libedit.a ${DPADD} ${LIBTERMCAP}
 	${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD}

Added: head/lib/libedit/readline/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libedit/readline/Makefile	Fri Sep 13 06:50:02 2019	(r352275)
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+.PATH: ${SRCTOP}/contrib/libedit/readline
+INCS=	readline.h history.h tilde.h
+
+INCSDIR= ${INCLUDEDIR}/edit/readline
+
+.include <bsd.lib.mk>

Copied: head/lib/libedit/readline/history.h (from r352274, head/lib/libedit/edit/readline/history.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libedit/readline/history.h	Fri Sep 13 06:50:02 2019	(r352275, copy of r352274, head/lib/libedit/edit/readline/history.h)
@@ -0,0 +1,32 @@
+/*-
+ * Copyright (c) 2011 David E. O'Brien
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the author nor the names of contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <edit/readline/readline.h>

Copied: head/lib/libedit/readline/tilde.h (from r352274, head/lib/libedit/edit/readline/tilde.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libedit/readline/tilde.h	Fri Sep 13 06:50:02 2019	(r352275, copy of r352274, head/lib/libedit/edit/readline/tilde.h)
@@ -0,0 +1,32 @@
+/*-
+ * Copyright (c) 2011 David E. O'Brien
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the author nor the names of contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <edit/readline/readline.h>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909130650.x8D6o2fb037276>