Module Name: src Committed By: rillig Date: Tue Dec 29 12:18:42 UTC 2020
Modified Files: src/usr.bin/xlint/common: tyname.c src/usr.bin/xlint/lint1: cgram.y err.c func.c lint1.h scan.l tree.c src/usr.bin/xlint/lint2: read.c Log Message: lint: fix indentation and alignment that used space-tab To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/xlint/common/tyname.c cvs rdiff -u -r1.112 -r1.113 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.57 -r1.58 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.29 -r1.30 src/usr.bin/xlint/lint1/func.c cvs rdiff -u -r1.33 -r1.34 src/usr.bin/xlint/lint1/lint1.h cvs rdiff -u -r1.95 -r1.96 src/usr.bin/xlint/lint1/scan.l cvs rdiff -u -r1.96 -r1.97 src/usr.bin/xlint/lint1/tree.c cvs rdiff -u -r1.30 -r1.31 src/usr.bin/xlint/lint2/read.c 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/common/tyname.c diff -u src/usr.bin/xlint/common/tyname.c:1.14 src/usr.bin/xlint/common/tyname.c:1.15 --- src/usr.bin/xlint/common/tyname.c:1.14 Tue Dec 29 11:35:11 2020 +++ src/usr.bin/xlint/common/tyname.c Tue Dec 29 12:18:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: tyname.c,v 1.14 2020/12/29 11:35:11 rillig Exp $ */ +/* $NetBSD: tyname.c,v 1.15 2020/12/29 12:18:42 rillig Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tyname.c,v 1.14 2020/12/29 11:35:11 rillig Exp $"); +__RCSID("$NetBSD: tyname.c,v 1.15 2020/12/29 12:18:42 rillig Exp $"); #endif #include <limits.h> @@ -46,10 +46,11 @@ __RCSID("$NetBSD: tyname.c,v 1.14 2020/1 #include PASS #ifndef LERROR -#define LERROR(fmt, args...) do { \ - (void)warnx("%s, %d: " fmt, __FILE__, __LINE__, ##args); \ - abort(); \ -} while (/*CONSTCOND*/0) +#define LERROR(fmt, args...) \ + do { \ + (void)warnx("%s, %d: " fmt, __FILE__, __LINE__, ##args); \ + abort(); \ + } while (/*CONSTCOND*/0) #endif const char * Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.112 src/usr.bin/xlint/lint1/cgram.y:1.113 --- src/usr.bin/xlint/lint1/cgram.y:1.112 Tue Dec 29 11:35:11 2020 +++ src/usr.bin/xlint/lint1/cgram.y Tue Dec 29 12:18:42 2020 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.112 2020/12/29 11:35:11 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.113 2020/12/29 12:18:42 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.112 2020/12/29 11:35:11 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.113 2020/12/29 12:18:42 rillig Exp $"); #endif #include <limits.h> @@ -1952,7 +1952,7 @@ term: | T_LPARN type_name T_RPARN term %prec T_UNOP { $$ = cast($4, $2); } - | T_LPARN type_name T_RPARN %prec T_UNOP { + | T_LPARN type_name T_RPARN %prec T_UNOP { sym_t *tmp = mktempsym($2); idecl(tmp, 1, NULL); } init_lbrace init_expr_list init_rbrace { Index: src/usr.bin/xlint/lint1/err.c diff -u src/usr.bin/xlint/lint1/err.c:1.57 src/usr.bin/xlint/lint1/err.c:1.58 --- src/usr.bin/xlint/lint1/err.c:1.57 Tue Dec 29 11:35:11 2020 +++ src/usr.bin/xlint/lint1/err.c Tue Dec 29 12:18:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.57 2020/12/29 11:35:11 rillig Exp $ */ +/* $NetBSD: err.c,v 1.58 2020/12/29 12:18:42 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: err.c,v 1.57 2020/12/29 11:35:11 rillig Exp $"); +__RCSID("$NetBSD: err.c,v 1.58 2020/12/29 12:18:42 rillig Exp $"); #endif #include <sys/types.h> @@ -215,9 +215,9 @@ const char *msgs[] = { "argument has incompatible pointer type, arg #%d (%s != %s)", /* 153 */ "illegal combination of %s (%s) and %s (%s), arg #%d", /* 154 */ "argument is incompatible with prototype, arg #%d", /* 155 */ - "enum type mismatch, arg #%d", /* 156 */ + "enum type mismatch, arg #%d", /* 156 */ "ANSI C treats constant as unsigned", /* 157 */ - "%s may be used before set", /* 158 */ + "%s may be used before set", /* 158 */ "assignment in conditional context", /* 159 */ "operator '==' found where '=' was expected", /* 160 */ "constant in conditional context", /* 161 */ @@ -242,7 +242,7 @@ const char *msgs[] = { "bit-field initializer does not fit", /* 180 */ "{}-enclosed initializer required", /* 181 */ "incompatible pointer types (%s != %s)", /* 182 */ - "illegal combination of %s (%s) and %s (%s)", /* 183 */ + "illegal combination of %s (%s) and %s (%s)", /* 183 */ "illegal pointer combination", /* 184 */ "initialisation type mismatch (%s) and (%s)", /* 185 */ "bit-field initialisation is illegal in traditional C", /* 186 */ @@ -250,7 +250,7 @@ const char *msgs[] = { "no automatic aggregate initialization in traditional C", /* 188 */ "assignment of struct/union illegal in traditional C", /* 189 */ "empty array declaration: %s", /* 190 */ - "%s set but not used in function %s", /* 191 */ + "%s set but not used in function %s", /* 191 */ "%s unused in function %s", /* 192 */ "statement not reached", /* 193 */ "label %s redefined", /* 194 */ @@ -384,7 +384,7 @@ const char *msgs[] = { "zero sized array is a C99 extension", /* 322 */ "continue in 'do ... while (0)' loop", /* 323 */ "suggest cast from '%s' to '%s' on op %s to avoid overflow", /* 324 */ - "variable declaration in for loop", /* 325 */ + "variable declaration in for loop", /* 325 */ "%s attribute ignored for %s", /* 326 */ "declarations after statements is a C9X feature", /* 327 */ "union cast is a C9X feature", /* 328 */ Index: src/usr.bin/xlint/lint1/func.c diff -u src/usr.bin/xlint/lint1/func.c:1.29 src/usr.bin/xlint/lint1/func.c:1.30 --- src/usr.bin/xlint/lint1/func.c:1.29 Tue Dec 29 10:24:22 2020 +++ src/usr.bin/xlint/lint1/func.c Tue Dec 29 12:18:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: func.c,v 1.29 2020/12/29 10:24:22 rillig Exp $ */ +/* $NetBSD: func.c,v 1.30 2020/12/29 12:18:42 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.29 2020/12/29 10:24:22 rillig Exp $"); +__RCSID("$NetBSD: func.c,v 1.30 2020/12/29 12:18:42 rillig Exp $"); #endif #include <stdlib.h> @@ -131,7 +131,7 @@ int llibflg; /* * Nonzero if warnings are suppressed by a LINTED directive * LWARN_BAD: error - * LWARN_ALL: warnings on + * LWARN_ALL: warnings on * LWARN_NONE: all warnings ignored * 0..n: warning n ignored */ Index: src/usr.bin/xlint/lint1/lint1.h diff -u src/usr.bin/xlint/lint1/lint1.h:1.33 src/usr.bin/xlint/lint1/lint1.h:1.34 --- src/usr.bin/xlint/lint1/lint1.h:1.33 Tue Dec 29 11:54:56 2020 +++ src/usr.bin/xlint/lint1/lint1.h Tue Dec 29 12:18:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lint1.h,v 1.33 2020/12/29 11:54:56 rillig Exp $ */ +/* $NetBSD: lint1.h,v 1.34 2020/12/29 12:18:42 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -64,13 +64,13 @@ typedef struct { } pos_t; /* Copies curr_pos, keeping things unique. */ -#define UNIQUE_CURR_POS(pos) \ - do { \ - STRUCT_ASSIGN((pos), curr_pos); \ - curr_pos.p_uniq++; \ - if (curr_pos.p_file == csrc_pos.p_file) \ - csrc_pos.p_uniq++; \ - } while (0) +#define UNIQUE_CURR_POS(pos) \ + do { \ + STRUCT_ASSIGN((pos), curr_pos); \ + curr_pos.p_uniq++; \ + if (curr_pos.p_file == csrc_pos.p_file) \ + csrc_pos.p_uniq++; \ + } while (0) /* * Strings cannot be referenced to simply by a pointer to its first @@ -256,7 +256,7 @@ typedef struct sym { struct sym **s_rlink; /* pointer to s_link of prev. symbol */ struct sym *s_nxt; /* next struct/union member, enumerator, argument */ - struct sym *s_dlnxt; /* next symbol declared on same level */ + struct sym *s_dlnxt; /* next symbol declared on same level */ } sym_t; #define s_styp u._s_st @@ -427,11 +427,11 @@ typedef struct err_set { } err_set; #define ERR_SET(n, p) \ - ((p)->errs_bits[(n)/__NERRBITS] |= (1 << ((n) % __NERRBITS))) + ((p)->errs_bits[(n)/__NERRBITS] |= (1 << ((n) % __NERRBITS))) #define ERR_CLR(n, p) \ - ((p)->errs_bits[(n)/__NERRBITS] &= ~(1 << ((n) % __NERRBITS))) + ((p)->errs_bits[(n)/__NERRBITS] &= ~(1 << ((n) % __NERRBITS))) #define ERR_ISSET(n, p) \ - ((p)->errs_bits[(n)/__NERRBITS] & (1 << ((n) % __NERRBITS))) + ((p)->errs_bits[(n)/__NERRBITS] & (1 << ((n) % __NERRBITS))) #define ERR_ZERO(p) (void)memset((p), 0, sizeof(*(p))) #define LERROR(fmt, args...) lerror(__FILE__, __LINE__, fmt, ##args) Index: src/usr.bin/xlint/lint1/scan.l diff -u src/usr.bin/xlint/lint1/scan.l:1.95 src/usr.bin/xlint/lint1/scan.l:1.96 --- src/usr.bin/xlint/lint1/scan.l:1.95 Mon Dec 28 19:47:42 2020 +++ src/usr.bin/xlint/lint1/scan.l Tue Dec 29 12:18:42 2020 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: scan.l,v 1.95 2020/12/28 19:47:42 rillig Exp $ */ +/* $NetBSD: scan.l,v 1.96 2020/12/29 12:18:42 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: scan.l,v 1.95 2020/12/28 19:47:42 rillig Exp $"); +__RCSID("$NetBSD: scan.l,v 1.96 2020/12/29 12:18:42 rillig Exp $"); #endif #include <ctype.h> @@ -101,7 +101,7 @@ TL ([fFlL]?[i]?) %% -{L}({L}|{D})* return (name()); +{L}({L}|{D})* return (name()); 0[bB]{BD}+[lLuU]* return (icon(2)); 0{OD}*[lLuU]* return (icon(8)); {NZD}{D}*[lLuU]* return (icon(10)); @@ -109,7 +109,7 @@ TL ([fFlL]?[i]?) {D}+\.{D}*{EX}?{TL} | {D}+{EX}{TL} | 0[xX]{HD}+\.{HD}*{HX}{TL} | -0[xX]{HD}+{HX}{TL} | +0[xX]{HD}+{HX}{TL} | \.{D}+{EX}?{TL} return (fcon()); "=" return (operator(T_ASSIGN, ASSIGN)); "*=" return (operator(T_OPASS, MULASS)); Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.96 src/usr.bin/xlint/lint1/tree.c:1.97 --- src/usr.bin/xlint/lint1/tree.c:1.96 Tue Dec 29 11:54:56 2020 +++ src/usr.bin/xlint/lint1/tree.c Tue Dec 29 12:18:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.96 2020/12/29 11:54:56 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.97 2020/12/29 12:18:42 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.96 2020/12/29 11:54:56 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.97 2020/12/29 12:18:42 rillig Exp $"); #endif #include <float.h> @@ -3984,10 +3984,10 @@ conaddr(tnode_t *tn, sym_t **symp, ptrdi #ifdef notdef /* * consider: - * struct foo { - * unsigned char a; - * } f = { - * (u_char)(u_long)(&(((struct foo *)0)->a)) + * struct foo { + * unsigned char a; + * } f = { + * (u_char)(u_long)(&(((struct foo *)0)->a)) * }; * since psize(u_long) != psize(u_char) this fails. */ Index: src/usr.bin/xlint/lint2/read.c diff -u src/usr.bin/xlint/lint2/read.c:1.30 src/usr.bin/xlint/lint2/read.c:1.31 --- src/usr.bin/xlint/lint2/read.c:1.30 Tue Dec 29 11:35:11 2020 +++ src/usr.bin/xlint/lint2/read.c Tue Dec 29 12:18:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: read.c,v 1.30 2020/12/29 11:35:11 rillig Exp $ */ +/* $NetBSD: read.c,v 1.31 2020/12/29 12:18:42 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: read.c,v 1.30 2020/12/29 11:35:11 rillig Exp $"); +__RCSID("$NetBSD: read.c,v 1.31 2020/12/29 12:18:42 rillig Exp $"); #endif #include <ctype.h> @@ -91,8 +91,8 @@ static hte_t **renametab; static int csrcfile; -#define inperr(fmt, args...) \ - inperror(__FILE__, __LINE__, fmt, ##args) +#define inperr(fmt, args...) \ + inperror(__FILE__, __LINE__, fmt, ##args) static void inperror(const char *, size_t, const char *, ...); static void setsrc(const char *); static void setfnid(int, const char *);