Fri Jul 29 20:58:07 2011 UTC ()
- fix unused params
- unconditionalize vis.h


(christos)
diff -r1.27 -r1.28 src/lib/libedit/common.c
diff -r1.27 -r1.28 src/lib/libedit/filecomplete.c
diff -r1.43 -r1.44 src/lib/libedit/history.c
diff -r1.96 -r1.97 src/lib/libedit/readline.c
diff -r1.37 -r1.38 src/lib/libedit/vi.c

cvs diff -r1.27 -r1.28 src/lib/libedit/common.c (expand / switch to context diff)
--- src/lib/libedit/common.c 2011/07/29 15:20:39 1.27
+++ src/lib/libedit/common.c 2011/07/29 20:58:07 1.28
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.27 2011/07/29 15:20:39 christos Exp $	*/
+/*	$NetBSD: common.c,v 1.28 2011/07/29 20:58:07 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)common.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: common.c,v 1.27 2011/07/29 15:20:39 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.28 2011/07/29 20:58:07 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -137,7 +137,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_delete_next_char(EditLine *el, Int c)
+ed_delete_next_char(EditLine *el, Int c __attribute__((__unused__)))
 {
 #ifdef DEBUG_EDIT
 #define	EL	el->el_line
@@ -432,7 +432,8 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_unassigned(EditLine *el, Int c __attribute__((__unused__)))
+ed_unassigned(EditLine *el __attribute__((__unused__)),
+    Int c __attribute__((__unused__)))
 {
 
 	return CC_ERROR;

cvs diff -r1.27 -r1.28 src/lib/libedit/filecomplete.c (expand / switch to context diff)
--- src/lib/libedit/filecomplete.c 2011/07/29 15:16:33 1.27
+++ src/lib/libedit/filecomplete.c 2011/07/29 20:58:07 1.28
@@ -1,4 +1,4 @@
-/*	$NetBSD: filecomplete.c,v 1.27 2011/07/29 15:16:33 christos Exp $	*/
+/*	$NetBSD: filecomplete.c,v 1.28 2011/07/29 20:58:07 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: filecomplete.c,v 1.27 2011/07/29 15:16:33 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.28 2011/07/29 20:58:07 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -46,11 +46,7 @@
 #include <limits.h>
 #include <errno.h>
 #include <fcntl.h>
-#ifdef HAVE_VIS_H
-#include <vis.h>
-#else
-#include "vis.h"
-#endif
+
 #include "el.h"
 #include "fcns.h"		/* for EL_NUM_FCNS */
 #include "histedit.h"

cvs diff -r1.43 -r1.44 src/lib/libedit/history.c (expand / switch to context diff)
--- src/lib/libedit/history.c 2011/07/29 15:16:33 1.43
+++ src/lib/libedit/history.c 2011/07/29 20:58:07 1.44
@@ -1,4 +1,4 @@
-/*	$NetBSD: history.c,v 1.43 2011/07/29 15:16:33 christos Exp $	*/
+/*	$NetBSD: history.c,v 1.44 2011/07/29 20:58:07 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)history.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: history.c,v 1.43 2011/07/29 15:16:33 christos Exp $");
+__RCSID("$NetBSD: history.c,v 1.44 2011/07/29 20:58:07 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -47,11 +47,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#ifdef HAVE_VIS_H
 #include <vis.h>
-#else
-#include "vis.h"
-#endif
 #include <sys/stat.h>
 
 static const char hist_cookie[] = "_HiStOrY_V2_\n";

cvs diff -r1.96 -r1.97 src/lib/libedit/readline.c (expand / switch to context diff)
--- src/lib/libedit/readline.c 2011/07/29 15:16:33 1.96
+++ src/lib/libedit/readline.c 2011/07/29 20:58:07 1.97
@@ -1,4 +1,4 @@
-/*	$NetBSD: readline.c,v 1.96 2011/07/29 15:16:33 christos Exp $	*/
+/*	$NetBSD: readline.c,v 1.97 2011/07/29 20:58:07 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.96 2011/07/29 15:16:33 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.97 2011/07/29 20:58:07 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -47,11 +47,8 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <setjmp.h>
-#ifdef HAVE_VIS_H
 #include <vis.h>
-#else
-#include "vis.h"
-#endif
+
 #include "readline/readline.h"
 #include "el.h"
 #include "fcns.h"		/* for EL_NUM_FCNS */
@@ -205,7 +202,7 @@
  */
 static int
 /*ARGSUSED*/
-_getc_function(EditLine *el, char *c)
+_getc_function(EditLine *el __attribute__((__unused__)), char *c)
 {
 	int i;
 
@@ -1886,7 +1883,8 @@
 
 /*ARGSUSED*/
 int
-rl_newline(int count, int c)
+rl_newline(int count __attribute__((__unused__)),
+    int c __attribute__((__unused__)))
 {
 	/*
 	 * Readline-4.0 appears to ignore the args.
@@ -1896,7 +1894,7 @@
 
 /*ARGSUSED*/
 static unsigned char
-rl_bind_wrapper(EditLine *el, unsigned char c)
+rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c)
 {
 	if (map[c] == NULL)
 	    return CC_ERROR;
@@ -1991,7 +1989,7 @@
 
 void
 /*ARGSUSED*/
-rl_prep_terminal(int meta_flag)
+rl_prep_terminal(int meta_flag __attribute__((__unused__)))
 {
 	el_set(e, EL_PREP_TERM, 1);
 }
@@ -2207,7 +2205,8 @@
 
 int
 /*ARGSUSED*/
-rl_kill_text(int from, int to)
+rl_kill_text(int from __attribute__((__unused__)),
+    int to __attribute__((__unused__)))
 {
 	return 0;
 }
@@ -2226,20 +2225,25 @@
 
 void
 /*ARGSUSED*/
-rl_set_keymap(Keymap k)
+rl_set_keymap(Keymap k __attribute__((__unused__)))
 {
 }
 
 int
 /*ARGSUSED*/
-rl_generic_bind(int type, const char * keyseq, const char * data, Keymap k)
+rl_generic_bind(int type __attribute__((__unused__)),
+    const char * keyseq __attribute__((__unused__)),
+    const char * data __attribute__((__unused__)),
+    Keymap k __attribute__((__unused__)))
 {
 	return 0;
 }
 
 int
 /*ARGSUSED*/
-rl_bind_key_in_map(int key, rl_command_func_t *fun, Keymap k)
+rl_bind_key_in_map(int key __attribute__((__unused__)),
+    rl_command_func_t *fun __attribute__((__unused__)),
+    Keymap k __attribute__((__unused__)))
 {
 	return 0;
 }

cvs diff -r1.37 -r1.38 src/lib/libedit/vi.c (expand / switch to context diff)
--- src/lib/libedit/vi.c 2011/07/29 15:16:33 1.37
+++ src/lib/libedit/vi.c 2011/07/29 20:58:07 1.38
@@ -1,4 +1,4 @@
-/*	$NetBSD: vi.c,v 1.37 2011/07/29 15:16:33 christos Exp $	*/
+/*	$NetBSD: vi.c,v 1.38 2011/07/29 20:58:07 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)vi.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: vi.c,v 1.37 2011/07/29 15:16:33 christos Exp $");
+__RCSID("$NetBSD: vi.c,v 1.38 2011/07/29 20:58:07 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -465,7 +465,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_end_big_word(EditLine *el, Int c)
+vi_end_big_word(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	if (el->el_line.cursor == el->el_line.lastchar)
@@ -801,7 +801,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_match(EditLine *el, Int c)
+vi_match(EditLine *el, Int c __attribute__((__unused__)))
 {
 	const Char match_chars[] = STR("()[]{}");
 	Char *cp;
@@ -848,7 +848,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_undo_line(EditLine *el, Int c)
+vi_undo_line(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	cv_undo(el);
@@ -862,7 +862,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_to_column(EditLine *el, Int c)
+vi_to_column(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	el->el_line.cursor = el->el_line.buffer;
@@ -876,7 +876,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_yank_end(EditLine *el, Int c)
+vi_yank_end(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	cv_yank(el, el->el_line.cursor,
@@ -890,7 +890,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_yank(EditLine *el, Int c)
+vi_yank(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	return cv_action(el, YANK);
@@ -902,7 +902,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_comment_out(EditLine *el, Int c)
+vi_comment_out(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	el->el_line.cursor = el->el_line.buffer;
@@ -924,7 +924,7 @@
 #endif
 protected el_action_t
 /*ARGSUSED*/
-vi_alias(EditLine *el, Int c)
+vi_alias(EditLine *el, Int c __attribute__((__unused__)))
 {
 #ifdef __weak_reference
 	char alias_name[3];
@@ -954,7 +954,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_to_history_line(EditLine *el, Int c)
+vi_to_history_line(EditLine *el, Int c __attribute__((__unused__)))
 {
 	int sv_event_no = el->el_history.eventno;
 	el_action_t rval;
@@ -999,7 +999,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_histedit(EditLine *el, Int c)
+vi_histedit(EditLine *el, Int c __attribute__((__unused__)))
 {
 	int fd;
 	pid_t pid;
@@ -1086,7 +1086,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_history_word(EditLine *el, Int c)
+vi_history_word(EditLine *el, Int c __attribute__((__unused__)))
 {
 	const Char *wp = HIST_FIRST(el);
 	const Char *wep, *wsp;
@@ -1136,7 +1136,7 @@
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_redo(EditLine *el, Int c)
+vi_redo(EditLine *el, Int c __attribute__((__unused__)))
 {
 	c_redo_t *r = &el->el_chared.c_redo;