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 AMChristopher Snowhill committed on 6/13/2018, 12:10:58 AM
Parent: 3aa8a437591202761828240a5064926d5acf6a6b
Files changed
src/syntrax/file.c | changed |
src/syntrax/file.c | ||
---|---|---|
@@ -53,9 +53,9 @@ | ||
53 | 53 | (((const uint8_t*)p)[2]) * 0x10000 + |
54 | 54 | (((const uint8_t*)p)[3]) * 0x1000000; |
55 | 55 | } |
56 | 56 | |
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) | |
58 | 58 | { |
59 | 59 | if (size < 52) return -1; |
60 | 60 | |
61 | 61 | h->version = get_le16(buffer); |
@@ -83,9 +83,9 @@ | ||
83 | 83 | |
84 | 84 | return 52; |
85 | 85 | } |
86 | 86 | |
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) | |
88 | 88 | { |
89 | 89 | int i, j; |
90 | 90 | |
91 | 91 | if (size < 16564) return -1; |
@@ -134,9 +134,9 @@ | ||
134 | 134 | |
135 | 135 | return 16564; |
136 | 136 | } |
137 | 137 | |
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) | |
139 | 139 | { |
140 | 140 | if (size < 5) return -1; |
141 | 141 | |
142 | 142 | r->note = buffer[0]; |
@@ -147,9 +147,9 @@ | ||
147 | 147 | |
148 | 148 | return 5; |
149 | 149 | } |
150 | 150 | |
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) | |
152 | 152 | { |
153 | 153 | if (size < 40) return -1; |
154 | 154 | |
155 | 155 | effect->destWave = get_le32(buffer); |
@@ -167,12 +167,12 @@ | ||
167 | 167 | |
168 | 168 | return 40; |
169 | 169 | } |
170 | 170 | |
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) | |
172 | 172 | { |
173 | 173 | int i, j; |
174 | - ssize_t sizeRead; | |
174 | + long sizeRead; | |
175 | 175 | |
176 | 176 | if (size < 8712) return -1; |
177 | 177 | |
178 | 178 | instr->version = get_le16(buffer); |
@@ -267,9 +267,9 @@ | ||
267 | 267 | Order *order; |
268 | 268 | Row *row; |
269 | 269 | Instrument *instr; |
270 | 270 | Song *synSong; |
271 | - ssize_t sizeRead; | |
271 | + long sizeRead; | |
272 | 272 | |
273 | 273 | synSong = (Song *) calloc(1, sizeof(Song)); |
274 | 274 | if (!synSong) return NULL; |
275 | 275 |
Built with git-ssb-web