Module Name: src
Committed By: rillig
Date: Sun Jan 3 19:15:36 UTC 2021
Modified Files:
src/usr.bin/xlint/lint1: decl.c lint1.h
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.50 -r1.51 src/usr.bin/xlint/lint1/lint1.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.108 src/usr.bin/xlint/lint1/decl.c:1.109
--- src/usr.bin/xlint/lint1/decl.c:1.108 Sun Jan 3 19:10:47 2021
+++ src/usr.bin/xlint/lint1/decl.c Sun Jan 3 19:15:36 2021
@@ -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 @@ void
addpacked(void)
{
if (dcs->d_type == NULL)
- dcs->d_ispacked = 1;
+ dcs->d_packed = 1;
else
setpackedsize(dcs->d_type);
}
@@ -1639,7 +1639,7 @@ mktag(sym_t *tag, tspec_t kind, int decl
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 @@ mktag(sym_t *tag, tspec_t kind, int decl
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 @@ complete_tag_struct_or_union(type_t *tp,
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;
Index: src/usr.bin/xlint/lint1/lint1.h
diff -u src/usr.bin/xlint/lint1/lint1.h:1.50 src/usr.bin/xlint/lint1/lint1.h:1.51
--- src/usr.bin/xlint/lint1/lint1.h:1.50 Sun Jan 3 19:10:47 2021
+++ src/usr.bin/xlint/lint1/lint1.h Sun Jan 3 19:15:36 2021
@@ -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 @@ struct type {
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 @@ typedef struct dinfo {
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 */