/* we check the magic */
- if (err==UNZ_OK)
+ if (err==UNZ_OK) {
if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
err=UNZ_ERRNO;
else if (uMagic!=0x02014b50)
err=UNZ_BADZIPFILE;
+ }
if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK)
err=UNZ_ERRNO;
else
uSizeRead = extraFieldBufferSize;
- if (lSeek!=0)
+ if (lSeek!=0) {
if (zfile_fseek(s->file,lSeek,SEEK_CUR)==0)
lSeek=0;
else
err=UNZ_ERRNO;
+ }
if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
if (zfile_fread(extraField,(uInt)uSizeRead,1,s->file)!=1)
err=UNZ_ERRNO;
else
uSizeRead = commentBufferSize;
- if (lSeek!=0)
+ if (lSeek!=0) {
if (zfile_fseek(s->file,lSeek,SEEK_CUR)==0)
lSeek=0;
else
err=UNZ_ERRNO;
+ }
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
if (zfile_fread(szComment,(uInt)uSizeRead,1,s->file)!=1)
err=UNZ_ERRNO;
return UNZ_ERRNO;
- if (err==UNZ_OK)
+ if (err==UNZ_OK) {
if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
err=UNZ_ERRNO;
else if (uMagic!=0x04034b50)
err=UNZ_BADZIPFILE;
+ }
if (unzlocal_getShort(s->file,&uData) != UNZ_OK)
err=UNZ_ERRNO;
if ((s->cur_file_info.compression_method!=0) &&
(s->cur_file_info.compression_method!=Z_DEFLATED)) {
- write_log (_T("ZIP: unknown compression method %d\n"), s->cur_file_info.compression_method);
+ write_log (_T("ZIP: unknown compression method %lld\n"), s->cur_file_info.compression_method);
err=UNZ_BADZIPFILE;
}
Store = s->cur_file_info.compression_method==0;
return UNZ_PARAMERROR;
- if ((pfile_in_zip_read_info->read_buffer == NULL))
+ if (pfile_in_zip_read_info->read_buffer == NULL)
return UNZ_END_OF_LIST_OF_FILE;
if (len==0)
return 0;
*/
extern int ZEXPORT unzGetGlobalComment (unzFile file, char *szComment, uLong uSizeBuf)
{
- int err=UNZ_OK;
unz_s* s;
uLong uReadThis ;
if (file==NULL)
#include "xwin.h"
#include "enforcer.h"
-#if defined(AHI)
+#ifdef AHI
#if defined(JIT)
#define special_mem_r special_mem |= S_READ
} else {
native_name = my_strdup (_T("Unknown"));
}
- _stprintf (buf, _T("----> %08lx - \"%s\" Hunk %04lx Offset %08lx\n"), pc, native_name, hunk, offset);
+ _stprintf (buf, _T("----> %08x - \"%s\" Hunk %04lx Offset %08x\n"), pc, native_name, hunk, offset);
xfree (native_name);
return 1;
}
uae_u32 offset = pc - (get_long (node + 8) << 2);
uaecptr mod = get_long (node + 20);
native_name = au ((char*)amiga2native (mod + 24, 100));
- _stprintf (buf, _T("----> %08lx - \"%s\" Hunk %04lx Offset %08lx\n"), pc, native_name, hunk, offset);
+ _stprintf (buf, _T("----> %08x - \"%s\" Hunk %04x Offset %08x\n"), pc, native_name, hunk, offset);
xfree (native_name);
return 1;
}
_tcscpy (enforcer_buf_ptr, _T("Enforcer Hit! Bad program\n"));
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
- _stprintf (buf, _T("Illegal %s: %08lx"), addressmode, addr);
- _stprintf (enforcer_buf_ptr, _T("%-48sPC: %0lx\n"), buf, pc);
+ _stprintf (buf, _T("Illegal %s: %08x"), addressmode, addr);
+ _stprintf (enforcer_buf_ptr, _T("%-48sPC: %0x\n"), buf, pc);
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
/* Data registers */
- _stprintf (enforcer_buf_ptr, _T("Data: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
+ _stprintf (enforcer_buf_ptr, _T("Data: %08x %08x %08x %08x %08x %08x %08x %08x\n"),
m68k_dreg (regs, 0), m68k_dreg (regs, 1), m68k_dreg (regs, 2), m68k_dreg (regs, 3),
m68k_dreg (regs, 4), m68k_dreg (regs, 5), m68k_dreg (regs, 6), m68k_dreg (regs, 7));
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
/* Address registers */
- _stprintf (enforcer_buf_ptr, _T("Addr: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
+ _stprintf (enforcer_buf_ptr, _T("Addr: %08x %08x %08x %08x %08x %08x %08x %08x\n"),
m68k_areg (regs, 0), m68k_areg (regs, 1), m68k_areg (regs, 2), m68k_areg (regs, 3),
m68k_areg (regs, 4), m68k_areg (regs, 5), m68k_areg (regs, 6), m68k_areg (regs, 7));
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
_tcscpy (enforcer_buf_ptr, _T("Stck:"));
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
}
- _stprintf (enforcer_buf_ptr, _T(" %08lx"),get_long (a7));
+ _stprintf (enforcer_buf_ptr, _T(" %08x"),get_long (a7));
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
if (i%8 == 7)
}
sm68k_disasm (buf, instrcode, bestpc, NULL);
- _stprintf (lines[i], _T("%08lx : %-20s %s\n"), bestpc, instrcode, buf);
+ _stprintf (lines[i], _T("%08x : %-20s %s\n"), bestpc, instrcode, buf);
temppc = bestpc;
}
temppc = pc;
for (i = 0; i < (INSTRUCTIONLINES + 1) / 2; i++) {
sm68k_disasm (buf, instrcode, temppc, &nextpc);
- _stprintf (enforcer_buf_ptr, _T("%08lx : %s %-20s %s\n"), temppc,
+ _stprintf (enforcer_buf_ptr, _T("%08x : %s %-20s %s\n"), temppc,
(i == 0 ? _T("*") : _T(" ")), instrcode, buf);
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
temppc = nextpc;
}
if (!native_task_name)
- native_task_name = _T("Unknown");
+ native_task_name = my_strdup(_T("Unknown"));
_stprintf (enforcer_buf_ptr, _T("Name: \"%s\"\n\n"), native_task_name);
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
console_out (enforcer_buf);
- write_log (enforcer_buf);
+ write_log (_T("%s"), enforcer_buf);
sleep_millis (5);
doflashscreen ();
return 1;
}
-#endif
+#endif // AHI