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 more _nxt members to _next



details:   https://anonhg.NetBSD.org/src/rev/f0b3625b6a90
branches:  trunk
changeset: 948736:f0b3625b6a90
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Dec 30 10:46:11 2020 +0000

description:
lint: rename more _nxt members to _next

diffstat:

 usr.bin/xlint/common/emit.c |  28 ++++++++++++++--------------
 usr.bin/xlint/common/lint.h |   4 ++--
 usr.bin/xlint/lint1/emit1.c |   8 ++++----
 usr.bin/xlint/lint1/func.c  |  26 +++++++++++++-------------
 usr.bin/xlint/lint1/init.c  |  24 ++++++++++++------------
 usr.bin/xlint/lint1/lint1.h |  10 +++++-----
 usr.bin/xlint/lint1/mem1.c  |  10 +++++-----
 usr.bin/xlint/lint1/scan.l  |  10 +++++-----
 usr.bin/xlint/lint2/chk.c   |  22 +++++++++++-----------
 usr.bin/xlint/lint2/lint2.h |  12 ++++++------
 usr.bin/xlint/lint2/read.c  |  40 ++++++++++++++++++++--------------------
 11 files changed, 97 insertions(+), 97 deletions(-)

diffs (truncated from 757 to 300 lines):

diff -r 1f4341081977 -r f0b3625b6a90 usr.bin/xlint/common/emit.c
--- a/usr.bin/xlint/common/emit.c       Wed Dec 30 10:35:38 2020 +0000
+++ b/usr.bin/xlint/common/emit.c       Wed Dec 30 10:46:11 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emit.c,v 1.7 2020/12/28 21:24:55 rillig Exp $  */
+/*     $NetBSD: emit.c,v 1.8 2020/12/30 10:46:11 rillig Exp $  */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: emit.c,v 1.7 2020/12/28 21:24:55 rillig Exp $");
+__RCSID("$NetBSD: emit.c,v 1.8 2020/12/30 10:46:11 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -71,7 +71,7 @@
 
        /* Create output buffer */
        ob.o_len = 1024;
-       ob.o_end = (ob.o_buf = ob.o_nxt = xmalloc(ob.o_len)) + ob.o_len;
+       ob.o_end = (ob.o_buf = ob.o_next = xmalloc(ob.o_len)) + ob.o_len;
 }
 
 /*
@@ -94,10 +94,10 @@
 {
        ptrdiff_t coffs;
 
-       coffs = ob.o_nxt - ob.o_buf;
+       coffs = ob.o_next - ob.o_buf;
        ob.o_len *= 2;
        ob.o_end = (ob.o_buf = xrealloc(ob.o_buf, ob.o_len)) + ob.o_len;
-       ob.o_nxt = ob.o_buf + coffs;
+       ob.o_next = ob.o_buf + coffs;
 }
 
 /*
@@ -109,14 +109,14 @@
 {
        size_t  sz;
 
-       if (ob.o_buf != ob.o_nxt) {
+       if (ob.o_buf != ob.o_next) {
                outchar('\n');
-               sz = ob.o_nxt - ob.o_buf;
+               sz = ob.o_next - ob.o_buf;
                if (sz > ob.o_len)
                        errx(1, "internal error: outclr() 1");
                if (fwrite(ob.o_buf, sz, 1, lout) != 1)
                        err(1, "cannot write to %s", loname);
-               ob.o_nxt = ob.o_buf;
+               ob.o_next = ob.o_buf;
        }
 }
 
@@ -127,9 +127,9 @@
 outchar(int c)
 {
 
-       if (ob.o_nxt == ob.o_end)
+       if (ob.o_next == ob.o_end)
                outxbuf();
-       *ob.o_nxt++ = (char)c;
+       *ob.o_next++ = (char)c;
 }
 
 /*
@@ -193,9 +193,9 @@
 {
 
        while (*s != '\0') {
-               if (ob.o_nxt == ob.o_end)
+               if (ob.o_next == ob.o_end)
                        outxbuf();
-               *ob.o_nxt++ = *s++;
+               *ob.o_next++ = *s++;
        }
 }
 
@@ -206,9 +206,9 @@
 outint(int i)
 {
 
-       if ((size_t)(ob.o_end - ob.o_nxt) < 3 * sizeof (int))
+       if ((size_t)(ob.o_end - ob.o_next) < 3 * sizeof (int))
                outxbuf();
-       ob.o_nxt += sprintf(ob.o_nxt, "%d", i);
+       ob.o_next += sprintf(ob.o_next, "%d", i);
 }
 
 /*
diff -r 1f4341081977 -r f0b3625b6a90 usr.bin/xlint/common/lint.h
--- a/usr.bin/xlint/common/lint.h       Wed Dec 30 10:35:38 2020 +0000
+++ b/usr.bin/xlint/common/lint.h       Wed Dec 30 10:46:11 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lint.h,v 1.17 2020/12/28 21:24:55 rillig Exp $ */
+/*     $NetBSD: lint.h,v 1.18 2020/12/30 10:46:11 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -131,7 +131,7 @@
        char    *o_buf;         /* buffer */
        char    *o_end;         /* first byte after buffer */
        size_t  o_len;          /* length of buffer */
-       char    *o_nxt;         /* next free byte in buffer */
+       char    *o_next;        /* next free byte in buffer */
 } ob_t;
 
 typedef struct type type_t;
diff -r 1f4341081977 -r f0b3625b6a90 usr.bin/xlint/lint1/emit1.c
--- a/usr.bin/xlint/lint1/emit1.c       Wed Dec 30 10:35:38 2020 +0000
+++ b/usr.bin/xlint/lint1/emit1.c       Wed Dec 30 10:46:11 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: emit1.c,v 1.26 2020/12/30 10:26:12 rillig Exp $ */
+/* $NetBSD: emit1.c,v 1.27 2020/12/30 10:46:11 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.26 2020/12/30 10:26:12 rillig Exp $");
+__RCSID("$NetBSD: emit1.c,v 1.27 2020/12/30 10:46:11 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -173,13 +173,13 @@
 
        if (tob.o_buf == NULL) {
                tob.o_len = 64;
-               tob.o_buf = tob.o_nxt = xmalloc(tob.o_len);
+               tob.o_buf = tob.o_next = xmalloc(tob.o_len);
                tob.o_end = tob.o_buf + tob.o_len;
        }
 
        tmp = ob;
        ob = tob;
-       ob.o_nxt = ob.o_buf;
+       ob.o_next = ob.o_buf;
        outtype(tp);
        outchar('\0');
        tob = ob;
diff -r 1f4341081977 -r f0b3625b6a90 usr.bin/xlint/lint1/func.c
--- a/usr.bin/xlint/lint1/func.c        Wed Dec 30 10:35:38 2020 +0000
+++ b/usr.bin/xlint/lint1/func.c        Wed Dec 30 10:46:11 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: func.c,v 1.32 2020/12/30 10:26:12 rillig Exp $ */
+/*     $NetBSD: func.c,v 1.33 2020/12/30 10:46:11 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.32 2020/12/30 10:26:12 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.33 2020/12/30 10:46:11 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -159,7 +159,7 @@
 
        ci = xcalloc(1, sizeof (cstk_t));
        ci->c_env = env;
-       ci->c_nxt = cstk;
+       ci->c_next = cstk;
        cstk = ci;
 }
 
@@ -175,10 +175,10 @@
        if (cstk == NULL || cstk->c_env != env)
                LERROR("popctrl()");
 
-       cstk = (ci = cstk)->c_nxt;
+       cstk = (ci = cstk)->c_next;
 
        while ((cl = ci->c_clst) != NULL) {
-               ci->c_clst = cl->cl_nxt;
+               ci->c_clst = cl->cl_next;
                free(cl);
        }
 
@@ -432,7 +432,7 @@
        case T_CASE:
 
                /* find the stack entry for the innermost switch statement */
-               for (ci = cstk; ci != NULL && !ci->c_switch; ci = ci->c_nxt)
+               for (ci = cstk; ci != NULL && !ci->c_switch; ci = ci->c_next)
                        continue;
 
                if (ci == NULL) {
@@ -478,7 +478,7 @@
                        free(v);
 
                        /* look if we had this value already */
-                       for (cl = ci->c_clst; cl != NULL; cl = cl->cl_nxt) {
+                       for (cl = ci->c_clst; cl != NULL; cl = cl->cl_next) {
                                if (cl->cl_val.v_quad == nv.v_quad)
                                        break;
                        }
@@ -495,7 +495,7 @@
                                 */
                                cl = xcalloc(1, sizeof (clst_t));
                                STRUCT_ASSIGN(cl->cl_val, nv);
-                               cl->cl_nxt = ci->c_clst;
+                               cl->cl_next = ci->c_clst;
                                ci->c_clst = cl;
                        }
                }
@@ -505,7 +505,7 @@
        case T_DEFAULT:
 
                /* find the stack entry for the innermost switch statement */
-               for (ci = cstk; ci != NULL && !ci->c_switch; ci = ci->c_nxt)
+               for (ci = cstk; ci != NULL && !ci->c_switch; ci = ci->c_next)
                        continue;
 
                if (ci == NULL) {
@@ -647,7 +647,7 @@
                     esym != NULL; esym = esym->s_next) {
                        nenum++;
                }
-               for (cl = cstk->c_clst; cl != NULL; cl = cl->cl_nxt)
+               for (cl = cstk->c_clst; cl != NULL; cl = cl->cl_next)
                        nclab++;
                if (hflag && eflag && nenum != nclab && !cstk->c_default) {
                        /* enumeration value(s) not handled in switch */
@@ -924,7 +924,7 @@
 
        ci = cstk;
        while (ci != NULL && !ci->c_loop && !ci->c_switch)
-               ci = ci->c_nxt;
+               ci = ci->c_next;
 
        if (ci == NULL) {
                /* break outside loop or switch */
@@ -948,7 +948,7 @@
 {
        cstk_t  *ci;
 
-       for (ci = cstk; ci != NULL && !ci->c_loop; ci = ci->c_nxt)
+       for (ci = cstk; ci != NULL && !ci->c_loop; ci = ci->c_next)
                continue;
 
        if (ci == NULL) {
@@ -974,7 +974,7 @@
        cstk_t  *ci;
        op_t    op;
 
-       for (ci = cstk; ci->c_nxt != NULL; ci = ci->c_nxt)
+       for (ci = cstk; ci->c_next != NULL; ci = ci->c_next)
                continue;
 
        if (tn != NULL) {
diff -r 1f4341081977 -r f0b3625b6a90 usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c        Wed Dec 30 10:35:38 2020 +0000
+++ b/usr.bin/xlint/lint1/init.c        Wed Dec 30 10:46:11 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.45 2020/12/30 10:26:12 rillig Exp $ */
+/*     $NetBSD: init.c,v 1.46 2020/12/30 10:46:11 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.45 2020/12/30 10:26:12 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.46 2020/12/30 10:46:11 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -126,7 +126,7 @@
 
        /* free memory used in last initialisation */
        while ((istk = initstk) != NULL) {
-               initstk = istk->i_nxt;
+               initstk = istk->i_next;
                free(istk);
        }
 
@@ -158,7 +158,7 @@
            tyname(buf, sizeof buf, istk->i_type ? istk->i_type : istk->i_subt),
            istk->i_brace, istk->i_remaining, istk->i_namedmem));
 
-       initstk = istk->i_nxt;
+       initstk = istk->i_next;
        free(istk);
        istk = initstk;
        lint_assert(istk != NULL);
@@ -265,7 +265,7 @@
                 * Inside of other aggregate types must not be an incomplete
                 * type.
                 */
-               lint_assert(istk->i_nxt->i_nxt == NULL);
+               lint_assert(istk->i_next->i_next == NULL);



Home | Main Index | Thread Index | Old Index