Changeset 298f0b4 in buchla-68k for ram/libdsp.c
- Timestamp:
- 07/14/2017 01:45:36 PM (7 years ago)
- Branches:
- master
- Children:
- 7d4cf30
- Parents:
- 33b5477
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/libdsp.c
r33b5477 r298f0b4 235 235 */ 236 236 237 int32_t chksum(int8_t *area, int32_t len) 238 { 239 register int32_t cs, i; 240 237 int32_t chksum(void *area, int32_t len) 238 { 239 uint8_t *area8; 240 int32_t cs, i; 241 242 area8 = area; 241 243 cs = 0L; 242 244 243 245 for (i = 0; i < len; i++) 244 cs += 0x000000FFL & *area ++;246 cs += 0x000000FFL & *area8++; 245 247 246 248 return(cs); … … 306 308 */ 307 309 308 int16_t wr_ec(FILE *fp, int8_t *from, int32_t len) 309 { 310 register int32_t count; 311 register int8_t c; 310 int16_t wr_ec(FILE *fp, void *from, int32_t len) 311 { 312 uint8_t *from8, c; 313 int32_t count; 314 315 from8 = from; 316 312 317 for (count = 0; count < len; count++) { 313 318 314 319 errno = 0; 315 c = *from ++;320 c = *from8++; 316 321 317 322 if (EOF EQ putc(c, fp)) { … … 346 351 */ 347 352 348 int16_t rd_ec(FILE *fp, int8_t *to, int32_t len) 349 { 350 register int32_t count; 351 register int16_t c; 353 int16_t rd_ec(FILE *fp, void *to, int32_t len) 354 { 355 uint8_t *to8; 356 int32_t count; 357 int16_t c; 358 359 to8 = to; 352 360 353 361 for (count = 0; count < len; count++) { … … 368 376 } else { 369 377 370 *to ++ =c;378 *to8++ = (uint8_t)c; 371 379 372 380 #if DEBUGRE
Note:
See TracChangeset
for help on using the changeset viewer.