#ifndef lint
-FILE_RCSID("@(#)$File: compress.c,v 1.49 2007/02/05 16:46:40 christos Exp $")
+FILE_RCSID("@(#)$File: compress.c,v 1.50 2007/03/01 22:14:54 christos Exp $")
#endif
private struct {
goto nocheck;
#ifdef FIONREAD
- if (canbepipe && (ioctl(fd, FIONREAD, &t) == -1) || (t == 0)) {
+ if ((canbepipe && (ioctl(fd, FIONREAD, &t) == -1)) || (t == 0)) {
#ifdef FD_ZERO
for (cnt = 0;; cnt++) {
fd_set check;
struct timeval tout = {0, 100 * 1000};
- int rv;
+ int selrv;
FD_ZERO(&check);
FD_SET(fd, &check);
* Avoid soft deadlock: do not read if there
* is nothing to read from sockets and pipes.
*/
- rv = select(fd + 1, &check, NULL, NULL, &tout);
- if (rv == -1) {
+ selrv = select(fd + 1, &check, NULL, NULL, &tout);
+ if (selrv == -1) {
if (errno == EINTR || errno == EAGAIN)
continue;
- } else if (rv == 0 && cnt >= 5) {
+ } else if (selrv == 0 && cnt >= 5) {
return 0;
} else
break;
#include <time.h>
#ifndef lint
-FILE_RCSID("@(#)$File: print.c,v 1.57 2007/01/12 17:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: print.c,v 1.58 2007/01/16 14:58:48 ljt Exp $")
#endif /* lint */
#define SZOF(a) (sizeof(a) / sizeof(a[0]))
{
private const char optyp[] = { FILE_OPS };
- (void) fprintf(stderr, "[%zu", m->lineno);
- (void) fprintf(stderr, ">>>>>>>> %d" + 8 - (m->cont_level & 7),
+ (void) fprintf(stderr, "[%u", m->lineno);
+ (void) fprintf(stderr, ">>>>>>>> %u" + 8 - (m->cont_level & 7),
m->offset);
if (m->flag & INDIR) {
file_names[m->in_type] : "*bad*");
if (m->in_op & FILE_OPINVERSE)
(void) fputc('~', stderr);
- (void) fprintf(stderr, "%c%d),",
+ (void) fprintf(stderr, "%c%u),",
((m->in_op & FILE_OPS_MASK) < SZOF(optyp)) ?
optyp[m->in_op & FILE_OPS_MASK] : '?',
m->in_offset);
#ifndef lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.94 2007/03/02 19:52:47 christos Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.95 2007/03/03 19:09:25 christos Exp $")
#endif /* lint */
private int match(struct magic_set *, struct magic *, uint32_t,
mprint(struct magic_set *ms, struct magic *m)
{
uint64_t v;
- int32_t t = 0;
+ int64_t t = 0;
char buf[512];
union VALUETYPE *p = &ms->ms_value;