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: spell check



details:   https://anonhg.NetBSD.org/src/rev/bd1dbaa584e3
branches:  trunk
changeset: 1017477:bd1dbaa584e3
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Dec 28 21:24:55 2020 +0000

description:
lint: spell check

diffstat:

 usr.bin/xlint/common/emit.c  |    8 +-
 usr.bin/xlint/common/lint.h  |    4 +-
 usr.bin/xlint/common/mem.c   |    5 +-
 usr.bin/xlint/common/param.h |   10 ++--
 usr.bin/xlint/lint1/cgram.y  |   26 +++++-----
 usr.bin/xlint/lint1/decl.c   |  104 ++++++++++++++++++++----------------------
 usr.bin/xlint/lint1/emit1.c  |   13 ++--
 usr.bin/xlint/lint1/err.c    |    8 +-
 usr.bin/xlint/lint1/func.c   |   30 ++++++------
 9 files changed, 101 insertions(+), 107 deletions(-)

diffs (truncated from 796 to 300 lines):

diff -r 136bb72df3b0 -r bd1dbaa584e3 usr.bin/xlint/common/emit.c
--- a/usr.bin/xlint/common/emit.c       Mon Dec 28 20:29:57 2020 +0000
+++ b/usr.bin/xlint/common/emit.c       Mon Dec 28 21:24:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emit.c,v 1.6 2014/04/17 18:52:03 christos Exp $        */
+/*     $NetBSD: emit.c,v 1.7 2020/12/28 21:24:55 rillig Exp $  */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: emit.c,v 1.6 2014/04/17 18:52:03 christos Exp $");
+__RCSID("$NetBSD: emit.c,v 1.7 2020/12/28 21:24:55 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -184,7 +184,7 @@
 }
 
 /*
- * write a strint to the output buffer
+ * write a string to the output buffer
  * the string must not contain any characters which
  * should be quoted
  */
@@ -200,7 +200,7 @@
 }
 
 /*
- * write an integer value to toe output buffer
+ * write an integer value to the output buffer
  */
 void
 outint(int i)
diff -r 136bb72df3b0 -r bd1dbaa584e3 usr.bin/xlint/common/lint.h
--- a/usr.bin/xlint/common/lint.h       Mon Dec 28 20:29:57 2020 +0000
+++ b/usr.bin/xlint/common/lint.h       Mon Dec 28 21:24:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lint.h,v 1.16 2020/12/28 18:49:02 rillig Exp $ */
+/*     $NetBSD: lint.h,v 1.17 2020/12/28 21:24:55 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -46,7 +46,7 @@
 #include "param.h"
 
 /*
- * Type specifiers, used in type structures (type_t) and otherwere.
+ * Type specifiers, used in type structures (type_t) and elsewhere.
  */
 typedef enum {
        NOTSPEC = 0,
diff -r 136bb72df3b0 -r bd1dbaa584e3 usr.bin/xlint/common/mem.c
--- a/usr.bin/xlint/common/mem.c        Mon Dec 28 20:29:57 2020 +0000
+++ b/usr.bin/xlint/common/mem.c        Mon Dec 28 21:24:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mem.c,v 1.8 2020/02/10 04:54:01 christos Exp $ */
+/*     $NetBSD: mem.c,v 1.9 2020/12/28 21:24:55 rillig Exp $   */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: mem.c,v 1.8 2020/02/10 04:54:01 christos Exp $");
+__RCSID("$NetBSD: mem.c,v 1.9 2020/12/28 21:24:55 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -137,3 +137,4 @@
                err(1, "Cannot map memory for %lu bytes", (unsigned long)len);
        return p;
 }
+ 
\ No newline at end of file
diff -r 136bb72df3b0 -r bd1dbaa584e3 usr.bin/xlint/common/param.h
--- a/usr.bin/xlint/common/param.h      Mon Dec 28 20:29:57 2020 +0000
+++ b/usr.bin/xlint/common/param.h      Mon Dec 28 21:24:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.5 2003/09/21 17:06:40 martin Exp $ */
+/*     $NetBSD: param.h,v 1.6 2020/12/28 21:24:55 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -38,14 +38,14 @@
 #define        STRBLEN         256
 
 /*
- * This defines the size of memory blocks which are used to allocate
- * memory in larger chunks.
+ * The size of memory blocks which are used to allocate memory in larger
+ * chunks.
  */
 #define        MBLKSIZ         ((size_t)0x4000)
 
 /*
  * Sizes of hash tables
- * Should be a prime. Possible primes are
+ * Should be primes. Possible primes are
  * 307, 401, 503, 601, 701, 809, 907, 1009, 1103, 1201, 1301, 1409, 1511.
  *
  * HSHSIZ1     symbol table 1st pass
@@ -67,7 +67,7 @@
 #define WCHAR  INT
 
 /*
- * And the sparc64 long double code generation is broken in old gcc.
+ * The sparc64 long double code generation is broken in old gcc.
  */
 #if !defined(__sparc64__) || !defined(__GNUC__) || __GNUC__ > 2
 typedef        long double ldbl_t;
diff -r 136bb72df3b0 -r bd1dbaa584e3 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Mon Dec 28 20:29:57 2020 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Mon Dec 28 21:24:55 2020 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.109 2020/12/28 19:47:42 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.110 2020/12/28 21:24:55 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.109 2020/12/28 19:47:42 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.110 2020/12/28 21:24:55 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -52,7 +52,7 @@
 int    blklev;
 
 /*
- * level for memory allocation. Normaly the same as blklev.
+ * level for memory allocation. Normally the same as blklev.
  * An exception is the declaration of arguments in prototypes. Memory
  * for these can't be freed after the declaration, but symbols must
  * be removed from the symbol table after the declaration.
@@ -611,7 +611,7 @@
        ;
 
 clrtyp:
-         {
+         /* empty */ {
                clrtyp();
          }
        ;
@@ -697,8 +697,8 @@
                 * STDC requires that "struct a;" always introduces
                 * a new tag if "a" is not declared at current level
                 *
-                * yychar is valid because otherwise the parser would
-                * not been able to decide if he must shift or reduce
+                * yychar is valid because otherwise the parser would not
+                * have been able to decide if it must shift or reduce
                 */
                $$ = mktag($2, $1, 0, yychar == T_SEMI);
          }
@@ -995,7 +995,7 @@
        ;
 
 notype_init_decl:
-       notype_decl opt_asm_or_symbolrename {
+         notype_decl opt_asm_or_symbolrename {
                idecl($1, 0, $2);
                chksz($1);
          }
@@ -1007,7 +1007,7 @@
        ;
 
 type_init_decl:
-       type_decl opt_asm_or_symbolrename {
+         type_decl opt_asm_or_symbolrename {
                idecl($1, 0, $2);
                chksz($1);
          }
@@ -1342,7 +1342,7 @@
          }
        ;
 range:
-       constant {
+         constant {
                $$.lo = toicon($1, 1);
                $$.hi = $$.lo + 1;
          }
@@ -1390,7 +1390,7 @@
        ;
 
 type_name:
-         {
+         {
                pushdecl(ABSTRACT);
          } abstract_declaration {
                popdecl();
@@ -1702,8 +1702,8 @@
          }
        ;
 for_exprs:
-           for_start declspecs deftyp notype_init_decls T_SEMI opt_expr
-           T_SEMI opt_expr T_RPARN {
+         for_start declspecs deftyp notype_init_decls T_SEMI opt_expr
+         T_SEMI opt_expr T_RPARN {
                c99ism(325);
                for1(NULL, $6, $8);
                CLRWFLGS(__FILE__, __LINE__);
@@ -1971,7 +1971,7 @@
        ;
 
 string2:
-        T_STRING {
+         T_STRING {
                if (tflag) {
                        /* concatenated strings are illegal in traditional C */
                        warning(219);
diff -r 136bb72df3b0 -r bd1dbaa584e3 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Mon Dec 28 20:29:57 2020 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Mon Dec 28 21:24:55 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.72 2020/12/28 18:49:02 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.73 2020/12/28 21:24:55 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.72 2020/12/28 18:49:02 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.73 2020/12/28 21:24:55 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -57,7 +57,7 @@
 int    enumval;
 
 /*
- * pointer to top element of a stack which contains informations local
+ * pointer to top element of a stack which contains information local
  * to nested declarations
  */
 dinfo_t        *dcs;
@@ -131,9 +131,9 @@
 }
 
 /*
- * Returns a shared type structure vor arithmetic types and void.
+ * Returns a shared type structure for arithmetic types and void.
  *
- * It's important do duplicate this structure (using duptyp() or tdupdyp())
+ * It's important to duplicate this structure (using duptyp() or tdupdyp())
  * if it is to be modified (adding qualifiers or anything else).
  */
 type_t *
@@ -246,7 +246,7 @@
  * deftyp() to build the type used for all declarators in this
  * declaration.
  *
- * Is tp->t_typedef 1, the type comes from a previously defined typename.
+ * If tp->t_typedef is 1, the type comes from a previously defined typename.
  * Otherwise it comes from a type specifier (int, long, ...) or a
  * struct/union/enum tag.
  */
@@ -627,7 +627,7 @@
                 * Symbols declared in (nested) structs or enums are
                 * part of the next level (they are removed from the
                 * symbol table if the symbols of the outher level are
-                * removed)
+                * removed).
                 */
                if ((*dcs->d_ldlsym = di->d_dlsyms) != NULL)
                        dcs->d_ldlsym = di->d_ldlsym;
@@ -649,8 +649,8 @@
                /*
                 * casts and sizeof
                 * Append all symbols declared in the abstract declaration
-                * to the list of symbols declared in the surounding decl.
-                * or block.
+                * to the list of symbols declared in the surrounding
+                * declaration or block.
                 * XXX I'm not sure whether they should be removed from the
                 * symbol table now or later.
                 */
@@ -716,7 +716,7 @@
 }
 
 /*
- * Create a type structure from the informations gathered in
+ * Create a type structure from the information gathered in
  * the declaration stack.
  * Complain about storage classes which are not possible in current
  * context.
@@ -882,7 +882,7 @@
 }
 
 /*
- * Return the length of a type in bit.



Home | Main Index | Thread Index | Old Index