Module Name: src Committed By: christos Date: Wed Aug 17 13:11:22 UTC 2011
Modified Files: src/usr.bin/error: error.h main.c pi.c Log Message: avoid "... dutch" being interpreted as a pascal continuation message, and core-dumping. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/error/error.h src/usr.bin/error/pi.c cvs rdiff -u -r1.20 -r1.21 src/usr.bin/error/main.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/error/error.h diff -u src/usr.bin/error/error.h:1.17 src/usr.bin/error/error.h:1.18 --- src/usr.bin/error/error.h:1.17 Fri May 20 20:43:31 2011 +++ src/usr.bin/error/error.h Wed Aug 17 09:11:22 2011 @@ -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. Index: src/usr.bin/error/pi.c diff -u src/usr.bin/error/pi.c:1.17 src/usr.bin/error/pi.c:1.18 --- src/usr.bin/error/pi.c:1.17 Thu Aug 13 02:59:37 2009 +++ src/usr.bin/error/pi.c Wed Aug 17 09:11:22 2011 @@ -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 Index: src/usr.bin/error/main.c diff -u src/usr.bin/error/main.c:1.20 src/usr.bin/error/main.c:1.21 --- src/usr.bin/error/main.c:1.20 Fri May 20 20:43:42 2011 +++ src/usr.bin/error/main.c Wed Aug 17 09:11:22 2011 @@ -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 */