Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: rename d_fargs, d_fdpos and d_fpsy...



details:   https://anonhg.NetBSD.org/src/rev/66ff55716c94
branches:  trunk
changeset: 960559:66ff55716c94
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 21 10:30:28 2021 +0000

description:
lint: rename d_fargs, d_fdpos and d_fpsyms to be less abbreviated

No functional change.

diffstat:

 usr.bin/xlint/lint1/decl.c  |  22 +++++++++++-----------
 usr.bin/xlint/lint1/func.c  |  17 +++++++++--------
 usr.bin/xlint/lint1/lint1.h |   8 ++++----
 3 files changed, 24 insertions(+), 23 deletions(-)

diffs (168 lines):

diff -r 050e1a3c0c43 -r 66ff55716c94 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Sun Mar 21 10:25:40 2021 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Sun Mar 21 10:30:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.155 2021/03/21 10:25:40 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.156 2021/03/21 10:30:28 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.155 2021/03/21 10:25:40 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.156 2021/03/21 10:30:28 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -639,8 +639,8 @@
                 * parameter type list.
                 */
                if (di->d_dlsyms != NULL) {
-                       *di->d_ldlsym = dcs->d_fpsyms;
-                       dcs->d_fpsyms = di->d_dlsyms;
+                       *di->d_ldlsym = dcs->d_func_proto_syms;
+                       dcs->d_func_proto_syms = di->d_dlsyms;
                }
                break;
        case ABSTRACT:
@@ -1396,16 +1396,16 @@
         * The symbols are removed from the symbol table by popdecl() after
         * 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_next->d_fpsyms. Also a list of the arguments (concatenated
-        * by s_next) is stored in dcs->d_next->d_fargs.
+        * dcs->d_next->d_func_proto_syms. Also a list of the arguments
+        * (concatenated by s_next) is stored in dcs->d_next->d_func_args.
         * (dcs->d_next must be used because *dcs is the declaration stack
         * element created for the list of params and is removed after
         * add_function())
         */
        if (dcs->d_next->d_ctx == EXTERN &&
            decl->s_type == dcs->d_next->d_type) {
-               dcs->d_next->d_fpsyms = dcs->d_dlsyms;
-               dcs->d_next->d_fargs = args;
+               dcs->d_next->d_func_proto_syms = dcs->d_dlsyms;
+               dcs->d_next->d_func_args = args;
        }
 
        tpp = &decl->s_type;
@@ -1602,7 +1602,7 @@
 
        sym->s_type = dcs->d_type;
 
-       dcs->d_fpsyms = NULL;
+       dcs->d_func_proto_syms = NULL;
 
        return sym;
 }
@@ -2483,7 +2483,7 @@
         * number of arguments.
         */
        narg = 0;
-       for (arg = dcs->d_fargs; arg != NULL; arg = arg->s_next)
+       for (arg = dcs->d_func_args; arg != NULL; arg = arg->s_next)
                narg++;
        if (nargusg > narg) {
                /* argument number mismatch with directive: ** %s ** */
@@ -2512,7 +2512,7 @@
        if (printflike_argnum != -1 || scanflike_argnum != -1) {
                narg = printflike_argnum != -1
                    ? printflike_argnum : scanflike_argnum;
-               arg = dcs->d_fargs;
+               arg = dcs->d_func_args;
                for (n = 1; n < narg; n++)
                        arg = arg->s_next;
                if (arg->s_type->t_tspec != PTR ||
diff -r 050e1a3c0c43 -r 66ff55716c94 usr.bin/xlint/lint1/func.c
--- a/usr.bin/xlint/lint1/func.c        Sun Mar 21 10:25:40 2021 +0000
+++ b/usr.bin/xlint/lint1/func.c        Sun Mar 21 10:30:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: func.c,v 1.80 2021/03/21 10:21:07 rillig Exp $ */
+/*     $NetBSD: func.c,v 1.81 2021/03/21 10:30:28 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.80 2021/03/21 10:21:07 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.81 2021/03/21 10:30:28 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -223,7 +223,7 @@
         * Put all symbols declared in the argument list back to the
         * symbol table.
         */
-       for (sym = dcs->d_fpsyms; sym != NULL; sym = sym->s_dlnxt) {
+       for (sym = dcs->d_func_proto_syms; sym != NULL; sym = sym->s_dlnxt) {
                if (sym->s_block_level != -1) {
                        lint_assert(sym->s_block_level == 1);
                        inssym(1, sym);
@@ -282,7 +282,7 @@
         * if this is an old style definition and we had already a
         * prototype.
         */
-       dcs->d_fdpos = fsym->s_def_pos;
+       dcs->d_func_def_pos = fsym->s_def_pos;
 
        if ((rdsym = dcs->d_redeclared_symbol) != NULL) {
 
@@ -378,7 +378,7 @@
                warning(216, funcsym->s_name);
 
        /* Print warnings for unused arguments */
-       arg = dcs->d_fargs;
+       arg = dcs->d_func_args;
        n = 0;
        while (arg != NULL && (nargusg == -1 || n < nargusg)) {
                check_usage_sym(dcs->d_asm, arg);
@@ -396,8 +396,9 @@
        if (dcs->d_scl == EXTERN && funcsym->s_inline) {
                outsym(funcsym, funcsym->s_scl, DECL);
        } else {
-               outfdef(funcsym, &dcs->d_fdpos, cstmt->c_had_return_value,
-                       funcsym->s_osdef, dcs->d_fargs);
+               outfdef(funcsym, &dcs->d_func_def_pos,
+                   cstmt->c_had_return_value, funcsym->s_osdef,
+                   dcs->d_func_args);
        }
 
        /*
@@ -406,7 +407,7 @@
         */
        lint_assert(dcs->d_next == NULL);
        lint_assert(dcs->d_ctx == EXTERN);
-       rmsyms(dcs->d_fpsyms);
+       rmsyms(dcs->d_func_proto_syms);
 
        /* must be set on level 0 */
        reached = true;
diff -r 050e1a3c0c43 -r 66ff55716c94 usr.bin/xlint/lint1/lint1.h
--- a/usr.bin/xlint/lint1/lint1.h       Sun Mar 21 10:25:40 2021 +0000
+++ b/usr.bin/xlint/lint1/lint1.h       Sun Mar 21 10:30:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.79 2021/03/21 10:25:40 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.80 2021/03/21 10:30:28 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -350,12 +350,12 @@
        bool    d_packed : 1;
        bool    d_used : 1;
        type_t  *d_tagtyp;      /* tag during member declaration */
-       sym_t   *d_fargs;       /* list of arguments during function def. */
-       pos_t   d_fdpos;        /* position of function definition */
+       sym_t   *d_func_args;   /* list of arguments during function def. */
+       pos_t   d_func_def_pos; /* position of function definition */
        sym_t   *d_dlsyms;      /* first symbol declared at this level */
        sym_t   **d_ldlsym;     /* points to s_dlnxt in last symbol decl.
                                   at this level */
-       sym_t   *d_fpsyms;      /* symbols defined in prototype */
+       sym_t   *d_func_proto_syms; /* symbols defined in prototype */
        struct  dinfo *d_next;  /* next level */
 } dinfo_t;
 



Home | Main Index | Thread Index | Old Index