Well, Jochen adopted most of my submissions. So only the different

style of error reporting (i prefer gcc style to be consistent with the
compiler) is left, plus a minor nit he's most likely been overlooking.

There are still problems with bootstrapping, and you should expect
troubles when linting libc...
This commit is contained in:
Joerg Wunsch 1995-11-06 21:54:02 +00:00
parent cc066d80c4
commit 6b024ad2a8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12134
3 changed files with 12 additions and 5 deletions

View file

@ -399,7 +399,7 @@ verror(n, ap)
const char *fn;
fn = basename(curr_pos.p_file);
(void)printf("%s(%d): ", fn, curr_pos.p_line);
(void)printf("%s:%d: ", fn, curr_pos.p_line);
(void)vprintf(msgs[n], ap);
(void)printf("\n");
nerr++;
@ -417,7 +417,7 @@ vwarning(n, ap)
return;
fn = basename(curr_pos.p_file);
(void)printf("%s(%d): warning: ", fn, curr_pos.p_line);
(void)printf("%s:%d: warning: ", fn, curr_pos.p_line);
(void)vprintf(msgs[n], ap);
(void)printf("\n");
}
@ -460,7 +460,7 @@ lerror(msg, va_alist)
va_start(ap);
#endif
fn = basename(curr_pos.p_file);
(void)fprintf(stderr, "%s(%d): lint error: ", fn, curr_pos.p_line);
(void)fprintf(stderr, "%s:%d: lint error: ", fn, curr_pos.p_line);
(void)vfprintf(stderr, msg, ap);
(void)fprintf(stderr, "\n");
va_end(ap);
@ -505,7 +505,7 @@ message(n, va_alist)
va_start(ap);
#endif
fn = basename(curr_pos.p_file);
(void)printf("%s(%d): ", fn, curr_pos.p_line);
(void)printf("%s:%d: ", fn, curr_pos.p_line);
(void)vprintf(msgs[n], ap);
(void)printf("\n");
va_end(ap);

View file

@ -4,7 +4,7 @@
PROG= xlint
SRCS= xlint.c mem.c
MAN= lint.1
MAN1= lint.1
CFLAGS+=-I${.CURDIR}/../lint1

View file

@ -325,7 +325,12 @@ main(argc, argv)
appcstrg(&cppflags, "-$");
appcstrg(&cppflags, "-C");
appcstrg(&cppflags, "-Wcomment");
#if defined (__FreeBSD__) && (__FreeBSD__ == 2)
appcstrg(&cppflags, "-D__FreeBSD__=2");
#else
# error "This ain't NetBSD. You lose!"
appcstrg(&cppflags, "-D__NetBSD__");
#endif
appcstrg(&cppflags, "-Dlint"); /* XXX don't def. with -s */
appdef(&cppflags, "lint");
appdef(&cppflags, "unix");
@ -422,7 +427,9 @@ main(argc, argv)
freelst(&lcppflgs);
appcstrg(&lcppflgs, "-traditional");
appstrg(&lcppflgs, concat2("-D", MACHINE));
#ifdef MACHINE_ARCH
appstrg(&lcppflgs, concat2("-D", MACHINE_ARCH));
#endif
appcstrg(&l1flags, "-t");
appcstrg(&l2flags, "-t");
tflag = 1;