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 styp and utyp



details:   https://anonhg.NetBSD.org/src/rev/cbcae906354a
branches:  trunk
changeset: 958338:cbcae906354a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jan 01 11:58:03 2021 +0000

description:
lint: rename styp and utyp

diffstat:

 usr.bin/xlint/common/lint.h |  10 +++++-----
 usr.bin/xlint/lint1/tree.c  |   8 ++++----
 usr.bin/xlint/lint2/chk.c   |  10 +++++-----
 3 files changed, 14 insertions(+), 14 deletions(-)

diffs (112 lines):

diff -r b56afdc76cd1 -r cbcae906354a usr.bin/xlint/common/lint.h
--- a/usr.bin/xlint/common/lint.h       Fri Jan 01 11:51:47 2021 +0000
+++ b/usr.bin/xlint/common/lint.h       Fri Jan 01 11:58:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lint.h,v 1.19 2021/01/01 11:51:15 rillig Exp $ */
+/*     $NetBSD: lint.h,v 1.20 2021/01/01 11:58:03 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -93,8 +93,8 @@
        size_t  tt_sz;                  /* size in bits */
        size_t  tt_psz;                 /* size, different from tt_sz
                                           if pflag is set */
-       tspec_t tt_styp;                /* signed counterpart */
-       tspec_t tt_utyp;                /* unsigned counterpart */
+       tspec_t tt_signed_counterpart;
+       tspec_t tt_unsigned_counterpart;
        u_int   tt_is_int : 1;          /* 1 if integer type */
        u_int   tt_is_uint : 1;         /* 1 if unsigned integer type */
        u_int   tt_is_float : 1;        /* 1 if floating point type */
@@ -106,8 +106,8 @@
 
 #define size(t)                        (ttab[t].tt_sz)
 #define psize(t)               (ttab[t].tt_psz)
-#define styp(t)                        (ttab[t].tt_styp)
-#define utyp(t)                        (ttab[t].tt_utyp)
+#define signed_type(t)         (ttab[t].tt_signed_counterpart)
+#define unsigned_type(t)       (ttab[t].tt_unsigned_counterpart)
 #define tspec_is_int(t)                (ttab[t].tt_is_int)
 #define tspec_is_uint(t)       (ttab[t].tt_is_uint)
 #define tspec_is_float(t)      (ttab[t].tt_is_float)
diff -r b56afdc76cd1 -r cbcae906354a usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Fri Jan 01 11:51:47 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Fri Jan 01 11:58:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.113 2021/01/01 11:41:01 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.114 2021/01/01 11:58:03 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.113 2021/01/01 11:41:01 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.114 2021/01/01 11:58:03 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -1666,7 +1666,7 @@
                }
                t = tl[i];
                if (u && tspec_is_int(t) && !tspec_is_uint(t))
-                       t = utyp(t);
+                       t = unsigned_type(t);
        }
 
        if (t != lt) {
@@ -1775,7 +1775,7 @@
                 * and the msb of the argument is not set, print no warning
                 */
                if (ptn->tn_op == CON && tspec_is_int(nt) &&
-                   styp(nt) == styp(ot) &&
+                   signed_type(nt) == signed_type(ot) &&
                    msb(ptn->tn_val->v_quad, ot, -1) == 0) {
                        /* ok */
                } else {
diff -r b56afdc76cd1 -r cbcae906354a usr.bin/xlint/lint2/chk.c
--- a/usr.bin/xlint/lint2/chk.c Fri Jan 01 11:51:47 2021 +0000
+++ b/usr.bin/xlint/lint2/chk.c Fri Jan 01 11:58:03 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chk.c,v 1.29 2020/12/30 10:46:11 rillig Exp $ */
+/* $NetBSD: chk.c,v 1.30 2021/01/01 11:58:03 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: chk.c,v 1.29 2020/12/30 10:46:11 rillig Exp $");
+__RCSID("$NetBSD: chk.c,v 1.30 2021/01/01 11:58:03 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -519,7 +519,7 @@
                        }
                }
 
-               if (styp(t1) == styp(t2)) {
+               if (signed_type(t1) == signed_type(t2)) {
 
                        /*
                         * types differ only in signedness; get information
@@ -901,7 +901,7 @@
                        if (!noasgn) {
                                if (t1 != PTR) {
                                        inconarg(hte, call, n);
-                               } else if (t2 != styp(sz)) {
+                               } else if (t2 != signed_type(sz)) {
                                        inconarg(hte, call, n);
                                } else if (hflag && t2 != sz) {
                                        inconarg(hte, call, n);
@@ -1242,7 +1242,7 @@
                         */
                        if (sflag || hflag || to != PTR)
                                return 0;
-                       if (styp(t) != styp(tp2->t_tspec))
+                       if (signed_type(t) != signed_type(tp2->t_tspec))
                                return 0;
                }
 



Home | Main Index | Thread Index | Old Index