Module Name: src Committed By: christos Date: Thu Apr 15 00:57:33 UTC 2010
Modified Files: src/lib/libedit: chared.h makelist readline.c search.c Log Message: >From Jess Thrysoee - Fix wint_t to Int confusion To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libedit/chared.h cvs rdiff -u -r1.14 -r1.15 src/lib/libedit/makelist cvs rdiff -u -r1.88 -r1.89 src/lib/libedit/readline.c cvs rdiff -u -r1.23 -r1.24 src/lib/libedit/search.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/chared.h diff -u src/lib/libedit/chared.h:1.19 src/lib/libedit/chared.h:1.20 --- src/lib/libedit/chared.h:1.19 Wed Dec 30 17:37:40 2009 +++ src/lib/libedit/chared.h Wed Apr 14 20:57:33 2010 @@ -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 *); Index: src/lib/libedit/makelist diff -u src/lib/libedit/makelist:1.14 src/lib/libedit/makelist:1.15 --- src/lib/libedit/makelist:1.14 Wed Dec 30 18:54:52 2009 +++ src/lib/libedit/makelist Wed Apr 14 20:57:33 2010 @@ -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"); }' Index: src/lib/libedit/readline.c diff -u src/lib/libedit/readline.c:1.88 src/lib/libedit/readline.c:1.89 --- src/lib/libedit/readline.c:1.88 Sun Jan 3 13:27:10 2010 +++ src/lib/libedit/readline.c Wed Apr 14 20:57:33 2010 @@ -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; Index: src/lib/libedit/search.c diff -u src/lib/libedit/search.c:1.23 src/lib/libedit/search.c:1.24 --- src/lib/libedit/search.c:1.23 Wed Dec 30 18:54:52 2009 +++ src/lib/libedit/search.c Wed Apr 14 20:57:33 2010 @@ -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;