Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint lint: rename s_nxt to s_next
details: https://anonhg.NetBSD.org/src/rev/1b7a96648e61
branches: trunk
changeset: 958268:1b7a96648e61
user: rillig <rillig%NetBSD.org@localhost>
date: Wed Dec 30 10:26:12 2020 +0000
description:
lint: rename s_nxt to s_next
diffstat:
usr.bin/xlint/lint1/cgram.y | 6 ++--
usr.bin/xlint/lint1/decl.c | 54 ++++++++++++++++++++++----------------------
usr.bin/xlint/lint1/emit1.c | 12 +++++-----
usr.bin/xlint/lint1/func.c | 10 ++++----
usr.bin/xlint/lint1/init.c | 10 ++++----
usr.bin/xlint/lint1/lint1.h | 4 +-
usr.bin/xlint/lint1/tree.c | 12 +++++-----
usr.bin/xlint/lint2/chk.c | 14 +++++-----
usr.bin/xlint/lint2/emit2.c | 6 ++--
usr.bin/xlint/lint2/lint2.h | 8 +++---
usr.bin/xlint/lint2/read.c | 24 ++++++++++----------
11 files changed, 80 insertions(+), 80 deletions(-)
diffs (truncated from 636 to 300 lines):
diff -r 4b191d063586 -r 1b7a96648e61 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Wed Dec 30 10:03:16 2020 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Wed Dec 30 10:26:12 2020 +0000
@@ -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 void
anonymize(sym_t *s)
{
- for ( ; s; s = s->s_nxt)
+ for ( ; s; s = s->s_next)
s->s_styp = NULL;
}
%}
diff -r 4b191d063586 -r 1b7a96648e61 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c Wed Dec 30 10:03:16 2020 +0000
+++ b/usr.bin/xlint/lint1/decl.c Wed Dec 30 10:26:12 2020 +0000
@@ -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 @@
/*
* 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 @@
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 @@
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 @@
}
/*
- * 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 @@
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(). 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 @@
}
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 @@
}
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 @@
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 @@
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 @@
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 @@
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 @@
* 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 @@
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 @@
* 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 @@
*/
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 @@
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)
diff -r 4b191d063586 -r 1b7a96648e61 usr.bin/xlint/lint1/emit1.c
--- a/usr.bin/xlint/lint1/emit1.c Wed Dec 30 10:03:16 2020 +0000
+++ b/usr.bin/xlint/lint1/emit1.c Wed Dec 30 10:26:12 2020 +0000
@@ -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 @@
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 @@
/* 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 {
diff -r 4b191d063586 -r 1b7a96648e61 usr.bin/xlint/lint1/func.c
--- a/usr.bin/xlint/lint1/func.c Wed Dec 30 10:03:16 2020 +0000
+++ b/usr.bin/xlint/lint1/func.c Wed Dec 30 10:26:12 2020 +0000
@@ -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 @@
* (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 @@
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++;
}
Home |
Main Index |
Thread Index |
Old Index