Module Name: src
Committed By: rillig
Date: Wed Dec 30 10:26:12 UTC 2020
Modified Files:
src/usr.bin/xlint/lint1: cgram.y decl.c emit1.c func.c init.c lint1.h
tree.c
src/usr.bin/xlint/lint2: chk.c emit2.c lint2.h read.c
Log Message:
lint: rename s_nxt to s_next
To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.79 -r1.80 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/xlint/lint1/emit1.c
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/xlint/lint1/func.c
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/xlint/lint1/init.c
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.100 -r1.101 src/usr.bin/xlint/lint1/tree.c
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/xlint/lint2/chk.c
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/xlint/lint2/emit2.c
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/xlint/lint2/lint2.h
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/xlint/lint2/read.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.118 src/usr.bin/xlint/lint1/cgram.y:1.119
--- src/usr.bin/xlint/lint1/cgram.y:1.118 Wed Dec 30 01:44:32 2020
+++ src/usr.bin/xlint/lint1/cgram.y Wed Dec 30 10:26:12 2020
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.118 2020/12/30 01:44:32 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.119 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.118 2020/12/30 01:44:32 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.119 2020/12/30 10:26:12 rillig Exp $");
#endif
#include <limits.h>
@@ -114,7 +114,7 @@ static inline void RESTORE(const char *f
static void
anonymize(sym_t *s)
{
- for ( ; s; s = s->s_nxt)
+ for ( ; s; s = s->s_next)
s->s_styp = NULL;
}
%}
Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.79 src/usr.bin/xlint/lint1/decl.c:1.80
--- src/usr.bin/xlint/lint1/decl.c:1.79 Tue Dec 29 21:32:46 2020
+++ src/usr.bin/xlint/lint1/decl.c Wed Dec 30 10:26:12 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.79 2020/12/29 21:32:46 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.80 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.79 2020/12/29 21:32:46 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.80 2020/12/30 10:26:12 rillig Exp $");
#endif
#include <sys/param.h>
@@ -133,7 +133,7 @@ initdecl(void)
/*
* Returns a shared type structure for arithmetic types and void.
*
- * It's important to duplicate this structure (using duptyp() or tdupdyp())
+ * It's important to duplicate this structure (using duptyp() or tduptyp())
* if it is to be modified (adding qualifiers or anything else).
*/
type_t *
@@ -497,7 +497,7 @@ bitfieldsize(sym_t **mem)
size_t len = (*mem)->s_type->t_flen;
while (*mem && (*mem)->s_type->t_isfield) {
len += (*mem)->s_type->t_flen;
- *mem = (*mem)->s_nxt;
+ *mem = (*mem)->s_next;
}
return ((len + INT_SIZE - 1) / INT_SIZE) * INT_SIZE;
}
@@ -514,7 +514,7 @@ setpackedsize(type_t *tp)
case UNION:
sp = tp->t_str;
sp->size = 0;
- for (mem = sp->memb; mem != NULL; mem = mem->s_nxt) {
+ for (mem = sp->memb; mem != NULL; mem = mem->s_next) {
if (mem->s_type->t_isfield) {
sp->size += bitfieldsize(&mem);
if (mem == NULL)
@@ -962,7 +962,7 @@ getbound(type_t *tp)
}
/*
- * Concatenate two lists of symbols by s_nxt. Used by declarations of
+ * Concatenate two lists of symbols by s_next. Used by declarations of
* struct/union/enum elements and parameters.
*/
sym_t *
@@ -972,9 +972,9 @@ lnklst(sym_t *l1, sym_t *l2)
if ((l = l1) == NULL)
return l2;
- while (l1->s_nxt != NULL)
- l1 = l1->s_nxt;
- l1->s_nxt = l2;
+ while (l1->s_next != NULL)
+ l1 = l1->s_next;
+ l1->s_next = l2;
return l;
}
@@ -1381,7 +1381,7 @@ add_function(sym_t *decl, sym_t *args)
* add_function(). To be able to restore them if this is a function
* definition, a pointer to the list of all symbols is stored in
* dcs->d_nxt->d_fpsyms. Also a list of the arguments (concatenated
- * by s_nxt) is stored in dcs->d_nxt->d_fargs.
+ * by s_next) is stored in dcs->d_nxt->d_fargs.
* (dcs->d_nxt must be used because *dcs is the declaration stack
* element created for the list of params and is removed after
* add_function())
@@ -1432,9 +1432,9 @@ new_style_function(sym_t *decl, sym_t *a
}
n = 1;
- for (arg = args; arg != NULL; arg = arg->s_nxt) {
+ for (arg = args; arg != NULL; arg = arg->s_next) {
if (arg->s_type->t_tspec == VOID) {
- if (n > 1 || arg->s_nxt != NULL) {
+ if (n > 1 || arg->s_next != NULL) {
/* "void" must be sole parameter */
error(60);
arg->s_type = gettyp(INT);
@@ -1801,7 +1801,7 @@ complete_tag_struct_or_union(type_t *tp,
}
n = 0;
- for (mem = fmem; mem != NULL; mem = mem->s_nxt) {
+ for (mem = fmem; mem != NULL; mem = mem->s_next) {
/* bind anonymous members to the structure */
if (mem->s_styp == NULL) {
mem->s_styp = sp;
@@ -2199,8 +2199,8 @@ eqargs(type_t *tp1, type_t *tp2, int *do
if (eqtype(a1->s_type, a2->s_type, 1, 0, dowarn) == 0)
return 0;
- a1 = a1->s_nxt;
- a2 = a2->s_nxt;
+ a1 = a1->s_next;
+ a2 = a2->s_next;
}
@@ -2227,7 +2227,7 @@ mnoarg(type_t *tp, int *dowarn)
if (dowarn != NULL)
*dowarn = 1;
}
- for (arg = tp->t_args; arg != NULL; arg = arg->s_nxt) {
+ for (arg = tp->t_args; arg != NULL; arg = arg->s_next) {
if ((t = arg->s_type->t_tspec) == FLOAT ||
t == CHAR || t == SCHAR || t == UCHAR ||
t == SHORT || t == USHORT) {
@@ -2255,9 +2255,9 @@ check_old_style_definition(sym_t *rdsym,
msg = 0;
narg = nparg = 0;
- for (arg = args; arg != NULL; arg = arg->s_nxt)
+ for (arg = args; arg != NULL; arg = arg->s_next)
narg++;
- for (parg = pargs; parg != NULL; parg = parg->s_nxt)
+ for (parg = pargs; parg != NULL; parg = parg->s_next)
nparg++;
if (narg != nparg) {
/* prototype does not match old-style definition */
@@ -2280,8 +2280,8 @@ check_old_style_definition(sym_t *rdsym,
error(299, n);
msg = 1;
}
- arg = arg->s_nxt;
- parg = parg->s_nxt;
+ arg = arg->s_next;
+ parg = parg->s_next;
n++;
}
@@ -2428,7 +2428,7 @@ cluparg(void)
* number of arguments.
*/
narg = 0;
- for (arg = dcs->d_fargs; arg != NULL; arg = arg->s_nxt)
+ for (arg = dcs->d_fargs; arg != NULL; arg = arg->s_next)
narg++;
if (nargusg > narg) {
/* argument number mismatch with directive: ** %s ** */
@@ -2458,7 +2458,7 @@ cluparg(void)
narg = prflstrg != -1 ? prflstrg : scflstrg;
arg = dcs->d_fargs;
for (n = 1; n < narg; n++)
- arg = arg->s_nxt;
+ arg = arg->s_next;
if (arg->s_type->t_tspec != PTR ||
((t = arg->s_type->t_subt->t_tspec) != CHAR &&
t != UCHAR && t != SCHAR)) {
@@ -2472,7 +2472,7 @@ cluparg(void)
* print a warning for each argument of an old style function
* definition which defaults to int
*/
- for (arg = args; arg != NULL; arg = arg->s_nxt) {
+ for (arg = args; arg != NULL; arg = arg->s_next) {
if (arg->s_defarg) {
/* argument type defaults to int: %s */
warning(32, arg->s_name);
@@ -2492,9 +2492,9 @@ cluparg(void)
*/
narg = nparg = 0;
msg = 0;
- for (parg = pargs; parg != NULL; parg = parg->s_nxt)
+ for (parg = pargs; parg != NULL; parg = parg->s_next)
nparg++;
- for (arg = args; arg != NULL; arg = arg->s_nxt)
+ for (arg = args; arg != NULL; arg = arg->s_next)
narg++;
if (narg != nparg) {
/* parameter mismatch: %d declared, %d defined */
@@ -2505,8 +2505,8 @@ cluparg(void)
arg = args;
while (narg--) {
msg |= check_prototype_declaration(arg, parg);
- parg = parg->s_nxt;
- arg = arg->s_nxt;
+ parg = parg->s_next;
+ arg = arg->s_next;
}
}
if (msg)
Index: src/usr.bin/xlint/lint1/emit1.c
diff -u src/usr.bin/xlint/lint1/emit1.c:1.25 src/usr.bin/xlint/lint1/emit1.c:1.26
--- src/usr.bin/xlint/lint1/emit1.c:1.25 Tue Dec 29 21:32:46 2020
+++ src/usr.bin/xlint/lint1/emit1.c Wed Dec 30 10:26:12 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: emit1.c,v 1.25 2020/12/29 21:32:46 rillig Exp $ */
+/* $NetBSD: emit1.c,v 1.26 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: emit1.c,v 1.25 2020/12/29 21:32:46 rillig Exp $");
+__RCSID("$NetBSD: emit1.c,v 1.26 2020/12/30 10:26:12 rillig Exp $");
#endif
#include <ctype.h>
@@ -145,12 +145,12 @@ outtype(type_t *tp)
outtt(tp->t_str->stag, tp->t_str->stdef);
} else if (ts == FUNC && tp->t_proto) {
na = 0;
- for (arg = tp->t_args; arg != NULL; arg = arg->s_nxt)
+ for (arg = tp->t_args; arg != NULL; arg = arg->s_next)
na++;
if (tp->t_vararg)
na++;
outint(na);
- for (arg = tp->t_args; arg != NULL; arg = arg->s_nxt)
+ for (arg = tp->t_args; arg != NULL; arg = arg->s_next)
outtype(arg->s_type);
if (tp->t_vararg)
outchar('E');
@@ -385,11 +385,11 @@ outfdef(sym_t *fsym, pos_t *posp, int rv
/* argument types and return value */
if (osdef) {
narg = 0;
- for (arg = args; arg != NULL; arg = arg->s_nxt)
+ for (arg = args; arg != NULL; arg = arg->s_next)
narg++;
outchar('f');
outint(narg);
- for (arg = args; arg != NULL; arg = arg->s_nxt)
+ for (arg = args; arg != NULL; arg = arg->s_next)
outtype(arg->s_type);
outtype(fsym->s_type->t_subt);
} else {
Index: src/usr.bin/xlint/lint1/func.c
diff -u src/usr.bin/xlint/lint1/func.c:1.31 src/usr.bin/xlint/lint1/func.c:1.32
--- src/usr.bin/xlint/lint1/func.c:1.31 Tue Dec 29 13:33:03 2020
+++ src/usr.bin/xlint/lint1/func.c Wed Dec 30 10:26:12 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: func.c,v 1.31 2020/12/29 13:33:03 rillig Exp $ */
+/* $NetBSD: func.c,v 1.32 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: func.c,v 1.31 2020/12/29 13:33:03 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.32 2020/12/30 10:26:12 rillig Exp $");
#endif
#include <stdlib.h>
@@ -267,7 +267,7 @@ funcdef(sym_t *fsym)
* (void is already removed from the list of arguments)
*/
n = 1;
- for (arg = fsym->s_type->t_args; arg != NULL; arg = arg->s_nxt) {
+ for (arg = fsym->s_type->t_args; arg != NULL; arg = arg->s_next) {
if (arg->s_scl == ABSTRACT) {
if (arg->s_name != unnamed)
LERROR("funcdef()");
@@ -372,7 +372,7 @@ funcend(void)
n = 0;
while (arg != NULL && (nargusg == -1 || n < nargusg)) {
check_usage_sym(dcs->d_asm, arg);
- arg = arg->s_nxt;
+ arg = arg->s_next;
n++;
}
nargusg = -1;
@@ -644,7 +644,7 @@ switch2(void)
if (cstk->c_swtype->t_enum == NULL)
LERROR("switch2()");
for (esym = cstk->c_swtype->t_enum->elem;
- esym != NULL; esym = esym->s_nxt) {
+ esym != NULL; esym = esym->s_next) {
nenum++;
}
for (cl = cstk->c_clst; cl != NULL; cl = cl->cl_nxt)
Index: src/usr.bin/xlint/lint1/init.c
diff -u src/usr.bin/xlint/lint1/init.c:1.44 src/usr.bin/xlint/lint1/init.c:1.45
--- src/usr.bin/xlint/lint1/init.c:1.44 Wed Dec 30 01:33:30 2020
+++ src/usr.bin/xlint/lint1/init.c Wed Dec 30 10:26:12 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.44 2020/12/30 01:33:30 rillig Exp $ */
+/* $NetBSD: init.c,v 1.45 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.44 2020/12/30 01:33:30 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.45 2020/12/30 10:26:12 rillig Exp $");
#endif
#include <ctype.h>
@@ -179,7 +179,7 @@ initstack_pop_item(void)
__func__, istk->i_remaining,
tyname(buf, sizeof(buf), istk->i_type), namedmem->n_name));
- for (m = istk->i_type->t_str->memb; m != NULL; m = m->s_nxt) {
+ for (m = istk->i_type->t_str->memb; m != NULL; m = m->s_next) {
DPRINTF(("%s: pop lhs.name=%s rhs.name=%s\n", __func__,
m->s_name, namedmem->n_name));
if (m->s_field && m->s_name == unnamed)
@@ -204,7 +204,7 @@ initstack_pop_item(void)
if (istk->i_remaining > 0 && istk->i_type->t_tspec == STRUCT &&
!istk->i_namedmem) {
do {
- m = istk->i_mem = istk->i_mem->s_nxt;
+ m = istk->i_mem = istk->i_mem->s_next;
lint_assert(m != NULL);
DPRINTF(("%s: pop %s\n", __func__, m->s_name));
} while (m->s_field && m->s_name == unnamed);
@@ -326,7 +326,7 @@ again:
DPRINTF(("%s: lookup type=%s, name=%s named=%d\n", __func__,
tyname(buf, sizeof(buf), istk->i_type),
namedmem ? namedmem->n_name : "*none*", istk->i_namedmem));
- for (m = istk->i_type->t_str->memb; m != NULL; m = m->s_nxt) {
+ for (m = istk->i_type->t_str->memb; m != NULL; m = m->s_next) {
if (m->s_field && m->s_name == unnamed)
continue;
if (namedmem != NULL) {
Index: src/usr.bin/xlint/lint1/lint1.h
diff -u src/usr.bin/xlint/lint1/lint1.h:1.37 src/usr.bin/xlint/lint1/lint1.h:1.38
--- src/usr.bin/xlint/lint1/lint1.h:1.37 Wed Dec 30 01:33:30 2020
+++ src/usr.bin/xlint/lint1/lint1.h Wed Dec 30 10:26:12 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.37 2020/12/30 01:33:30 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.38 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -254,7 +254,7 @@ typedef struct sym {
} u;
struct sym *s_link; /* next symbol with same hash value */
struct sym **s_rlink; /* pointer to s_link of prev. symbol */
- struct sym *s_nxt; /* next struct/union member, enumerator,
+ struct sym *s_next; /* next struct/union member, enumerator,
argument */
struct sym *s_dlnxt; /* next symbol declared on same level */
} sym_t;
Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.100 src/usr.bin/xlint/lint1/tree.c:1.101
--- src/usr.bin/xlint/lint1/tree.c:1.100 Tue Dec 29 23:04:31 2020
+++ src/usr.bin/xlint/lint1/tree.c Wed Dec 30 10:26:12 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.100 2020/12/29 23:04:31 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.101 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.100 2020/12/29 23:04:31 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.101 2020/12/30 10:26:12 rillig Exp $");
#endif
#include <float.h>
@@ -2310,7 +2310,7 @@ has_constant_member(type_t *tp)
if ((t = tp->t_tspec) != STRUCT && t != UNION)
LERROR("has_constant_member()");
- for (m = tp->t_str->memb; m != NULL; m = m->s_nxt) {
+ for (m = tp->t_str->memb; m != NULL; m = m->s_next) {
tp = m->s_type;
if (tp->t_const)
return 1;
@@ -3210,7 +3210,7 @@ cast(tnode_t *tn, type_t *tp)
error(328);
return NULL;
}
- for (m = str->memb; m != NULL; m = m->s_nxt) {
+ for (m = str->memb; m != NULL; m = m->s_next) {
if (sametype(m->s_type, tn->tn_type)) {
tn = getnode();
tn->tn_op = CVT;
@@ -3338,7 +3338,7 @@ check_function_arguments(type_t *ftp, tn
/* get # of args in the prototype */
npar = 0;
- for (asym = ftp->t_args; asym != NULL; asym = asym->s_nxt)
+ for (asym = ftp->t_args; asym != NULL; asym = asym->s_next)
npar++;
/* get # of args in function call */
@@ -3391,7 +3391,7 @@ check_function_arguments(type_t *ftp, tn
arg->tn_type = arg->tn_left->tn_type;
if (asym != NULL)
- asym = asym->s_nxt;
+ asym = asym->s_next;
}
return args;
Index: src/usr.bin/xlint/lint2/chk.c
diff -u src/usr.bin/xlint/lint2/chk.c:1.27 src/usr.bin/xlint/lint2/chk.c:1.28
--- src/usr.bin/xlint/lint2/chk.c:1.27 Tue Dec 29 11:35:11 2020
+++ src/usr.bin/xlint/lint2/chk.c Wed Dec 30 10:26:12 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: chk.c,v 1.27 2020/12/29 11:35:11 rillig Exp $ */
+/* $NetBSD: chk.c,v 1.28 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: chk.c,v 1.27 2020/12/29 11:35:11 rillig Exp $");
+__RCSID("$NetBSD: chk.c,v 1.28 2020/12/30 10:26:12 rillig Exp $");
#endif
#include <ctype.h>
@@ -100,7 +100,7 @@ chkname(hte_t *hte)
/* Get definition, prototype declaration and declaration */
def = pdecl = decl = NULL;
- for (sym = hte->h_syms; sym != NULL; sym = sym->s_nxt) {
+ for (sym = hte->h_syms; sym != NULL; sym = sym->s_next) {
if (def == NULL && (sym->s_def == DEF || sym->s_def == TDEF))
def = sym;
if (pdecl == NULL && sym->s_def == DECL &&
@@ -159,7 +159,7 @@ chkdnu(hte_t *hte)
if (!hte->h_def || hte->h_used)
return;
- for (sym = hte->h_syms; sym != NULL; sym = sym->s_nxt) {
+ for (sym = hte->h_syms; sym != NULL; sym = sym->s_next) {
if (sym->s_def == DEF || sym->s_def == TDEF) {
/* %s defined( %s ), but never used */
msg(1, hte->h_name, mkpos(&sym->s_pos));
@@ -204,7 +204,7 @@ chkmd(hte_t *hte)
return;
def1 = NULL;
- for (sym = hte->h_syms; sym != NULL; sym = sym->s_nxt) {
+ for (sym = hte->h_syms; sym != NULL; sym = sym->s_next) {
/*
* ANSI C allows tentative definitions of the same name in
* only one compilation unit.
@@ -307,7 +307,7 @@ chkvtdi(hte_t *hte, sym_t *def, sym_t *d
return;
tp1 = TP(def->s_type);
- for (sym = hte->h_syms; sym != NULL; sym = sym->s_nxt) {
+ for (sym = hte->h_syms; sym != NULL; sym = sym->s_next) {
type_t *xt1, *xt2;
if (sym == def)
continue;
@@ -1146,7 +1146,7 @@ chkadecl(hte_t *hte, sym_t *def, sym_t *
* declarations.
*/
- for (sym = hte->h_syms; sym != NULL; sym = sym->s_nxt) {
+ for (sym = hte->h_syms; sym != NULL; sym = sym->s_next) {
if (sym == sym1 || !TP(sym->s_type)->t_proto)
continue;
ap1 = TP(sym1->s_type)->t_args;
Index: src/usr.bin/xlint/lint2/emit2.c
diff -u src/usr.bin/xlint/lint2/emit2.c:1.14 src/usr.bin/xlint/lint2/emit2.c:1.15
--- src/usr.bin/xlint/lint2/emit2.c:1.14 Tue Dec 29 11:35:11 2020
+++ src/usr.bin/xlint/lint2/emit2.c Wed Dec 30 10:26:12 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: emit2.c,v 1.14 2020/12/29 11:35:11 rillig Exp $ */
+/* $NetBSD: emit2.c,v 1.15 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: emit2.c,v 1.14 2020/12/29 11:35:11 rillig Exp $");
+__RCSID("$NetBSD: emit2.c,v 1.15 2020/12/30 10:26:12 rillig Exp $");
#endif
#include "lint2.h"
@@ -203,7 +203,7 @@ dumpname(hte_t *hte)
* definition is allowed (except with sflag).
*/
def = NULL;
- for (sym = hte->h_syms; sym != NULL; sym = sym->s_nxt) {
+ for (sym = hte->h_syms; sym != NULL; sym = sym->s_next) {
if (sym->s_def == DEF) {
def = sym;
break;
Index: src/usr.bin/xlint/lint2/lint2.h
diff -u src/usr.bin/xlint/lint2/lint2.h:1.9 src/usr.bin/xlint/lint2/lint2.h:1.10
--- src/usr.bin/xlint/lint2/lint2.h:1.9 Tue Dec 29 21:32:46 2020
+++ src/usr.bin/xlint/lint2/lint2.h Wed Dec 30 10:26:12 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: lint2.h,v 1.9 2020/12/29 21:32:46 rillig Exp $ */
+/* $NetBSD: lint2.h,v 1.10 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -126,7 +126,7 @@ typedef struct sym {
u_int s_prfl : 1; /* printflike */
u_int s_scfl : 1; /* scanflike */
u_short s_type; /* type */
- struct sym *s_nxt; /* next symbol with same name */
+ struct sym *s_next; /* next symbol with same name */
} s_s;
short s_nva;
short s_nprfl;
@@ -143,7 +143,7 @@ typedef struct sym {
#define s_prfl s_s.s_prfl
#define s_scfl s_s.s_scfl
#define s_type s_s.s_type
-#define s_nxt s_s.s_nxt
+#define s_next s_s.s_next
/*
* Used to store information about function calls.
@@ -175,7 +175,7 @@ typedef struct hte {
u_int h_def : 1; /* symbol is defined */
u_int h_static : 1; /* static symbol */
sym_t *h_syms; /* declarations and definitions */
- sym_t **h_lsym; /* points to s_nxt of last decl./def. */
+ sym_t **h_lsym; /* points to s_next of last decl./def. */
fcall_t *h_calls; /* function calls */
fcall_t **h_lcall; /* points to f_nxt of last call */
usym_t *h_usyms; /* usage info */
Index: src/usr.bin/xlint/lint2/read.c
diff -u src/usr.bin/xlint/lint2/read.c:1.31 src/usr.bin/xlint/lint2/read.c:1.32
--- src/usr.bin/xlint/lint2/read.c:1.31 Tue Dec 29 12:18:42 2020
+++ src/usr.bin/xlint/lint2/read.c Wed Dec 30 10:26:12 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: read.c,v 1.31 2020/12/29 12:18:42 rillig Exp $ */
+/* $NetBSD: read.c,v 1.32 2020/12/30 10:26:12 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: read.c,v 1.31 2020/12/29 12:18:42 rillig Exp $");
+__RCSID("$NetBSD: read.c,v 1.32 2020/12/30 10:26:12 rillig Exp $");
#endif
#include <ctype.h>
@@ -486,7 +486,7 @@ decldef(pos_t *posp, const char *cp)
* because static symbols, tentatively defined at the same location
* but in different translation units are really different symbols.
*/
- for (symp = hte->h_syms; symp != NULL; symp = symp->s_nxt) {
+ for (symp = hte->h_syms; symp != NULL; symp = symp->s_next) {
if (symp->s_pos.p_isrc == sym.s_pos.p_isrc &&
symp->s_pos.p_iline == sym.s_pos.p_iline &&
symp->s_type == sym.s_type &&
@@ -507,7 +507,7 @@ decldef(pos_t *posp, const char *cp)
STRUCT_ASSIGN(symp->s_s, sym.s_s);
}
*hte->h_lsym = symp;
- hte->h_lsym = &symp->s_nxt;
+ hte->h_lsym = &symp->s_next;
/* XXX hack so we can remember where a symbol was renamed */
if (renamed)
@@ -1202,7 +1202,7 @@ mkstatic(hte_t *hte)
int ofnd;
/* Look for first static definition */
- for (sym1 = hte->h_syms; sym1 != NULL; sym1 = sym1->s_nxt) {
+ for (sym1 = hte->h_syms; sym1 != NULL; sym1 = sym1->s_next) {
if (sym1->s_static)
break;
}
@@ -1211,7 +1211,7 @@ mkstatic(hte_t *hte)
/* Do nothing if this name is used only in one translation unit. */
ofnd = 0;
- for (sym = hte->h_syms; sym != NULL && !ofnd; sym = sym->s_nxt) {
+ for (sym = hte->h_syms; sym != NULL && !ofnd; sym = sym->s_next) {
if (sym->s_pos.p_src != sym1->s_pos.p_src)
ofnd = 1;
}
@@ -1261,14 +1261,14 @@ mkstatic(hte_t *hte)
for (symp = &hte->h_syms; (sym = *symp) != NULL; ) {
if (sym->s_pos.p_src == sym1->s_pos.p_src) {
sym->s_static = 1;
- (*symp) = sym->s_nxt;
- if (hte->h_lsym == &sym->s_nxt)
+ (*symp) = sym->s_next;
+ if (hte->h_lsym == &sym->s_next)
hte->h_lsym = symp;
- sym->s_nxt = NULL;
+ sym->s_next = NULL;
*nhte->h_lsym = sym;
- nhte->h_lsym = &sym->s_nxt;
+ nhte->h_lsym = &sym->s_next;
} else {
- symp = &sym->s_nxt;
+ symp = &sym->s_next;
}
}
for (callp = &hte->h_calls; (call = *callp) != NULL; ) {
@@ -1298,7 +1298,7 @@ mkstatic(hte_t *hte)
/* h_def must be recalculated for old hte */
hte->h_def = nhte->h_def = 0;
- for (sym = hte->h_syms; sym != NULL; sym = sym->s_nxt) {
+ for (sym = hte->h_syms; sym != NULL; sym = sym->s_next) {
if (sym->s_def == DEF || sym->s_def == TDEF) {
hte->h_def = 1;
break;