[Midnightbsd-cvs] src [10777] trunk/usr.bin/xlint/lint2: tag
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jun 9 22:40:15 EDT 2018
Revision: 10777
http://svnweb.midnightbsd.org/src/?rev=10777
Author: laffer1
Date: 2018-06-09 22:40:14 -0400 (Sat, 09 Jun 2018)
Log Message:
-----------
tag
Modified Paths:
--------------
trunk/usr.bin/xlint/lint2/Makefile
trunk/usr.bin/xlint/lint2/chk.c
trunk/usr.bin/xlint/lint2/emit2.c
trunk/usr.bin/xlint/lint2/externs2.h
trunk/usr.bin/xlint/lint2/hash.c
trunk/usr.bin/xlint/lint2/lint2.h
trunk/usr.bin/xlint/lint2/main2.c
trunk/usr.bin/xlint/lint2/mem2.c
trunk/usr.bin/xlint/lint2/msg.c
trunk/usr.bin/xlint/lint2/read.c
Modified: trunk/usr.bin/xlint/lint2/Makefile
===================================================================
--- trunk/usr.bin/xlint/lint2/Makefile 2018-06-10 02:39:42 UTC (rev 10776)
+++ trunk/usr.bin/xlint/lint2/Makefile 2018-06-10 02:40:14 UTC (rev 10777)
@@ -1,14 +1,15 @@
+# $MidnightBSD$
# $NetBSD: Makefile,v 1.2 1995/07/03 21:24:39 cgd Exp $
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/xlint/lint2/Makefile 291819 2015-12-04 19:16:56Z bdrewery $
.PATH: ${.CURDIR}/../lint1
PROG= lint2
SRCS= main2.c hash.c read.c mem.c mem2.c chk.c msg.c emit.c emit2.c inittyp.c
-NO_MAN=
+MAN=
CFLAGS+=-I${.CURDIR}/../lint1
LINTFLAGS=-abehrz
-BINDIR= /usr/libexec
+BINDIR= ${LIBEXECDIR}
.include <bsd.prog.mk>
Modified: trunk/usr.bin/xlint/lint2/chk.c
===================================================================
--- trunk/usr.bin/xlint/lint2/chk.c 2018-06-10 02:39:42 UTC (rev 10776)
+++ trunk/usr.bin/xlint/lint2/chk.c 2018-06-10 02:40:14 UTC (rev 10777)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: chk.c,v 1.15 2002/01/21 19:49:52 tv Exp $ */
/*
@@ -36,7 +37,7 @@
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: chk.c,v 1.15 2002/01/21 19:49:52 tv Exp $");
#endif
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/xlint/lint2/chk.c 228992 2011-12-30 11:02:40Z uqs $");
#include <ctype.h>
#include <err.h>
@@ -447,11 +448,11 @@
char *pos1;
/*
- * If a function definition is available (def != NULL), we compair the
+ * If a function definition is available (def != NULL), we compare the
* function call (call) with the definition. Otherwise, if a function
* definition is available and it is not an old style definition
- * (decl != NULL && TP(decl->s_type)->t_proto), we compair the call
- * with this declaration. Otherwise we compair it with the first
+ * (decl != NULL && TP(decl->s_type)->t_proto), we compare the call
+ * with this declaration. Otherwise we compare it with the first
* call we have found (call1).
*/
@@ -474,7 +475,7 @@
* of an argument does not match exactly the expected type. The
* result are lots of warnings which are really not necessary.
* We print a warning only if
- * (0) at least one type is not an interger type and types differ
+ * (0) at least one type is not an integer type and types differ
* (1) hflag is set and types differ
* (2) types differ, except in signedness
* If the argument is an integer constant whose msb is not set,
@@ -482,7 +483,7 @@
* int). This is with and without hflag.
* If the argument is an integer constant with value 0 and the
* expected argument is of type pointer and the width of the
- * interger constant is the same as the width of the pointer,
+ * integer constant is the same as the width of the pointer,
* no warning is printed.
*/
t1 = arg1->t_tspec;
@@ -490,7 +491,7 @@
if (isityp(t1) && isityp(t2) && !arg1->t_isenum && !arg2->t_isenum) {
if (promote) {
/*
- * XXX Here is a problem: Althrough it is possible to
+ * XXX Here is a problem: Although it is possible to
* pass an int where a char/short it expected, there
* may be loss in significant digits. We should first
* check for const arguments if they can be converted
Modified: trunk/usr.bin/xlint/lint2/emit2.c
===================================================================
--- trunk/usr.bin/xlint/lint2/emit2.c 2018-06-10 02:39:42 UTC (rev 10776)
+++ trunk/usr.bin/xlint/lint2/emit2.c 2018-06-10 02:40:14 UTC (rev 10777)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: emit2.c,v 1.8 2002/01/21 19:49:52 tv Exp $ */
/*
@@ -36,7 +37,7 @@
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: emit2.c,v 1.8 2002/01/21 19:49:52 tv Exp $");
#endif
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/xlint/lint2/emit2.c 148723 2005-08-05 09:07:42Z stefanf $");
#include <err.h>
Modified: trunk/usr.bin/xlint/lint2/externs2.h
===================================================================
--- trunk/usr.bin/xlint/lint2/externs2.h 2018-06-10 02:39:42 UTC (rev 10776)
+++ trunk/usr.bin/xlint/lint2/externs2.h 2018-06-10 02:40:14 UTC (rev 10777)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: externs2.h,v 1.7 2001/05/28 12:40:38 lukem Exp $ */
/*
Modified: trunk/usr.bin/xlint/lint2/hash.c
===================================================================
--- trunk/usr.bin/xlint/lint2/hash.c 2018-06-10 02:39:42 UTC (rev 10776)
+++ trunk/usr.bin/xlint/lint2/hash.c 2018-06-10 02:40:14 UTC (rev 10777)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: hash.c,v 1.7 2002/01/21 19:49:52 tv Exp $ */
/*
@@ -35,7 +36,7 @@
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: hash.c,v 1.7 2002/01/21 19:49:52 tv Exp $");
#endif
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/xlint/lint2/hash.c 148723 2005-08-05 09:07:42Z stefanf $");
/*
* XXX Really need a generalized hash table package
Modified: trunk/usr.bin/xlint/lint2/lint2.h
===================================================================
--- trunk/usr.bin/xlint/lint2/lint2.h 2018-06-10 02:39:42 UTC (rev 10776)
+++ trunk/usr.bin/xlint/lint2/lint2.h 2018-06-10 02:40:14 UTC (rev 10777)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: lint2.h,v 1.5 2000/06/14 06:49:23 cgd Exp $ */
/*
Modified: trunk/usr.bin/xlint/lint2/main2.c
===================================================================
--- trunk/usr.bin/xlint/lint2/main2.c 2018-06-10 02:39:42 UTC (rev 10776)
+++ trunk/usr.bin/xlint/lint2/main2.c 2018-06-10 02:40:14 UTC (rev 10777)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: main2.c,v 1.5 2001/11/21 19:14:26 wiz Exp $ */
/*
@@ -35,7 +36,7 @@
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: main2.c,v 1.5 2001/11/21 19:14:26 wiz Exp $");
#endif
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/xlint/lint2/main2.c 108532 2003-01-01 18:13:45Z schweikh $");
#include <stdio.h>
#include <stdlib.h>
Modified: trunk/usr.bin/xlint/lint2/mem2.c
===================================================================
--- trunk/usr.bin/xlint/lint2/mem2.c 2018-06-10 02:39:42 UTC (rev 10776)
+++ trunk/usr.bin/xlint/lint2/mem2.c 2018-06-10 02:40:14 UTC (rev 10777)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: mem2.c,v 1.6 2002/01/21 19:49:52 tv Exp $ */
/*
@@ -35,7 +36,7 @@
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: mem2.c,v 1.6 2002/01/21 19:49:52 tv Exp $");
#endif
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/xlint/lint2/mem2.c 148723 2005-08-05 09:07:42Z stefanf $");
#include <sys/param.h>
#include <sys/types.h>
Modified: trunk/usr.bin/xlint/lint2/msg.c
===================================================================
--- trunk/usr.bin/xlint/lint2/msg.c 2018-06-10 02:39:42 UTC (rev 10776)
+++ trunk/usr.bin/xlint/lint2/msg.c 2018-06-10 02:40:14 UTC (rev 10777)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: msg.c,v 1.6 2002/01/21 19:49:52 tv Exp $ */
/*
@@ -32,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/xlint/lint2/msg.c 223262 2011-06-18 13:56:33Z benl $");
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: msg.c,v 1.6 2002/01/21 19:49:52 tv Exp $");
#endif
Modified: trunk/usr.bin/xlint/lint2/read.c
===================================================================
--- trunk/usr.bin/xlint/lint2/read.c 2018-06-10 02:39:42 UTC (rev 10776)
+++ trunk/usr.bin/xlint/lint2/read.c 2018-06-10 02:40:14 UTC (rev 10777)
@@ -1,4 +1,5 @@
-/* $NetBSD: read.c,v 1.12 2002/01/21 19:49:52 tv Exp $ */
+/* $MidnightBSD$ */
+/* $NetBSD: read.c,v 1.19 2007/09/28 21:53:50 uwe Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -34,9 +35,9 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: read.c,v 1.12 2002/01/21 19:49:52 tv Exp $");
+__RCSID("$NetBSD: read.c,v 1.19 2007/09/28 21:53:50 uwe Exp $");
#endif
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/xlint/lint2/read.c 281168 2015-04-06 19:56:27Z pfg $");
#include <ctype.h>
#include <err.h>
@@ -87,7 +88,8 @@
static int csrcfile;
-static void inperr(void);
+#define inperr() inperror(__FILE__, __LINE__)
+static void inperror(const char *, size_t);
static void setsrc(const char *);
static void setfnid(int, const char *);
static void funccall(pos_t *, const char *);
@@ -213,10 +215,10 @@
static void
-inperr(void)
+inperror(const char *file, size_t line)
{
- errx(1, "input file error: %s", fnames[srcfile]);
+ errx(1, "%s,%zd: input file error: %s", file, line, fnames[srcfile]);
}
/*
@@ -361,9 +363,7 @@
used = 0;
- while ((c = *cp) == 't' || c == 'd' || c == 'e' || c == 'u' ||
- c == 'r' || c == 'o' || c == 's' || c == 'v' ||
- c == 'P' || c == 'S') {
+ while (strchr("tdeurosvPS", (c = *cp)) != NULL) {
cp++;
switch (c) {
case 't':
@@ -506,7 +506,7 @@
}
/*
- * Read an u-record (emited by lint1 if a symbol was used).
+ * Read an u-record (emitted by lint1 if a symbol was used).
*/
static void
usedsym(pos_t *posp, const char *cp)
@@ -545,7 +545,7 @@
type_t *tp;
int narg, i, osdef = 0;
size_t tlen;
- u_short tidx;
+ u_short tidx, sidx;
int h;
/* If we have this type already, return it's index. */
@@ -621,10 +621,12 @@
case ARRAY:
tp->t_dim = (int)strtol(cp, &eptr, 10);
cp = eptr;
- tp->t_subt = TP(inptype(cp, &cp));
+ sidx = inptype(cp, &cp); /* force seq. point! (ditto below) */
+ tp->t_subt = TP(sidx);
break;
case PTR:
- tp->t_subt = TP(inptype(cp, &cp));
+ sidx = inptype(cp, &cp);
+ tp->t_subt = TP(sidx);
break;
case FUNC:
c = *cp;
@@ -641,11 +643,13 @@
tp->t_vararg = 1;
cp++;
} else {
- tp->t_args[i] = TP(inptype(cp, &cp));
+ sidx = inptype(cp, &cp);
+ tp->t_args[i] = TP(sidx);
}
}
}
- tp->t_subt = TP(inptype(cp, &cp));
+ sidx = inptype(cp, &cp);
+ tp->t_subt = TP(sidx);
break;
case ENUM:
tp->t_tspec = INT;
More information about the Midnightbsd-cvs
mailing list