Author: pfg
Date: Tue Aug 11 02:58:33 2015
New Revision: 286614
URL: https://svnweb.freebsd.org/changeset/base/286614

Log:
  xlint(1): Fix some typos in comments and translate some german
  
  No functional change.
  
  Obtained from:        OpenBSD (where xlint is no more)

Modified:
  head/usr.bin/xlint/lint1/decl.c
  head/usr.bin/xlint/lint1/func.c
  head/usr.bin/xlint/lint1/init.c
  head/usr.bin/xlint/lint1/lint.h
  head/usr.bin/xlint/lint1/lint1.h
  head/usr.bin/xlint/lint1/scan.l
  head/usr.bin/xlint/lint1/tree.c
  head/usr.bin/xlint/lint2/read.c

Modified: head/usr.bin/xlint/lint1/decl.c
==============================================================================
--- head/usr.bin/xlint/lint1/decl.c     Tue Aug 11 02:30:54 2015        
(r286613)
+++ head/usr.bin/xlint/lint1/decl.c     Tue Aug 11 02:58:33 2015        
(r286614)
@@ -127,7 +127,7 @@ initdecl(void)
 /*
  * Returns a shared type structure vor 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 *
@@ -803,7 +803,7 @@ length(type_t *tp, const char *name)
 }
 
 /*
- * Get the alignment of the given Type in bits.
+ * Get the alignment of the given type in bits.
  */
 int
 getbound(type_t *tp)
@@ -984,8 +984,8 @@ decl1str(sym_t *dsym)
                /*
                 * bit field
                 *
-                * only unsigned und signed int are protable bit-field types
-                *(at least in ANSI C, in traditional C only unsigned int)
+                * only unsigned and signed int are portable bit-field types
+                * (at least in ANSI C, in traditional C only unsigned int)
                 */
                if (t == CHAR || t == UCHAR || t == SCHAR ||
                    t == SHORT || t == USHORT || t == ENUM) {
@@ -1173,7 +1173,7 @@ mergepq(pqinf_t *p1, pqinf_t *p2)
  * Followint 3 functions extend the type of a declarator with
  * pointer, function and array types.
  *
- * The current type is the Type built by deftyp() (dcs->d_type) and
+ * The current type is the type built by deftyp() (dcs->d_type) and
  * pointer, function and array types already added for this
  * declarator. The new type extension is inserted between both.
  */
@@ -1559,7 +1559,7 @@ mktag(sym_t *tag, tspec_t kind, int decl
                        tp->t_enum = getblk(sizeof (enum_t));
                        tp->t_enum->etag = tag;
                }
-               /* ist unvollstaendiger Typ */
+               /* is incomplete type */
                setcompl(tp, 1);
        }
 
@@ -1769,7 +1769,7 @@ decl1ext(sym_t *dsym, int initflg)
        if (plibflg && llibflg &&
            dsym->s_type->t_tspec == FUNC && dsym->s_type->t_proto) {
                /*
-                * With both LINTLIBRARY and PROTOLIB the prototyp is
+                * With both LINTLIBRARY and PROTOLIB the prototype is
                 * written as a function definition to the output file.
                 */
                rval = dsym->s_type->t_subt->t_tspec != VOID;
@@ -1800,7 +1800,7 @@ decl1ext(sym_t *dsym, int initflg)
                        }
 
                        /*
-                        * Overtake the rememberd params if the new symbol
+                        * Overtake the remembered params if the new symbol
                         * is not a prototype.
                         */
                        if (rdsym->s_osdef && !dsym->s_type->t_proto) {
@@ -1912,7 +1912,7 @@ isredec(sym_t *dsym, int *warn)
                return(0);
        if (rsym->s_scl == EXTERN && rsym->s_def == DEF) {
                /*
-                * All cases except "int a = 1; static int a;" are catched
+                * All cases except "int a = 1; static int a;" are caught
                 * above with or without a warning
                 */
                /* redeclaration of %s */
@@ -2125,7 +2125,7 @@ chkosdef(sym_t *rdsym, sym_t *dsym)
 }
 
 /*
- * Complets a type by copying the dimension and prototype information
+ * Completes a type by copying the dimension and prototype information
  * from a second compatible type.
  *
  * Following lines are legal:
@@ -2150,7 +2150,7 @@ compltyp(sym_t *dsym, sym_t *ssym)
                        if (dst->t_dim == 0 && src->t_dim != 0) {
                                *dstp = dst = duptyp(dst);
                                dst->t_dim = src->t_dim;
-                               /* now a complete Typ */
+                               /* now a complete type */
                                setcompl(dst, 0);
                        }
                } else if (dst->t_tspec == FUNC) {
@@ -2229,7 +2229,7 @@ decl1arg(sym_t *sym, int initflg)
  * Does some checks for lint directives which apply to functions.
  * Processes arguments in old style function definitions which default
  * to int.
- * Checks compatiblility of old style function definition with previous
+ * Checks compatibility of old style function definition with previous
  * prototype.
  */
 void
@@ -2300,7 +2300,7 @@ cluparg(void)
        }
 
        /*
-        * print a warning for each argument off an old style function
+        * print a warning for each argument of an old style function
         * definition which defaults to int
         */
        for (arg = args; arg != NULL; arg = arg->s_nxt) {
@@ -2657,7 +2657,7 @@ globclup(void)
        mblklev = 0;
 
        /*
-        * remove all informations about pending lint directives without
+        * remove all information about pending lint directives without
         * warnings.
         */
        glclup(1);

Modified: head/usr.bin/xlint/lint1/func.c
==============================================================================
--- head/usr.bin/xlint/lint1/func.c     Tue Aug 11 02:30:54 2015        
(r286613)
+++ head/usr.bin/xlint/lint1/func.c     Tue Aug 11 02:58:33 2015        
(r286614)
@@ -652,7 +652,7 @@ switch2(void)
 
        if (cstk->c_break) {
                /*
-                * end of switch alway reached (c_break is only set if the
+                * end of switch always reached (c_break is only set if the
                 * break statement can be reached).
                 */
                reached = 1;

Modified: head/usr.bin/xlint/lint1/init.c
==============================================================================
--- head/usr.bin/xlint/lint1/init.c     Tue Aug 11 02:30:54 2015        
(r286613)
+++ head/usr.bin/xlint/lint1/init.c     Tue Aug 11 02:58:33 2015        
(r286614)
@@ -544,7 +544,7 @@ mkinit(tnode_t *tn)
                goto end;
 
        /*
-        * Store the tree memory. This is nessesary because otherwise
+        * Store the tree memory. This is necessary because otherwise
         * expr() would free it.
         */
        tmem = tsave();

Modified: head/usr.bin/xlint/lint1/lint.h
==============================================================================
--- head/usr.bin/xlint/lint1/lint.h     Tue Aug 11 02:30:54 2015        
(r286613)
+++ head/usr.bin/xlint/lint1/lint.h     Tue Aug 11 02:58:33 2015        
(r286614)
@@ -29,6 +29,8 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
  */
 
 #include <sys/types.h>
@@ -82,7 +84,7 @@ typedef       struct {
        u_int   tt_isftyp : 1;          /* 1 if floating point type */
        u_int   tt_isatyp : 1;          /* 1 if arithmetic type */
        u_int   tt_issclt : 1;          /* 1 if scalar type */
-       char    *tt_name;               /* Bezeichnung des Typs */
+       char    *tt_name;               /* type name */
 } ttab_t;
 
 #define size(t)                (ttab[t].tt_sz)

Modified: head/usr.bin/xlint/lint1/lint1.h
==============================================================================
--- head/usr.bin/xlint/lint1/lint1.h    Tue Aug 11 02:30:54 2015        
(r286613)
+++ head/usr.bin/xlint/lint1/lint1.h    Tue Aug 11 02:58:33 2015        
(r286614)
@@ -273,7 +273,7 @@ typedef     struct tnode {
        op_t    tn_op;          /* operator */
        type_t  *tn_type;       /* type */
        u_int   tn_lvalue : 1;  /* node is lvalue */
-       u_int   tn_cast : 1;    /* if tn_op == CVT its an explizit cast */
+       u_int   tn_cast : 1;    /* if tn_op == CVT its an explicit cast */
        u_int   tn_parn : 1;    /* node parenthesized */
        union {
                struct {

Modified: head/usr.bin/xlint/lint1/scan.l
==============================================================================
--- head/usr.bin/xlint/lint1/scan.l     Tue Aug 11 02:30:54 2015        
(r286613)
+++ head/usr.bin/xlint/lint1/scan.l     Tue Aug 11 02:58:33 2015        
(r286614)
@@ -259,7 +259,7 @@ uint64_t qumasks[sizeof(uint64_t) * CHAR
 /* free list for sbuf structures */
 static sbuf_t   *sbfrlst;
 
-/* Typ of next expected symbol */
+/* type of next expected symbol */
 symt_t symtyp;
 
 
@@ -518,7 +518,7 @@ icon(int base)
                warning(252);
 
        /*
-        * If the value is to big for the current type, we must choose
+        * If the value is too big for the current type, we must choose
         * another type.
         */
        ansiu = 0;

Modified: head/usr.bin/xlint/lint1/tree.c
==============================================================================
--- head/usr.bin/xlint/lint1/tree.c     Tue Aug 11 02:30:54 2015        
(r286613)
+++ head/usr.bin/xlint/lint1/tree.c     Tue Aug 11 02:58:33 2015        
(r286614)
@@ -559,7 +559,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);
@@ -616,7 +616,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);
@@ -733,7 +733,7 @@ cconv(tnode_t *tn)
         */
        if (tn->tn_type->t_tspec == ARRAY) {
                if (!tn->tn_lvalue) {
-                       /* %soperand of '%s' must be lvalue */
+                       /* operand of '%s' must be lvalue */
                        /* XXX print correct operator */
                        (void)gnuism(114, "", modtab[AMPER].m_name);
                }
@@ -761,7 +761,7 @@ cconv(tnode_t *tn)
 
 /*
  * Perform most type checks. First the types are checked using
- * informations from modtab[]. After that it is done by hand for
+ * information from modtab[]. After that it is done by hand for
  * more complicated operators and type combinations.
  *
  * If the types are ok, typeok() returns 1, otherwise 0.
@@ -790,7 +790,7 @@ typeok(op_t op, int arg, tnode_t *ln, tn
        }
 
        if (mp->m_rqint) {
-               /* integertypes required */
+               /* integer types required */
                if (!isityp(lt) || (mp->m_binary && !isityp(rt))) {
                        incompat(op, lt, rt);
                        return (0);
@@ -826,11 +826,11 @@ typeok(op_t op, int arg, tnode_t *ln, tn
        case POINT:
                /*
                 * Most errors required by ANSI C are reported in strmemb().
-                * Here we only must check for totaly wrong things.
+                * Here we only must check for totally wrong things.
                 */
                if (lt == FUNC || lt == VOID || ltp->t_isfield ||
                    ((lt != STRUCT && lt != UNION) && !ln->tn_lvalue)) {
-                       /* Without tflag we got already an error */
+                       /* Without tflag we already got an error */
                        if (tflag)
                                /* unacceptable operand of %s */
                                error(111, mp->m_name);
@@ -842,7 +842,7 @@ typeok(op_t op, int arg, tnode_t *ln, tn
                if (lt != PTR && !(tflag && isityp(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);
                }
@@ -858,11 +858,11 @@ typeok(op_t op, int arg, tnode_t *ln, tn
                                /* a cast does not yield an lvalue */
                                error(163);
                        }
-                       /* %soperand of %s must be lvalue */
+                       /* operand of %s must be lvalue */
                        error(114, "", mp->m_name);
                        return (0);
                } else if (ltp->t_const) {
-                       /* %soperand of %s must be modifiable lvalue */
+                       /* operand of %s must be modifiable lvalue */
                        if (!tflag)
                                warning(115, "", mp->m_name);
                }
@@ -1584,7 +1584,7 @@ promote(op_t op, int farg, tnode_t *tn)
 
 /*
  * Insert conversions which are necessary to give both operands the same
- * type. This is done in different ways for traditional C and ANIS C.
+ * type. This is done in different ways for traditional C and ANSI C.
  */
 static void
 balance(op_t op, tnode_t **lnp, tnode_t **rnp)
@@ -1760,7 +1760,7 @@ ptconv(int arg, tspec_t nt, tspec_t ot, 
 }
 
 /*
- * Print warnings for conversions of integer types which my cause
+ * Print warnings for conversions of integer types which may cause
  * problems.
  */
 /* ARGSUSED */
@@ -1819,7 +1819,7 @@ piconv(op_t op, tspec_t nt, type_t *tp, 
                return;
 
        if (op != CVT) {
-               /* We got already an error. */
+               /* We already got an error. */
                return;
        }
 
@@ -1844,7 +1844,7 @@ ppconv(op_t op, tnode_t *tn, type_t *tp)
        const   char *nts, *ots;
 
        /*
-        * We got already an error (pointers of different types
+        * We already got an error (pointers of different types
         * without a cast) or we will not get a warning.
         */
        if (op != CVT)
@@ -1890,7 +1890,7 @@ ppconv(op_t op, tnode_t *tn, type_t *tp)
  *
  * op          operator which requires conversion
  * arg         if op is FARG, # of argument
- * tp          type in which to convert the constant
+ * tp          type to which convert the constant
  * nv          new constant
  * v           old constant
  */
@@ -1938,7 +1938,7 @@ cvtcon(op_t op, int arg, type_t *tp, val
                case DOUBLE:
                        max = DBL_MAX;          min = -DBL_MAX;         break;
                case PTR:
-                       /* Got already an error because of float --> ptr */
+                       /* Already got an error because of float --> ptr */
                case LDOUBLE:
                        max = LDBL_MAX;         min = -LDBL_MAX;        break;
                default:
@@ -2566,7 +2566,7 @@ bldcol(tnode_t *ln, tnode_t *rn)
                        LERROR("bldcol()");
                /*
                 * 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.
                 */
@@ -3676,7 +3676,7 @@ chkmisc(tnode_t *tn, int vctx, int tctx,
 /*
  * 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
@@ -3795,7 +3795,7 @@ chkcomp(op_t op, tnode_t *ln, tnode_t *r
 }
 
 /*
- * Takes an expression an returns 0 if this expression can be used
+ * Takes an expression and returns 0 if this expression can be used
  * for static initialisation, otherwise -1.
  *
  * Constant initialisation expressions must be constant or an address

Modified: head/usr.bin/xlint/lint2/read.c
==============================================================================
--- head/usr.bin/xlint/lint2/read.c     Tue Aug 11 02:30:54 2015        
(r286613)
+++ head/usr.bin/xlint/lint2/read.c     Tue Aug 11 02:58:33 2015        
(r286614)
@@ -143,7 +143,7 @@ readfile(const char *name)
                /* line number in csrcfile */
                cline = (int)strtol(cp, &eptr, 10);
                if (cp == eptr) {
-                       cline = -1;
+                       cline = -1;
                } else {
                        cp = eptr;
                }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to