git ssb

0+

kode54 / syntrax-c



Commit 43f8ff7a03fe81107d8117541a266c88d8288170

Replaced ssize_t with long. This type is part of POSIX, not C standard.

anonymous authored on 1/2/2016, 10:02:15 AM
Christopher Snowhill committed on 6/13/2018, 12:10:58 AM
Parent: 3aa8a437591202761828240a5064926d5acf6a6b

Files changed

src/syntrax/file.cchanged
src/syntrax/file.cView
@@ -53,9 +53,9 @@
5353 (((const uint8_t*)p)[2]) * 0x10000 +
5454 (((const uint8_t*)p)[3]) * 0x1000000;
5555 }
5656
57-static ssize_t File_readHeader(SongHeader *h, const uint8_t *buffer, size_t size)
57+static long File_readHeader(SongHeader *h, const uint8_t *buffer, size_t size)
5858 {
5959 if (size < 52) return -1;
6060
6161 h->version = get_le16(buffer);
@@ -83,9 +83,9 @@
8383
8484 return 52;
8585 }
8686
87-static ssize_t File_readSubSong(Subsong *subSong, const uint8_t *buffer, size_t size)
87+static long File_readSubSong(Subsong *subSong, const uint8_t *buffer, size_t size)
8888 {
8989 int i, j;
9090
9191 if (size < 16564) return -1;
@@ -134,9 +134,9 @@
134134
135135 return 16564;
136136 }
137137
138-ssize_t File_readRow(Row *r, const uint8_t *buffer, size_t size)
138+long File_readRow(Row *r, const uint8_t *buffer, size_t size)
139139 {
140140 if (size < 5) return -1;
141141
142142 r->note = buffer[0];
@@ -147,9 +147,9 @@
147147
148148 return 5;
149149 }
150150
151-static ssize_t File_readInstrumentEffect(InstrumentEffect *effect, const uint8_t *buffer, size_t size)
151+static long File_readInstrumentEffect(InstrumentEffect *effect, const uint8_t *buffer, size_t size)
152152 {
153153 if (size < 40) return -1;
154154
155155 effect->destWave = get_le32(buffer);
@@ -167,12 +167,12 @@
167167
168168 return 40;
169169 }
170170
171-static ssize_t File_readInstrument(Instrument *instr, const uint8_t *buffer, size_t size)
171+static long File_readInstrument(Instrument *instr, const uint8_t *buffer, size_t size)
172172 {
173173 int i, j;
174- ssize_t sizeRead;
174+ long sizeRead;
175175
176176 if (size < 8712) return -1;
177177
178178 instr->version = get_le16(buffer);
@@ -267,9 +267,9 @@
267267 Order *order;
268268 Row *row;
269269 Instrument *instr;
270270 Song *synSong;
271- ssize_t sizeRead;
271+ long sizeRead;
272272
273273 synSong = (Song *) calloc(1, sizeof(Song));
274274 if (!synSong) return NULL;
275275

Built with git-ssb-web