#include <dirent.h>
#ifndef lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.139 2008/07/18 17:24:06 christos Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.140 2008/07/20 04:02:15 christos Exp $")
#endif /* lint */
#define EATAB {while (isascii((unsigned char) *l) && \
case FILE_REGEX:
case FILE_SEARCH:
/* binary test if pattern is not text */
- if (file_looks_utf8(m->value.us, m->vallen, NULL, NULL) <= 0)
+ if (file_looks_utf8(m->value.us, (size_t)m->vallen, NULL,
+ NULL) <= 0)
mstart->flag |= BINTEST;
break;
case FILE_DEFAULT:
*
*/
-#include "file.h"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: apptype.c,v 1.6 2003/11/11 20:01:45 christos Exp $")
+FILE_RCSID("@(#)$File: apptype.c,v 1.7 2007/01/12 17:38:27 christos Exp $")
#endif /* lint */
#ifdef __EMX__
#include "names.h"
#ifndef lint
-FILE_RCSID("@(#)$File: ascmagic.c,v 1.63 2008/05/09 14:20:28 christos Exp $")
+FILE_RCSID("@(#)$File: ascmagic.c,v 1.64 2008/07/16 18:00:57 christos Exp $")
#endif /* lint */
#define MAXLINELEN 300 /* longest sane line length */
}
if ((utf8_end = encode_utf8(utf8_buf, mlen, ubuf, ulen)) == NULL)
goto done;
- if (file_softmagic(ms, utf8_buf, utf8_end - utf8_buf, TEXTTEST) != 0) {
+ if (file_softmagic(ms, utf8_buf, (size_t)(utf8_end - utf8_buf),
+ TEXTTEST) != 0) {
rv = 1;
goto done;
}
#include "magic.h"
#ifndef lint
-FILE_RCSID("@(#)$File: readelf.c,v 1.76 2008/07/16 18:00:57 christos Exp $")
+FILE_RCSID("@(#)$File: readelf.c,v 1.77 2008/08/30 17:51:09 christos Exp $")
#endif
#ifdef ELFCORE
for (;;) {
Elf32_Cap cap32;
Elf64_Cap cap64;
- char cbuf[MAX(sizeof cap32, sizeof cap64)];
+ char cbuf[/*CONSTCOND*/
+ MAX(sizeof cap32, sizeof cap64)];
if ((coff += xcap_sizeof) >= (size_t)xsh_size)
break;
if (read(fd, cbuf, (size_t)xcap_sizeof) !=