Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/nvi remove unused variables
details: https://anonhg.NetBSD.org/src/rev/d12bc6b670bb
branches: trunk
changeset: 790638:d12bc6b670bb
user: christos <christos%NetBSD.org@localhost>
date: Fri Oct 18 20:40:15 2013 +0000
description:
remove unused variables
diffstat:
dist/nvi/cl/cl_funcs.c | 11 ++---------
dist/nvi/cl/cl_screen.c | 4 +---
dist/nvi/common/exf.c | 6 +++---
dist/nvi/common/key.c | 4 +---
dist/nvi/ex/ex.c | 13 +------------
dist/nvi/ex/ex_args.c | 4 +---
dist/nvi/ex/ex_argv.c | 4 +---
dist/nvi/ex/ex_bang.c | 5 ++---
dist/nvi/ex/ex_display.c | 4 +---
dist/nvi/ex/ex_global.c | 4 +---
dist/nvi/ex/ex_print.c | 6 +-----
dist/nvi/ex/ex_script.c | 4 +---
dist/nvi/ex/ex_subst.c | 6 +++---
dist/nvi/ex/ex_tag.c | 7 ++-----
dist/nvi/ex/ex_usage.c | 4 +---
dist/nvi/regex/engine.c | 3 ++-
dist/nvi/vi/v_mark.c | 5 +----
dist/nvi/vi/v_search.c | 9 +--------
dist/nvi/vi/v_txt.c | 17 ++---------------
dist/nvi/vi/vs_line.c | 4 +---
dist/nvi/vi/vs_msg.c | 6 +++---
dist/nvi/vi/vs_split.c | 7 +------
22 files changed, 33 insertions(+), 104 deletions(-)
diffs (truncated from 730 to 300 lines):
diff -r baac20d083ef -r d12bc6b670bb dist/nvi/cl/cl_funcs.c
--- a/dist/nvi/cl/cl_funcs.c Fri Oct 18 20:26:45 2013 +0000
+++ b/dist/nvi/cl/cl_funcs.c Fri Oct 18 20:40:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cl_funcs.c,v 1.4 2009/11/15 18:43:28 dsl Exp $ */
+/* $NetBSD: cl_funcs.c,v 1.5 2013/10/18 20:40:15 christos Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -37,12 +37,10 @@
static int
addstr4(SCR *sp, const void *str, size_t len, int wide)
{
- CL_PRIVATE *clp;
WINDOW *win;
size_t y, x;
int iv;
- clp = CLP(sp);
win = CLSP(sp) ? CLSP(sp) : stdscr;
/*
@@ -51,6 +49,7 @@
*/
iv = 0;
getyx(win, y, x);
+ __USE(x);
if (!F_ISSET(sp, SC_SCR_EXWROTE) &&
y == RLNO(sp, LASTLINE(sp)) && IS_SPLIT(sp)) {
iv = 1;
@@ -312,11 +311,9 @@
cl_deleteln(SCR *sp)
{
CHAR_T ch;
- CL_PRIVATE *clp;
WINDOW *win;
size_t col, lno, spcnt, y, x;
- clp = CLP(sp);
win = CLSP(sp) ? CLSP(sp) : stdscr;
/*
@@ -548,13 +545,11 @@
int
cl_refresh(SCR *sp, int repaint)
{
- GS *gp;
CL_PRIVATE *clp;
WINDOW *win;
SCR *psp, *tsp;
size_t y, x;
- gp = sp->gp;
clp = CLP(sp);
win = CLSP(sp) ? CLSP(sp) : stdscr;
@@ -741,11 +736,9 @@
struct termios t;
CL_PRIVATE *clp;
WINDOW *win;
- GS *gp;
size_t y, x;
int changed;
- gp = sp->gp;
clp = CLP(sp);
win = CLSP(sp) ? CLSP(sp) : stdscr;
*allowedp = 1;
diff -r baac20d083ef -r d12bc6b670bb dist/nvi/cl/cl_screen.c
--- a/dist/nvi/cl/cl_screen.c Fri Oct 18 20:26:45 2013 +0000
+++ b/dist/nvi/cl/cl_screen.c Fri Oct 18 20:40:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cl_screen.c,v 1.2 2008/12/05 22:51:42 christos Exp $ */
+/* $NetBSD: cl_screen.c,v 1.3 2013/10/18 20:40:15 christos Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -185,11 +185,9 @@
cl_vi_init(SCR *sp)
{
CL_PRIVATE *clp;
- GS *gp;
char *o_cols, *o_lines, *o_term;
const char *ttype;
- gp = sp->gp;
clp = CLP(sp);
/* If already initialized, just set the terminal modes. */
diff -r baac20d083ef -r d12bc6b670bb dist/nvi/common/exf.c
--- a/dist/nvi/common/exf.c Fri Oct 18 20:26:45 2013 +0000
+++ b/dist/nvi/common/exf.c Fri Oct 18 20:40:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exf.c,v 1.5 2012/07/15 09:13:59 spz Exp $ */
+/* $NetBSD: exf.c,v 1.6 2013/10/18 20:40:15 christos Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -131,10 +131,10 @@
EXF *ep;
struct stat sb;
size_t psize;
- int fd, exists, open_err, readonly, stolen;
+ int fd, exists, open_err, readonly;
char *oname = NULL, tname[MAXPATHLEN];
- stolen = open_err = readonly = 0;
+ open_err = readonly = 0;
/*
* If the file is a recovery file, let the recovery code handle it.
diff -r baac20d083ef -r d12bc6b670bb dist/nvi/common/key.c
--- a/dist/nvi/common/key.c Fri Oct 18 20:26:45 2013 +0000
+++ b/dist/nvi/common/key.c Fri Oct 18 20:40:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.6 2011/03/21 14:53:02 tnozaki Exp $ */
+/* $NetBSD: key.c,v 1.7 2013/10/18 20:40:15 christos Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -345,12 +345,10 @@
/* CH_* flags. */
{
EVENT *evp;
- GS *gp;
WIN *wp;
size_t total;
/* If we have room, stuff the items into the buffer. */
- gp = sp->gp;
wp = sp->wp;
if (nitems <= wp->i_next ||
(wp->i_event != NULL && wp->i_cnt == 0 && nitems <= wp->i_nelem)) {
diff -r baac20d083ef -r d12bc6b670bb dist/nvi/ex/ex.c
--- a/dist/nvi/ex/ex.c Fri Oct 18 20:26:45 2013 +0000
+++ b/dist/nvi/ex/ex.c Fri Oct 18 20:40:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ex.c,v 1.9 2011/11/23 19:25:28 tnozaki Exp $ */
+/* $NetBSD: ex.c,v 1.10 2013/10/18 20:40:15 christos Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -52,7 +52,6 @@
int
ex(SCR **spp)
{
- EX_PRIVATE *exp;
GS *gp;
WIN *wp;
MSGS *mp;
@@ -63,7 +62,6 @@
sp = *spp;
wp = sp->wp;
gp = sp->gp;
- exp = EXP(sp);
/* Start the ex screen. */
if (ex_init(sp))
@@ -1628,8 +1626,6 @@
ex_range(SCR *sp, EXCMD *ecp, int *errp)
{
enum { ADDR_FOUND, ADDR_NEED, ADDR_NONE } addr;
- GS *gp;
- EX_PRIVATE *exp;
MARK m;
int isaddr;
@@ -1656,8 +1652,6 @@
* addresses. For consistency, we make it true for leading semicolon
* addresses as well.
*/
- gp = sp->gp;
- exp = EXP(sp);
for (addr = ADDR_NONE, ecp->addrcnt = 0; ecp->clen > 0;)
switch (*ecp->cp) {
case '%': /* Entire file. */
@@ -1827,17 +1821,12 @@
ex_line(SCR *sp, EXCMD *ecp, MARK *mp, int *isaddrp, int *errp)
{
enum nresult nret;
- EX_PRIVATE *exp;
- GS *gp;
long total, val;
unsigned long uval;
int isneg;
int (*sf) __P((SCR *, MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int));
CHAR_T *endp;
- gp = sp->gp;
- exp = EXP(sp);
-
*isaddrp = *errp = 0;
F_CLR(ecp, E_DELTA);
diff -r baac20d083ef -r d12bc6b670bb dist/nvi/ex/ex_args.c
--- a/dist/nvi/ex/ex_args.c Fri Oct 18 20:26:45 2013 +0000
+++ b/dist/nvi/ex/ex_args.c Fri Oct 18 20:40:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ex_args.c,v 1.3 2009/01/18 03:45:50 lukem Exp $ */
+/* $NetBSD: ex_args.c,v 1.4 2013/10/18 20:40:15 christos Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -265,7 +265,6 @@
int
ex_args(SCR *sp, EXCMD *cmdp)
{
- GS *gp;
int cnt, sep;
size_t col, len;
char **ap;
@@ -275,7 +274,6 @@
return (0);
}
- gp = sp->gp;
col = len = sep = 0;
for (cnt = 1, ap = sp->argv; *ap != NULL; ++ap) {
col += len = strlen(*ap) + sep + (ap == sp->cargv ? 2 : 0);
diff -r baac20d083ef -r d12bc6b670bb dist/nvi/ex/ex_argv.c
--- a/dist/nvi/ex/ex_argv.c Fri Oct 18 20:26:45 2013 +0000
+++ b/dist/nvi/ex/ex_argv.c Fri Oct 18 20:40:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ex_argv.c,v 1.4 2011/03/21 14:53:03 tnozaki Exp $ */
+/* $NetBSD: ex_argv.c,v 1.5 2013/10/18 20:40:15 christos Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -89,14 +89,12 @@
int
argv_exp1(SCR *sp, EXCMD *excp, const CHAR_T *cmd, size_t cmdlen, int is_bang)
{
- EX_PRIVATE *exp;
size_t blen, len;
CHAR_T *p, *t, *bp;
GET_SPACE_RETW(sp, bp, blen, 512);
len = 0;
- exp = EXP(sp);
if (argv_fexp(sp, excp, cmd, cmdlen, bp, &len, &bp, &blen, is_bang)) {
FREE_SPACEW(sp, bp, blen);
return (1);
diff -r baac20d083ef -r d12bc6b670bb dist/nvi/ex/ex_bang.c
--- a/dist/nvi/ex/ex_bang.c Fri Oct 18 20:26:45 2013 +0000
+++ b/dist/nvi/ex/ex_bang.c Fri Oct 18 20:40:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ex_bang.c,v 1.3 2009/11/14 23:40:11 christos Exp $ */
+/* $NetBSD: ex_bang.c,v 1.4 2013/10/18 20:40:15 christos Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -56,7 +56,6 @@
EX_PRIVATE *exp;
MARK rm;
db_recno_t lno;
- int rval;
const char *msg;
const char *np;
size_t nlen;
@@ -156,7 +155,7 @@
ftype = FILTER_RBANG;
}
}
- rval = ex_filter(sp, cmdp,
+ (void)ex_filter(sp, cmdp,
&cmdp->addr1, &cmdp->addr2, &rm, ap->bp, ftype);
/*
diff -r baac20d083ef -r d12bc6b670bb dist/nvi/ex/ex_display.c
--- a/dist/nvi/ex/ex_display.c Fri Oct 18 20:26:45 2013 +0000
+++ b/dist/nvi/ex/ex_display.c Fri Oct 18 20:40:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ex_display.c,v 1.3 2011/03/21 14:53:03 tnozaki Exp $ */
+/* $NetBSD: ex_display.c,v 1.4 2013/10/18 20:40:15 christos Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -121,12 +121,10 @@
db(SCR *sp, CB *cbp, const char *np)
{
CHAR_T *p;
- GS *gp;
TEXT *tp;
size_t len;
const unsigned char *name = (const void *)np;
- gp = sp->gp;
(void)ex_printf(sp, "********** %s%s\n",
name == NULL ? KEY_NAME(sp, cbp->name) : name,
F_ISSET(cbp, CB_LMODE) ? " (line mode)" : " (character mode)");
diff -r baac20d083ef -r d12bc6b670bb dist/nvi/ex/ex_global.c
--- a/dist/nvi/ex/ex_global.c Fri Oct 18 20:26:45 2013 +0000
+++ b/dist/nvi/ex/ex_global.c Fri Oct 18 20:40:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ex_global.c,v 1.4 2011/03/21 14:53:03 tnozaki Exp $ */
+/* $NetBSD: ex_global.c,v 1.5 2013/10/18 20:40:15 christos Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
Home |
Main Index |
Thread Index |
Old Index