Module Name: src
Committed By: rillig
Date: Wed Dec 30 11:56:10 UTC 2020
Modified Files:
src/usr.bin/xlint/lint1: decl.c func.c scan.l tree.c
Log Message:
lint: spell check comments
To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/xlint/lint1/func.c
cvs rdiff -u -r1.104 -r1.105 src/usr.bin/xlint/lint1/scan.l
cvs rdiff -u -r1.105 -r1.106 src/usr.bin/xlint/lint1/tree.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/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.85 src/usr.bin/xlint/lint1/decl.c:1.86
--- src/usr.bin/xlint/lint1/decl.c:1.85 Wed Dec 30 11:39:55 2020
+++ src/usr.bin/xlint/lint1/decl.c Wed Dec 30 11:56:10 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.85 2020/12/30 11:39:55 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.86 2020/12/30 11:56:10 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.85 2020/12/30 11:39:55 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.86 2020/12/30 11:56:10 rillig Exp $");
#endif
#include <sys/param.h>
@@ -473,7 +473,7 @@ tdeferr(type_t *td, tspec_t t)
* or enum tag if the typedef name is the first defined for this tag.
*
* If the tag is unnamed, the typdef name is used for identification
- * of this tag in lint2. Although its possible that more than one typedef
+ * of this tag in lint2. Although it's possible that more than one typedef
* name is defined for one tag, the first name defined should be unique
* if the tag is unnamed.
*/
@@ -1172,7 +1172,7 @@ declarator_1_struct_union(sym_t *dsym)
/*
* bit-fields of length 0 are not warned about because length()
* does not return the length of the bit-field but the length
- * of the type the bit-field is packed in (its ok)
+ * of the type the bit-field is packed in (it's ok)
*/
if ((sz = length(dsym->s_type, dsym->s_name)) == 0) {
if (t == ARRAY && dsym->s_type->t_dim == 0) {
@@ -1460,7 +1460,7 @@ old_style_function(sym_t *decl, sym_t *a
decl->s_type == dcs->d_next->d_type) {
/*
* We assume that this becomes a function definition. If
- * we are wrong, its corrected in check_function_definition().
+ * we are wrong, it's corrected in check_function_definition().
*/
if (args != NULL) {
decl->s_osdef = 1;
@@ -1475,7 +1475,7 @@ old_style_function(sym_t *decl, sym_t *a
/*
* Lists of Identifiers in functions declarations are allowed only if
- * its also a function definition. If this is not the case, print a
+ * it's also a function definition. If this is not the case, print a
* error message.
*/
void
@@ -2072,7 +2072,7 @@ check_redeclaration(sym_t *dsym, int *do
return(0);
}
/*
- * Now its on of:
+ * Now it's one of:
* "static a; int a;", "static a; int a = 1;", "static a = 1; int a;"
*/
/* redeclaration of %s; ANSI C requires "static" */
@@ -2646,7 +2646,7 @@ decl1loc(sym_t *dsym, int initflg)
} else if (dcs->d_rdcsym->s_blklev == blklev) {
- /* no hflag, because its illegal! */
+ /* no hflag, because it's illegal! */
if (dcs->d_rdcsym->s_arg) {
/*
* if !tflag, a "redeclaration of %s" error
Index: src/usr.bin/xlint/lint1/func.c
diff -u src/usr.bin/xlint/lint1/func.c:1.36 src/usr.bin/xlint/lint1/func.c:1.37
--- src/usr.bin/xlint/lint1/func.c:1.36 Wed Dec 30 11:39:55 2020
+++ src/usr.bin/xlint/lint1/func.c Wed Dec 30 11:56:10 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: func.c,v 1.36 2020/12/30 11:39:55 rillig Exp $ */
+/* $NetBSD: func.c,v 1.37 2020/12/30 11:56:10 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.36 2020/12/30 11:39:55 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.37 2020/12/30 11:56:10 rillig Exp $");
#endif
#include <stdlib.h>
@@ -597,8 +597,8 @@ switch1(tnode_t *tn)
}
/*
- * Remember the type of the expression. Because its possible
- * that (*tp) is allocated on tree memory the type must be
+ * Remember the type of the expression. Because it's possible
+ * that (*tp) is allocated on tree memory, the type must be
* duplicated. This is not too complicated because it is
* only an integer type.
*/
Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.104 src/usr.bin/xlint/lint1/scan.l:1.105
--- src/usr.bin/xlint/lint1/scan.l:1.104 Wed Dec 30 11:14:03 2020
+++ src/usr.bin/xlint/lint1/scan.l Wed Dec 30 11:56:10 2020
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: scan.l,v 1.104 2020/12/30 11:14:03 rillig Exp $ */
+/* $NetBSD: scan.l,v 1.105 2020/12/30 11:56:10 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.104 2020/12/30 11:14:03 rillig Exp $");
+__RCSID("$NetBSD: scan.l,v 1.105 2020/12/30 11:56:10 rillig Exp $");
#endif
#include <ctype.h>
@@ -51,7 +51,7 @@ __RCSID("$NetBSD: scan.l,v 1.104 2020/12
#define CHAR_MASK ((int)(~(~0U << CHAR_BIT)))
-/* Current position (its also updated when an included file is parsed) */
+/* Current position (it's also updated when an included file is parsed) */
pos_t curr_pos = { 1, "", 0 };
/*
@@ -799,7 +799,7 @@ xsign(int64_t q, tspec_t t, int len)
}
/*
- * Convert a string representing a floating point value into its interal
+ * Convert a string representing a floating point value into its integral
* representation. Type and value are returned in yylval. fcon()
* (and yylex()) returns T_CON.
* XXX Currently it is not possible to convert constants of type
Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.105 src/usr.bin/xlint/lint1/tree.c:1.106
--- src/usr.bin/xlint/lint1/tree.c:1.105 Wed Dec 30 11:04:48 2020
+++ src/usr.bin/xlint/lint1/tree.c Wed Dec 30 11:56:10 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.105 2020/12/30 11:04:48 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.106 2020/12/30 11:56:10 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.105 2020/12/30 11:04:48 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.106 2020/12/30 11:56:10 rillig Exp $");
#endif
#include <float.h>
@@ -480,7 +480,7 @@ build(op_t op, tnode_t *ln, tnode_t *rn)
/*
* Apply class conversions to the left operand, but only if its
- * value is needed or it is compaired with null.
+ * value is needed or it is compared with null.
*/
if (mp->m_vctx || mp->m_tctx)
ln = cconv(ln);
@@ -537,7 +537,7 @@ build(op_t op, tnode_t *ln, tnode_t *rn)
/*
* Check types for compatibility with the operation and mutual
- * compatibility. Return if there are serios problems.
+ * compatibility. Return if there are serious problems.
*/
if (!typeok(op, 0, ln, rn))
return NULL;
@@ -775,7 +775,7 @@ typeok(op_t op, int arg, tnode_t *ln, tn
if (lt != PTR && !(tflag && tspec_is_int(lt))) {
/* Without tflag we got already an error */
if (tflag)
- /* unacceptabel operand of %s */
+ /* unacceptable operand of %s */
error(111, mp->m_name);
return 0;
}
@@ -908,15 +908,15 @@ typeok(op_t op, int arg, tnode_t *ln, tn
/*
* ANSI C does not perform balancing for shift operations,
* but traditional C does. If the width of the right operand
- * is greather than the width of the left operand, than in
- * traditional C the left operand would be extendet to the
+ * is greater than the width of the left operand, than in
+ * traditional C the left operand would be extended to the
* width of the right operand. For SHL this may result in
* different results.
*/
if (psize(lt) < psize(rt)) {
/*
- * XXX If both operands are constant make sure
- * that there is really a differencs between
+ * XXX If both operands are constant, make sure
+ * that there is really a difference between
* ANSI C and traditional C.
*/
if (hflag)
@@ -2589,7 +2589,7 @@ build_colon(tnode_t *ln, tnode_t *rn)
LERROR("build_colon()");
/*
* XXX For now we simply take the left type. This is
- * probably wrong, if one type contains a functionprototype
+ * probably wrong, if one type contains a function prototype
* and the other one, at the same place, only an old style
* declaration.
*/
@@ -3199,7 +3199,7 @@ cast(tnode_t *tn, type_t *tp)
if (nt == VOID) {
/*
- * XXX ANSI C requires scalar types or void (Plauger&Brodie).
+ * XXX ANSI C requires scalar types or void (Plauger & Brodie).
* But this seams really questionable.
*/
} else if (nt == UNION) {
@@ -3362,7 +3362,7 @@ check_function_arguments(type_t *ftp, tn
for (i = narg, arg = args; i > n; i--, arg = arg->tn_right)
continue;
- /* some things which are always not allowd */
+ /* some things which are always not allowed */
if ((at = arg->tn_left->tn_type->t_tspec) == VOID) {
/* void expressions may not be arguments, arg #%d */
error(151, n);
@@ -3809,7 +3809,7 @@ check_expr_misc(tnode_t *tn, int vctx, i
/*
* Checks the range of array indices, if possible.
* amper is set if only the address of the element is used. This
- * means that the index is allowd to refere to the first element
+ * means that the index is allowed to refer to the first element
* after the array.
*/
static void