Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit From Jess Thrysoee



details:   https://anonhg.NetBSD.org/src/rev/0137c49bd267
branches:  trunk
changeset: 753981:0137c49bd267
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Apr 15 00:57:33 2010 +0000

description:
>From Jess Thrysoee
    - Fix wint_t to Int confusion

diffstat:

 lib/libedit/chared.h   |  18 +++++++++---------
 lib/libedit/makelist   |   6 +++---
 lib/libedit/readline.c |   9 ++++++---
 lib/libedit/search.c   |   8 ++++----
 4 files changed, 22 insertions(+), 19 deletions(-)

diffs (133 lines):

diff -r 05b20015c62d -r 0137c49bd267 lib/libedit/chared.h
--- a/lib/libedit/chared.h      Thu Apr 15 00:56:40 2010 +0000
+++ b/lib/libedit/chared.h      Thu Apr 15 00:57:33 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chared.h,v 1.19 2009/12/30 22:37:40 christos Exp $     */
+/*     $NetBSD: chared.h,v 1.20 2010/04/15 00:57:33 christos Exp $     */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -139,17 +139,17 @@
 #include "fcns.h"
 
 
-protected int   cv__isword(wint_t);
-protected int   cv__isWord(wint_t);
+protected int   cv__isword(Int);
+protected int   cv__isWord(Int);
 protected void  cv_delfini(EditLine *);
-protected Char *cv__endword(Char *, Char *, int, int (*)(wint_t));
-protected int   ce__isword(wint_t);
+protected Char *cv__endword(Char *, Char *, int, int (*)(Int));
+protected int   ce__isword(Int);
 protected void  cv_undo(EditLine *);
 protected void  cv_yank(EditLine *, const Char *, int);
-protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(wint_t));
-protected Char *cv_prev_word(Char *, Char *, int, int (*)(wint_t));
-protected Char *c__next_word(Char *, Char *, int, int (*)(wint_t));
-protected Char *c__prev_word(Char *, Char *, int, int (*)(wint_t));
+protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int));
+protected Char *cv_prev_word(Char *, Char *, int, int (*)(Int));
+protected Char *c__next_word(Char *, Char *, int, int (*)(Int));
+protected Char *c__prev_word(Char *, Char *, int, int (*)(Int));
 protected void  c_insert(EditLine *, int);
 protected void  c_delbefore(EditLine *, int);
 protected void  c_delbefore1(EditLine *);
diff -r 05b20015c62d -r 0137c49bd267 lib/libedit/makelist
--- a/lib/libedit/makelist      Thu Apr 15 00:56:40 2010 +0000
+++ b/lib/libedit/makelist      Thu Apr 15 00:57:33 2010 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#      $NetBSD: makelist,v 1.14 2009/12/30 23:54:52 christos Exp $
+#      $NetBSD: makelist,v 1.15 2010/04/15 00:57:33 christos Exp $
 #
 # Copyright (c) 1992, 1993
 #      The Regents of the University of California.  All rights reserved.
@@ -77,7 +77,7 @@
 # XXX: need a space between name and prototype so that -fc and -fh
 #      parsing is much easier
 #
-               printf("protected el_action_t\t%s (EditLine *, wint_t);\n", name);
+               printf("protected el_action_t\t%s (EditLine *, Int);\n", name);
            }
        }
        END {
@@ -161,7 +161,7 @@
        END {
            printf("#define\t%-30.30s\t%3d\n", "EL_NUM_FCNS", count);
 
-           printf("typedef el_action_t (*el_func_t)(EditLine *, wint_t);");
+           printf("typedef el_action_t (*el_func_t)(EditLine *, Int);");
            printf("\nprotected const el_func_t* func__get(void);\n");
            printf("#endif /* _h_fcns_c */\n");
        }'
diff -r 05b20015c62d -r 0137c49bd267 lib/libedit/readline.c
--- a/lib/libedit/readline.c    Thu Apr 15 00:56:40 2010 +0000
+++ b/lib/libedit/readline.c    Thu Apr 15 00:57:33 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.c,v 1.88 2010/01/03 18:27:10 christos Exp $   */
+/*     $NetBSD: readline.c,v 1.89 2010/04/15 00:57:33 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.88 2010/01/03 18:27:10 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.89 2010/04/15 00:57:33 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -1364,11 +1364,14 @@
 add_history(const char *line)
 {
        TYPE(HistEvent) ev;
+       const Char *wline;
 
        if (h == NULL || e == NULL)
                rl_initialize();
 
-       (void)FUNW(history)(h, &ev, H_ENTER, line);
+       wline = ct_decode_string(line, &conv);
+
+       (void)FUNW(history)(h, &ev, H_ENTER, wline);
        if (FUNW(history)(h, &ev, H_GETSIZE) == 0)
                history_length = ev.num;
 
diff -r 05b20015c62d -r 0137c49bd267 lib/libedit/search.c
--- a/lib/libedit/search.c      Thu Apr 15 00:56:40 2010 +0000
+++ b/lib/libedit/search.c      Thu Apr 15 00:57:33 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: search.c,v 1.23 2009/12/30 23:54:52 christos Exp $     */
+/*     $NetBSD: search.c,v 1.24 2010/04/15 00:57:33 christos Exp $     */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)search.c   8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: search.c,v 1.23 2009/12/30 23:54:52 christos Exp $");
+__RCSID("$NetBSD: search.c,v 1.24 2010/04/15 00:57:33 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -564,7 +564,7 @@
  *     Vi repeat search
  */
 protected el_action_t
-cv_repeat_srch(EditLine *el, wint_t c)
+cv_repeat_srch(EditLine *el, Int c)
 {
 
 #ifdef SDEBUG
@@ -590,7 +590,7 @@
  *     Vi character search
  */
 protected el_action_t
-cv_csearch(EditLine *el, int direction, wint_t ch, int count, int tflag)
+cv_csearch(EditLine *el, int direction, Int ch, int count, int tflag)
 {
        Char *cp;
 



Home | Main Index | Thread Index | Old Index