I7000: Removed compiler warnings.
This commit is contained in:
parent
fb1be2093d
commit
4057374c7c
17 changed files with 46 additions and 57 deletions
|
@ -184,6 +184,8 @@ set_chan(UNIT * uptr, int32 val, CONST char *cptr, void *desc)
|
|||
return SCPE_IERR;
|
||||
|
||||
chan = UNIT_G_CHAN(uptr->flags);
|
||||
if (chan >= NUM_CHAN)
|
||||
chan = 0;
|
||||
dibp = (DIB *) dptr->ctxt;
|
||||
|
||||
if (dibp == NULL)
|
||||
|
|
|
@ -514,7 +514,7 @@ t_stat com_svc(UNIT * uptr)
|
|||
/* Grab next entry. */
|
||||
in_head++;
|
||||
/* Wrap around end of ring */
|
||||
if (in_head >= (sizeof(in_buff)/sizeof(uint16)))
|
||||
if (in_head >= (int)((sizeof(in_buff)/sizeof(uint16))))
|
||||
in_head = 0;
|
||||
com_data = in_buff[in_head];
|
||||
/* Check if end of current transfer */
|
||||
|
@ -1097,7 +1097,7 @@ com_post_eom()
|
|||
sim_debug(DEBUG_EXP, &com_dev, "inserting eom %d %d %d\n",
|
||||
in_head, in_tail, in_count);
|
||||
ent = in_tail + 1;
|
||||
if (ent >= (sizeof(in_buff)/sizeof(uint16))) /* Wrap around */
|
||||
if (ent >= (int)((sizeof(in_buff)/sizeof(uint16)))) /* Wrap around */
|
||||
ent = 0;
|
||||
if (ent != in_head) { /* If next element would be head, queue is full */
|
||||
/* If we can't put one on, handler will do it for us */
|
||||
|
@ -1120,12 +1120,12 @@ com_inp_msg(uint32 ln, uint16 msg)
|
|||
sim_debug(DEBUG_EXP, &com_dev, "inserting %d %04o %d %d %d\n", ln, msg,
|
||||
in_head, in_tail, in_count);
|
||||
ent1 = in_tail + 1;
|
||||
if (ent1 >= (sizeof(in_buff)/sizeof(uint16))) /* Wrap around */
|
||||
if (ent1 >= (int)((sizeof(in_buff)/sizeof(uint16)))) /* Wrap around */
|
||||
ent1 = 0;
|
||||
if (ent1 == in_head) /* If next element would be head, queue is full */
|
||||
return TRUE;
|
||||
ent2 = ent1 + 1;
|
||||
if (ent2 >= (sizeof(in_buff)/sizeof(uint16))) /* Wrap around */
|
||||
if (ent2 >= (int)((sizeof(in_buff)/sizeof(uint16)))) /* Wrap around */
|
||||
ent2 = 0;
|
||||
if (ent2 == in_head) /* If next element would be head, queue is full */
|
||||
return TRUE;
|
||||
|
|
|
@ -253,7 +253,7 @@ extern DEBTAB crd_debug[];
|
|||
#define UNIT_V_CHAN (UNIT_V_SELECT + 1) /* 10 */
|
||||
#define UNIT_CHAN (017 << UNIT_V_CHAN) /* 10-14 */
|
||||
#define UNIT_S_CHAN(x) (UNIT_CHAN & ((x) << UNIT_V_CHAN))
|
||||
#define UNIT_G_CHAN(x) ((UNIT_CHAN & (x)) >> UNIT_V_CHAN)
|
||||
#define UNIT_G_CHAN(x) ((int)((UNIT_CHAN & (x)) >> UNIT_V_CHAN))
|
||||
#define UNIT_V_LOCAL (UNIT_V_UF + 0) /* 0 */
|
||||
#define DEV_BUF_NUM(x) (((x) & 07) << DEV_V_UF)
|
||||
#define GET_DEV_BUF(x) (((x) >> DEV_V_UF) & 07)
|
||||
|
|
|
@ -297,14 +297,12 @@ DEVICE dsk_dev = {
|
|||
|
||||
uint32 dsk_cmd(UNIT * uptr, uint16 cmd, uint16 dev)
|
||||
{
|
||||
int chan;
|
||||
int u = (uptr->u3 >> 8) & 0xf;
|
||||
UNIT *base = &dsk_unit[u];
|
||||
int chan = UNIT_G_CHAN(dsk_unit[u].flags);
|
||||
#ifdef I7010
|
||||
int sel;
|
||||
|
||||
chan = UNIT_G_CHAN(dsk_unit[u].flags);
|
||||
sel = (base->flags & UNIT_SELECT) ? 1 : 0;
|
||||
#ifdef I7010
|
||||
sel = (dsk_unit[u].flags & UNIT_SELECT) ? 1 : 0;
|
||||
if (cmd & 0x100)
|
||||
sense[(chan * 2) + sel] |= STAT_SIXBIT;
|
||||
else
|
||||
|
|
|
@ -134,7 +134,7 @@ lpr_setlpp(UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
|||
}
|
||||
if (i < 20 || i > 100)
|
||||
return SCPE_ARG;
|
||||
uptr->capac = i;
|
||||
uptr->u6 = i;
|
||||
uptr->u4 = 0;
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ lpr_getlpp(FILE *st, UNIT *uptr, int32 v, CONST void *desc)
|
|||
{
|
||||
if (uptr == NULL)
|
||||
return SCPE_IERR;
|
||||
fprintf(st, "linesperpage=%d", uptr->capac);
|
||||
fprintf(st, "linesperpage=%d", uptr->u6);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,7 @@ print_line(UNIT * uptr, int chan, int unit)
|
|||
case 1:
|
||||
case 9: if (uptr->u4 == 1)
|
||||
break;
|
||||
i = uptr->capac - uptr->u4 + 1; break;
|
||||
i = uptr->u6 - uptr->u4 + 1; break;
|
||||
}
|
||||
if (i == 0)
|
||||
break;
|
||||
|
@ -231,7 +231,7 @@ print_line(UNIT * uptr, int chan, int unit)
|
|||
sim_putchar(out[j++]);
|
||||
}
|
||||
uptr->u4++;
|
||||
if (uptr->u4 > (int32)uptr->capac) {
|
||||
if (uptr->u4 > (int32)uptr->u6) {
|
||||
uptr->u4 = 1;
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ print_line(UNIT * uptr, int chan, int unit)
|
|||
sim_putchar('\n');
|
||||
}
|
||||
uptr->u4++;
|
||||
if (uptr->u4 > (int32)uptr->capac) {
|
||||
if (uptr->u4 > (int32)uptr->u6) {
|
||||
uptr->u4 = 1;
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ print_line(UNIT * uptr, int chan, int unit)
|
|||
if (uptr->u4 == 1)
|
||||
lpr_chan9[chan] = 1;
|
||||
#ifdef I7010
|
||||
if (uptr->u4 == uptr->capac)
|
||||
if (uptr->u4 == uptr->u6)
|
||||
lpr_chan12[chan] = 1;
|
||||
#endif
|
||||
|
||||
|
@ -356,8 +356,8 @@ uint32 lpr_cmd(UNIT * uptr, uint16 cmd, uint16 dev)
|
|||
case 1:
|
||||
case 9: if (uptr->u4 == 1)
|
||||
break;
|
||||
i = uptr->capac - uptr->u4 + 1; break;
|
||||
case 12: i = (uptr->capac/2) - uptr->u4; break;
|
||||
i = uptr->u6 - uptr->u4 + 1; break;
|
||||
case 12: i = (uptr->u6/2) - uptr->u4; break;
|
||||
}
|
||||
if (i == 0)
|
||||
break;
|
||||
|
@ -377,7 +377,7 @@ uint32 lpr_cmd(UNIT * uptr, uint16 cmd, uint16 dev)
|
|||
}
|
||||
break;
|
||||
}
|
||||
if (uptr->u4 == uptr->capac)
|
||||
if (uptr->u4 == uptr->u6)
|
||||
lpr_chan12[chan] = 1;
|
||||
#endif
|
||||
if (uptr->u4 == 1)
|
||||
|
|
|
@ -849,7 +849,7 @@ t_stat mt_srv(UNIT * uptr)
|
|||
return mt_error(uptr, chan, MTSE_TMK, dptr);
|
||||
}
|
||||
/* If at end of record, fill buffer */
|
||||
if (uptr->u6 == uptr->hwmark) {
|
||||
if (uptr->u6 == (int32)uptr->hwmark) {
|
||||
sim_debug(DEBUG_DETAIL, dptr, "Read unit=%d ", unit);
|
||||
uptr->u3 += GAP_LEN;
|
||||
if ((r = sim_tape_rdrecf(uptr, &mt_buffer[bufnum][0], &reclen,
|
||||
|
@ -1044,7 +1044,7 @@ t_stat mt_srv(UNIT * uptr)
|
|||
return mt_error(uptr, chan, MTSE_TMK, dptr);
|
||||
}
|
||||
/* If at end of record, fill buffer */
|
||||
if (uptr->u6 == uptr->hwmark) {
|
||||
if (uptr->u6 == (int32)uptr->hwmark) {
|
||||
sim_debug(DEBUG_DETAIL, dptr, "Read unit=%d ", unit);
|
||||
if ((r = sim_tape_rdrecr(uptr, &mt_buffer[bufnum][0], &reclen,
|
||||
BUFFSIZE)) != MTSE_OK) {
|
||||
|
|
|
@ -562,12 +562,12 @@ sim_instr(void)
|
|||
t_stat reason;
|
||||
uint16 t;
|
||||
int temp;
|
||||
int32 STAR;
|
||||
int32 STAR = 0;
|
||||
uint8 op, op_info;
|
||||
int state;
|
||||
uint8 ix;
|
||||
uint8 ix = 0;
|
||||
uint8 br;
|
||||
uint8 ar;
|
||||
uint8 ar = 0;
|
||||
int sign, qsign;
|
||||
uint8 ch;
|
||||
int cy;
|
||||
|
@ -3759,9 +3759,7 @@ do_divide()
|
|||
t_stat
|
||||
rtc_srv(UNIT * uptr)
|
||||
{
|
||||
int32 t;
|
||||
|
||||
t = sim_rtcn_calb (rtc_tps, TMR_RTC);
|
||||
(void)sim_rtcn_calb (rtc_tps, TMR_RTC);
|
||||
sim_activate_after(uptr, 1000000/rtc_tps);
|
||||
|
||||
if (timer_enable) {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
/* Memory */
|
||||
#define AMASK 0x1ffff
|
||||
#define BBIT 0x80000000
|
||||
#define MEM_ADDR_OK(x) ((uint32)(x & AMASK) < MEMSIZE)
|
||||
#define MEM_ADDR_OK(x) ((uint32)((x) & AMASK) < MEMSIZE)
|
||||
extern uint8 M[MAXMEMSIZE];
|
||||
#define WM 0200 /* Word mark in memory */
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ int
|
|||
chan_cmd(uint16 dev, uint16 dcmd)
|
||||
{
|
||||
UNIT *uptr;
|
||||
uint32 chan;
|
||||
int32 chan;
|
||||
DEVICE **dptr;
|
||||
DIB *dibp;
|
||||
int j;
|
||||
|
|
|
@ -398,7 +398,6 @@ t_stat
|
|||
parse_sym(CONST char *cptr, t_addr addr, UNIT * uptr, t_value * val, int32 sw)
|
||||
{
|
||||
int i;
|
||||
int f;
|
||||
t_value d;
|
||||
t_addr tag;
|
||||
int sign;
|
||||
|
@ -413,7 +412,6 @@ parse_sym(CONST char *cptr, t_addr addr, UNIT * uptr, t_value * val, int32 sw)
|
|||
|
||||
i = 0;
|
||||
sign = 0;
|
||||
f = 0;
|
||||
next:
|
||||
/* Skip blanks */
|
||||
while (isspace(*cptr))
|
||||
|
|
|
@ -290,7 +290,7 @@ sim_instr(void)
|
|||
uint8 op2 = 0;
|
||||
int iowait = 0; /* Wait for IO to start */
|
||||
int chwait = 0; /* Wait for channel to be inactive */
|
||||
int sign;
|
||||
uint8 sign;
|
||||
int instr_count = 0; /* Number of instructions to execute */
|
||||
|
||||
if (sim_step != 0) {
|
||||
|
@ -560,7 +560,7 @@ sim_instr(void)
|
|||
temp &= ldmask[f2-f1+1];
|
||||
/* Compute final sign */
|
||||
if ((opcode & 0x10f) == (OP_AAS1 & 0x10f)) {
|
||||
sign = utmp;
|
||||
sign = (uint8)(utmp & 0xf);
|
||||
} else if (sign & 0xc) {
|
||||
sign = ASIGN >> 40;
|
||||
} else if (sign & 2) {
|
||||
|
@ -679,7 +679,7 @@ sim_instr(void)
|
|||
case OP_M:
|
||||
/* Multiplicand in AC[3] */
|
||||
AC[1] = AC[2] = 0;
|
||||
sign = (MBR & SMASK) >> 40;
|
||||
sign = (uint8)(((MBR & SMASK) >> 40) & 0xf);
|
||||
MBR = (rdmask[f1] & MBR) >> ((9 - f2) * 4);
|
||||
sign = (((AC[3] & SMASK) >> 40) != sign) ? 6 : 9;
|
||||
/* Multiply MBR * AC[3] result to AC[1],AC[2] <low> */
|
||||
|
@ -714,7 +714,7 @@ sim_instr(void)
|
|||
case OP_D:
|
||||
/* dividend AC[1],AC[2] */
|
||||
/* divisor in MBR */
|
||||
sign = (MBR & SMASK) >> 40;
|
||||
sign = (uint8)(((MBR & SMASK) >> 40) & 0xf);
|
||||
AC[3] = (rdmask[f1] & MBR) >> ((9 - f2) * 4);
|
||||
if (AC[3] == 0) {
|
||||
AC[3] |= ((t_uint64)sign) << 40;
|
||||
|
@ -1536,7 +1536,7 @@ sim_instr(void)
|
|||
hst[hst_p].before = MBR;
|
||||
}
|
||||
temp = dec_bin_idx(MBR);
|
||||
sign = ((MBR & SMASK)>> 40);
|
||||
sign = (uint8)(((MBR & SMASK)>> 40) & 0xf);
|
||||
MBR &= DMASK;
|
||||
switch(sign) {
|
||||
case 0x6: /* + - tc b add */
|
||||
|
@ -1567,7 +1567,7 @@ sim_instr(void)
|
|||
}
|
||||
temp = 0;
|
||||
upd_idx(&temp, MA);
|
||||
sign = ((MBR & SMASK)>> 40);
|
||||
sign = (uint8)(((MBR & SMASK)>> 40) & 0xf);
|
||||
MBR &= DMASK;
|
||||
switch(sign) {
|
||||
default:
|
||||
|
|
|
@ -218,7 +218,7 @@ uint16 stop_flags = 0; /* Stop on error */
|
|||
uint16 selreg; /* Last select address */
|
||||
uint16 selreg2; /* RWW select address */
|
||||
int chwait; /* Channel wait register */
|
||||
uint8 ioflags[5000/8] = {0}; /* IO Error flags */
|
||||
uint8 ioflags[6200/8] = {0}; /* IO Error flags */
|
||||
uint16 irqflags; /* IRQ Flags */
|
||||
uint8 lpr_chan9[NUM_CHAN]; /* Line printer Channel 9 flag */
|
||||
uint8 bkcmp = 0; /* Backwords compare */
|
||||
|
|
|
@ -273,7 +273,6 @@ sim_load(FILE * fileref, CONST char *cptr, CONST char *fnam, int flag)
|
|||
}
|
||||
return SCPE_OK;
|
||||
} else if (match_ext(fnam, "dck")) {
|
||||
extern char ascii_to_six[128];
|
||||
while (fgets(buffer, 160, fileref) != 0) {
|
||||
uint8 image[80];
|
||||
/* Convert bits into image */
|
||||
|
@ -599,7 +598,6 @@ parse_sym(CONST char *cptr, t_addr addr, UNIT * uptr, t_value * val, int32 sw)
|
|||
int i;
|
||||
t_value d;
|
||||
char buffer[100];
|
||||
extern char ascii_to_six[];
|
||||
|
||||
while (isspace(*cptr))
|
||||
cptr++;
|
||||
|
|
|
@ -329,7 +329,9 @@ void
|
|||
chan_proc()
|
||||
{
|
||||
int chan;
|
||||
#ifdef I7090
|
||||
int cmask;
|
||||
#endif
|
||||
|
||||
/* Scan channels looking for work */
|
||||
for (chan = 0; chan < NUM_CHAN; chan++) {
|
||||
|
@ -341,7 +343,9 @@ chan_proc()
|
|||
if (chan_flags[chan] & DEV_DISCO)
|
||||
continue;
|
||||
|
||||
#ifdef I7090
|
||||
cmask = 0x0100 << chan;
|
||||
#endif
|
||||
switch (CHAN_G_TYPE(chan_unit[chan].flags)) {
|
||||
case CHAN_PIO:
|
||||
if ((chan_flags[chan] & (DEV_REOR|DEV_SEL|DEV_FULL)) ==
|
||||
|
@ -810,8 +814,7 @@ chan_proc()
|
|||
uptr = (*dptr)->units;
|
||||
for (j = 0; j < num; j++, uptr++) {
|
||||
if ((uptr->flags & UNIT_DIS) == 0 &&
|
||||
UNIT_G_CHAN(uptr->flags) ==
|
||||
(unsigned int)chan &&
|
||||
UNIT_G_CHAN(uptr->flags) == chan &&
|
||||
(sms[chan] & 1) ==
|
||||
((UNIT_SELECT & uptr->flags) != 0)) {
|
||||
goto found;
|
||||
|
@ -1243,7 +1246,7 @@ int
|
|||
chan_cmd(uint16 dev, uint16 dcmd)
|
||||
{
|
||||
UNIT *uptr;
|
||||
uint32 chan;
|
||||
int32 chan;
|
||||
DEVICE **dptr;
|
||||
DIB *dibp;
|
||||
int j;
|
||||
|
|
|
@ -723,7 +723,7 @@ sim_instr(void)
|
|||
uint16 decr;
|
||||
uint16 xr;
|
||||
uint16 opinfo;
|
||||
int fptemp, fptemp2;
|
||||
int fptemp = 0, fptemp2;
|
||||
uint8 f;
|
||||
uint16 tbase;
|
||||
int xeccnt = 15;
|
||||
|
@ -4198,8 +4198,7 @@ t_stat
|
|||
rtc_srv(UNIT * uptr)
|
||||
{
|
||||
if (cpu_unit.flags & OPTION_TIMER) {
|
||||
int32 t;
|
||||
t = sim_rtcn_calb (rtc_tps, TMR_RTC);
|
||||
(void)sim_rtcn_calb (rtc_tps, TMR_RTC);
|
||||
sim_activate_after(uptr, 1000000/rtc_tps);
|
||||
M[5] += 1;
|
||||
if (M[5] & MSIGN)
|
||||
|
|
|
@ -262,10 +262,6 @@ drm_detach(UNIT * uptr)
|
|||
t_stat
|
||||
drm_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
|
||||
{
|
||||
const char *cpu = cpu_description(&cpu_dev);
|
||||
DIB *dibp = (DIB *) dptr->ctxt;
|
||||
int ctype = dibp->ctype;
|
||||
|
||||
fprintf (st, "%s\n\n", drm_description(dptr));
|
||||
fprintf (st, "Up to %d units of drum could be used\n", NUM_UNITS_DR);
|
||||
fprintf (st, " sim> set %s UNITS=n to set number of units\n", dptr->name);
|
||||
|
|
|
@ -168,7 +168,6 @@ print_line(UNIT * uptr, int chan, int unit)
|
|||
uint16 buff[80]; /* Temp conversion buffer */
|
||||
int i, j;
|
||||
int outsel = uptr->u3;
|
||||
int prt_flg = 1;
|
||||
|
||||
if ((uptr->flags & (UNIT_ATT | ECHO)) == 0)
|
||||
return SCPE_UNATT; /* attached? */
|
||||
|
@ -670,8 +669,6 @@ lpr_attach(UNIT * uptr, CONST char *file)
|
|||
t_stat
|
||||
lpr_detach(UNIT * uptr)
|
||||
{
|
||||
int u = (uptr - lpr_unit);
|
||||
|
||||
return detach_unit(uptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue