1
0
mirror of https://github.com/open-simh/simh.git synced 2026-04-25 20:01:33 +00:00

Compiler suggested cleanup

This commit is contained in:
Mark Pizzolato
2012-12-15 07:56:42 -08:00
parent c046a29cba
commit 0450a9b430
7 changed files with 60 additions and 71 deletions

View File

@@ -496,11 +496,11 @@ if (ctx->dptr->dctrl & reason) {
if ((i > 0) && (0 == memcmp (&data[i], &data[i-16], 16))) {
++same;
continue;
}
}
if (same > 0) {
sim_debug (reason, ctx->dptr, "%04X thru %04X same as above\n", i-(16*same), i-1);
same = 0;
}
}
group = (((len - i) > 16) ? 16 : (len - i));
for (sidx=oidx=0; sidx<group; ++sidx) {
outbuf[oidx++] = ' ';
@@ -510,13 +510,14 @@ if (ctx->dptr->dctrl & reason) {
strbuf[sidx] = data[i+sidx];
else
strbuf[sidx] = '.';
}
}
outbuf[oidx] = '\0';
strbuf[sidx] = '\0';
sim_debug (reason, ctx->dptr, "%04X%-48s %s\n", i, outbuf, strbuf);
}
if (same > 0)
sim_debug (reason, ctx->dptr, "%04X thru %04X same as above\n", i-(16*same), len-1);
}
if (same > 0) {
sim_debug (reason, ctx->dptr, "%04X thru %04X same as above\n", i-(16*same), len-1);
}
}
}
}
@@ -1640,8 +1641,9 @@ t_stat sim_tape_rewind (UNIT *uptr)
{
struct tape_context *ctx = (struct tape_context *)uptr->tape_ctx;
if (uptr->flags & UNIT_ATT)
if (uptr->flags & UNIT_ATT) {
sim_debug (ctx->dbit, ctx->dptr, "sim_tape_rewind(unit=%d)\n", uptr-ctx->dptr->units);
}
uptr->pos = 0;
MT_CLR_PNU (uptr);
return MTSE_OK;
@@ -1868,10 +1870,14 @@ t_stat sim_tape_show_capac (FILE *st, UNIT *uptr, int32 val, void *desc)
if (uptr->capac) {
if (uptr->capac >= (t_addr) 1000000)
fprintf (st, "capacity=%dMB", (uint32) (uptr->capac / ((t_addr) 1000000)));
else if (uptr->capac >= (t_addr) 1000)
fprintf (st, "capacity=%dKB", (uint32) (uptr->capac / ((t_addr) 1000)));
else fprintf (st, "capacity=%dB", (uint32) uptr->capac);
else {
if (uptr->capac >= (t_addr) 1000)
fprintf (st, "capacity=%dKB", (uint32) (uptr->capac / ((t_addr) 1000)));
else
fprintf (st, "capacity=%dB", (uint32) uptr->capac);
}
}
else fprintf (st, "unlimited capacity");
else
fprintf (st, "unlimited capacity");
return SCPE_OK;
}