summaryrefslogtreecommitdiff
path: root/lib
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
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')
-rw-r--r--lib/libedit/chared.c15
-rw-r--r--lib/libedit/chared.h3
-rw-r--r--lib/libedit/common.c23
-rw-r--r--lib/libedit/editline.33
-rw-r--r--lib/libedit/editrc.53
-rw-r--r--lib/libedit/el.c42
-rw-r--r--lib/libedit/el.h3
-rw-r--r--lib/libedit/emacs.c5
-rw-r--r--lib/libedit/hist.c11
-rw-r--r--lib/libedit/hist.h3
-rw-r--r--lib/libedit/histedit.h3
-rw-r--r--lib/libedit/history.c19
-rw-r--r--lib/libedit/key.c41
-rw-r--r--lib/libedit/key.h3
-rw-r--r--lib/libedit/makelist3
-rw-r--r--lib/libedit/map.c49
-rw-r--r--lib/libedit/map.h3
-rw-r--r--lib/libedit/parse.c5
-rw-r--r--lib/libedit/parse.h3
-rw-r--r--lib/libedit/prompt.c5
-rw-r--r--lib/libedit/prompt.h3
-rw-r--r--lib/libedit/read.c39
-rw-r--r--lib/libedit/refresh.c7
-rw-r--r--lib/libedit/refresh.h3
-rw-r--r--lib/libedit/search.c37
-rw-r--r--lib/libedit/search.h3
-rw-r--r--lib/libedit/sig.c43
-rw-r--r--lib/libedit/sig.h3
-rw-r--r--lib/libedit/sys.h3
-rw-r--r--lib/libedit/term.c173
-rw-r--r--lib/libedit/term.h3
-rw-r--r--lib/libedit/termcap.h3
-rw-r--r--lib/libedit/tokenizer.c5
-rw-r--r--lib/libedit/tokenizer.h3
-rw-r--r--lib/libedit/tty.c51
-rw-r--r--lib/libedit/tty.h3
-rw-r--r--lib/libedit/vi.c17
37 files changed, 343 insertions, 301 deletions
diff --git a/lib/libedit/chared.c b/lib/libedit/chared.c
index 4498c67c82b..dd42d448e13 100644
--- a/lib/libedit/chared.c
+++ b/lib/libedit/chared.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: chared.c,v 1.2 1997/01/16 05:18:28 millert Exp $ */
+/* $OpenBSD: chared.c,v 1.3 1997/03/14 05:12:41 millert Exp $ */
+/* $NetBSD: chared.c,v 1.2 1997/01/11 06:47:48 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: chared.c,v 1.2 1997/01/16 05:18:28 millert Exp $";
+static char rcsid[] = "$OpenBSD: chared.c,v 1.3 1997/03/14 05:12:41 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -65,9 +66,9 @@ cv_undo(el, action, size, ptr)
vu->action = action;
vu->ptr = ptr;
vu->isize = size;
- (void) memcpy(vu->buf, vu->ptr, size);
+ (void)memcpy(vu->buf, vu->ptr, size);
#ifdef DEBUG_UNDO
- (void) fprintf(el->el_errfile, "Undo buffer \"%s\" size = +%d -%d\n",
+ (void)fprintf(el->el_errfile, "Undo buffer \"%s\" size = +%d -%d\n",
vu->ptr, vu->isize, vu->dsize);
#endif
}
@@ -433,13 +434,13 @@ ch_init(el)
EditLine *el;
{
el->el_line.buffer = (char *) el_malloc(EL_BUFSIZ);
- (void) memset(el->el_line.buffer, 0, EL_BUFSIZ);
+ (void)memset(el->el_line.buffer, 0, EL_BUFSIZ);
el->el_line.cursor = el->el_line.buffer;
el->el_line.lastchar = el->el_line.buffer;
el->el_line.limit = &el->el_line.buffer[EL_BUFSIZ - 2];
el->el_chared.c_undo.buf = (char *) el_malloc(EL_BUFSIZ);
- (void) memset(el->el_chared.c_undo.buf, 0, EL_BUFSIZ);
+ (void)memset(el->el_chared.c_undo.buf, 0, EL_BUFSIZ);
el->el_chared.c_undo.action = NOP;
el->el_chared.c_undo.isize = 0;
el->el_chared.c_undo.dsize = 0;
@@ -450,7 +451,7 @@ ch_init(el)
el->el_chared.c_vcmd.ins = el->el_line.buffer;
el->el_chared.c_kill.buf = (char *) el_malloc(EL_BUFSIZ);
- (void) memset(el->el_chared.c_kill.buf, 0, EL_BUFSIZ);
+ (void)memset(el->el_chared.c_kill.buf, 0, EL_BUFSIZ);
el->el_chared.c_kill.mark = el->el_line.buffer;
el->el_chared.c_kill.last = el->el_chared.c_kill.buf;
diff --git a/lib/libedit/chared.h b/lib/libedit/chared.h
index 47b11af3f0b..c4c1d94f2be 100644
--- a/lib/libedit/chared.h
+++ b/lib/libedit/chared.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: chared.h,v 1.2 1997/01/16 05:18:29 millert Exp $ */
+/* $OpenBSD: chared.h,v 1.3 1997/03/14 05:12:42 millert Exp $ */
+/* $NetBSD: chared.h,v 1.2 1997/01/11 06:47:49 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/common.c b/lib/libedit/common.c
index 9131b58f54e..1c085c1a8dd 100644
--- a/lib/libedit/common.c
+++ b/lib/libedit/common.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: common.c,v 1.2 1997/01/16 05:18:30 millert Exp $ */
+/* $OpenBSD: common.c,v 1.3 1997/03/14 05:12:43 millert Exp $ */
+/* $NetBSD: common.c,v 1.3 1997/01/14 04:17:22 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: common.c,v 1.2 1997/01/16 05:18:30 millert Exp $";
+static char rcsid[] = "$OpenBSD: common.c,v 1.3 1997/03/14 05:12:43 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -117,7 +118,7 @@ ed_insert(el, c)
}
if (el->el_state.inputmode == MODE_REPLACE_1)
- (void) vi_command_mode(el, 0);
+ (void)vi_command_mode(el, 0);
return CC_NORM;
}
@@ -706,7 +707,7 @@ ed_prev_history(el, c)
*el->el_line.lastchar = '\0'; /* just in case */
if (el->el_history.eventno == 0) { /* save the current buffer away */
- (void) strncpy(el->el_history.buf, el->el_line.buffer, EL_BUFSIZ - 1);
+ (void)strncpy(el->el_history.buf, el->el_line.buffer, EL_BUFSIZ - 1);
el->el_history.buf[EL_BUFSIZ - 1] = '\0';
el->el_history.last = el->el_history.buf +
(el->el_line.lastchar - el->el_line.buffer);
@@ -717,7 +718,7 @@ ed_prev_history(el, c)
if (hist_get(el) == CC_ERROR) {
beep = 1;
/* el->el_history.eventno was fixed by first call */
- (void) hist_get(el);
+ (void)hist_get(el);
}
re_refresh(el);
@@ -771,14 +772,14 @@ ed_search_prev_history(el, c)
*el->el_line.lastchar = '\0'; /* just in case */
if (el->el_history.eventno < 0) {
#ifdef DEBUG_EDIT
- (void) fprintf(el->el_errfile, "e_prev_search_hist(): eventno < 0;\n");
+ (void)fprintf(el->el_errfile, "e_prev_search_hist(): eventno < 0;\n");
#endif
el->el_history.eventno = 0;
return CC_ERROR;
}
if (el->el_history.eventno == 0) {
- (void) strncpy(el->el_history.buf, el->el_line.buffer, EL_BUFSIZ - 1);
+ (void)strncpy(el->el_history.buf, el->el_line.buffer, EL_BUFSIZ - 1);
el->el_history.buf[EL_BUFSIZ - 1] = '\0';
el->el_history.last = el->el_history.buf +
(el->el_line.lastchar - el->el_line.buffer);
@@ -799,7 +800,7 @@ ed_search_prev_history(el, c)
while (hp != NULL) {
#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp);
+ (void)fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp);
#endif
if ((strncmp(hp, el->el_line.buffer,
el->el_line.lastchar - el->el_line.buffer) ||
@@ -814,7 +815,7 @@ ed_search_prev_history(el, c)
if (!found) {
#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "not found\n");
+ (void)fprintf(el->el_errfile, "not found\n");
#endif
return CC_ERROR;
}
@@ -857,7 +858,7 @@ ed_search_next_history(el, c)
for (h = 1; h < el->el_history.eventno && hp; h++) {
#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp);
+ (void)fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp);
#endif
if ((strncmp(hp, el->el_line.buffer,
el->el_line.lastchar - el->el_line.buffer) ||
@@ -870,7 +871,7 @@ ed_search_next_history(el, c)
if (!found) { /* is it the current history number? */
if (!c_hmatch(el, el->el_history.buf)) {
#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "not found\n");
+ (void)fprintf(el->el_errfile, "not found\n");
#endif
return CC_ERROR;
}
diff --git a/lib/libedit/editline.3 b/lib/libedit/editline.3
index 2e1746522ec..a72c255a379 100644
--- a/lib/libedit/editline.3
+++ b/lib/libedit/editline.3
@@ -1,4 +1,5 @@
-.\" $OpenBSD: editline.3,v 1.1 1997/01/16 05:20:28 millert Exp $
+.\" $OpenBSD: editline.3,v 1.2 1997/03/14 05:12:44 millert Exp $
+.\" $NetBSD: editline.3,v 1.4 1997/01/14 04:17:23 lukem Exp $
.\"
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
diff --git a/lib/libedit/editrc.5 b/lib/libedit/editrc.5
index 55b455ac1d3..892b75333f6 100644
--- a/lib/libedit/editrc.5
+++ b/lib/libedit/editrc.5
@@ -1,4 +1,5 @@
-.\" $OpenBSD: editrc.5,v 1.1 1997/01/16 05:20:29 millert Exp $
+.\" $OpenBSD: editrc.5,v 1.2 1997/03/14 05:12:45 millert Exp $
+.\" $NetBSD: editrc.5,v 1.3 1997/01/11 09:57:06 lukem Exp $
.\"
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
diff --git a/lib/libedit/el.c b/lib/libedit/el.c
index 87bce35a04e..6df947c4901 100644
--- a/lib/libedit/el.c
+++ b/lib/libedit/el.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: el.c,v 1.4 1997/01/16 05:18:31 millert Exp $ */
+/* $OpenBSD: el.c,v 1.5 1997/03/14 05:12:45 millert Exp $ */
+/* $NetBSD: el.c,v 1.3 1997/01/17 01:03:33 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94";
#else
-static char rcsid[] = "$OpenBSD: el.c,v 1.4 1997/01/16 05:18:31 millert Exp $";
+static char rcsid[] = "$OpenBSD: el.c,v 1.5 1997/03/14 05:12:45 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -88,7 +89,7 @@ el_init(prog, fin, fout)
el->el_errfile = fopen(tty, "w");
if (el->el_errfile == NULL) {
extern errno;
- (void) fprintf(stderr, "Cannot open %s (%s).\n",
+ (void)fprintf(stderr, "Cannot open %s (%s).\n",
tty, strerror(errno));
return NULL;
}
@@ -100,15 +101,15 @@ el_init(prog, fin, fout)
/*
* Initialize all the modules. Order is important!!!
*/
- (void) term_init(el);
- (void) tty_init(el);
- (void) key_init(el);
- (void) map_init(el);
- (void) ch_init(el);
- (void) search_init(el);
- (void) hist_init(el);
- (void) prompt_init(el);
- (void) sig_init(el);
+ (void)term_init(el);
+ (void)tty_init(el);
+ (void)key_init(el);
+ (void)map_init(el);
+ (void)ch_init(el);
+ (void)search_init(el);
+ (void)hist_init(el);
+ (void)prompt_init(el);
+ (void)sig_init(el);
el->el_flags = 0;
return el;
@@ -302,21 +303,22 @@ el_source(el, fname)
return -1;
fname = strncpy(path, ptr, sizeof(path) - 1);
path[sizeof(path) - 1] = '\0';
- (void) strncat(path, elpath, sizeof(path) - strlen(path));
+ (void)strncat(path, elpath, sizeof(path) - strlen(path));
}
}
if ((fp = fopen(fname, "r")) == NULL)
return -1;
- while ((ptr = fgetln(fp, &len)) != NULL)
+ while ((ptr = fgetln(fp, &len)) != NULL) {
ptr[len - 1] = '\0';
if (parse_line(el, ptr) == -1) {
- (void) fclose(fp);
+ (void)fclose(fp);
return -1;
}
+ }
- (void) fclose(fp);
+ (void)fclose(fp);
return 0;
}
@@ -330,13 +332,13 @@ el_resize(el)
{
int lins, cols;
sigset_t oset, nset;
- (void) sigemptyset(&nset);
- (void) sigaddset(&nset, SIGWINCH);
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
+ (void)sigemptyset(&nset);
+ (void)sigaddset(&nset, SIGWINCH);
+ (void)sigprocmask(SIG_BLOCK, &nset, &oset);
/* get the correct window size */
if (term_get_size(el, &lins, &cols))
term_change_size(el, lins, cols);
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
+ (void)sigprocmask(SIG_SETMASK, &oset, NULL);
}
diff --git a/lib/libedit/el.h b/lib/libedit/el.h
index c2f0fbb5086..2bd20fddabd 100644
--- a/lib/libedit/el.h
+++ b/lib/libedit/el.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: el.h,v 1.2 1997/01/16 05:18:32 millert Exp $ */
+/* $OpenBSD: el.h,v 1.3 1997/03/14 05:12:46 millert Exp $ */
+/* $NetBSD: el.h,v 1.2 1997/01/11 06:47:53 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/emacs.c b/lib/libedit/emacs.c
index c921bdbdd09..38a6218b5f8 100644
--- a/lib/libedit/emacs.c
+++ b/lib/libedit/emacs.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: emacs.c,v 1.2 1997/01/16 05:18:32 millert Exp $ */
+/* $OpenBSD: emacs.c,v 1.3 1997/03/14 05:12:47 millert Exp $ */
+/* $NetBSD: emacs.c,v 1.3 1997/01/11 06:47:54 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)emacs.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: emacs.c,v 1.2 1997/01/16 05:18:32 millert Exp $";
+static char rcsid[] = "$OpenBSD: emacs.c,v 1.3 1997/03/14 05:12:47 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
diff --git a/lib/libedit/hist.c b/lib/libedit/hist.c
index b9a6e20c677..b5deda1fbe2 100644
--- a/lib/libedit/hist.c
+++ b/lib/libedit/hist.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: hist.c,v 1.2 1997/01/16 05:18:33 millert Exp $ */
+/* $OpenBSD: hist.c,v 1.3 1997/03/14 05:12:48 millert Exp $ */
+/* $NetBSD: hist.c,v 1.2 1997/01/11 06:47:55 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)hist.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: hist.c,v 1.2 1997/01/16 05:18:33 millert Exp $";
+static char rcsid[] = "$OpenBSD: hist.c,v 1.3 1997/03/14 05:12:48 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -106,7 +107,7 @@ hist_get(el)
int h;
if (el->el_history.eventno == 0) { /* if really the current line */
- (void) strncpy(el->el_line.buffer, el->el_history.buf, EL_BUFSIZ - 1);
+ (void)strncpy(el->el_line.buffer, el->el_history.buf, EL_BUFSIZ - 1);
el->el_line.buffer[EL_BUFSIZ - 1] = '\0';
el->el_line.lastchar = el->el_line.buffer +
(el->el_history.last - el->el_history.buf);
@@ -135,7 +136,7 @@ hist_get(el)
return CC_ERROR;
}
- (void) strncpy(el->el_line.buffer, hp, EL_BUFSIZ - 1);
+ (void)strncpy(el->el_line.buffer, hp, EL_BUFSIZ - 1);
el->el_line.buffer[EL_BUFSIZ - 1] = '\0';
el->el_line.lastchar = el->el_line.buffer + strlen(el->el_line.buffer);
@@ -173,6 +174,6 @@ hist_list(el, argc, argv)
if (el->el_history.ref == NULL)
return -1;
for (str = HIST_LAST(el); str != NULL; str = HIST_PREV(el))
- (void) fprintf(el->el_outfile, "%d %s", el->el_history.ev->num, str);
+ (void)fprintf(el->el_outfile, "%d %s", el->el_history.ev->num, str);
return 0;
}
diff --git a/lib/libedit/hist.h b/lib/libedit/hist.h
index 57319686ba2..c64bed49d5a 100644
--- a/lib/libedit/hist.h
+++ b/lib/libedit/hist.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: hist.h,v 1.3 1997/01/16 05:18:34 millert Exp $ */
+/* $OpenBSD: hist.h,v 1.4 1997/03/14 05:12:49 millert Exp $ */
+/* $NetBSD: hist.h,v 1.3 1997/01/11 06:47:56 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/histedit.h b/lib/libedit/histedit.h
index ee88d54ec3b..9e29d30045a 100644
--- a/lib/libedit/histedit.h
+++ b/lib/libedit/histedit.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: histedit.h,v 1.3 1997/01/16 05:18:34 millert Exp $ */
+/* $OpenBSD: histedit.h,v 1.4 1997/03/14 05:12:50 millert Exp $ */
+/* $NetBSD: histedit.h,v 1.4 1997/01/14 04:17:24 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/history.c b/lib/libedit/history.c
index cddeea185d4..23419ac571d 100644
--- a/lib/libedit/history.c
+++ b/lib/libedit/history.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: history.c,v 1.3 1997/01/16 05:18:35 millert Exp $ */
+/* $OpenBSD: history.c,v 1.4 1997/03/14 05:12:51 millert Exp $ */
+/* $NetBSD: history.c,v 1.4 1997/01/23 14:02:45 mrg Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)history.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: history.c,v 1.3 1997/01/16 05:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: history.c,v 1.4 1997/03/14 05:12:51 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -131,7 +132,7 @@ private void history_def_clear __P((ptr_t));
private const HistEvent *history_def_insert __P((history_t *, const char *));
private void history_def_delete __P((history_t *, hentry_t *));
-#define history_def_set(p, num) (void) (((history_t *) p)->max = (num))
+#define history_def_set(p, num) (void)(((history_t *) p)->max = (num))
/* history_def_first():
@@ -237,8 +238,8 @@ history_def_add(p, str)
return (history_def_enter(p, str));
len = strlen(h->cursor->ev.str) + strlen(str) + 1;
s = (char *) h_malloc(len);
- (void) strcpy(s, h->cursor->ev.str);
- (void) strcat(s, str);
+ (void)strcpy(s, h->cursor->ev.str);
+ (void)strcat(s, str);
h_free((ptr_t) h->cursor->ev.str);
h->cursor->ev.str = s;
return &h->cursor->ev;
@@ -472,7 +473,7 @@ history_load(h, fname)
}
done:
- (void) fclose(fp);
+ (void)fclose(fp);
return i;
}
@@ -492,10 +493,10 @@ history_save(h, fname)
if ((fp = fopen(fname, "w")) == NULL)
return -1;
- (void) fputs(hist_cookie, fp);
+ (void)fputs(hist_cookie, fp);
for (ev = HLAST(h); ev != NULL; ev = HPREV(h), i++)
- (void) fprintf(fp, "%s", ev->str);
- (void) fclose(fp);
+ (void)fprintf(fp, "%s", ev->str);
+ (void)fclose(fp);
return i;
}
diff --git a/lib/libedit/key.c b/lib/libedit/key.c
index 2fd5703d0a6..5a81521e52f 100644
--- a/lib/libedit/key.c
+++ b/lib/libedit/key.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: key.c,v 1.2 1997/01/16 05:18:36 millert Exp $ */
+/* $OpenBSD: key.c,v 1.3 1997/03/14 05:12:52 millert Exp $ */
+/* $NetBSD: key.c,v 1.2 1997/01/11 06:47:58 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)key.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: key.c,v 1.2 1997/01/16 05:18:36 millert Exp $";
+static char rcsid[] = "$OpenBSD: key.c,v 1.3 1997/03/14 05:12:52 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -201,13 +202,13 @@ key_add(el, key, val, ntype)
int ntype;
{
if (key[0] == '\0') {
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"key_add: Null extended-key not allowed.\n");
return;
}
if (ntype == XK_CMD && val->cmd == ED_SEQUENCE_LEAD_IN) {
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"key_add: sequence-lead-in command not allowed\n");
return;
}
@@ -217,7 +218,7 @@ key_add(el, key, val, ntype)
el->el_key.map = node__get(key[0]); /* it is properly initialized */
/* Now recurse through el->el_key.map */
- (void) node__try(el->el_key.map, key, val, ntype);
+ (void)node__try(el->el_key.map, key, val, ntype);
return;
}
@@ -236,7 +237,7 @@ key_clear(el, map, in)
el->el_map.alt[(unsigned char) *in] != ED_SEQUENCE_LEAD_IN) ||
(map == el->el_map.alt &&
el->el_map.key[(unsigned char) *in] != ED_SEQUENCE_LEAD_IN)))
- (void) key_delete(el, in);
+ (void)key_delete(el, in);
}
@@ -250,7 +251,7 @@ key_delete(el, key)
char *key;
{
if (key[0] == '\0') {
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"key_delete: Null extended-key not allowed.\n");
return -1;
}
@@ -258,7 +259,7 @@ key_delete(el, key)
if (el->el_key.map == NULL)
return 0;
- (void) node__delete(&el->el_key.map, key);
+ (void)node__delete(&el->el_key.map, key);
return 0;
}
@@ -279,7 +280,7 @@ key_print(el, key)
el->el_key.buf[0] = '"';
if (node_lookup(el, key, el->el_key.map, 1) <= -1)
/* key is not bound */
- (void) fprintf(el->el_errfile, "Unbound extended key \"%s\"\n", key);
+ (void)fprintf(el->el_errfile, "Unbound extended key \"%s\"\n", key);
return;
}
@@ -385,7 +386,7 @@ node__try(ptr, str, val, ntype)
/* still more chars to go */
if (ptr->next == NULL)
ptr->next = node__get(*str); /* setup new node */
- (void) node__try(ptr->next, str, val, ntype);
+ (void)node__try(ptr->next, str, val, ntype);
}
return 0;
}
@@ -514,7 +515,7 @@ node_lookup(el, str, ptr, cnt)
if (*str == 0) {
/* no more chars in str. node_enum from here. */
- (void) node_enum(el, ptr, cnt);
+ (void)node_enum(el, ptr, cnt);
return 0;
}
else {
@@ -563,15 +564,15 @@ node_enum(el, ptr, cnt)
if (cnt >= KEY_BUFSIZ - 5) { /* buffer too small */
el->el_key.buf[++cnt] = '"';
el->el_key.buf[++cnt] = '\0';
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"Some extended keys too long for internal print buffer");
- (void) fprintf(el->el_errfile, " \"%s...\"\n", el->el_key.buf);
+ (void)fprintf(el->el_errfile, " \"%s...\"\n", el->el_key.buf);
return 0;
}
if (ptr == NULL) {
#ifdef DEBUG_EDIT
- (void) fprintf(el->el_errfile, "node_enum: BUG!! Null ptr passed\n!");
+ (void)fprintf(el->el_errfile, "node_enum: BUG!! Null ptr passed\n!");
#endif
return -1;
}
@@ -585,11 +586,11 @@ node_enum(el, ptr, cnt)
key_kprint(el, el->el_key.buf, &ptr->val, ptr->type);
}
else
- (void) node_enum(el, ptr->next, ncnt + 1);
+ (void)node_enum(el, ptr->next, ncnt + 1);
/* go to sibling if there is one */
if (ptr->sibling)
- (void) node_enum(el, ptr->sibling, cnt);
+ (void)node_enum(el, ptr->sibling, cnt);
return 0;
}
@@ -613,19 +614,19 @@ key_kprint(el, key, val, ntype)
switch (ntype) {
case XK_STR:
case XK_EXE:
- (void) fprintf(el->el_errfile, fmt, key,
+ (void)fprintf(el->el_errfile, fmt, key,
key__decode_str(val->str, unparsbuf,
ntype == XK_STR ? "\"\"" : "[]"));
break;
case XK_CMD:
for (fp = el->el_map.help; fp->name; fp++)
if (val->cmd == fp->func) {
- (void) fprintf(el->el_errfile, fmt, key, fp->name);
+ (void)fprintf(el->el_errfile, fmt, key, fp->name);
break;
}
#ifdef DEBUG_KEY
if (fp->name == NULL)
- (void) fprintf(el->el_errfile, "BUG! Command not found.\n");
+ (void)fprintf(el->el_errfile, "BUG! Command not found.\n");
#endif
break;
@@ -634,7 +635,7 @@ key_kprint(el, key, val, ntype)
break;
}
else
- (void) fprintf(el->el_errfile, fmt, key, "no input");
+ (void)fprintf(el->el_errfile, fmt, key, "no input");
}
diff --git a/lib/libedit/key.h b/lib/libedit/key.h
index 5dfb3316f7e..924154bd4b9 100644
--- a/lib/libedit/key.h
+++ b/lib/libedit/key.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: key.h,v 1.2 1997/01/16 05:18:36 millert Exp $ */
+/* $OpenBSD: key.h,v 1.3 1997/03/14 05:12:52 millert Exp $ */
+/* $NetBSD: key.h,v 1.2 1997/01/11 06:47:59 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/makelist b/lib/libedit/makelist
index b2b320e89a1..2204cfc3583 100644
--- a/lib/libedit/makelist
+++ b/lib/libedit/makelist
@@ -1,5 +1,6 @@
#!/bin/sh -
-# $OpenBSD: makelist,v 1.2 1997/01/16 05:18:37 millert Exp $
+# $OpenBSD: makelist,v 1.3 1997/03/14 05:12:53 millert Exp $
+# $NetBSD: makelist,v 1.3 1997/01/11 06:48:00 lukem Exp $
#
# Copyright (c) 1992, 1993
# The Regents of the University of California. All rights reserved.
diff --git a/lib/libedit/map.c b/lib/libedit/map.c
index c760cedb9fb..67ef9ebaa47 100644
--- a/lib/libedit/map.c
+++ b/lib/libedit/map.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: map.c,v 1.2 1997/01/16 05:18:38 millert Exp $ */
+/* $OpenBSD: map.c,v 1.3 1997/03/14 05:12:54 millert Exp $ */
+/* $NetBSD: map.c,v 1.3 1997/01/11 06:48:00 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: map.c,v 1.2 1997/01/16 05:18:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: map.c,v 1.3 1997/03/14 05:12:54 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -908,7 +909,7 @@ map_init(el)
el->el_map.vii = el_map_vi_insert;
el->el_map.help = (el_bindings_t *) el_malloc(sizeof(el_bindings_t) *
EL_NUM_FCNS);
- (void) memcpy(el->el_map.help, help__get(),
+ (void)memcpy(el->el_map.help, help__get(),
sizeof(el_bindings_t) * EL_NUM_FCNS);
el->el_map.func = (el_func_t *) el_malloc(sizeof(el_func_t) * EL_NUM_FCNS);
memcpy(el->el_map.func, func__get(), sizeof(el_func_t) * EL_NUM_FCNS);
@@ -1109,10 +1110,10 @@ map_print_key(el, map, in)
el_bindings_t *bp;
if (in[0] == '\0' || in[1] == '\0') {
- (void) key__decode_str(in, outbuf, "");
+ (void)key__decode_str(in, outbuf, "");
for (bp = el->el_map.help; bp->name != NULL; bp++)
if (bp->func == map[(unsigned char) *in]) {
- (void) fprintf(el->el_outfile,
+ (void)fprintf(el->el_outfile,
"%s\t->\t%s\n", outbuf, bp->name);
return;
}
@@ -1141,7 +1142,7 @@ map_print_some_keys(el, map, first, last)
lastbuf[1] = 0;
if (map[first] == ED_UNASSIGNED) {
if (first == last)
- (void) fprintf(el->el_outfile, "%-15s-> is undefined\n",
+ (void)fprintf(el->el_outfile, "%-15s-> is undefined\n",
key__decode_str(firstbuf, unparsbuf, STRQQ));
return;
}
@@ -1149,12 +1150,12 @@ map_print_some_keys(el, map, first, last)
for (bp = el->el_map.help; bp->name != NULL; bp++) {
if (bp->func == map[first]) {
if (first == last) {
- (void) fprintf(el->el_outfile, "%-15s-> %s\n",
+ (void)fprintf(el->el_outfile, "%-15s-> %s\n",
key__decode_str(firstbuf, unparsbuf, STRQQ),
bp->name);
}
else {
- (void) fprintf(el->el_outfile, "%-4s to %-7s-> %s\n",
+ (void)fprintf(el->el_outfile, "%-4s to %-7s-> %s\n",
key__decode_str(firstbuf, unparsbuf, STRQQ),
key__decode_str(lastbuf, extrabuf, STRQQ),
bp->name);
@@ -1164,15 +1165,15 @@ map_print_some_keys(el, map, first, last)
}
#ifdef MAP_DEBUG
if (map == el->el_map.key) {
- (void) fprintf(el->el_outfile, "BUG!!! %s isn't bound to anything.\n",
+ (void)fprintf(el->el_outfile, "BUG!!! %s isn't bound to anything.\n",
key__decode_str(firstbuf, unparsbuf, STRQQ));
- (void) fprintf(el->el_outfile, "el->el_map.key[%d] == %d\n",
+ (void)fprintf(el->el_outfile, "el->el_map.key[%d] == %d\n",
first, el->el_map.key[first]);
}
else {
- (void) fprintf(el->el_outfile, "BUG!!! %s isn't bound to anything.\n",
+ (void)fprintf(el->el_outfile, "BUG!!! %s isn't bound to anything.\n",
key__decode_str(firstbuf, unparsbuf, STRQQ));
- (void) fprintf(el->el_outfile, "el->el_map.alt[%d] == %d\n",
+ (void)fprintf(el->el_outfile, "el->el_map.alt[%d] == %d\n",
first, el->el_map.alt[first]);
}
#endif
@@ -1189,7 +1190,7 @@ map_print_all_keys(el)
{
int prev, i;
- (void) fprintf(el->el_outfile, "Standard key bindings\n");
+ (void)fprintf(el->el_outfile, "Standard key bindings\n");
prev = 0;
for (i = 0; i < N_KEYS; i++) {
if (el->el_map.key[prev] == el->el_map.key[i])
@@ -1199,7 +1200,7 @@ map_print_all_keys(el)
}
map_print_some_keys(el, el->el_map.key, prev, i - 1);
- (void) fprintf(el->el_outfile, "Alternative key bindings\n");
+ (void)fprintf(el->el_outfile, "Alternative key bindings\n");
prev = 0;
for (i = 0; i < N_KEYS; i++) {
if (el->el_map.alt[prev] == el->el_map.alt[i])
@@ -1209,9 +1210,9 @@ map_print_all_keys(el)
}
map_print_some_keys(el, el->el_map.alt, prev, i - 1);
- (void) fprintf(el->el_outfile, "Multi-character bindings\n");
+ (void)fprintf(el->el_outfile, "Multi-character bindings\n");
key_print(el, "");
- (void) fprintf(el->el_outfile, "Arrow key bindings\n");
+ (void)fprintf(el->el_outfile, "Arrow key bindings\n");
term_print_arrow(el, "");
}
@@ -1275,11 +1276,11 @@ map_bind(el, argc, argv)
case 'l':
for (bp = el->el_map.help; bp->name != NULL; bp++)
- (void) fprintf(el->el_outfile, "%s\n\t%s\n",
+ (void)fprintf(el->el_outfile, "%s\n\t%s\n",
bp->name, bp->description);
return 0;
default:
- (void) fprintf(el->el_errfile, "%s: Invalid switch `%c'.\n",
+ (void)fprintf(el->el_errfile, "%s: Invalid switch `%c'.\n",
argv[0], p[1]);
}
else
@@ -1294,20 +1295,20 @@ map_bind(el, argc, argv)
in = argv[argc++];
else
if ((in = parse__string(inbuf, argv[argc++])) == NULL) {
- (void) fprintf(el->el_errfile, "%s: Invalid \\ or ^ in instring.\n",
+ (void)fprintf(el->el_errfile, "%s: Invalid \\ or ^ in instring.\n",
argv[0]);
return -1;
}
if (remove) {
if (key) {
- (void) term_clear_arrow(el, in);
+ (void)term_clear_arrow(el, in);
return -1;
}
if (in[1])
- (void) key_delete(el, in);
+ (void)key_delete(el, in);
else if (map[(unsigned char) *in] == ED_SEQUENCE_LEAD_IN)
- (void) key_delete(el, in);
+ (void)key_delete(el, in);
else
map[(unsigned char) *in] = ED_UNASSIGNED;
return 0;
@@ -1332,7 +1333,7 @@ map_bind(el, argc, argv)
case XK_STR:
case XK_EXE:
if ((out = parse__string(outbuf, argv[argc])) == NULL) {
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"%s: Invalid \\ or ^ in outstring.\n", argv[0]);
return -1;
}
@@ -1345,7 +1346,7 @@ map_bind(el, argc, argv)
case XK_CMD:
if ((cmd = parse_cmd(el, argv[argc])) == -1) {
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"%s: Invalid command `%s'.\n", argv[0], argv[argc]);
return -1;
}
diff --git a/lib/libedit/map.h b/lib/libedit/map.h
index 89743ded206..a6c73ed6cca 100644
--- a/lib/libedit/map.h
+++ b/lib/libedit/map.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: map.h,v 1.2 1997/01/16 05:18:39 millert Exp $ */
+/* $OpenBSD: map.h,v 1.3 1997/03/14 05:12:55 millert Exp $ */
+/* $NetBSD: map.h,v 1.2 1997/01/11 06:48:01 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/parse.c b/lib/libedit/parse.c
index b88f74e8d30..b113983a20d 100644
--- a/lib/libedit/parse.c
+++ b/lib/libedit/parse.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: parse.c,v 1.2 1997/01/16 05:18:39 millert Exp $ */
+/* $OpenBSD: parse.c,v 1.3 1997/03/14 05:12:55 millert Exp $ */
+/* $NetBSD: parse.c,v 1.5 1997/01/11 09:57:08 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: parse.c,v 1.2 1997/01/16 05:18:39 millert Exp $";
+static char rcsid[] = "$OpenBSD: parse.c,v 1.3 1997/03/14 05:12:55 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
diff --git a/lib/libedit/parse.h b/lib/libedit/parse.h
index bda660e528f..f11f849a9a1 100644
--- a/lib/libedit/parse.h
+++ b/lib/libedit/parse.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: parse.h,v 1.2 1997/01/16 05:18:40 millert Exp $ */
+/* $OpenBSD: parse.h,v 1.3 1997/03/14 05:12:56 millert Exp $ */
+/* $NetBSD: parse.h,v 1.2 1997/01/11 06:48:03 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/prompt.c b/lib/libedit/prompt.c
index 380052adffc..82d4f5d3e93 100644
--- a/lib/libedit/prompt.c
+++ b/lib/libedit/prompt.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: prompt.c,v 1.2 1997/01/16 05:18:40 millert Exp $ */
+/* $OpenBSD: prompt.c,v 1.3 1997/03/14 05:12:57 millert Exp $ */
+/* $NetBSD: prompt.c,v 1.2 1997/01/11 06:48:04 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)prompt.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: prompt.c,v 1.2 1997/01/16 05:18:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: prompt.c,v 1.3 1997/03/14 05:12:57 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
diff --git a/lib/libedit/prompt.h b/lib/libedit/prompt.h
index 6d43675a51c..4b456acdb4e 100644
--- a/lib/libedit/prompt.h
+++ b/lib/libedit/prompt.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: prompt.h,v 1.2 1997/01/16 05:18:41 millert Exp $ */
+/* $OpenBSD: prompt.h,v 1.3 1997/03/14 05:12:58 millert Exp $ */
+/* $NetBSD: prompt.h,v 1.2 1997/01/11 06:48:05 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/read.c b/lib/libedit/read.c
index 2d1139c6e82..55106d4cd73 100644
--- a/lib/libedit/read.c
+++ b/lib/libedit/read.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: read.c,v 1.2 1997/01/16 05:18:42 millert Exp $ */
+/* $OpenBSD: read.c,v 1.3 1997/03/14 05:12:58 millert Exp $ */
+/* $NetBSD: read.c,v 1.3 1997/01/14 04:17:25 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)read.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: read.c,v 1.2 1997/01/16 05:18:42 millert Exp $";
+static char rcsid[] = "$OpenBSD: read.c,v 1.3 1997/03/14 05:12:58 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -68,15 +69,15 @@ read_debug(el)
{
if (el->el_line.cursor > el->el_line.lastchar)
- (void) fprintf(el->el_errfile, "cursor > lastchar\r\n");
+ (void)fprintf(el->el_errfile, "cursor > lastchar\r\n");
if (el->el_line.cursor < el->el_line.buffer)
- (void) fprintf(el->el_errfile, "cursor < buffer\r\n");
+ (void)fprintf(el->el_errfile, "cursor < buffer\r\n");
if (el->el_line.cursor > el->el_line.limit)
- (void) fprintf(el->el_errfile, "cursor > limit\r\n");
+ (void)fprintf(el->el_errfile, "cursor > limit\r\n");
if (el->el_line.lastchar > el->el_line.limit)
- (void) fprintf(el->el_errfile, "lastchar > limit\r\n");
+ (void)fprintf(el->el_errfile, "lastchar > limit\r\n");
if (el->el_line.limit != &el->el_line.buffer[EL_BUFSIZ - 2])
- (void) fprintf(el->el_errfile, "limit != &buffer[EL_BUFSIZ-2]\r\n");
+ (void)fprintf(el->el_errfile, "limit != &buffer[EL_BUFSIZ-2]\r\n");
}
#endif /* DEBUG_EDIT */
@@ -151,7 +152,7 @@ read_preread(el)
return 0;
#ifdef FIONREAD
- (void) ioctl(el->el_infd, FIONREAD, (ioctl_t) &chrs);
+ (void)ioctl(el->el_infd, FIONREAD, (ioctl_t) &chrs);
if (chrs > 0) {
char buf[EL_BUFSIZ];
@@ -282,13 +283,13 @@ el_getc(el, cp)
}
#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "Turning raw mode on\n");
+ (void)fprintf(el->el_errfile, "Turning raw mode on\n");
#endif /* DEBUG_READ */
if (tty_rawmode(el) < 0) /* make sure the tty is set up correctly */
return 0;
#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "Reading a character\n");
+ (void)fprintf(el->el_errfile, "Reading a character\n");
#endif /* DEBUG_READ */
while ((num_read = read(el->el_infd, (char *) &tcp, 1)) == -1)
if (!tried && read__fixio(el->el_infd, errno) == 0)
@@ -298,7 +299,7 @@ el_getc(el, cp)
return -1;
}
#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "Got it %c\n", tcp);
+ (void)fprintf(el->el_errfile, "Got it %c\n", tcp);
#endif /* DEBUG_READ */
*cp = tcp;
return num_read;
@@ -326,7 +327,7 @@ el_gets(el, nread)
if (el->el_tty.t_mode == EX_IO && ma->level < 0) {
long chrs = 0;
- (void) ioctl(el->el_infd, FIONREAD, (ioctl_t) &chrs);
+ (void)ioctl(el->el_infd, FIONREAD, (ioctl_t) &chrs);
if (chrs == 0) {
if (tty_rawmode(el) < 0) {
if (nread)
@@ -346,14 +347,14 @@ el_gets(el, nread)
/* if EOF or error */
if ((num = read_getcmd(el, &cmdnum, &ch)) != OKCMD) {
#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "Returning from el_gets %d\n", num);
+ (void)fprintf(el->el_errfile, "Returning from el_gets %d\n", num);
#endif /* DEBUG_READ */
break;
}
if (cmdnum >= el->el_map.nfunc) { /* BUG CHECK command */
#ifdef DEBUG_EDIT
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"ERROR: illegal command from key 0%o\r\n", ch);
#endif /* DEBUG_EDIT */
continue; /* try again */
@@ -367,9 +368,9 @@ el_gets(el, nread)
if (b->func == cmdnum)
break;
if (b->name)
- (void) fprintf(el->el_errfile, "Executing %s\n", b->name);
+ (void)fprintf(el->el_errfile, "Executing %s\n", b->name);
else
- (void) fprintf(el->el_errfile, "Error command = %d\n", cmdnum);
+ (void)fprintf(el->el_errfile, "Error command = %d\n", cmdnum);
}
#endif /* DEBUG_READ */
retval = (*el->el_map.func[cmdnum])(el, ch);
@@ -415,7 +416,7 @@ el_gets(el, nread)
case CC_FATAL: /* fatal error, reset to known state */
#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "*** editor fatal ERROR ***\r\n\n");
+ (void)fprintf(el->el_errfile, "*** editor fatal ERROR ***\r\n\n");
#endif /* DEBUG_READ */
/* put (real) cursor in a known place */
re_clear_display(el); /* reset the display stuff */
@@ -428,7 +429,7 @@ el_gets(el, nread)
case CC_ERROR:
default: /* functions we don't know about */
#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "*** editor ERROR ***\r\n\n");
+ (void)fprintf(el->el_errfile, "*** editor ERROR ***\r\n\n");
#endif /* DEBUG_READ */
el->el_state.argument = 1;
el->el_state.doingarg = 0;
@@ -438,7 +439,7 @@ el_gets(el, nread)
}
}
- (void) tty_cookedmode(el); /* make sure the tty is set up correctly */
+ (void)tty_cookedmode(el); /* make sure the tty is set up correctly */
term__flush(); /* flush any buffered output */
if (el->el_flags & HANDLE_SIGNALS)
sig_clr(el);
diff --git a/lib/libedit/refresh.c b/lib/libedit/refresh.c
index 8b5ef97b1ba..eb3151a6976 100644
--- a/lib/libedit/refresh.c
+++ b/lib/libedit/refresh.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: refresh.c,v 1.2 1997/01/16 05:18:42 millert Exp $ */
+/* $OpenBSD: refresh.c,v 1.3 1997/03/14 05:12:59 millert Exp $ */
+/* $NetBSD: refresh.c,v 1.2 1997/01/11 06:48:07 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)refresh.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: refresh.c,v 1.2 1997/01/16 05:18:42 millert Exp $";
+static char rcsid[] = "$OpenBSD: refresh.c,v 1.3 1997/03/14 05:12:59 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -72,7 +73,7 @@ private void re_printstr __P((EditLine *, char *, char *,
# define __F el->el_errfile
# define RE_DEBUG(a, b, c) do \
if (a) { \
- (void) fprintf b; \
+ (void)fprintf b; \
c; \
} \
while (0)
diff --git a/lib/libedit/refresh.h b/lib/libedit/refresh.h
index 62039eb169c..9ffbde99d42 100644
--- a/lib/libedit/refresh.h
+++ b/lib/libedit/refresh.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: refresh.h,v 1.2 1997/01/16 05:18:43 millert Exp $ */
+/* $OpenBSD: refresh.h,v 1.3 1997/03/14 05:13:00 millert Exp $ */
+/* $NetBSD: refresh.h,v 1.2 1997/01/11 06:48:08 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/search.c b/lib/libedit/search.c
index f1c987de0bf..399b60ebde6 100644
--- a/lib/libedit/search.c
+++ b/lib/libedit/search.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: search.c,v 1.2 1997/01/16 05:18:44 millert Exp $ */
+/* $OpenBSD: search.c,v 1.3 1997/03/14 05:13:01 millert Exp $ */
+/* $NetBSD: refresh.h,v 1.2 1997/01/11 06:48:08 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)search.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: search.c,v 1.2 1997/01/16 05:18:44 millert Exp $";
+static char rcsid[] = "$OpenBSD: search.c,v 1.3 1997/03/14 05:13:01 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -158,7 +159,7 @@ c_hmatch(el, str)
const char *str;
{
#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "match `%s' with `%s'\n",
+ (void)fprintf(el->el_errfile, "match `%s' with `%s'\n",
el->el_search.patbuf, str);
#endif /* SDEBUG */
@@ -179,7 +180,7 @@ c_setpat(el)
if (el->el_search.patlen >= EL_BUFSIZ)
el->el_search.patlen = EL_BUFSIZ -1;
if (el->el_search.patlen >= 0) {
- (void) strncpy(el->el_search.patbuf, el->el_line.buffer,
+ (void)strncpy(el->el_search.patbuf, el->el_line.buffer,
el->el_search.patlen);
el->el_search.patbuf[el->el_search.patlen] = '\0';
}
@@ -187,10 +188,10 @@ c_setpat(el)
el->el_search.patlen = strlen(el->el_search.patbuf);
}
#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "\neventno = %d\n", el->el_history.eventno);
- (void) fprintf(el->el_errfile, "patlen = %d\n", el->el_search.patlen);
- (void) fprintf(el->el_errfile, "patbuf = \"%s\"\n", el->el_search.patbuf);
- (void) fprintf(el->el_errfile, "cursor %d lastchar %d\n",
+ (void)fprintf(el->el_errfile, "\neventno = %d\n", el->el_history.eventno);
+ (void)fprintf(el->el_errfile, "patlen = %d\n", el->el_search.patlen);
+ (void)fprintf(el->el_errfile, "patbuf = \"%s\"\n", el->el_search.patbuf);
+ (void)fprintf(el->el_errfile, "cursor %d lastchar %d\n",
EL_CURSOR(el) - el->el_line.buffer,
el->el_line.lastchar - el->el_line.buffer);
#endif
@@ -346,7 +347,7 @@ ce_inc_search(el, dir)
newdir == ED_SEARCH_PREV_HISTORY ? 0 : 0x7fffffff;
if (hist_get(el) == CC_ERROR)
/* el->el_history.eventno was fixed by first call */
- (void) hist_get(el);
+ (void)hist_get(el);
el->el_line.cursor = newdir == ED_SEARCH_PREV_HISTORY ?
el->el_line.lastchar : el->el_line.buffer;
} else
@@ -370,7 +371,7 @@ ce_inc_search(el, dir)
if (ret != CC_ERROR) {
el->el_line.cursor = newdir == ED_SEARCH_PREV_HISTORY ?
el->el_line.lastchar : el->el_line.buffer;
- (void) ce_search_line(el, &el->el_search.patbuf[1],
+ (void)ce_search_line(el, &el->el_search.patbuf[1],
newdir);
}
}
@@ -467,11 +468,13 @@ cv_search(el, dir)
}
#ifdef ANCHOR
if (el->el_search.patbuf[0] != '.' && el->el_search.patbuf[0] != '*') {
- (void) strcpy(tmpbuf, el->el_search.patbuf);
+ (void)strncpy(tmpbuf, el->el_search.patbuf, sizeof(tmpbuf) - 1);
+ tmpbuf[sizeof(tmpbuf) - 1] = '\0';
el->el_search.patbuf[0] = '.';
el->el_search.patbuf[1] = '*';
- (void) strncpy(&el->el_search.patbuf[2], tmpbuf, EL_BUFSIZ - 3);
- el->el_search.patbuf[EL_BUFSIZ - 1] = '\0';
+ (void)strncpy(&el->el_search.patbuf[2], tmpbuf,
+ sizeof(el->el_search.patbuf) - 3);
+ el->el_search.patbuf[sizeof(el->el_search.patbuf) - 1] = '\0';
el->el_search.patlen++;
el->el_search.patbuf[el->el_search.patlen++] = '.';
el->el_search.patbuf[el->el_search.patlen++] = '*';
@@ -485,8 +488,10 @@ cv_search(el, dir)
tmpbuf[tmplen++] = '*';
#endif
tmpbuf[tmplen] = '\0';
- (void) strcpy(el->el_search.patbuf, tmpbuf);
- el->el_search.patlen = tmplen;
+ (void)strncpy(el->el_search.patbuf, tmpbuf,
+ sizeof(el->el_search.patbuf) - 1);
+ el->el_search.patbuf[sizeof(el->el_search.patbuf) - 1] = '\0';
+ el->el_search.patlen = strlen(el->el_search.patbuf);
}
el->el_state.lastcmd = (el_action_t) dir; /* avoid c_setpat */
el->el_line.cursor = el->el_line.lastchar = el->el_line.buffer;
@@ -548,7 +553,7 @@ cv_repeat_srch(el, c)
int c;
{
#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "dir %d patlen %d patbuf %s\n",
+ (void)fprintf(el->el_errfile, "dir %d patlen %d patbuf %s\n",
c, el->el_search.patlen, el->el_search.patbuf);
#endif
diff --git a/lib/libedit/search.h b/lib/libedit/search.h
index 5d2a8e6fad2..6cf20ed58c7 100644
--- a/lib/libedit/search.h
+++ b/lib/libedit/search.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: search.h,v 1.2 1997/01/16 05:18:44 millert Exp $ */
+/* $OpenBSD: search.h,v 1.3 1997/03/14 05:13:02 millert Exp $ */
+/* $NetBSD: search.h,v 1.2 1997/01/11 06:48:09 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/sig.c b/lib/libedit/sig.c
index b2880df95e9..06a0d490ccd 100644
--- a/lib/libedit/sig.c
+++ b/lib/libedit/sig.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: sig.c,v 1.3 1997/03/14 04:15:38 tholo Exp $ */
+/* $OpenBSD: sig.c,v 1.4 1997/03/14 05:13:02 millert Exp $ */
+/* $NetBSD: sig.c,v 1.2 1997/01/11 06:48:10 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)sig.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: sig.c,v 1.3 1997/03/14 04:15:38 tholo Exp $";
+static char rcsid[] = "$OpenBSD: sig.c,v 1.4 1997/03/14 05:13:02 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -76,9 +77,9 @@ sig_handler(signo)
int i;
sigset_t nset, oset;
- (void) sigemptyset(&nset);
- (void) sigaddset(&nset, signo);
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
+ (void)sigemptyset(&nset);
+ (void)sigaddset(&nset, signo);
+ (void)sigprocmask(SIG_BLOCK, &nset, &oset);
switch (signo) {
case SIGCONT:
@@ -101,9 +102,9 @@ sig_handler(signo)
if (signo == sighdl[i])
break;
- (void) signal(signo, sel->el_signal[i]);
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
- (void) kill(0, signo);
+ (void)signal(signo, sel->el_signal[i]);
+ (void)sigprocmask(SIG_SETMASK, &oset, NULL);
+ (void)kill(0, signo);
}
@@ -117,11 +118,11 @@ sig_init(el)
int i;
sigset_t nset, oset;
- (void) sigemptyset(&nset);
-#define _DO(a) (void) sigaddset(&nset, a);
+ (void)sigemptyset(&nset);
+#define _DO(a) (void)sigaddset(&nset, a);
ALLSIGS
#undef _DO
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
+ (void)sigprocmask(SIG_BLOCK, &nset, &oset);
#define SIGSIZE (sizeof(sighdl) / sizeof(sighdl[0]) * sizeof(sig_t))
@@ -129,7 +130,7 @@ sig_init(el)
for (i = 0; sighdl[i] != -1; i++)
el->el_signal[i] = BADSIG;
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
+ (void)sigprocmask(SIG_SETMASK, &oset, NULL);
return 0;
}
@@ -157,11 +158,11 @@ sig_set(el)
int i;
sigset_t nset, oset;
- (void) sigemptyset(&nset);
-#define _DO(a) (void) sigaddset(&nset, a);
+ (void)sigemptyset(&nset);
+#define _DO(a) (void)sigaddset(&nset, a);
ALLSIGS
#undef _DO
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
+ (void)sigprocmask(SIG_BLOCK, &nset, &oset);
for (i = 0; sighdl[i] != -1; i++) {
sig_t s;
@@ -170,7 +171,7 @@ sig_set(el)
el->el_signal[i] = s;
}
sel = el;
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
+ (void)sigprocmask(SIG_SETMASK, &oset, NULL);
}
@@ -184,16 +185,16 @@ sig_clr(el)
int i;
sigset_t nset, oset;
- (void) sigemptyset(&nset);
-#define _DO(a) (void) sigaddset(&nset, a);
+ (void)sigemptyset(&nset);
+#define _DO(a) (void)sigaddset(&nset, a);
ALLSIGS
#undef _DO
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
+ (void)sigprocmask(SIG_BLOCK, &nset, &oset);
for (i = 0; sighdl[i] != -1; i++)
if (el->el_signal[i] != BADSIG)
- (void) signal(sighdl[i], el->el_signal[i]);
+ (void)signal(sighdl[i], el->el_signal[i]);
sel = NULL; /* we are going to die if the handler is called */
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
+ (void)sigprocmask(SIG_SETMASK, &oset, NULL);
}
diff --git a/lib/libedit/sig.h b/lib/libedit/sig.h
index 92021100f4e..e70bbb611bf 100644
--- a/lib/libedit/sig.h
+++ b/lib/libedit/sig.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: sig.h,v 1.2 1997/01/16 05:18:45 millert Exp $ */
+/* $OpenBSD: sig.h,v 1.3 1997/03/14 05:13:03 millert Exp $ */
+/* $NetBSD: sig.h,v 1.2 1997/01/11 06:48:11 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/sys.h b/lib/libedit/sys.h
index 38321de8261..bdb62121c62 100644
--- a/lib/libedit/sys.h
+++ b/lib/libedit/sys.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: sys.h,v 1.2 1997/01/16 05:18:46 millert Exp $ */
+/* $OpenBSD: sys.h,v 1.3 1997/03/14 05:13:04 millert Exp $ */
+/* $NetBSD: sys.h,v 1.3 1997/01/11 06:48:12 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/term.c b/lib/libedit/term.c
index 8253a86340e..5a9a088c358 100644
--- a/lib/libedit/term.c
+++ b/lib/libedit/term.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: term.c,v 1.2 1997/01/16 05:18:47 millert Exp $ */
+/* $OpenBSD: term.c,v 1.3 1997/03/14 05:13:05 millert Exp $ */
+/* $NetBSD: term.c,v 1.8 1997/01/23 14:02:49 mrg Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)term.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: term.c,v 1.2 1997/01/16 05:18:47 millert Exp $";
+static char rcsid[] = "$OpenBSD: term.c,v 1.3 1997/03/14 05:13:05 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -290,15 +291,15 @@ term_setflags(el)
#ifdef DEBUG_SCREEN
if (!EL_CAN_UP) {
- (void) fprintf(el->el_errfile, "WARNING: Your terminal cannot move up.\n");
- (void) fprintf(el->el_errfile, "Editing may be odd for long lines.\n");
+ (void)fprintf(el->el_errfile, "WARNING: Your terminal cannot move up.\n");
+ (void)fprintf(el->el_errfile, "Editing may be odd for long lines.\n");
}
if (!EL_CAN_CEOL)
- (void) fprintf(el->el_errfile, "no clear EOL capability.\n");
+ (void)fprintf(el->el_errfile, "no clear EOL capability.\n");
if (!EL_CAN_DELETE)
- (void) fprintf(el->el_errfile, "no delete char capability.\n");
+ (void)fprintf(el->el_errfile, "no delete char capability.\n");
if (!EL_CAN_INSERT)
- (void) fprintf(el->el_errfile, "no insert char capability.\n");
+ (void)fprintf(el->el_errfile, "no insert char capability.\n");
#endif /* DEBUG_SCREEN */
}
@@ -315,11 +316,11 @@ term_init(el)
el->el_term.t_fkey = (fkey_t *) el_malloc(4 * sizeof(fkey_t));
el->el_term.t_loc = 0;
el->el_term.t_str = (char **) el_malloc(T_str * sizeof(char*));
- (void) memset(el->el_term.t_str, 0, T_str * sizeof(char*));
+ (void)memset(el->el_term.t_str, 0, T_str * sizeof(char*));
el->el_term.t_val = (int *) el_malloc(T_val * sizeof(int));
- (void) memset(el->el_term.t_val, 0, T_val * sizeof(char*));
+ (void)memset(el->el_term.t_val, 0, T_val * sizeof(char*));
term_outfile = el->el_outfile;
- (void) term_set(el, NULL);
+ (void)term_set(el, NULL);
term_init_arrow(el);
return 0;
}
@@ -371,7 +372,7 @@ term_alloc(el, t, cap)
* New string is shorter; no need to allocate space
*/
if (clen <= tlen) {
- (void) strcpy(*str, cap);
+ (void)strcpy(*str, cap);
return;
}
@@ -379,7 +380,7 @@ term_alloc(el, t, cap)
* New string is longer; see if we have enough space to append
*/
if (el->el_term.t_loc + 3 < TC_BUFSIZE) {
- (void) strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], cap);
+ (void)strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], cap);
el->el_term.t_loc += clen + 1; /* one for \0 */
return;
}
@@ -400,10 +401,10 @@ term_alloc(el, t, cap)
memcpy(el->el_term.t_buf, termbuf, TC_BUFSIZE);
el->el_term.t_loc = tlen;
if (el->el_term.t_loc + 3 >= TC_BUFSIZE) {
- (void) fprintf(el->el_errfile, "Out of termcap string space.\n");
+ (void)fprintf(el->el_errfile, "Out of termcap string space.\n");
return;
}
- (void) strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], cap);
+ (void)strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], cap);
el->el_term.t_loc += clen + 1; /* one for \0 */
return;
} /* end term_alloc */
@@ -497,7 +498,7 @@ term_move_to_line(el, where)
if (where > el->el_term.t_size.v) {
#ifdef DEBUG_SCREEN
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"term_move_to_line: where is ridiculous: %d\r\n", where);
#endif /* DEBUG_SCREEN */
return;
@@ -505,7 +506,7 @@ term_move_to_line(el, where)
if ((del = where - el->el_cursor.v) > 0) {
if ((del > 1) && GoodStr(T_DO))
- (void) tputs(tgoto(Str(T_DO), del, del), del, term__putc);
+ (void)tputs(tgoto(Str(T_DO), del, del), del, term__putc);
else {
for (i = 0; i < del; i++)
term__putc('\n');
@@ -514,11 +515,11 @@ term_move_to_line(el, where)
}
else { /* del < 0 */
if (GoodStr(T_UP) && (-del > 1 || !GoodStr(T_up)))
- (void) tputs(tgoto(Str(T_UP), -del, -del), -del, term__putc);
+ (void)tputs(tgoto(Str(T_UP), -del, -del), -del, term__putc);
else {
if (GoodStr(T_up))
for (i = 0; i < -del; i++)
- (void) tputs(Str(T_up), 1, term__putc);
+ (void)tputs(Str(T_up), 1, term__putc);
}
}
el->el_cursor.v = where; /* now where is here */
@@ -541,7 +542,7 @@ mc_again:
if (where > (el->el_term.t_size.h + 1)) {
#ifdef DEBUG_SCREEN
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"term_move_to_char: where is riduculous: %d\r\n", where);
#endif /* DEBUG_SCREEN */
return;
@@ -557,11 +558,11 @@ mc_again:
if ((del < -4 || del > 4) && GoodStr(T_ch))
/* go there directly */
- (void) tputs(tgoto(Str(T_ch), where, where), where, term__putc);
+ (void)tputs(tgoto(Str(T_ch), where, where), where, term__putc);
else {
if (del > 0) { /* moving forward */
if ((del > 4) && GoodStr(T_RI))
- (void) tputs(tgoto(Str(T_RI), del, del), del, term__putc);
+ (void)tputs(tgoto(Str(T_RI), del, del), del, term__putc);
else {
if (EL_CAN_TAB) { /* if I can do tabs, use them */
if ((el->el_cursor.h & 0370) != (where & 0370)) {
@@ -583,7 +584,7 @@ mc_again:
}
else { /* del < 0 := moving backward */
if ((-del > 4) && GoodStr(T_LE))
- (void) tputs(tgoto(Str(T_LE), -del, -del), -del, term__putc);
+ (void)tputs(tgoto(Str(T_LE), -del, -del), -del, term__putc);
else { /* can't go directly there */
/* if the "cost" is greater than the "cost" from col 0 */
if (EL_CAN_TAB ? (-del > ((where >> 3) + (where & 07)))
@@ -615,7 +616,7 @@ term_overwrite(el, cp, n)
if (n > (el->el_term.t_size.h + 1)) {
#ifdef DEBUG_SCREEN
- (void) fprintf(el->el_errfile, "term_overwrite: n is riduculous: %d\r\n", n);
+ (void)fprintf(el->el_errfile, "term_overwrite: n is riduculous: %d\r\n", n);
#endif /* DEBUG_SCREEN */
return;
}
@@ -640,14 +641,14 @@ term_deletechars(el, num)
if (!EL_CAN_DELETE) {
#ifdef DEBUG_EDIT
- (void) fprintf(el->el_errfile, " ERROR: cannot delete \n");
+ (void)fprintf(el->el_errfile, " ERROR: cannot delete \n");
#endif /* DEBUG_EDIT */
return;
}
if (num > el->el_term.t_size.h) {
#ifdef DEBUG_SCREEN
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"term_deletechars: num is riduculous: %d\r\n", num);
#endif /* DEBUG_SCREEN */
return;
@@ -655,19 +656,19 @@ term_deletechars(el, num)
if (GoodStr(T_DC)) /* if I have multiple delete */
if ((num > 1) || !GoodStr(T_dc)) { /* if dc would be more expen. */
- (void) tputs(tgoto(Str(T_DC), num, num), num, term__putc);
+ (void)tputs(tgoto(Str(T_DC), num, num), num, term__putc);
return;
}
if (GoodStr(T_dm)) /* if I have delete mode */
- (void) tputs(Str(T_dm), 1, term__putc);
+ (void)tputs(Str(T_dm), 1, term__putc);
if (GoodStr(T_dc)) /* else do one at a time */
while (num--)
- (void) tputs(Str(T_dc), 1, term__putc);
+ (void)tputs(Str(T_dc), 1, term__putc);
if (GoodStr(T_ed)) /* if I have delete mode */
- (void) tputs(Str(T_ed), 1, term__putc);
+ (void)tputs(Str(T_ed), 1, term__putc);
} /* end term_deletechars */
@@ -685,27 +686,27 @@ term_insertwrite(el, cp, num)
return;
if (!EL_CAN_INSERT) {
#ifdef DEBUG_EDIT
- (void) fprintf(el->el_errfile, " ERROR: cannot insert \n");
+ (void)fprintf(el->el_errfile, " ERROR: cannot insert \n");
#endif /* DEBUG_EDIT */
return;
}
if (num > el->el_term.t_size.h) {
#ifdef DEBUG_SCREEN
- (void) fprintf(el->el_errfile, "StartInsert: num is riduculous: %d\r\n", num);
+ (void)fprintf(el->el_errfile, "StartInsert: num is riduculous: %d\r\n", num);
#endif /* DEBUG_SCREEN */
return;
}
if (GoodStr(T_IC)) /* if I have multiple insert */
if ((num > 1) || !GoodStr(T_ic)) { /* if ic would be more expen. */
- (void) tputs(tgoto(Str(T_IC), num, num), num, term__putc);
+ (void)tputs(tgoto(Str(T_IC), num, num), num, term__putc);
term_overwrite(el, cp, num); /* this updates el_cursor.h */
return;
}
if (GoodStr(T_im) && GoodStr(T_ei)) { /* if I have insert mode */
- (void) tputs(Str(T_im), 1, term__putc);
+ (void)tputs(Str(T_im), 1, term__putc);
el->el_cursor.h += num;
do
@@ -713,22 +714,22 @@ term_insertwrite(el, cp, num)
while (--num);
if (GoodStr(T_ip)) /* have to make num chars insert */
- (void) tputs(Str(T_ip), 1, term__putc);
+ (void)tputs(Str(T_ip), 1, term__putc);
- (void) tputs(Str(T_ei), 1, term__putc);
+ (void)tputs(Str(T_ei), 1, term__putc);
return;
}
do {
if (GoodStr(T_ic)) /* have to make num chars insert */
- (void) tputs(Str(T_ic), 1, term__putc); /* insert a char */
+ (void)tputs(Str(T_ic), 1, term__putc); /* insert a char */
term__putc(*cp++);
el->el_cursor.h++;
if (GoodStr(T_ip)) /* have to make num chars insert */
- (void) tputs(Str(T_ip), 1, term__putc);/* pad the inserted char */
+ (void)tputs(Str(T_ip), 1, term__putc);/* pad the inserted char */
} while (--num);
} /* end term_insertwrite */
@@ -745,7 +746,7 @@ term_clear_EOL(el, num)
int i;
if (EL_CAN_CEOL && GoodStr(T_ce))
- (void) tputs(Str(T_ce), 1, term__putc);
+ (void)tputs(Str(T_ce), 1, term__putc);
else {
for (i = 0; i < num; i++)
term__putc(' ');
@@ -763,11 +764,11 @@ term_clear_screen(el)
{ /* clear the whole screen and home */
if (GoodStr(T_cl))
/* send the clear screen code */
- (void) tputs(Str(T_cl), Val(T_li), term__putc);
+ (void)tputs(Str(T_cl), Val(T_li), term__putc);
else if (GoodStr(T_ho) && GoodStr(T_cd)) {
- (void) tputs(Str(T_ho), Val(T_li), term__putc); /* home */
+ (void)tputs(Str(T_ho), Val(T_li), term__putc); /* home */
/* clear to bottom of screen */
- (void) tputs(Str(T_cd), Val(T_li), term__putc);
+ (void)tputs(Str(T_cd), Val(T_li), term__putc);
}
else {
term__putc('\r');
@@ -784,10 +785,10 @@ term_beep(el)
EditLine *el;
{
if (GoodStr(T_vb))
- (void) tputs(Str(T_vb), 1, term__putc); /* visible bell */
+ (void)tputs(Str(T_vb), 1, term__putc); /* visible bell */
else if (GoodStr(T_bl))
/* what termcap says we should use */
- (void) tputs(Str(T_bl), 1, term__putc);
+ (void)tputs(Str(T_bl), 1, term__putc);
else
term__putc('\007'); /* an ASCII bell; ^G */
} /* end term_beep */
@@ -802,9 +803,9 @@ term_clear_to_bottom(el)
EditLine *el;
{
if (GoodStr(T_cd))
- (void) tputs(Str(T_cd), Val(T_li), term__putc);
+ (void)tputs(Str(T_cd), Val(T_li), term__putc);
else if (GoodStr(T_ce))
- (void) tputs(Str(T_ce), Val(T_li), term__putc);
+ (void)tputs(Str(T_ce), Val(T_li), term__putc);
} /* end term_clear_to_bottom */
#endif
@@ -824,9 +825,9 @@ term_set(el, term)
sigset_t oset, nset;
int lins, cols;
- (void) sigemptyset(&nset);
- (void) sigaddset(&nset, SIGWINCH);
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
+ (void)sigemptyset(&nset);
+ (void)sigaddset(&nset, SIGWINCH);
+ (void)sigprocmask(SIG_BLOCK, &nset, &oset);
area = buf;
@@ -843,11 +844,11 @@ term_set(el, term)
if (i <= 0) {
if (i == -1)
- (void) fprintf(el->el_errfile, "Cannot read termcap database;\n");
+ (void)fprintf(el->el_errfile, "Cannot read termcap database;\n");
else if (i == 0)
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"No entry for terminal type \"%s\";\n", term);
- (void) fprintf(el->el_errfile, "using dumb terminal settings.\n");
+ (void)fprintf(el->el_errfile, "using dumb terminal settings.\n");
Val(T_co) = 80; /* do a dumb terminal */
Val(T_pt) = Val(T_km) = Val(T_li) = 0;
Val(T_xt) = Val(T_MT);
@@ -878,9 +879,9 @@ term_set(el, term)
term_setflags(el);
- (void) term_get_size(el, &lins, &cols);/* get the correct window size */
+ (void)term_get_size(el, &lins, &cols);/* get the correct window size */
term_change_size(el, lins, cols);
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
+ (void)sigprocmask(SIG_SETMASK, &oset, NULL);
term_bind_arrow(el);
return 0;
} /* end term_set */
@@ -1138,7 +1139,7 @@ protected void
term__putc(c)
int c;
{
- (void) fputc(c, term_outfile);
+ (void)fputc(c, term_outfile);
} /* end term__putc */
@@ -1148,7 +1149,7 @@ term__putc(c)
protected void
term__flush()
{
- (void) fflush(term_outfile);
+ (void)fflush(term_outfile);
} /* end term__flush */
@@ -1166,27 +1167,27 @@ term_telltc(el, argc, argv)
char **ts;
char upbuf[EL_BUFSIZ];
- (void) fprintf(el->el_outfile, "\n\tYour terminal has the\n");
- (void) fprintf(el->el_outfile, "\tfollowing characteristics:\n\n");
- (void) fprintf(el->el_outfile, "\tIt has %d columns and %d lines\n",
+ (void)fprintf(el->el_outfile, "\n\tYour terminal has the\n");
+ (void)fprintf(el->el_outfile, "\tfollowing characteristics:\n\n");
+ (void)fprintf(el->el_outfile, "\tIt has %d columns and %d lines\n",
Val(T_co), Val(T_li));
- (void) fprintf(el->el_outfile,
+ (void)fprintf(el->el_outfile,
"\tIt has %s meta key\n", EL_HAS_META ? "a" : "no");
- (void) fprintf(el->el_outfile,
+ (void)fprintf(el->el_outfile,
"\tIt can%suse tabs\n", EL_CAN_TAB ? " " : "not ");
#ifdef notyet
- (void) fprintf(el->el_outfile, "\tIt %s automatic margins\n",
+ (void)fprintf(el->el_outfile, "\tIt %s automatic margins\n",
(T_Margin&MARGIN_AUTO)? "has": "does not have");
if (T_Margin & MARGIN_AUTO)
- (void) fprintf(el->el_outfile, "\tIt %s magic margins\n",
+ (void)fprintf(el->el_outfile, "\tIt %s magic margins\n",
(T_Margin&MARGIN_MAGIC)?"has":"does not have");
#endif
for (t = tstr, ts = el->el_term.t_str; t->name != NULL; t++, ts++)
- (void) fprintf(el->el_outfile, "\t%25s (%s) == %s\n", t->long_name,
+ (void)fprintf(el->el_outfile, "\t%25s (%s) == %s\n", t->long_name,
t->name, *ts && **ts ?
key__decode_str(*ts, upbuf, "") : "(empty)");
- (void) fputc('\n', el->el_outfile);
+ (void)fputc('\n', el->el_outfile);
return 0;
}
@@ -1242,7 +1243,7 @@ term_settc(el, argc, argv)
else if (strcmp(how, "no") == 0)
el->el_term.t_val[tv - tval] = 0;
else {
- (void) fprintf(el->el_errfile, "settc: Bad value `%s'.\n", how);
+ (void)fprintf(el->el_errfile, "settc: Bad value `%s'.\n", how);
return -1;
}
term_setflags(el);
@@ -1303,21 +1304,21 @@ term_echotc(el, argc, argv)
if (!*argv || *argv[0] == '\0')
return 0;
if (strcmp(*argv, "tabs") == 0) {
- (void) fprintf(el->el_outfile, fmts, EL_CAN_TAB ? "yes" : "no");
+ (void)fprintf(el->el_outfile, fmts, EL_CAN_TAB ? "yes" : "no");
return 0;
}
else if (strcmp(*argv, "meta") == 0) {
- (void) fprintf(el->el_outfile, fmts, Val(T_km) ? "yes" : "no");
+ (void)fprintf(el->el_outfile, fmts, Val(T_km) ? "yes" : "no");
return 0;
}
#ifdef notyet
else if (strcmp(*argv, "xn") == 0) {
- (void) fprintf(el->el_outfile, fmts, T_Margin & MARGIN_MAGIC ?
+ (void)fprintf(el->el_outfile, fmts, T_Margin & MARGIN_MAGIC ?
"yes" : "no");
return 0;
}
else if (strcmp(*argv, "am") == 0) {
- (void) fprintf(el->el_outfile, fmts, T_Margin & MARGIN_AUTO ?
+ (void)fprintf(el->el_outfile, fmts, T_Margin & MARGIN_AUTO ?
"yes" : "no");
return 0;
}
@@ -1328,21 +1329,21 @@ term_echotc(el, argc, argv)
for (i = 0; baud_rate[i].b_name != NULL; i++)
if (el->el_tty.t_speed == baud_rate[i].b_rate) {
- (void) fprintf(el->el_outfile, fmts, baud_rate[i].b_name);
+ (void)fprintf(el->el_outfile, fmts, baud_rate[i].b_name);
return 0;
}
- (void) fprintf(el->el_outfile, fmtd, 0);
+ (void)fprintf(el->el_outfile, fmtd, 0);
#else
- (void) fprintf(el->el_outfile, fmtd, el->el_tty.t_speed);
+ (void)fprintf(el->el_outfile, fmtd, el->el_tty.t_speed);
#endif
return 0;
}
else if (strcmp(*argv, "rows") == 0 || strcmp(*argv, "lines") == 0) {
- (void) fprintf(el->el_outfile, fmtd, Val(T_li));
+ (void)fprintf(el->el_outfile, fmtd, Val(T_li));
return 0;
}
else if (strcmp(*argv, "cols") == 0) {
- (void) fprintf(el->el_outfile, fmtd, Val(T_co));
+ (void)fprintf(el->el_outfile, fmtd, Val(T_co));
return 0;
}
@@ -1359,7 +1360,7 @@ term_echotc(el, argc, argv)
scap = tgetstr(*argv, &area);
if (!scap || scap[0] == '\0') {
if (!silent)
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"echotc: Termcap parameter `%s' not found.\n", *argv);
return -1;
}
@@ -1390,7 +1391,7 @@ term_echotc(el, argc, argv)
* hpux has lot's of them...
*/
if (verbose)
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"echotc: Warning: unknown termcap %% `%c'.\n", *cap);
/* This is bad, but I won't complain */
break;
@@ -1401,17 +1402,17 @@ term_echotc(el, argc, argv)
argv++;
if (*argv && *argv[0]) {
if (!silent)
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"echotc: Warning: Extra argument `%s'.\n", *argv);
return -1;
}
- (void) tputs(scap, 1, term__putc);
+ (void)tputs(scap, 1, term__putc);
break;
case 1:
argv++;
if (!*argv || *argv[0] == '\0') {
if (!silent)
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"echotc: Warning: Missing argument.\n");
return -1;
}
@@ -1420,16 +1421,16 @@ term_echotc(el, argc, argv)
argv++;
if (*argv && *argv[0]) {
if (!silent)
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"echotc: Warning: Extra argument `%s'.\n", *argv);
return -1;
}
- (void) tputs(tgoto(scap, arg_cols, arg_rows), 1, term__putc);
+ (void)tputs(tgoto(scap, arg_cols, arg_rows), 1, term__putc);
break;
default:
/* This is wrong, but I will ignore it... */
if (verbose)
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"echotc: Warning: Too many required arguments (%d).\n",
arg_need);
/*FALLTHROUGH*/
@@ -1437,7 +1438,7 @@ term_echotc(el, argc, argv)
argv++;
if (!*argv || *argv[0] == '\0') {
if (!silent)
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"echotc: Warning: Missing argument.\n");
return -1;
}
@@ -1445,7 +1446,7 @@ term_echotc(el, argc, argv)
argv++;
if (!*argv || *argv[0] == '\0') {
if (!silent)
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"echotc: Warning: Missing argument.\n");
return -1;
}
@@ -1453,11 +1454,11 @@ term_echotc(el, argc, argv)
argv++;
if (*argv && *argv[0]) {
if (!silent)
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"echotc: Warning: Extra argument `%s'.\n", *argv);
return -1;
}
- (void) tputs(tgoto(scap, arg_cols, arg_rows), arg_rows, term__putc);
+ (void)tputs(tgoto(scap, arg_cols, arg_rows), arg_rows, term__putc);
break;
}
return 0;
diff --git a/lib/libedit/term.h b/lib/libedit/term.h
index b7ac3e708f1..451d85291c9 100644
--- a/lib/libedit/term.h
+++ b/lib/libedit/term.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: term.h,v 1.2 1997/01/16 05:18:48 millert Exp $ */
+/* $OpenBSD: term.h,v 1.3 1997/03/14 05:13:06 millert Exp $ */
+/* $NetBSD: term.h,v 1.4 1997/01/11 06:48:14 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/termcap.h b/lib/libedit/termcap.h
index 6be66f669f3..507bdbf6796 100644
--- a/lib/libedit/termcap.h
+++ b/lib/libedit/termcap.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: termcap.h,v 1.2 1997/01/16 05:18:48 millert Exp $ */
+/* $OpenBSD: termcap.h,v 1.3 1997/03/14 05:13:06 millert Exp $ */
+/* $NetBSD: termcap.h,v 1.2 1997/01/11 06:48:14 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/tokenizer.c b/lib/libedit/tokenizer.c
index 3446504ba3b..ed7b8e7b79a 100644
--- a/lib/libedit/tokenizer.c
+++ b/lib/libedit/tokenizer.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: tokenizer.c,v 1.2 1997/01/16 05:18:49 millert Exp $ */
+/* $OpenBSD: tokenizer.c,v 1.3 1997/03/14 05:13:07 millert Exp $ */
+/* $NetBSD: tokenizer.c,v 1.2 1997/01/11 06:48:15 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)tokenizer.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: tokenizer.c,v 1.2 1997/01/16 05:18:49 millert Exp $";
+static char rcsid[] = "$OpenBSD: tokenizer.c,v 1.3 1997/03/14 05:13:07 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
diff --git a/lib/libedit/tokenizer.h b/lib/libedit/tokenizer.h
index dd7137df4bf..33cc9753bff 100644
--- a/lib/libedit/tokenizer.h
+++ b/lib/libedit/tokenizer.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: tokenizer.h,v 1.2 1997/01/16 05:18:50 millert Exp $ */
+/* $OpenBSD: tokenizer.h,v 1.3 1997/03/14 05:13:08 millert Exp $ */
+/* $NetBSD: tokenizer.h,v 1.2 1997/01/11 06:48:16 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libedit/tty.c b/lib/libedit/tty.c
index bcaa5043095..69f12aec2ed 100644
--- a/lib/libedit/tty.c
+++ b/lib/libedit/tty.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: tty.c,v 1.2 1997/01/16 05:18:50 millert Exp $ */
+/* $OpenBSD: tty.c,v 1.3 1997/03/14 05:13:09 millert Exp $ */
+/* $NetBSD: tty.c,v 1.2 1997/01/11 06:48:17 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: tty.c,v 1.2 1997/01/16 05:18:50 millert Exp $";
+static char rcsid[] = "$OpenBSD: tty.c,v 1.3 1997/03/14 05:13:09 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -470,7 +471,7 @@ tty_setup(el)
int rst = 1;
if (tty_getty(el, &el->el_tty.t_ed) == -1) {
#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile,
+ (void)fprintf(el->el_errfile,
"tty_setup: tty_getty: %s\n", strerror(errno));
#endif /* DEBUG_TTY */
return(-1);
@@ -515,7 +516,7 @@ tty_setup(el)
tty__setchar(&el->el_tty.t_ex, el->el_tty.t_c[EX_IO]);
if (tty_setty(el, &el->el_tty.t_ex) == -1) {
#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "tty_setup: tty_setty: %s\n",
+ (void)fprintf(el->el_errfile, "tty_setup: tty_setty: %s\n",
strerror(errno));
#endif /* DEBUG_TTY */
return(-1);
@@ -546,8 +547,8 @@ tty_init(el)
{
el->el_tty.t_mode = EX_IO;
el->el_tty.t_vdisable = _POSIX_VDISABLE;
- (void) memcpy(el->el_tty.t_t, ttyperm, sizeof(ttyperm_t));
- (void) memcpy(el->el_tty.t_c, ttychar, sizeof(ttychar_t));
+ (void)memcpy(el->el_tty.t_t, ttyperm, sizeof(ttyperm_t));
+ (void)memcpy(el->el_tty.t_c, ttychar, sizeof(ttychar_t));
return tty_setup(el);
} /* end tty_init */
@@ -804,7 +805,7 @@ tty_rawmode(el)
if (tty_getty(el, &el->el_tty.t_ts) == -1) {
#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "tty_rawmode: tty_getty: %s\n", strerror(errno));
+ (void)fprintf(el->el_errfile, "tty_rawmode: tty_getty: %s\n", strerror(errno));
#endif /* DEBUG_TTY */
return(-1);
}
@@ -818,10 +819,10 @@ tty_rawmode(el)
if (tty__getspeed(&el->el_tty.t_ex) != el->el_tty.t_speed ||
tty__getspeed(&el->el_tty.t_ed) != el->el_tty.t_speed) {
- (void) cfsetispeed(&el->el_tty.t_ex, el->el_tty.t_speed);
- (void) cfsetospeed(&el->el_tty.t_ex, el->el_tty.t_speed);
- (void) cfsetispeed(&el->el_tty.t_ed, el->el_tty.t_speed);
- (void) cfsetospeed(&el->el_tty.t_ed, el->el_tty.t_speed);
+ (void)cfsetispeed(&el->el_tty.t_ex, el->el_tty.t_speed);
+ (void)cfsetospeed(&el->el_tty.t_ex, el->el_tty.t_speed);
+ (void)cfsetispeed(&el->el_tty.t_ed, el->el_tty.t_speed);
+ (void)cfsetospeed(&el->el_tty.t_ed, el->el_tty.t_speed);
}
if (tty__cooked_mode(&el->el_tty.t_ts)) {
@@ -916,7 +917,7 @@ tty_rawmode(el)
if (tty_setty(el, &el->el_tty.t_ed) == -1) {
#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "tty_rawmode: tty_setty: %s\n",
+ (void)fprintf(el->el_errfile, "tty_rawmode: tty_setty: %s\n",
strerror(errno));
#endif /* DEBUG_TTY */
return -1;
@@ -938,7 +939,7 @@ tty_cookedmode(el)
if (tty_setty(el, &el->el_tty.t_ex) == -1) {
#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "tty_cookedmode: tty_setty: %s\n",
+ (void)fprintf(el->el_errfile, "tty_cookedmode: tty_setty: %s\n",
strerror(errno));
#endif /* DEBUG_TTY */
return -1;
@@ -974,7 +975,7 @@ tty_quotemode(el)
if (tty_setty(el, &el->el_tty.t_qu) == -1) {
#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "QuoteModeOn: tty_setty: %s\n",
+ (void)fprintf(el->el_errfile, "QuoteModeOn: tty_setty: %s\n",
strerror(errno));
#endif /* DEBUG_TTY */
return -1;
@@ -995,7 +996,7 @@ tty_noquotemode(el)
return 0;
if (tty_setty(el, &el->el_tty.t_ed) == -1) {
#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "QuoteModeOff: tty_setty: %s\n",
+ (void)fprintf(el->el_errfile, "QuoteModeOff: tty_setty: %s\n",
strerror(errno));
#endif /* DEBUG_TTY */
return -1;
@@ -1044,7 +1045,7 @@ tty_stty(el, argc, argv)
z = QU_IO;
break;
default:
- (void) fprintf(el->el_errfile, "%s: Unknown switch `%c'.\n",
+ (void)fprintf(el->el_errfile, "%s: Unknown switch `%c'.\n",
name, argv[0][1]);
return -1;
}
@@ -1054,7 +1055,7 @@ tty_stty(el, argc, argv)
int len = 0, st = 0, cu;
for (m = ttymodes; m->m_name; m++) {
if (m->m_type != i) {
- (void) fprintf(el->el_outfile, "%s%s", i != -1 ? "\n" : "",
+ (void)fprintf(el->el_outfile, "%s%s", i != -1 ? "\n" : "",
el->el_tty.t_t[z][m->m_type].t_name);
i = m->m_type;
st = len = strlen(el->el_tty.t_t[z][m->m_type].t_name);
@@ -1068,19 +1069,19 @@ tty_stty(el, argc, argv)
cu = strlen(m->m_name) + (x != '\0') + 1;
if (len + cu >= el->el_term.t_size.h) {
- (void) fprintf(el->el_outfile, "\n%*s", st, "");
+ (void)fprintf(el->el_outfile, "\n%*s", st, "");
len = st + cu;
}
else
len += cu;
if (x != '\0')
- (void) fprintf(el->el_outfile, "%c%s ", x, m->m_name);
+ (void)fprintf(el->el_outfile, "%c%s ", x, m->m_name);
else
- (void) fprintf(el->el_outfile, "%s ", m->m_name);
+ (void)fprintf(el->el_outfile, "%s ", m->m_name);
}
}
- (void) fprintf(el->el_outfile, "\n");
+ (void)fprintf(el->el_outfile, "\n");
return 0;
}
@@ -1100,7 +1101,7 @@ tty_stty(el, argc, argv)
break;
if (!m->m_name) {
- (void) fprintf(el->el_errfile, "%s: Invalid argument `%s'.\n",
+ (void)fprintf(el->el_errfile, "%s: Invalid argument `%s'.\n",
name, d);
return -1;
}
@@ -1141,10 +1142,10 @@ tty_printchar(el, s)
if (m->m_type == M_CHAR && C_SH(i) == m->m_value)
break;
if (m->m_name)
- (void) fprintf(el->el_errfile, "%s ^%c ", m->m_name, s[i] + 'A'-1);
+ (void)fprintf(el->el_errfile, "%s ^%c ", m->m_name, s[i] + 'A'-1);
if (i % 5 == 0)
- (void) fprintf(el->el_errfile, "\n");
+ (void)fprintf(el->el_errfile, "\n");
}
- (void) fprintf(el->el_errfile, "\n");
+ (void)fprintf(el->el_errfile, "\n");
}
#endif /* notyet */
diff --git a/lib/libedit/tty.h b/lib/libedit/tty.h
index 2058bd1c0c2..df99094648b 100644
--- a/lib/libedit/tty.h
+++ b/lib/libedit/tty.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: tty.h,v 1.2 1997/01/16 05:18:51 millert Exp $ */
+/* $OpenBSD: tty.h,v 1.3 1997/03/14 05:13:10 millert Exp $ */
+/* $NetBSD: tty.h,v 1.2 1997/01/11 06:48:18 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
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];