Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit - fix unused params



details:   https://anonhg.NetBSD.org/src/rev/a3fb9e2d5088
branches:  trunk
changeset: 767760:a3fb9e2d5088
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jul 29 20:58:07 2011 +0000

description:
- fix unused params
- unconditionalize vis.h

diffstat:

 lib/libedit/common.c       |   9 +++++----
 lib/libedit/filecomplete.c |  10 +++-------
 lib/libedit/history.c      |   8 ++------
 lib/libedit/readline.c     |  32 ++++++++++++++++++--------------
 lib/libedit/vi.c           |  28 ++++++++++++++--------------
 5 files changed, 42 insertions(+), 45 deletions(-)

diffs (truncated from 331 to 300 lines):

diff -r 090130136907 -r a3fb9e2d5088 lib/libedit/common.c
--- a/lib/libedit/common.c      Fri Jul 29 20:57:34 2011 +0000
+++ b/lib/libedit/common.c      Fri Jul 29 20:58:07 2011 +0000
@@ -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;
diff -r 090130136907 -r a3fb9e2d5088 lib/libedit/filecomplete.c
--- a/lib/libedit/filecomplete.c        Fri Jul 29 20:57:34 2011 +0000
+++ b/lib/libedit/filecomplete.c        Fri Jul 29 20:58:07 2011 +0000
@@ -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"
diff -r 090130136907 -r a3fb9e2d5088 lib/libedit/history.c
--- a/lib/libedit/history.c     Fri Jul 29 20:57:34 2011 +0000
+++ b/lib/libedit/history.c     Fri Jul 29 20:58:07 2011 +0000
@@ -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";
diff -r 090130136907 -r a3fb9e2d5088 lib/libedit/readline.c
--- a/lib/libedit/readline.c    Fri Jul 29 20:57:34 2011 +0000
+++ b/lib/libedit/readline.c    Fri Jul 29 20:58:07 2011 +0000
@@ -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;
 }
diff -r 090130136907 -r a3fb9e2d5088 lib/libedit/vi.c
--- a/lib/libedit/vi.c  Fri Jul 29 20:57:34 2011 +0000
+++ b/lib/libedit/vi.c  Fri Jul 29 20:58:07 2011 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index