Hello community,

here is the log from the commit of package libedit for openSUSE:Factory checked 
in at 2019-05-03 22:22:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libedit (Old)
 and      /work/SRC/openSUSE:Factory/.libedit.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libedit"

Fri May  3 22:22:20 2019 rev:29 rq:699689 version:3.1.snap20180525

Changes:
--------
--- /work/SRC/openSUSE:Factory/libedit/libedit.changes  2018-08-10 
09:47:31.462052273 +0200
+++ /work/SRC/openSUSE:Factory/.libedit.new.5148/libedit.changes        
2019-05-03 22:22:23.488704322 +0200
@@ -1,0 +2,6 @@
+Tue Apr 30 13:49:12 UTC 2019 - Ismail Dönmez <[email protected]>
+
+- Update to version 20190324-3.1:
+  * Sync with upstream sources
+
+-------------------------------------------------------------------

Old:
----
  libedit-20180525-3.1.tar.gz

New:
----
  libedit-20190324-3.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libedit.spec ++++++
--- /var/tmp/diff_new_pack.vf0gGC/_old  2019-05-03 22:22:24.180705727 +0200
+++ /var/tmp/diff_new_pack.vf0gGC/_new  2019-05-03 22:22:24.184705735 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libedit
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,11 +12,11 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
-%define pkg_version 20180525-3.1
+%define pkg_version 20190324-3.1
 %define soname 0
 %define library_name libedit%{soname}
 Name:           libedit

++++++ libedit-20180525-3.1.tar.gz -> libedit-20190324-3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/ChangeLog 
new/libedit-20190324-3.1/ChangeLog
--- old/libedit-20180525-3.1/ChangeLog  2018-05-25 20:34:40.000000000 +0200
+++ new/libedit-20190324-3.1/ChangeLog  2019-03-24 16:00:01.000000000 +0100
@@ -1,6 +1,18 @@
    * See also NetBSD changelog:
        http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit
 
+2019-03-24 Jess Thrysoee
+
+   * version-info: 0:60:0
+
+   * all: sync with upstream source
+
+2018-12-09 Jess Thrysoee
+
+   * version-info: 0:59:0
+
+   * all: sync with upstream source
+
 2018-05-25 Jess Thrysoee
 
    * version-info: 0:58:0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/configure 
new/libedit-20190324-3.1/configure
--- old/libedit-20180525-3.1/configure  2018-05-25 20:35:43.000000000 +0200
+++ new/libedit-20190324-3.1/configure  2019-03-24 16:00:16.000000000 +0100
@@ -586,7 +586,7 @@
 
 # Identity of this package.
 PACKAGE_NAME='libedit'
-PACKAGE_TARNAME='libedit-20180525'
+PACKAGE_TARNAME='libedit-20190324'
 PACKAGE_VERSION='3.1'
 PACKAGE_STRING='libedit 3.1'
 PACKAGE_BUGREPORT=''
@@ -1374,7 +1374,7 @@
   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
   --docdir=DIR            documentation root
-                          [DATAROOTDIR/doc/libedit-20180525]
+                          [DATAROOTDIR/doc/libedit-20190324]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -4223,7 +4223,7 @@
 
 
 # Define the identity of the package.
- PACKAGE='libedit-20180525'
+ PACKAGE='libedit-20190324'
  VERSION='3.1'
 
 
@@ -12118,7 +12118,7 @@
 
 
 # libtool -version-info
-LT_VERSION=0:58:0
+LT_VERSION=0:60:0
 
 
 # Check whether --enable-silent-rules was given.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/configure.ac 
new/libedit-20190324-3.1/configure.ac
--- old/libedit-20180525-3.1/configure.ac       2018-05-25 20:35:12.000000000 
+0200
+++ new/libedit-20190324-3.1/configure.ac       2019-03-24 16:00:05.000000000 
+0100
@@ -35,7 +35,7 @@
 AC_PROG_LIBTOOL
 
 # libtool -version-info
-AC_SUBST(LT_VERSION, [0:58:0])
+AC_SUBST(LT_VERSION, [0:60:0])
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/doc/editline.3.roff 
new/libedit-20190324-3.1/doc/editline.3.roff
--- old/libedit-20180525-3.1/doc/editline.3.roff        2018-05-25 
20:09:38.000000000 +0200
+++ new/libedit-20190324-3.1/doc/editline.3.roff        2018-12-09 
10:39:30.000000000 +0100
@@ -1,4 +1,4 @@
-.\"    $NetBSD: editline.3,v 1.98 2017/09/02 06:48:10 wiz Exp $
+.\"    $NetBSD: editline.3,v 1.99 2018/11/18 17:09:39 christos Exp $
 .\"
 .\" Copyright (c) 1997-2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -26,7 +26,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd September 1, 2017
+.Dd November 9, 2018
 .Dt EDITLINE 3
 .Os
 .Sh NAME
@@ -181,8 +181,6 @@
 locale set by the application program and never uses
 .Xr setlocale 3
 to change the locale.
-The only locales supported are UTF-8 and the default C or POSIX locale.
-If any other locale is set, behaviour is undefined.
 .Sh LINE EDITING FUNCTIONS
 The line editing functions use a common data structure,
 .Fa EditLine ,
Binary files old/libedit-20180525-3.1/examples/._fileman.c and 
new/libedit-20190324-3.1/examples/._fileman.c differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/examples/fileman.c 
new/libedit-20190324-3.1/examples/fileman.c
--- old/libedit-20180525-3.1/examples/fileman.c 2018-05-25 19:50:45.000000000 
+0200
+++ new/libedit-20190324-3.1/examples/fileman.c 2018-12-09 10:54:24.000000000 
+0100
@@ -251,7 +251,7 @@
       directory. */
    if (start == 0)
       /* TODO */
-      matches = completion_matches (text, command_generator);
+      matches = completion_matches ((char*)text, command_generator);
       /* matches = rl_completion_matches (text, command_generator); */
 
    return (matches);
Binary files old/libedit-20180525-3.1/src/._chartype.c and 
new/libedit-20190324-3.1/src/._chartype.c differ
Binary files old/libedit-20180525-3.1/src/._makelist and 
new/libedit-20190324-3.1/src/._makelist differ
Binary files old/libedit-20180525-3.1/src/._parse.c and 
new/libedit-20190324-3.1/src/._parse.c differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/chartype.c 
new/libedit-20190324-3.1/src/chartype.c
--- old/libedit-20180525-3.1/src/chartype.c     2018-05-25 19:50:45.000000000 
+0200
+++ new/libedit-20190324-3.1/src/chartype.c     2018-12-09 10:39:30.000000000 
+0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: chartype.c,v 1.31 2017/01/09 02:54:18 christos Exp $   */
+/*     $NetBSD: chartype.c,v 1.34 2018/11/25 16:20:28 christos Exp $   */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,10 +31,11 @@
  */
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: chartype.c,v 1.31 2017/01/09 02:54:18 christos Exp $");
+__RCSID("$NetBSD: chartype.c,v 1.34 2018/11/25 16:20:28 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <ctype.h>
+#include <limits.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -183,17 +184,14 @@
 libedit_private size_t
 ct_enc_width(wchar_t c)
 {
-       /* UTF-8 encoding specific values */
-       if (c < 0x80)
-               return 1;
-       else if (c < 0x0800)
-               return 2;
-       else if (c < 0x10000)
-               return 3;
-       else if (c < 0x110000)
-               return 4;
-       else
-               return 0; /* not a valid codepoint */
+       mbstate_t mbs;
+       char buf[MB_LEN_MAX];
+       size_t size;
+       memset(&mbs, 0, sizeof(mbs));
+
+       if ((size = wcrtomb(buf, c, &mbs)) == (size_t)-1)
+               return 0;
+       return size;
 }
 
 libedit_private ssize_t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/editline/readline.h 
new/libedit-20190324-3.1/src/editline/readline.h
--- old/libedit-20180525-3.1/src/editline/readline.h    2018-05-25 
20:09:38.000000000 +0200
+++ new/libedit-20190324-3.1/src/editline/readline.h    2019-03-24 
15:58:46.000000000 +0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.h,v 1.42 2017/09/01 10:19:10 christos Exp $   */
+/*     $NetBSD: readline.h,v 1.45 2019/02/15 23:20:35 christos Exp $   */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -38,11 +38,13 @@
 
 /* typedefs */
 typedef int      Function(const char *, int);
+typedef char     *CPFunction(const char *, int);
 typedef void     VFunction(void);
 typedef void     rl_vcpfunc_t(char *);
 typedef char   **rl_completion_func_t(const char *, int, int);
 typedef char     *rl_compentry_func_t(const char *, int);
 typedef int      rl_command_func_t(int, int);
+typedef int      rl_hook_func_t(void);
 
 /* only supports length */
 typedef struct {
@@ -97,14 +99,14 @@
 #endif
 extern const char      *rl_library_version;
 extern int             rl_readline_version;
-extern char            *rl_readline_name;
+extern const char      *rl_readline_name;
 extern FILE            *rl_instream;
 extern FILE            *rl_outstream;
 extern char            *rl_line_buffer;
 extern int              rl_point, rl_end;
 extern int              history_base, history_length;
 extern int              max_input_history;
-extern char            *rl_basic_word_break_characters;
+extern const char      *rl_basic_word_break_characters;
 extern char            *rl_completer_word_break_characters;
 extern char            *rl_completer_quote_characters;
 extern rl_compentry_func_t *rl_completion_entry_function;
@@ -113,7 +115,7 @@
 extern int              rl_attempted_completion_over;
 extern int             rl_completion_type;
 extern int             rl_completion_query_items;
-extern char            *rl_special_prefixes;
+extern const char      *rl_special_prefixes;
 extern int             rl_completion_append_character;
 extern int             rl_inhibit_completion;
 extern Function                *rl_pre_input_hook;
@@ -137,6 +139,7 @@
 extern VFunction       *rl_completion_display_matches_hook;
 extern VFunction       *rl_prep_term_function;
 extern VFunction       *rl_deprep_term_function;
+extern rl_hook_func_t  *rl_event_hook;
 extern int             readline_echoing_p;
 extern int             _rl_print_completions_horizontally;
 
@@ -177,12 +180,12 @@
 char           *username_completion_function(const char *, int);
 int             rl_complete(int, int);
 int             rl_read_key(void);
-char          **completion_matches(const char *, rl_compentry_func_t *);
+char          **completion_matches(/* const */ char *, rl_compentry_func_t *);
 void            rl_display_match_list(char **, int, int);
 
 int             rl_insert(int, int);
 int             rl_insert_text(const char *);
-void            rl_reset_terminal(const char *);
+int             rl_reset_terminal(const char *);
 void            rl_resize_terminal(void);
 int             rl_bind_key(int, rl_command_func_t *);
 int             rl_newline(int, int);
@@ -196,7 +199,7 @@
 int             rl_read_init_file(const char *);
 int             rl_parse_and_bind(const char *);
 int             rl_variable_bind(const char *, const char *);
-void            rl_stuff_char(int);
+int             rl_stuff_char(int);
 int             rl_add_defun(const char *, rl_command_func_t *, int);
 HISTORY_STATE  *history_get_history_state(void);
 void            rl_get_screen_size(int *, int *);
@@ -208,6 +211,8 @@
 void            rl_forced_update_display(void);
 int             rl_set_prompt(const char *);
 int             rl_on_new_line(void);
+void            rl_reset_after_signal(void);
+void            rl_echo_signal_char(int);
 
 /*
  * The following are not implemented
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/el.c 
new/libedit-20190324-3.1/src/el.c
--- old/libedit-20180525-3.1/src/el.c   2018-05-25 20:12:12.000000000 +0200
+++ new/libedit-20190324-3.1/src/el.c   2018-12-09 10:39:30.000000000 +0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: el.c,v 1.96 2018/01/01 22:32:46 christos Exp $ */
+/*     $NetBSD: el.c,v 1.97 2018/11/18 17:09:39 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)el.c       8.2 (Berkeley) 1/3/94";
 #else
-__RCSID("$NetBSD: el.c,v 1.96 2018/01/01 22:32:46 christos Exp $");
+__RCSID("$NetBSD: el.c,v 1.97 2018/11/18 17:09:39 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -123,10 +123,6 @@
          * Initialize all the modules. Order is important!!!
          */
        el->el_flags = flags;
-       if (setlocale(LC_CTYPE, NULL) != NULL){
-               if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0)
-                       el->el_flags |= CHARSET_IS_UTF8;
-       }
 
        if (terminal_init(el) == -1) {
                el_free(el->el_prog);
@@ -328,7 +324,7 @@
                void *ptr = va_arg(ap, void *);
 
                rv = hist_set(el, func, ptr);
-               if (!(el->el_flags & CHARSET_IS_UTF8))
+               if (MB_CUR_MAX == 1)
                        el->el_flags &= ~NARROW_HISTORY;
                break;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/el.h 
new/libedit-20190324-3.1/src/el.h
--- old/libedit-20180525-3.1/src/el.h   2018-05-25 20:09:38.000000000 +0200
+++ new/libedit-20190324-3.1/src/el.h   2018-12-09 10:39:30.000000000 +0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: el.h,v 1.43 2017/09/05 18:07:59 christos Exp $ */
+/*     $NetBSD: el.h,v 1.44 2018/11/18 17:09:39 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -55,7 +55,6 @@
 #define        NO_TTY          0x02
 #define        EDIT_DISABLED   0x04
 #define        UNBUFFERED      0x08
-#define        CHARSET_IS_UTF8 0x10
 #define        NARROW_HISTORY  0x40
 #define        NO_RESET        0x80
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/history.c 
new/libedit-20190324-3.1/src/history.c
--- old/libedit-20180525-3.1/src/history.c      2018-05-25 20:09:38.000000000 
+0200
+++ new/libedit-20190324-3.1/src/history.c      2018-12-09 10:39:30.000000000 
+0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: history.c,v 1.59 2017/12/23 18:25:03 uwe Exp $ */
+/*     $NetBSD: history.c,v 1.62 2018/09/13 09:03:40 kre Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)history.c  8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: history.c,v 1.59 2017/12/23 18:25:03 uwe Exp $");
+__RCSID("$NetBSD: history.c,v 1.62 2018/09/13 09:03:40 kre Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -778,6 +778,7 @@
        char *ptr;
        int i = -1;
        TYPE(HistEvent) ev;
+       Char *decode_result;
 #ifndef NARROWCHAR
        static ct_buffer_t conv;
 #endif
@@ -810,7 +811,10 @@
                        ptr = nptr;
                }
                (void) strunvis(ptr, line);
-               if (HENTER(h, &ev, ct_decode_string(ptr, &conv)) == -1) {
+               decode_result = ct_decode_string(ptr, &conv);
+               if (decode_result == NULL)
+                       continue;
+               if (HENTER(h, &ev, decode_result) == -1) {
                        i = -1;
                        goto oomem;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/makelist 
new/libedit-20190324-3.1/src/makelist
--- old/libedit-20180525-3.1/src/makelist       2018-05-25 19:50:45.000000000 
+0200
+++ new/libedit-20190324-3.1/src/makelist       2018-12-20 19:40:37.000000000 
+0100
@@ -124,7 +124,7 @@
 #
 -fh)
     cat $FILES | $AWK '/el_action_t/ { print $3 }' | \
-    sort | tr '[a-z]' '[A-Z]' | $AWK '
+    sort | tr '[:lower:]' '[:upper:]' | $AWK '
        BEGIN {
            printf("/* Automatically generated file, do not edit */\n");
            count = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/parse.c 
new/libedit-20190324-3.1/src/parse.c
--- old/libedit-20180525-3.1/src/parse.c        2018-05-25 19:50:45.000000000 
+0200
+++ new/libedit-20190324-3.1/src/parse.c        2018-12-09 10:39:30.000000000 
+0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.40 2016/05/09 21:46:56 christos Exp $      */
+/*     $NetBSD: parse.c,v 1.41 2018/11/29 03:10:20 christos Exp $      */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parse.c    8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: parse.c,v 1.40 2016/05/09 21:46:56 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.41 2018/11/29 03:10:20 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -111,7 +111,7 @@
 
                if (ptr == argv[0])
                        return 0;
-               l = (size_t)(ptr - argv[0] - 1);
+               l = (size_t)(ptr - argv[0]);
                tprog = el_malloc((l + 1) * sizeof(*tprog));
                if (tprog == NULL)
                        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/read.c 
new/libedit-20190324-3.1/src/read.c
--- old/libedit-20180525-3.1/src/read.c 2018-05-25 20:09:38.000000000 +0200
+++ new/libedit-20190324-3.1/src/read.c 2018-12-09 10:39:30.000000000 +0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: read.c,v 1.103 2017/06/27 23:24:19 christos Exp $      */
+/*     $NetBSD: read.c,v 1.105 2018/11/25 16:21:04 christos Exp $      */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)read.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: read.c,v 1.103 2017/06/27 23:24:19 christos Exp $");
+__RCSID("$NetBSD: read.c,v 1.105 2018/11/25 16:21:04 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -335,13 +335,7 @@
                                goto again;
                        }
                case (size_t)-2:
-                       /*
-                        * We don't support other multibyte charsets.
-                        * The second condition shouldn't happen
-                        * and is here merely for additional safety.
-                        */
-                       if ((el->el_flags & CHARSET_IS_UTF8) == 0 ||
-                           cbp >= MB_LEN_MAX) {
+                       if (cbp >= MB_LEN_MAX) {
                                errno = EILSEQ;
                                *cp = L'\0';
                                return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/readline.c 
new/libedit-20190324-3.1/src/readline.c
--- old/libedit-20180525-3.1/src/readline.c     2018-05-25 20:09:38.000000000 
+0200
+++ new/libedit-20190324-3.1/src/readline.c     2019-03-24 15:58:46.000000000 
+0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.c,v 1.146 2018/01/01 22:32:46 christos Exp $  */
+/*     $NetBSD: readline.c,v 1.151 2019/02/15 23:20:35 christos Exp $  */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.146 2018/01/01 22:32:46 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.151 2019/02/15 23:20:35 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -76,7 +76,7 @@
 static char expand_chars[] = { ' ', '\t', '\n', '=', '(', '\0' };
 static char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@', '$',
     '>', '<', '=', ';', '|', '&', '{', '(', '\0' };
-char *rl_readline_name = empty;
+const char *rl_readline_name = empty;
 FILE *rl_instream = NULL;
 FILE *rl_outstream = NULL;
 int rl_point = 0;
@@ -84,7 +84,7 @@
 char *rl_line_buffer = NULL;
 rl_vcpfunc_t *rl_linefunc = NULL;
 int rl_done = 0;
-VFunction *rl_event_hook = NULL;
+rl_hook_func_t *rl_event_hook = NULL;
 KEYMAP_ENTRY_ARRAY emacs_standard_keymap,
     emacs_meta_keymap,
     emacs_ctlx_keymap;
@@ -109,7 +109,7 @@
 
 int rl_inhibit_completion = 0;
 int rl_attempted_completion_over = 0;
-char *rl_basic_word_break_characters = break_chars;
+const char *rl_basic_word_break_characters = break_chars;
 char *rl_completer_word_break_characters = NULL;
 char *rl_completer_quote_characters = NULL;
 rl_compentry_func_t *rl_completion_entry_function = NULL;
@@ -154,7 +154,7 @@
  * in the parsed text when it is passed to the completion function.
  * Shell uses this to help determine what kind of completing to do.
  */
-char *rl_special_prefixes = NULL;
+const char *rl_special_prefixes = NULL;
 
 /*
  * This is the character appended to the completed words if at the end of
@@ -323,7 +323,7 @@
                el_end(e);
                return -1;
        }
-       el_set(e, EL_PROMPT, _get_prompt, RL_PROMPT_START_IGNORE);
+       el_set(e, EL_PROMPT_ESC, _get_prompt, RL_PROMPT_START_IGNORE);
        el_set(e, EL_SIGNAL, rl_catch_signals);
 
        /* set default mode to "emacs"-style and read setting afterwards */
@@ -433,7 +433,7 @@
        if (rl_pre_input_hook)
                (*rl_pre_input_hook)(NULL, 0);
 
-       if (rl_event_hook && !(e->el_flags&NO_TTY)) {
+       if (rl_event_hook && !(e->el_flags & NO_TTY)) {
                el_set(e, EL_GETCFN, _rl_event_read_char);
                used_event_hook = 1;
        }
@@ -1594,7 +1594,7 @@
                return NULL;
 
        if ((nlp = el_realloc(_history_listp,
-           (size_t)history_length * sizeof(*nlp))) == NULL)
+           ((size_t)history_length + 1) * sizeof(*nlp))) == NULL)
                return NULL;
        _history_listp = nlp;
 
@@ -1611,6 +1611,7 @@
                if (i++ == history_length)
                        abort();
        } while (history(h, &ev, H_PREV) == 0);
+       _history_listp[i] = NULL;
        return _history_listp;
 }
 
@@ -1880,7 +1881,7 @@
 rl_complete(int ignore __attribute__((__unused__)), int invoking_key)
 {
        static ct_buffer_t wbreak_conv, sprefix_conv;
-       char *breakchars;
+       const char *breakchars;
 
        if (h == NULL || e == NULL)
                rl_initialize();
@@ -1966,13 +1967,14 @@
  * reset the terminal
  */
 /* ARGSUSED */
-void
+int
 rl_reset_terminal(const char *p __attribute__((__unused__)))
 {
 
        if (h == NULL || e == NULL)
                rl_initialize();
        el_reset(e);
+       return 0;
 }
 
 
@@ -2070,15 +2072,12 @@
        if (done && rl_linefunc != NULL) {
                el_set(e, EL_UNBUFFERED, 0);
                if (done == 2) {
-                   if ((wbuf = strdup(buf)) != NULL)
-                       wbuf[count] = '\0';
+                       if ((wbuf = strdup(buf)) != NULL)
+                               wbuf[count] = '\0';
                } else
                        wbuf = NULL;
                (*(void (*)(const char *))rl_linefunc)(wbuf);
-               if (!rl_already_prompted) {
-                   el_set(e, EL_UNBUFFERED, 1);
-                   rl_already_prompted = 1;
-               }
+               el_set(e, EL_UNBUFFERED, 1);
        }
 }
 
@@ -2164,7 +2163,7 @@
        return el_set(e, EL_BIND, "", var, value, NULL) == -1 ? 1 : 0;
 }
 
-void
+int
 rl_stuff_char(int c)
 {
        char buf[2];
@@ -2172,6 +2171,7 @@
        buf[0] = (char)c;
        buf[1] = '\0';
        el_insertstr(e, buf);
+       return 1;
 }
 
 static int
@@ -2414,3 +2414,19 @@
 {
        el_resize(e);
 }
+
+void
+rl_reset_after_signal(void)
+{
+       if (rl_prep_term_function)
+               (*rl_prep_term_function)();
+}
+
+void
+rl_echo_signal_char(int sig)
+{
+       int c = tty_get_signal_character(e, sig);
+       if (c == -1)
+               return;
+       re_putc(e, c, 0);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/refresh.c 
new/libedit-20190324-3.1/src/refresh.c
--- old/libedit-20180525-3.1/src/refresh.c      2018-05-25 20:09:38.000000000 
+0200
+++ new/libedit-20190324-3.1/src/refresh.c      2019-03-24 15:58:46.000000000 
+0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: refresh.c,v 1.54 2017/06/30 20:26:52 kre Exp $ */
+/*     $NetBSD: refresh.c,v 1.56 2019/01/04 03:03:44 uwe Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)refresh.c  8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: refresh.c,v 1.54 2017/06/30 20:26:52 kre Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.56 2019/01/04 03:03:44 uwe Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -1090,7 +1090,10 @@
 static void
 re_fastputc(EditLine *el, wint_t c)
 {
-       int w = wcwidth(c);
+       wchar_t *lastline;
+       int w;
+
+       w = wcwidth(c);
        while (w > 1 && el->el_cursor.h + w > el->el_terminal.t_size.h)
            re_fastputc(el, ' ');
 
@@ -1112,17 +1115,18 @@
                 */
                if (el->el_cursor.v + 1 >= el->el_terminal.t_size.v) {
                        int i, lins = el->el_terminal.t_size.v;
-                       wchar_t *firstline = el->el_display[0];
 
+                       lastline = el->el_display[0];
                        for(i = 1; i < lins; i++)
                                el->el_display[i - 1] = el->el_display[i];
 
-                       re__copy_and_pad(firstline, L"", (size_t)0);
-                       el->el_display[i - 1] = firstline;
+                       el->el_display[i - 1] = lastline;
                } else {
                        el->el_cursor.v++;
-                       el->el_refresh.r_oldcv++;
+                       lastline = el->el_display[++el->el_refresh.r_oldcv];
                }
+               re__copy_and_pad(lastline, L"", 
(size_t)el->el_terminal.t_size.h);
+
                if (EL_HAS_AUTO_MARGINS) {
                        if (EL_HAS_MAGIC_MARGINS) {
                                terminal__putc(el, ' ');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/terminal.c 
new/libedit-20190324-3.1/src/terminal.c
--- old/libedit-20180525-3.1/src/terminal.c     2018-05-25 20:09:38.000000000 
+0200
+++ new/libedit-20190324-3.1/src/terminal.c     2019-03-24 15:58:46.000000000 
+0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: terminal.c,v 1.33 2017/06/27 23:23:09 christos Exp $   */
+/*     $NetBSD: terminal.c,v 1.35 2019/02/15 23:20:35 christos Exp $   */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)term.c     8.2 (Berkeley) 4/30/95";
 #else
-__RCSID("$NetBSD: terminal.c,v 1.33 2017/06/27 23:23:09 christos Exp $");
+__RCSID("$NetBSD: terminal.c,v 1.35 2019/02/15 23:20:35 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -419,7 +419,7 @@
        return 0;
 }
 
-static wchar_t **
+static wint_t **
 terminal_alloc_buffer(EditLine *el)
 {
        wint_t **b;
@@ -509,36 +509,14 @@
                return;
        }
        if ((del = where - el->el_cursor.v) > 0) {
-               while (del > 0) {
-                       if (EL_HAS_AUTO_MARGINS &&
-                           el->el_display[el->el_cursor.v][0] != '\0') {
-                                size_t h = (size_t)
-                                   (el->el_terminal.t_size.h - 1);
-                                for (; h > 0 &&
-                                         el->el_display[el->el_cursor.v][h] ==
-                                                 MB_FILL_CHAR;
-                                         h--)
-                                                continue;
-                               /* move without newline */
-                               terminal_move_to_char(el, (int)h);
-                               terminal_overwrite(el, &el->el_display
-                                   [el->el_cursor.v][el->el_cursor.h],
-                                   (size_t)(el->el_terminal.t_size.h -
-                                   el->el_cursor.h));
-                               /* updates Cursor */
-                               del--;
-                       } else {
-                               if ((del > 1) && GoodStr(T_DO)) {
-                                       terminal_tputs(el, tgoto(Str(T_DO), del,
-                                           del), del);
-                                       del = 0;
-                               } else {
-                                       for (; del > 0; del--)
-                                               terminal__putc(el, '\n');
-                                       /* because the \n will become \r\n */
-                                       el->el_cursor.h = 0;
-                               }
-                       }
+               if ((del > 1) && GoodStr(T_DO)) {
+                       terminal_tputs(el, tgoto(Str(T_DO), del, del), del);
+                       del = 0;
+               } else {
+                       for (; del > 0; del--)
+                               terminal__putc(el, '\n');
+                       /* because the \n will become \r\n */
+                       el->el_cursor.h = 0;
                }
        } else {                /* del < 0 */
                if (GoodStr(T_UP) && (-del > 1 || !GoodStr(T_up)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/tty.c 
new/libedit-20190324-3.1/src/tty.c
--- old/libedit-20180525-3.1/src/tty.c  2018-05-25 20:09:38.000000000 +0200
+++ new/libedit-20190324-3.1/src/tty.c  2018-12-09 10:39:30.000000000 +0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty.c,v 1.67 2018/01/01 22:32:46 christos Exp $        */
+/*     $NetBSD: tty.c,v 1.68 2018/12/02 16:58:13 christos Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)tty.c      8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: tty.c,v 1.67 2018/01/01 22:32:46 christos Exp $");
+__RCSID("$NetBSD: tty.c,v 1.68 2018/12/02 16:58:13 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -1341,3 +1341,33 @@
                *f = tty_update_flag(el, *f, mode, kind);
        }
 }
+
+libedit_private int
+tty_get_signal_character(EditLine *el, int sig)
+{
+#ifdef ECHOCTL
+       tcflag_t *ed = tty__get_flag(&el->el_tty.t_ed, MD_INP);
+       if ((*ed & ECHOCTL) == 0)
+               return -1;
+#endif
+       switch (sig) {
+#ifdef SIGINT
+       case SIGINT:
+               return el->el_tty.t_c[ED_IO][VINTR];
+#endif
+#ifdef SIGQUIT
+       case SIGQUIT:
+               return el->el_tty.t_c[ED_IO][VQUIT];
+#endif
+#ifdef SIGINFO
+       case SIGINFO:
+               return el->el_tty.t_c[ED_IO][VSTATUS];
+#endif
+#ifdef SIGTSTP
+       case SIGTSTP:
+               return el->el_tty.t_c[ED_IO][VSUSP];
+#endif
+       default:
+               return -1;
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libedit-20180525-3.1/src/tty.h 
new/libedit-20190324-3.1/src/tty.h
--- old/libedit-20180525-3.1/src/tty.h  2018-05-25 20:09:38.000000000 +0200
+++ new/libedit-20190324-3.1/src/tty.h  2018-12-09 10:39:30.000000000 +0100
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty.h,v 1.22 2018/01/01 22:32:46 christos Exp $        */
+/*     $NetBSD: tty.h,v 1.23 2018/12/02 16:58:13 christos Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -464,6 +464,7 @@
 libedit_private int    tty_quotemode(EditLine *);
 libedit_private int    tty_noquotemode(EditLine *);
 libedit_private void   tty_bind_char(EditLine *, int);
+libedit_private int    tty_get_signal_character(EditLine *, int);
 
 typedef struct {
     ttyperm_t t_t;


Reply via email to