diff options
author | 2016-10-22 13:13:17 +0200 | |
---|---|---|
committer | 2016-10-22 13:13:17 +0200 | |
commit | ddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch) | |
tree | a70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/lib/formats/mz_cas.cpp | |
parent | 333bff8de64dfaeb98134000412796b4fdef970b (diff) |
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/lib/formats/mz_cas.cpp')
-rw-r--r-- | src/lib/formats/mz_cas.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/formats/mz_cas.cpp b/src/lib/formats/mz_cas.cpp index 1fb9d6c1577..cfcf9f36ed8 100644 --- a/src/lib/formats/mz_cas.cpp +++ b/src/lib/formats/mz_cas.cpp @@ -36,7 +36,7 @@ #define STM_0 20 #define STM_L 1 -static int fill_wave_1(INT16 *buffer, int offs) +static int fill_wave_1(int16_t *buffer, int offs) { buffer[offs++] = HI; buffer[offs++] = HI; @@ -45,14 +45,14 @@ static int fill_wave_1(INT16 *buffer, int offs) return LONG_PULSE; } -static int fill_wave_0(INT16 *buffer, int offs) +static int fill_wave_0(int16_t *buffer, int offs) { buffer[offs++] = HI; buffer[offs++] = LO; return SHORT_PULSE; } -static int fill_wave_b(INT16 *buffer, int offs, int byte) +static int fill_wave_b(int16_t *buffer, int offs, int byte) { int i, count = 0; @@ -69,10 +69,10 @@ static int fill_wave_b(INT16 *buffer, int offs, int byte) return count; } -static int fill_wave(INT16 *buffer, int length, UINT8 *code) +static int fill_wave(int16_t *buffer, int length, uint8_t *code) { - static INT16 *beg; - static UINT16 csum = 0; + static int16_t *beg; + static uint16_t csum = 0; static int header = 1, bytecount = 0; int count = 0; @@ -123,7 +123,7 @@ static int fill_wave(INT16 *buffer, int length, UINT8 *code) if( code == CODE_TRAILER ) { int i, file_length; - INT16 *end = buffer; + int16_t *end = buffer; /* is there insufficient space for the CHKF? */ if( count + 2 * BYTE_SAMPLES > length ) @@ -145,12 +145,12 @@ static int fill_wave(INT16 *buffer, int length, UINT8 *code) for (i = 0; i < 256; i++) count += fill_wave_0(buffer, count); - file_length = (int)(end - beg) / sizeof(INT16); + file_length = (int)(end - beg) / sizeof(int16_t); /* is there insufficient space for the FILEC ? */ if( count + file_length > length ) return -1; LOG(1,"mz700_fill_wave",("FILEC %d samples\n", file_length)); - memcpy(buffer + count, beg, file_length * sizeof(INT16)); + memcpy(buffer + count, beg, file_length * sizeof(int16_t)); count += file_length; /* is there insufficient space for the CHKF ? */ @@ -177,7 +177,7 @@ static int fill_wave(INT16 *buffer, int length, UINT8 *code) if( header == 1 && bytecount == 128 ) { int i, hdr_length; - INT16 *end = buffer; + int16_t *end = buffer; /* is there insufficient space for the CHKH ? */ if( count + 2 * BYTE_SAMPLES > length ) @@ -199,12 +199,12 @@ static int fill_wave(INT16 *buffer, int length, UINT8 *code) for (i = 0; i < 256; i++) count += fill_wave_0(buffer, count); - hdr_length = (int)(end - beg) / sizeof(INT16); + hdr_length = (int)(end - beg) / sizeof(int16_t); /* is there insufficient space for the HDRC ? */ if( count + hdr_length > length ) return -1; LOG(1,"mz700_fill_wave",("HDRC %d samples\n", hdr_length)); - memcpy(buffer + count, beg, hdr_length * sizeof(INT16)); + memcpy(buffer + count, beg, hdr_length * sizeof(int16_t)); count += hdr_length; /* is there insufficient space for CHKH ? */ |