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: fix indentation and alignment that used ...



details:   https://anonhg.NetBSD.org/src/rev/7abbfe18ccc9
branches:  trunk
changeset: 1017497:7abbfe18ccc9
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Dec 29 12:18:42 2020 +0000

description:
lint: fix indentation and alignment that used space-tab

diffstat:

 usr.bin/xlint/common/tyname.c |  13 +++++++------
 usr.bin/xlint/lint1/cgram.y   |   6 +++---
 usr.bin/xlint/lint1/err.c     |  14 +++++++-------
 usr.bin/xlint/lint1/func.c    |   6 +++---
 usr.bin/xlint/lint1/lint1.h   |  24 ++++++++++++------------
 usr.bin/xlint/lint1/scan.l    |   8 ++++----
 usr.bin/xlint/lint1/tree.c    |  12 ++++++------
 usr.bin/xlint/lint2/read.c    |   8 ++++----
 8 files changed, 46 insertions(+), 45 deletions(-)

diffs (299 lines):

diff -r 63ef447417a1 -r 7abbfe18ccc9 usr.bin/xlint/common/tyname.c
--- a/usr.bin/xlint/common/tyname.c     Tue Dec 29 11:54:56 2020 +0000
+++ b/usr.bin/xlint/common/tyname.c     Tue Dec 29 12:18:42 2020 +0000
@@ -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 @@
 #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 *
diff -r 63ef447417a1 -r 7abbfe18ccc9 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Tue Dec 29 11:54:56 2020 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Tue Dec 29 12:18:42 2020 +0000
@@ -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 @@
        | 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 {
diff -r 63ef447417a1 -r 7abbfe18ccc9 usr.bin/xlint/lint1/err.c
--- a/usr.bin/xlint/lint1/err.c Tue Dec 29 11:54:56 2020 +0000
+++ b/usr.bin/xlint/lint1/err.c Tue Dec 29 12:18:42 2020 +0000
@@ -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 @@
        "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 @@
        "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 @@
        "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 @@
        "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 */
diff -r 63ef447417a1 -r 7abbfe18ccc9 usr.bin/xlint/lint1/func.c
--- a/usr.bin/xlint/lint1/func.c        Tue Dec 29 11:54:56 2020 +0000
+++ b/usr.bin/xlint/lint1/func.c        Tue Dec 29 12:18:42 2020 +0000
@@ -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 @@
 /*
  * 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
  */
diff -r 63ef447417a1 -r 7abbfe18ccc9 usr.bin/xlint/lint1/lint1.h
--- a/usr.bin/xlint/lint1/lint1.h       Tue Dec 29 11:54:56 2020 +0000
+++ b/usr.bin/xlint/lint1/lint1.h       Tue Dec 29 12:18:42 2020 +0000
@@ -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 @@
 } 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 @@
        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 @@
 } 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)
diff -r 63ef447417a1 -r 7abbfe18ccc9 usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l        Tue Dec 29 11:54:56 2020 +0000
+++ b/usr.bin/xlint/lint1/scan.l        Tue Dec 29 12:18:42 2020 +0000
@@ -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 @@
 
 %%
 
-{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 @@
 {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));
diff -r 63ef447417a1 -r 7abbfe18ccc9 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Tue Dec 29 11:54:56 2020 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Tue Dec 29 12:18:42 2020 +0000
@@ -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 @@
 #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.
                 */
diff -r 63ef447417a1 -r 7abbfe18ccc9 usr.bin/xlint/lint2/read.c
--- a/usr.bin/xlint/lint2/read.c        Tue Dec 29 11:54:56 2020 +0000
+++ b/usr.bin/xlint/lint2/read.c        Tue Dec 29 12:18:42 2020 +0000
@@ -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 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 *);



Home | Main Index | Thread Index | Old Index