Changeset 298f0b4 in buchla-68k for ram/libdsp.c


Ignore:
Timestamp:
07/14/2017 01:45:36 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
7d4cf30
Parents:
33b5477
Message:

Fewer incompatible pointers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/libdsp.c

    r33b5477 r298f0b4  
    235235*/
    236236
    237 int32_t chksum(int8_t *area, int32_t len)
    238 {
    239         register int32_t cs, i;
    240 
     237int32_t chksum(void *area, int32_t len)
     238{
     239        uint8_t *area8;
     240        int32_t cs, i;
     241
     242        area8 = area;
    241243        cs = 0L;
    242244
    243245        for (i = 0; i < len; i++)
    244                 cs += 0x000000FFL & *area++;
     246                cs += 0x000000FFL & *area8++;
    245247
    246248        return(cs);
     
    306308*/
    307309
    308 int16_t wr_ec(FILE *fp, int8_t *from, int32_t len)
    309 {
    310         register int32_t count;
    311         register int8_t c;
     310int16_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
    312317        for (count = 0; count < len; count++) {
    313318
    314319                errno = 0;
    315                 c  = *from++;
     320                c  = *from8++;
    316321
    317322                if (EOF EQ putc(c, fp)) {
     
    346351*/
    347352
    348 int16_t rd_ec(FILE *fp, int8_t *to, int32_t len)
    349 {
    350         register int32_t count;
    351         register int16_t c;
     353int16_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;
    352360
    353361        for (count = 0; count < len; count++) {
     
    368376                } else {
    369377
    370                         *to++ = c;
     378                        *to8++ = (uint8_t)c;
    371379
    372380#if     DEBUGRE
Note: See TracChangeset for help on using the changeset viewer.