summaryrefslogtreecommitdiffstats
path: root/contrib/file/print.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2004-12-28 04:31:47 +0000
committerobrien <obrien@FreeBSD.org>2004-12-28 04:31:47 +0000
commitdf11c7b63d4e785920524068f8f9cbdef5dc08ad (patch)
tree1f6a2b8408267a2849e0e3074601f0e52db5e802 /contrib/file/print.c
parentbda6cdf5897e5ebed7279aca3ea3387bddcb19b0 (diff)
downloadFreeBSD-src-df11c7b63d4e785920524068f8f9cbdef5dc08ad.zip
FreeBSD-src-df11c7b63d4e785920524068f8f9cbdef5dc08ad.tar.gz
Virgin import of Christos Zoulas's FILE 4.12.
Diffstat (limited to 'contrib/file/print.c')
-rw-r--r--contrib/file/print.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/contrib/file/print.c b/contrib/file/print.c
index ee1926d..81eb789 100644
--- a/contrib/file/print.c
+++ b/contrib/file/print.c
@@ -12,11 +12,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Ian F. Darwin and others.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -46,7 +41,7 @@
#include <time.h>
#ifndef lint
-FILE_RCSID("@(#)$Id: print.c,v 1.44 2003/09/12 19:39:44 christos Exp $")
+FILE_RCSID("@(#)$Id: print.c,v 1.46 2004/11/13 08:11:39 christos Exp $")
#endif /* lint */
#define SZOF(a) (sizeof(a) / sizeof(a[0]))
@@ -142,7 +137,7 @@ file_mdump(struct magic *m)
/*VARARGS*/
protected void
-file_magwarn(const char *f, ...)
+file_magwarn(struct magic_set *ms, const char *f, ...)
{
va_list va;
va_start(va, f);
@@ -150,7 +145,8 @@ file_magwarn(const char *f, ...)
/* cuz we use stdout for most, stderr here */
(void) fflush(stdout);
- (void) fprintf(stderr, "WARNING: ");
+ (void) fprintf(stderr, "%s, %lu: Warning ", ms->file,
+ (unsigned long)ms->line);
(void) vfprintf(stderr, f, va);
va_end(va);
fputc('\n', stderr);
OpenPOWER on IntegriCloud