Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/error avoid "... dutch" being interpreted as a pasca...
details: https://anonhg.NetBSD.org/src/rev/556d596d6cc1
branches: trunk
changeset: 768476:556d596d6cc1
user: christos <christos%NetBSD.org@localhost>
date: Wed Aug 17 13:11:22 2011 +0000
description:
avoid "... dutch" being interpreted as a pascal continuation message, and
core-dumping.
diffstat:
usr.bin/error/error.h | 3 ++-
usr.bin/error/main.c | 6 +++---
usr.bin/error/pi.c | 7 ++++---
3 files changed, 9 insertions(+), 7 deletions(-)
diffs (72 lines):
diff -r 3aa2fa6b3fb8 -r 556d596d6cc1 usr.bin/error/error.h
--- a/usr.bin/error/error.h Wed Aug 17 12:57:19 2011 +0000
+++ b/usr.bin/error/error.h Wed Aug 17 13:11:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: error.h,v 1.17 2011/05/21 00:43:31 christos Exp $ */
+/* $NetBSD: error.h,v 1.18 2011/08/17 13:11:22 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -203,6 +203,7 @@
*/
extern int language;
extern char *currentfilename;
+extern char default_currentfilename[];
/*
* Macros for initializing arrays of string constants.
diff -r 3aa2fa6b3fb8 -r 556d596d6cc1 usr.bin/error/main.c
--- a/usr.bin/error/main.c Wed Aug 17 12:57:19 2011 +0000
+++ b/usr.bin/error/main.c Wed Aug 17 13:11:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.20 2011/05/21 00:43:42 christos Exp $ */
+/* $NetBSD: main.c,v 1.21 2011/08/17 13:11:22 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: main.c,v 1.20 2011/05/21 00:43:42 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.21 2011/08/17 13:11:22 christos Exp $");
#endif /* not lint */
#include <signal.h>
@@ -68,7 +68,7 @@
boolean *touchedfiles; /* which files we touched */
int language = INCC;
-static char default_currentfilename[] = "????";
+char default_currentfilename[] = "????";
char *currentfilename = default_currentfilename;
boolean query = false; /* query the operator if touch files */
diff -r 3aa2fa6b3fb8 -r 556d596d6cc1 usr.bin/error/pi.c
--- a/usr.bin/error/pi.c Wed Aug 17 12:57:19 2011 +0000
+++ b/usr.bin/error/pi.c Wed Aug 17 13:11:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pi.c,v 1.17 2009/08/13 06:59:37 dholland Exp $ */
+/* $NetBSD: pi.c,v 1.18 2011/08/17 13:11:22 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pi.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: pi.c,v 1.17 2009/08/13 06:59:37 dholland Exp $");
+__RCSID("$NetBSD: pi.c,v 1.18 2011/08/17 13:11:22 christos Exp $");
#endif /* not lint */
#include <stdio.h>
@@ -364,7 +364,8 @@
cur_wordc += 1 + 3;
return (C_THISFILE);
}
- if (strcmp(cur_wordv[1], "...") == 0) {
+ if (strcmp(cur_wordv[1], "...") == 0 && c_linenumber &&
+ currentfilename != default_currentfilename) {
/*
* have a continuation error message
* of the form: ... message
Home |
Main Index |
Thread Index |
Old Index