Changeset a8b81c2 in buchla-68k for ram


Ignore:
Timestamp:
11/12/2017 07:42:11 PM (6 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
7c05959
Parents:
908b6ab
Message:

Fixed etres1.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/etres1.c

    r908b6ab ra8b81c2  
    1616int16_t et_res1(int16_t n)
    1717{
    18         ebuf[0] = anrs[n][abs(angroup)-1];
     18        ebuf[0] = (int8_t)anrs[n][abs(angroup)-1];
    1919        ebflag = TRUE;
    2020        return(SUCCESS);
     
    4848                if (E_NULL NE (ep = findev(p_cur, t_cur, EV_ANRS, vg, -1))) {
    4949
    50                         ep->e_data2 = ival;
     50                        ep->e_data2 = (int8_t)ival;
    5151
    5252                } else if (E_NULL NE (ep = e_alc(E_SIZE2))) {
    5353
    5454                        ep->e_type  = EV_ANRS;
    55                         ep->e_data1 = vg;
    56                         ep->e_data2 = ival;
     55                        ep->e_data1 = (int8_t)vg;
     56                        ep->e_data2 = (int8_t)ival;
    5757                        ep->e_time  = t_cur;
    5858                        p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
     
    9999        (void)n;
    100100
    101         ebuf[0] = k;
     101        ebuf[0] = (int8_t)k;
    102102
    103103        if (v_regs[5] & 0x0180)
     
    135135
    136136        val1 = val / 100;
    137         ebuf[4] = (val - (val1 * 100)) / 10;
     137        ebuf[4] = (int8_t)((val - (val1 * 100)) / 10);
    138138        val2 = val1 / 10;
    139         ebuf[2] = val1 - (val2 * 10);
    140         ebuf[1] = val2;
     139        ebuf[2] = (int8_t)(val1 - (val2 * 10));
     140        ebuf[1] = (int8_t)val2;
    141141
    142142        ebflag = TRUE;
     
    183183
    184184                        ep->e_type  = EV_ANVL;
    185                         ep->e_data1 = vg;
     185                        ep->e_data1 = (int8_t)vg;
    186186                        ep->e_dn    = (struct s_entry *)((int32_t)val << 16);
    187187                        ep->e_time  = t_cur;
     
    223223
    224224        val1 = val / 100;
    225         buf[4] = '0' + ((val - (val1 * 100)) / 10);
     225        buf[4] = (int8_t)('0' + ((val - (val1 * 100)) / 10));
    226226        val2 = val1 / 10;
    227         buf[2] = '0' + (val1 - (val2 * 10));
    228         buf[1] = '0' + val2;
     227        buf[2] = (int8_t)('0' + (val1 - (val2 * 10)));
     228        buf[1] = (int8_t)('0' + val2);
    229229        buf[3] = '.';
    230230        buf[5] = '\0';
     
    255255                return(FAILURE);
    256256
    257         ebuf[ec] = k;
     257        ebuf[ec] = (int8_t)k;
    258258
    259259        if (ec EQ 0)
     
    355355        ec = stccol - cfetp->flcol;
    356356
    357         ebuf[ec] = k + '0';
     357        ebuf[ec] = (int8_t)(k + '0');
    358358
    359359        if (v_regs[5] & 0x0180)
Note: See TracChangeset for help on using the changeset viewer.