diff options
author | Jim Meyering <jim@meyering.net> | 1995-05-20 13:28:24 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-05-20 13:28:24 +0000 |
commit | 37a6bc3abff0636164ba01a09994ba91c9b065df (patch) | |
tree | 77c6ab1db640fa66c4785fab38f88926a046ef3d /lib/error.c | |
parent | e364481ca4089e0342fb5366a5671cd4fdaefff2 (diff) | |
download | coreutils-37a6bc3abff0636164ba01a09994ba91c9b065df.tar.xz |
merge with 1.11.1a
Diffstat (limited to 'lib/error.c')
-rw-r--r-- | lib/error.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/error.c b/lib/error.c index b1bbf1853..a65d644d1 100644 --- a/lib/error.c +++ b/lib/error.c @@ -1,5 +1,5 @@ /* error.c -- error handler for noninteractive utilities - Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. + Copyright (C) 1990, 91, 92, 93, 94, 95 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -43,6 +43,9 @@ void exit (); #endif +/* This variable is incremented each time `error' is called. */ +unsigned int error_message_count; + /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this function without parameters instead. */ @@ -112,6 +115,8 @@ error (status, errnum, message, va_alist) fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); #endif + ++error_message_count; + if (errnum) fprintf (stderr, ": %s", strerror (errnum)); putc ('\n', stderr); |