Module Name: src Committed By: christos Date: Fri Jul 29 20:58:07 UTC 2011
Modified Files: src/lib/libedit: common.c filecomplete.c history.c readline.c vi.c Log Message: - fix unused params - unconditionalize vis.h To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/libedit/common.c \ src/lib/libedit/filecomplete.c cvs rdiff -u -r1.43 -r1.44 src/lib/libedit/history.c cvs rdiff -u -r1.96 -r1.97 src/lib/libedit/readline.c cvs rdiff -u -r1.37 -r1.38 src/lib/libedit/vi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/common.c diff -u src/lib/libedit/common.c:1.27 src/lib/libedit/common.c:1.28 --- src/lib/libedit/common.c:1.27 Fri Jul 29 11:20:39 2011 +++ src/lib/libedit/common.c Fri Jul 29 16:58:07 2011 @@ -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; Index: src/lib/libedit/filecomplete.c diff -u src/lib/libedit/filecomplete.c:1.27 src/lib/libedit/filecomplete.c:1.28 --- src/lib/libedit/filecomplete.c:1.27 Fri Jul 29 11:16:33 2011 +++ src/lib/libedit/filecomplete.c Fri Jul 29 16:58:07 2011 @@ -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" Index: src/lib/libedit/history.c diff -u src/lib/libedit/history.c:1.43 src/lib/libedit/history.c:1.44 --- src/lib/libedit/history.c:1.43 Fri Jul 29 11:16:33 2011 +++ src/lib/libedit/history.c Fri Jul 29 16:58:07 2011 @@ -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"; Index: src/lib/libedit/readline.c diff -u src/lib/libedit/readline.c:1.96 src/lib/libedit/readline.c:1.97 --- src/lib/libedit/readline.c:1.96 Fri Jul 29 11:16:33 2011 +++ src/lib/libedit/readline.c Fri Jul 29 16:58:07 2011 @@ -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; } Index: src/lib/libedit/vi.c diff -u src/lib/libedit/vi.c:1.37 src/lib/libedit/vi.c:1.38 --- src/lib/libedit/vi.c:1.37 Fri Jul 29 11:16:33 2011 +++ src/lib/libedit/vi.c Fri Jul 29 16:58:07 2011 @@ -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;