- Timestamp:
- 11/11/2017 10:35:13 PM (7 years ago)
- Branches:
- master
- Children:
- f537c48
- Parents:
- 572daa7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/etioas.c
r572daa7 r5c977dd 59 59 if (E_NULL NE (ep = findev(p_cur, t_cur, EV_ASGN, -1, -1))) { 60 60 61 ep->e_data1 = ival;61 ep->e_data1 = (int8_t)ival; 62 62 63 63 } else if (E_NULL NE (ep = e_alc(E_SIZE2))) { 64 64 65 65 ep->e_type = EV_ASGN; 66 ep->e_data1 = ival;66 ep->e_data1 = (int8_t)ival; 67 67 ep->e_time = t_cur; 68 68 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd; … … 109 109 110 110 ec = stccol - cfetp->flcol; 111 ebuf[ec] = k + '0';111 ebuf[ec] = (int8_t)(k + '0'); 112 112 113 113 if (v_regs[5] & 0x0180) … … 135 135 (void)n; 136 136 137 ebuf[0] = '0' + curtun;137 ebuf[0] = (int8_t)('0' + curtun); 138 138 ebuf[1] = '\0'; 139 139 ebflag = TRUE; … … 163 163 if (E_NULL NE (ep = findev(p_cur, t_cur, EV_TUNE, -1, -1))) { 164 164 165 ep->e_data1 = ival;165 ep->e_data1 = (int8_t)ival; 166 166 167 167 } else if (E_NULL NE (ep = e_alc(E_SIZE2))) { 168 168 169 169 ep->e_type = EV_TUNE; 170 ep->e_data1 = ival;170 ep->e_data1 = (int8_t)ival; 171 171 ep->e_time = t_cur; 172 172 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd; … … 209 209 (void)n; 210 210 211 ebuf[0] = k + '0';211 ebuf[0] = (int8_t)(k + '0'); 212 212 213 213 if (v_regs[5] & 0x0180) … … 269 269 if (E_NULL NE (ep = findev(p_cur, t_cur, EV_TMPO, -1, -1))) { 270 270 271 ep->e_data1 = ival;271 ep->e_data1 = (int8_t)ival; 272 272 273 273 } else if (E_NULL NE (ep = e_alc(E_SIZE2))) { 274 274 275 275 ep->e_type = EV_TMPO; 276 ep->e_data1 = ival;276 ep->e_data1 = (int8_t)ival; 277 277 ep->e_time = t_cur; 278 278 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd; … … 320 320 321 321 ec = stccol - cfetp->flcol; 322 ebuf[ec] = k + '0';322 ebuf[ec] = (int8_t)(k + '0'); 323 323 324 324 if (v_regs[5] & 0x0180) … … 353 353 sf = 100L; 354 354 tt = fromfpu(curintp); 355 th = tt / sc;356 tl = ( tt - (th * sc)) / sf;355 th = (int16_t)(tt / sc); 356 tl = (int16_t)((tt - (th * sc)) / sf); 357 357 358 358 sprintf(ebuf, "%02d.%d", th, tl); … … 382 382 383 383 for (i = 0; i < 2; i++) /* convert from ASCII to binary */ 384 tmpval = (tmpval * 10) + ( ebuf[i] - '0');385 386 tmpval = ((tmpval * 10) + ( ebuf[3] - '0')) * 100;384 tmpval = (tmpval * 10) + (uint16_t)(ebuf[i] - '0'); 385 386 tmpval = ((tmpval * 10) + (uint16_t)(ebuf[3] - '0')) * 100; 387 387 388 388 if (tmpval > (uint16_t)64900) … … 398 398 if (E_NULL NE (ep = findev(p_cur, t_cur, EV_INTP, -1, -1))) { 399 399 400 ep->e_data1 = ( curintp >> 8);401 ep->e_data2 = 0x00FF & curintp;400 ep->e_data1 = (int8_t)(curintp >> 8); 401 ep->e_data2 = (int8_t)(0x00FF & curintp); 402 402 403 403 } else if (E_NULL NE (ep = e_alc(E_SIZE3))) { … … 405 405 ep->e_type = EV_INTP; 406 406 ep->e_time = t_cur; 407 ep->e_data1 = ( curintp >> 8);408 ep->e_data2 = 0x00FF & curintp;407 ep->e_data1 = (int8_t)(curintp >> 8); 408 ep->e_data2 = (int8_t)(0x00FF & curintp); 409 409 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd; 410 410 eh_ins(ep, EH_INTP); … … 434 434 sf = 100L; 435 435 tt = fromfpu(curintp); 436 th = tt / sc;437 tl = ( tt - (th * sc)) / sf;436 th = (int16_t)(tt / sc); 437 tl = (int16_t)((tt - (th * sc)) / sf); 438 438 439 439 sprintf(dspbuf, "%02d.%d", th, tl); /* convert to ASCII */ … … 469 469 return(FAILURE); 470 470 471 ebuf[ec] = k + '0';471 ebuf[ec] = (int8_t)(k + '0'); 472 472 ebuf[2] = '.'; 473 473 ebuf[4] = '\0'; 474 474 475 dspbuf[0] = k + '0';475 dspbuf[0] = (int8_t)(k + '0'); 476 476 dspbuf[1] = '\0'; 477 477
Note:
See TracChangeset
for help on using the changeset viewer.