aboutsummaryrefslogtreecommitdiffstats
path: root/msg.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-16 11:58:26 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-16 11:58:26 +0300
commit765c7494b3dac62207e6cd57fb839997e237f292 (patch)
treef7da12ffdb85d9f82671cb3122775b2ce73f7ad9 /msg.c
parentcce5115e21db1702e0617afdca36633e7e2c9eae (diff)
downloadegawk-765c7494b3dac62207e6cd57fb839997e237f292.tar.gz
egawk-765c7494b3dac62207e6cd57fb839997e237f292.tar.bz2
egawk-765c7494b3dac62207e6cd57fb839997e237f292.zip
Moving to 2.13.2.
Diffstat (limited to 'msg.c')
-rw-r--r--msg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/msg.c b/msg.c
index 6f1090fd..eb96c4d5 100644
--- a/msg.c
+++ b/msg.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Progamming Language.
@@ -35,26 +35,26 @@ char *s;
char *msg;
va_list *argp;
{
- int line;
char *file;
+ (void) fflush(stdout);
(void) fprintf(stderr, "%s: %s ", myname, s);
vfprintf(stderr, msg, *argp);
(void) fprintf(stderr, "\n");
- line = (int) FNR_node->var_value->numbr;
- if (line) {
- (void) fprintf(stderr, " input line number %d", line);
+ if (FNR) {
+ (void) fprintf(stderr, " input line number %d", FNR);
file = FILENAME_node->var_value->stptr;
if (file && !STREQ(file, "-"))
(void) fprintf(stderr, ", file `%s'", file);
(void) fprintf(stderr, "\n");
}
if (sourceline) {
- (void) fprintf(stderr, " source line number %d", sourceline);
+ (void) fprintf(stderr, " source line number %d", sourceline);
if (source)
(void) fprintf(stderr, ", file `%s'", source);
(void) fprintf(stderr, "\n");
}
+ (void) fflush(stderr);
}
/*VARARGS0*/
@@ -100,5 +100,5 @@ va_dcl
#ifdef DEBUG
abort();
#endif
- exit(1);
+ exit(2);
}