summaryrefslogtreecommitdiff
path: root/lib/libedit/vi.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-03-14 05:13:12 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-03-14 05:13:12 +0000
commit792987ae58d7eb73cd9316b0db73298133aedd0a (patch)
treedf20288853f454d9c1b380583a13a9be108bbabd /lib/libedit/vi.c
parent2619c4c4532a4d864fb1ca726290a4181e754cc3 (diff)
fix el_source() - a block needed braces around it (from NetBSD)
Some strcpy() -> strncpy (from NetBSD) Some KNF Add current NetBSD tags
Diffstat (limited to 'lib/libedit/vi.c')
-rw-r--r--lib/libedit/vi.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/libedit/vi.c b/lib/libedit/vi.c
index 3c5f6e5ce38..8226fab7a13 100644
--- a/lib/libedit/vi.c
+++ b/lib/libedit/vi.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: vi.c,v 1.2 1997/01/16 05:18:52 millert Exp $ */
+/* $OpenBSD: vi.c,v 1.3 1997/03/14 05:13:11 millert Exp $ */
+/* $NetBSD: vi.c,v 1.2 1997/01/11 06:48:19 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: vi.c,v 1.2 1997/01/16 05:18:52 millert Exp $";
+static char rcsid[] = "$OpenBSD: vi.c,v 1.3 1997/03/14 05:13:11 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -117,7 +118,7 @@ cv_paste(el, c)
char *ptr;
c_undo_t *un = &el->el_chared.c_undo;
#ifdef DEBUG_PASTE
- (void) fprintf(el->el_errfile, "Paste: %x \"%s\" +%d -%d\n",
+ (void)fprintf(el->el_errfile, "Paste: %x \"%s\" +%d -%d\n",
un->action, un->buf, un->isize, un->dsize);
#endif
if (un->isize == 0)
@@ -130,7 +131,7 @@ cv_paste(el, c)
c_insert(el, un->isize);
if (el->el_line.cursor + un->isize > el->el_line.lastchar)
return CC_ERROR;
- (void) memcpy(ptr, un->buf, un->isize);
+ (void)memcpy(ptr, un->buf, un->isize);
return CC_REFRESH;
}
@@ -402,7 +403,7 @@ vi_substitute_line(el, c)
EditLine *el;
int c;
{
- (void) em_kill_line(el, 0);
+ (void)em_kill_line(el, 0);
el->el_map.current = el->el_map.key;
return CC_REFRESH;
}
@@ -418,7 +419,7 @@ vi_change_to_eol(el, c)
EditLine *el;
int c;
{
- (void) ed_kill_line(el, 0);
+ (void)ed_kill_line(el, 0);
el->el_map.current = el->el_map.key;
return CC_REFRESH;
}
@@ -576,7 +577,7 @@ vi_undo(el, c)
c_undo_t *un = &el->el_chared.c_undo;
#ifdef DEBUG_UNDO
- (void) fprintf(el->el_errfile, "Undo: %x \"%s\" +%d -%d\n",
+ (void)fprintf(el->el_errfile, "Undo: %x \"%s\" +%d -%d\n",
un->action, un->buf, un->isize, un->dsize);
#endif
switch (un->action) {
@@ -584,7 +585,7 @@ vi_undo(el, c)
if (un->dsize == 0)
return CC_NORM;
- (void) memcpy(un->buf, un->ptr, un->dsize);
+ (void)memcpy(un->buf, un->ptr, un->dsize);
for (cp = un->ptr; cp <= el->el_line.lastchar; cp++)
*cp = cp[un->dsize];