Deleted Added
sdiff udiff text old ( 133359 ) new ( 139368 )
full compact
1/*
2 * Copyright (c) Ian F. Darwin 1986-1995.
3 * Software written by Ian F. Darwin and others;
4 * maintained 1995-present by Christos Zoulas and others.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice immediately at the beginning of the file, without modification,
11 * this list of conditions, and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

--- 13 unchanged lines hidden (view full) ---

36#include <stdarg.h>
37#include <stdlib.h>
38#ifdef HAVE_UNISTD_H
39#include <unistd.h>
40#endif
41#include <time.h>
42
43#ifndef lint
44FILE_RCSID("@(#)$Id: print.c,v 1.46 2004/11/13 08:11:39 christos Exp $")
45#endif /* lint */
46
47#define SZOF(a) (sizeof(a) / sizeof(a[0]))
48
49#ifndef COMPILE_ONLY
50protected void
51file_mdump(struct magic *m)
52{

--- 79 unchanged lines hidden (view full) ---

132 }
133 }
134 (void) fprintf(stderr, ",\"%s\"]\n", m->desc);
135}
136#endif
137
138/*VARARGS*/
139protected void
140file_magwarn(struct magic_set *ms, const char *f, ...)
141{
142 va_list va;
143 va_start(va, f);
144
145 /* cuz we use stdout for most, stderr here */
146 (void) fflush(stdout);
147
148 (void) fprintf(stderr, "%s, %lu: Warning ", ms->file,
149 (unsigned long)ms->line);
150 (void) vfprintf(stderr, f, va);
151 va_end(va);
152 fputc('\n', stderr);
153}
154
155protected char *
156file_fmttime(uint32_t v, int local)
157{

--- 30 unchanged lines hidden ---