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 t_ispacked to t_packed and ...



details:   https://anonhg.NetBSD.org/src/rev/3d8e5ffa6758
branches:  trunk
changeset: 958403:3d8e5ffa6758
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jan 03 19:15:36 2021 +0000

description:
lint: rename t_ispacked to t_packed and d_ispacked to d_packed

It's shorter, and the other flags of the type or declaration also don't
have "is" in their names.  Except for t_isenum, but that's because there
is a macro named t_enum that would interfere with that name.

diffstat:

 usr.bin/xlint/lint1/decl.c  |  12 ++++++------
 usr.bin/xlint/lint1/lint1.h |   8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (83 lines):

diff -r 70af23454873 -r 3d8e5ffa6758 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Sun Jan 03 19:10:47 2021 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Sun Jan 03 19:15:36 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.108 2021/01/03 19:10:47 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.109 2021/01/03 19:15:36 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.108 2021/01/03 19:10:47 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.109 2021/01/03 19:15:36 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -536,7 +536,7 @@
 addpacked(void)
 {
        if (dcs->d_type == NULL)
-               dcs->d_ispacked = 1;
+               dcs->d_packed = 1;
        else
                setpackedsize(dcs->d_type);
 }
@@ -1639,7 +1639,7 @@
                if (tag->s_scl == NOSCL) {
                        tag->s_scl = scl;
                        tag->s_type = tp = getblk(sizeof (type_t));
-                       tp->t_ispacked = dcs->d_ispacked;
+                       tp->t_packed = dcs->d_packed;
                } else {
                        tp = tag->s_type;
                }
@@ -1651,7 +1651,7 @@
                tag->s_scl = scl;
                tag->s_blklev = -1;
                tag->s_type = tp = getblk(sizeof (type_t));
-               tp->t_ispacked = dcs->d_ispacked;
+               tp->t_packed = dcs->d_packed;
                dcs->d_next->d_nedecl = 1;
        }
 
@@ -1772,7 +1772,7 @@
        sp = tp->t_str;
        sp->align = dcs->d_stralign;
        sp->memb = fmem;
-       if (tp->t_ispacked)
+       if (tp->t_packed)
                setpackedsize(tp);
        else
                sp->size = dcs->d_offset;
diff -r 70af23454873 -r 3d8e5ffa6758 usr.bin/xlint/lint1/lint1.h
--- a/usr.bin/xlint/lint1/lint1.h       Sun Jan 03 19:10:47 2021 +0000
+++ b/usr.bin/xlint/lint1/lint1.h       Sun Jan 03 19:15:36 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.50 2021/01/03 19:10:47 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.51 2021/01/03 19:15:36 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -158,7 +158,7 @@
        bool    t_typedef : 1;  /* type defined with typedef */
        bool    t_bitfield : 1;
        bool    t_isenum : 1;   /* type is (or was) enum (t_enum valid) */
-       bool    t_ispacked : 1; /* type is packed */
+       bool    t_packed : 1;
        union {
                int     _t_dim;         /* dimension */
                str_t   *_t_str;        /* struct/union tag */
@@ -343,8 +343,8 @@
        bool    d_proto : 1;    /* current function decl. is prototype */
        bool    d_notyp : 1;    /* set if no type specifier was present */
        bool    d_asm : 1;      /* set if d_ctx == AUTO and asm() present */
-       bool    d_ispacked : 1; /* packed */
-       bool    d_used : 1;     /* used */
+       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 */



Home | Main Index | Thread Index | Old Index