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 in_bit to in_bits



details:   https://anonhg.NetBSD.org/src/rev/816c7d9224e8
branches:  trunk
changeset: 960433:816c7d9224e8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Mar 19 08:21:26 2021 +0000

description:
lint: rename in_bit to in_bits

No functional change.

diffstat:

 usr.bin/xlint/lint1/decl.c  |  34 +++++++++++++++++-----------------
 usr.bin/xlint/lint1/lint1.h |   6 +++---
 usr.bin/xlint/lint1/tree.c  |   8 ++++----
 3 files changed, 24 insertions(+), 24 deletions(-)

diffs (166 lines):

diff -r 420c24ff63bf -r 816c7d9224e8 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Fri Mar 19 08:19:24 2021 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Fri Mar 19 08:21:26 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.148 2021/03/19 08:19:24 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.149 2021/03/19 08:21:26 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.148 2021/03/19 08:19:24 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.149 2021/03/19 08:21:26 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -516,19 +516,19 @@
        case STRUCT:
        case UNION:
                sp = tp->t_str;
-               sp->sou_size_in_bit = 0;
+               sp->sou_size_in_bits = 0;
                for (mem = sp->sou_first_member;
                     mem != NULL; mem = mem->s_next) {
                        if (mem->s_type->t_bitfield) {
-                               sp->sou_size_in_bit += bitfieldsize(&mem);
+                               sp->sou_size_in_bits += bitfieldsize(&mem);
                                if (mem == NULL)
                                        break;
                        }
                        size_t x = (size_t)type_size_in_bits(mem->s_type);
                        if (tp->t_tspec == STRUCT)
-                               sp->sou_size_in_bit += x;
-                       else if (x > sp->sou_size_in_bit)
-                               sp->sou_size_in_bit = x;
+                               sp->sou_size_in_bits += x;
+                       else if (x > sp->sou_size_in_bits)
+                               sp->sou_size_in_bits = x;
                }
                break;
        default:
@@ -916,7 +916,7 @@
                        /* incomplete structure or union %s: %s */
                        error(31, tp->t_str->sou_tag->s_name, name);
                }
-               elsz = tp->t_str->sou_size_in_bit;
+               elsz = tp->t_str->sou_size_in_bits;
                break;
        case ENUM:
                if (is_incomplete(tp) && name != NULL) {
@@ -946,7 +946,7 @@
                return -1;
 
        if ((t = tp->t_tspec) == STRUCT || t == UNION) {
-               a = tp->t_str->sou_align_in_bit;
+               a = tp->t_str->sou_align_in_bits;
        } else if (t == FUNC) {
                /* compiler takes alignment of function */
                error(14);
@@ -1687,7 +1687,7 @@
                tp->t_tspec = kind;
                if (kind != ENUM) {
                        tp->t_str = getblk(sizeof (struct_or_union));
-                       tp->t_str->sou_align_in_bit = CHAR_SIZE;
+                       tp->t_str->sou_align_in_bits = CHAR_SIZE;
                        tp->t_str->sou_tag = tag;
                } else {
                        tp->t_is_enum = true;
@@ -1798,14 +1798,14 @@
        t = tp->t_tspec;
        align(dcs->d_stralign, 0);
        sp = tp->t_str;
-       sp->sou_align_in_bit = dcs->d_stralign;
+       sp->sou_align_in_bits = dcs->d_stralign;
        sp->sou_first_member = fmem;
        if (tp->t_packed)
                setpackedsize(tp);
        else
-               sp->sou_size_in_bit = dcs->d_offset;
-
-       if (sp->sou_size_in_bit == 0) {
+               sp->sou_size_in_bits = dcs->d_offset;
+
+       if (sp->sou_size_in_bits == 0) {
                /* zero sized %s is a C9X feature */
                c99ism(47, ttab[t].tt_name);
        }
@@ -1816,17 +1816,17 @@
                if (mem->s_styp == NULL) {
                        mem->s_styp = sp;
                        if (mem->s_type->t_bitfield) {
-                               sp->sou_size_in_bit += bitfieldsize(&mem);
+                               sp->sou_size_in_bits += bitfieldsize(&mem);
                                if (mem == NULL)
                                        break;
                        }
-                       sp->sou_size_in_bit += type_size_in_bits(mem->s_type);
+                       sp->sou_size_in_bits += type_size_in_bits(mem->s_type);
                }
                if (mem->s_name != unnamed)
                        n++;
        }
 
-       if (n == 0 && sp->sou_size_in_bit != 0) {
+       if (n == 0 && sp->sou_size_in_bits != 0) {
                /* %s has no named members */
                warning(65, t == STRUCT ? "structure" : "union");
        }
diff -r 420c24ff63bf -r 816c7d9224e8 usr.bin/xlint/lint1/lint1.h
--- a/usr.bin/xlint/lint1/lint1.h       Fri Mar 19 08:19:24 2021 +0000
+++ b/usr.bin/xlint/lint1/lint1.h       Fri Mar 19 08:21:26 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.74 2021/03/18 14:58:44 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.75 2021/03/19 08:21:26 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -126,8 +126,8 @@
  * the structure type in pass 2.
  */
 typedef        struct {
-       u_int   sou_size_in_bit;
-       u_int   sou_align_in_bit : 15;
+       u_int   sou_size_in_bits;
+       u_int   sou_align_in_bits : 15;
        bool    sou_incomplete : 1;
        struct  sym *sou_first_member;
        struct  sym *sou_tag;
diff -r 420c24ff63bf -r 816c7d9224e8 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Fri Mar 19 08:19:24 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Fri Mar 19 08:21:26 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.236 2021/03/19 08:19:24 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.237 2021/03/19 08:21:26 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.236 2021/03/19 08:19:24 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.237 2021/03/19 08:21:26 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -2990,7 +2990,7 @@
                break;
        case STRUCT:
        case UNION:
-               if ((elsz = tp->t_str->sou_size_in_bit) == 0)
+               if ((elsz = tp->t_str->sou_size_in_bits) == 0)
                        /* cannot do pointer arithmetic on operand of ... */
                        error(136);
                break;
@@ -3375,7 +3375,7 @@
                        error(143);
                        elsz = 1;
                } else {
-                       elsz = tp->t_str->sou_size_in_bit;
+                       elsz = tp->t_str->sou_size_in_bits;
                }
                break;
        case ENUM:



Home | Main Index | Thread Index | Old Index