Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Add missing EL_REFRESH
details: https://anonhg.NetBSD.org/src/rev/64c38e9cee90
branches: trunk
changeset: 327063:64c38e9cee90
user: christos <christos%NetBSD.org@localhost>
date: Wed Feb 26 13:50:29 2014 +0000
description:
Add missing EL_REFRESH
diffstat:
lib/libedit/eln.c | 29 +++++++++++++++++++++--------
1 files changed, 21 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r ada5e1841ee6 -r 64c38e9cee90 lib/libedit/eln.c
--- a/lib/libedit/eln.c Wed Feb 26 11:00:40 2014 +0000
+++ b/lib/libedit/eln.c Wed Feb 26 13:50:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: eln.c,v 1.14 2012/03/11 21:15:25 christos Exp $ */
+/* $NetBSD: eln.c,v 1.15 2014/02/26 13:50:29 christos Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: eln.c,v 1.14 2012/03/11 21:15:25 christos Exp $");
+__RCSID("$NetBSD: eln.c,v 1.15 2014/02/26 13:50:29 christos Exp $");
#endif /* not lint && not SCCSID */
#include "histedit.h"
@@ -125,6 +125,15 @@
break;
}
+ case EL_PROMPT_ESC:
+ case EL_RPROMPT_ESC: {
+ el_pfunc_t p = va_arg(ap, el_pfunc_t);
+ int c = va_arg(ap, int);
+
+ ret = prompt_set(el, p, c, op, 0);
+ break;
+ }
+
case EL_TERMINAL: /* const char * */
ret = el_wset(el, op, va_arg(ap, char *));
break;
@@ -220,27 +229,31 @@
el->el_flags |= NARROW_HISTORY;
break;
}
+
/* XXX: do we need to change el_rfunc_t? */
case EL_GETCFN: /* el_rfunc_t */
ret = el_wset(el, op, va_arg(ap, el_rfunc_t));
el->el_flags |= NARROW_READ;
break;
+
case EL_CLIENTDATA: /* void * */
ret = el_wset(el, op, va_arg(ap, void *));
break;
+
case EL_SETFP: { /* int, FILE * */
int what = va_arg(ap, int);
FILE *fp = va_arg(ap, FILE *);
ret = el_wset(el, op, what, fp);
break;
}
- case EL_PROMPT_ESC: /* el_pfunc_t, char */
- case EL_RPROMPT_ESC: {
- el_pfunc_t p = va_arg(ap, el_pfunc_t);
- char c = (char)va_arg(ap, int);
- ret = prompt_set(el, p, c, op, 0);
+
+ case EL_REFRESH:
+ re_clear_display(el);
+ re_refresh(el);
+ terminal__flush(el);
+ ret = 0;
break;
- }
+
default:
ret = -1;
break;
Home |
Main Index |
Thread Index |
Old Index