Merge branch 'mysql-5.1' into mysql-5.5
This commit is contained in:
commit
dbe6832c2e
@ -1,7 +1,7 @@
|
|||||||
/* $NetBSD: terminal.h,v 1.3 2011/07/29 23:44:45 christos Exp $ */
|
/* $NetBSD: terminal.h,v 1.3 2011/07/29 23:44:45 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 2015
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is derived from software contributed to Berkeley by
|
* This code is derived from software contributed to Berkeley by
|
||||||
@ -103,7 +103,7 @@ protected int terminal_settc(EditLine *, int, const Char **);
|
|||||||
protected int terminal_gettc(EditLine *, int, char **);
|
protected int terminal_gettc(EditLine *, int, char **);
|
||||||
protected int terminal_telltc(EditLine *, int, const Char **);
|
protected int terminal_telltc(EditLine *, int, const Char **);
|
||||||
protected int terminal_echotc(EditLine *, int, const Char **);
|
protected int terminal_echotc(EditLine *, int, const Char **);
|
||||||
protected void terminal_writec(EditLine *, Int);
|
protected int terminal_writec(EditLine *, Int);
|
||||||
protected int terminal__putc(EditLine *, Int);
|
protected int terminal__putc(EditLine *, Int);
|
||||||
protected void terminal__flush(EditLine *);
|
protected void terminal__flush(EditLine *);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* $NetBSD: emacs.c,v 1.25 2011/07/29 15:16:33 christos Exp $ */
|
/* $NetBSD: emacs.c,v 1.25 2011/07/29 15:16:33 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 2015
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is derived from software contributed to Berkeley by
|
* This code is derived from software contributed to Berkeley by
|
||||||
@ -58,8 +58,10 @@ em_delete_or_list(EditLine *el, Int c)
|
|||||||
/* if I'm at the end */
|
/* if I'm at the end */
|
||||||
if (el->el_line.cursor == el->el_line.buffer) {
|
if (el->el_line.cursor == el->el_line.buffer) {
|
||||||
/* and the beginning */
|
/* and the beginning */
|
||||||
terminal_writec(el, c); /* then do an EOF */
|
if(!(terminal_writec(el, c))) /* then do an EOF */
|
||||||
return CC_EOF;
|
return CC_EOF;
|
||||||
|
else
|
||||||
|
return CC_ERROR;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Here we could list completions, but it is an
|
* Here we could list completions, but it is an
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* $NetBSD: terminal.c,v 1.10 2011/10/04 15:27:04 christos Exp $ */
|
/* $NetBSD: terminal.c,v 1.10 2011/10/04 15:27:04 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 2015
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is derived from software contributed to Berkeley by
|
* This code is derived from software contributed to Berkeley by
|
||||||
@ -1271,14 +1271,19 @@ terminal__flush(EditLine *el)
|
|||||||
/* terminal_writec():
|
/* terminal_writec():
|
||||||
* Write the given character out, in a human readable form
|
* Write the given character out, in a human readable form
|
||||||
*/
|
*/
|
||||||
protected void
|
protected int
|
||||||
terminal_writec(EditLine *el, Int c)
|
terminal_writec(EditLine *el, Int c)
|
||||||
{
|
{
|
||||||
Char visbuf[VISUAL_WIDTH_MAX +1];
|
Char visbuf[VISUAL_WIDTH_MAX +1];
|
||||||
ssize_t vcnt = ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c);
|
ssize_t vcnt = ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c);
|
||||||
|
if(vcnt == -1)
|
||||||
|
return 1; /* Error due to insufficient space */
|
||||||
|
else {
|
||||||
visbuf[vcnt] = '\0';
|
visbuf[vcnt] = '\0';
|
||||||
terminal_overwrite(el, visbuf, (size_t)vcnt);
|
terminal_overwrite(el, visbuf, (size_t)vcnt);
|
||||||
terminal__flush(el);
|
terminal__flush(el);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* $NetBSD: vi.c,v 1.41 2011/10/04 15:27:04 christos Exp $ */
|
/* $NetBSD: vi.c,v 1.41 2011/10/04 15:27:04 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 2015
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is derived from software contributed to Berkeley by
|
* This code is derived from software contributed to Berkeley by
|
||||||
@ -607,8 +607,10 @@ vi_list_or_eof(EditLine *el, Int c)
|
|||||||
|
|
||||||
if (el->el_line.cursor == el->el_line.lastchar) {
|
if (el->el_line.cursor == el->el_line.lastchar) {
|
||||||
if (el->el_line.cursor == el->el_line.buffer) {
|
if (el->el_line.cursor == el->el_line.buffer) {
|
||||||
terminal_writec(el, c); /* then do a EOF */
|
if(!(terminal_writec(el, c))) /* then do a EOF */
|
||||||
return CC_EOF;
|
return CC_EOF;
|
||||||
|
else
|
||||||
|
return CC_ERROR;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Here we could list completions, but it is an
|
* Here we could list completions, but it is an
|
||||||
|
Loading…
x
Reference in New Issue
Block a user