#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.146 2008/11/07 18:57:08 christos Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.147 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include "magic.h"
if (p == NULL)
return;
switch (type) {
-#ifdef QUICK
case 2:
+#ifdef QUICK
p--;
(void)munmap((void *)p, sizeof(*p) * (entries + 1));
break;
+#else
+ (void)&entries;
+ abort();
+ /*NOTREACHED*/
#endif
case 1:
p--;
file_oomem(ms, (size_t)st.st_size);
goto error1;
}
- if (read(fd, mm, (size_t)st.st_size) != (size_t)st.st_size) {
+ if (read(fd, mm, (size_t)st.st_size) != (ssize_t)st.st_size) {
file_badread(ms);
goto error1;
}
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: apptype.c,v 1.9 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: apptype.c,v 1.10 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include <stdlib.h>
}
(void)fclose(fp);
}
- rc = DosQueryAppType(path, &type);
+ rc = DosQueryAppType((unsigned char *)path, &type);
if (fn == NULL) {
unlink(path);
*/
/*
* file.h - definitions for file(1) program
- * @(#)$File: file.h,v 1.117 2008/11/22 17:01:28 chl Exp $
+ * @(#)$File: file.h,v 1.118 2009/02/03 20:27:51 christos Exp $
*/
#ifndef __file_h__
protected const char *file_getbuffer(struct magic_set *);
protected ssize_t sread(int, void *, size_t, int);
protected int file_check_mem(struct magic_set *, unsigned int);
-protected int file_looks_utf8(const unsigned char *, size_t, unichar *, size_t *);
+protected int file_looks_utf8(const unsigned char *, size_t, unichar *,
+ size_t *);
+#ifdef __EMX__
+protected int file_os2_apptype(struct magic_set *, const char *, const void *,
+ size_t);
+#endif /* __EMX__ */
+
#ifndef COMPILE_ONLY
extern const char *file_names[];
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: magic.c,v 1.58 2009/01/12 20:15:11 christos Exp $")
+FILE_RCSID("@(#)$File: magic.c,v 1.59 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include "magic.h"
#endif
#endif
-#ifdef __EMX__
-private char *apptypeName = NULL;
-protected int file_os2_apptype(struct magic_set *ms, const char *fn,
- const void *buf, size_t nb);
-#endif /* __EMX__ */
-
private void free_mlist(struct mlist *);
private void close_and_restore(const struct magic_set *, const char *, int,
const struct stat *);