#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.215 2014/08/30 10:19:54 christos Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.216 2014/09/24 19:49:07 christos Exp $")
#endif /* lint */
#include "magic.h"
if (action == FILE_LIST) {
for (i = 0; i < MAGIC_SETS; i++) {
- printf("Set %zu:\nBinary patterns:\n", i);
+ printf("Set %" SIZE_T_FORMAT "u:\nBinary patterns:\n",
+ i);
apprentice_list(ms->mlist[i], BINTEST);
printf("Text patterns:\n");
apprentice_list(ms->mlist[i], TEXTTEST);
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.66 2014/08/27 06:59:35 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.67 2014/09/24 19:49:07 christos Exp $")
#endif
#include <assert.h>
for (i = 0; i < __arraycount(h->h_master_sat); i++) {
if (h->h_master_sat[i] == CDF_SECID_FREE)
break;
- (void)fprintf(stderr, "%35.35s[%.3zu] = %d\n",
+ (void)fprintf(stderr, "%35.35s[%.3" SIZE_T_FORMAT "u] = %d\n",
"master_sat", i, h->h_master_sat[i]);
}
}
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.194 2014/09/22 18:26:19 christos Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.195 2014/09/24 19:49:07 christos Exp $")
#endif /* lint */
#include "magic.h"
const char *ptr = fmtcheck(m->desc, def);
if (ptr == def)
file_magerror(ms,
- "%s, %zu: format `%s' does not match with `%s'",
- file, line, m->desc, def);
+ "%s, %" SIZE_T_FORMAT "u: format `%s' does not match"
+ " with `%s'", file, line, m->desc, def);
return ptr;
}
#else
private void
mdebug(uint32_t offset, const char *str, size_t len)
{
- (void) fprintf(stderr, "mget/%zu @%d: ", len, offset);
+ (void) fprintf(stderr, "mget/%" SIZE_T_FORMAT "u @%d: ", len, offset);
file_showstr(stderr, str, len);
(void) fputc('\n', stderr);
(void) fputc('\n', stderr);
return -1;
if ((ms->flags & MAGIC_DEBUG) != 0) {
- fprintf(stderr, "mget(type=%d, flag=%x, offset=%u, o=%zu, "
- "nbytes=%zu)\n", m->type, m->flag, offset, o, nbytes);
+ fprintf(stderr, "mget(type=%d, flag=%x, offset=%u, o=%"
+ SIZE_T_FORMAT "u, " "nbytes=%" SIZE_T_FORMAT "u)\n",
+ m->type, m->flag, offset, o, nbytes);
mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE));
#ifndef COMPILE_ONLY
file_mdump(m);
copy = malloc(slen);
if (copy == NULL) {
file_error(ms, errno,
- "can't allocate %zu bytes", slen);
+ "can't allocate %" SIZE_T_FORMAT "u bytes",
+ slen);
return -1;
}
memcpy(copy, ms->search.s, slen);