History

Fix read and write return types: now st_size_t, like the size inputs.

To support this change, turn on lots more compiler warnings, and fix all the warnings generated.

rrt committed 19 years ago

Commit 4d743c41 parent ce1f8f393 files · +875 −1236Browse files

Showing the changes to src/tx16w.c (1 of 93 files). Show all

Unified · Split

src/tx16w.c+8−17
@@ -74,7 +74,7 @@ static st_size_t writedone=0; · 73 unmodified lines
7474 * size and encoding of samples,
7575 * mono/stereo/quad.
7676 */
77−int st_txwstartread(ft_t ft)
77+static int st_txwstartread(ft_t ft)
7878 {
7979 int c;
8080 char filetype[7];
@@ -186,10 +186,10 @@ int st_txwstartread(ft_t ft) · 105 unmodified lines
186186 * Return number of samples read.
187187 */
188188
189−st_ssize_t st_txwread(ft_t ft, st_sample_t *buf, st_size_t len)
189+static st_size_t st_txwread(ft_t ft, st_sample_t *buf, st_size_t len)
190190 {
191191 txw_t sk = (txw_t) ft->priv;
192− int done = 0;
192+ st_size_t done = 0;
193193 unsigned char uc1,uc2,uc3;
194194 unsigned short s1,s2;
195195
@@ -236,16 +236,7 @@ st_ssize_t st_txwread(ft_t ft, st_sample_t *buf, st_size_t len) · 40 unmodified lines
236236 return done;
237237 }
238238
239−/*
240− * Do anything required when you stop reading samples.
241− * Don't close input file!
242− */
243−int st_txwstopread(ft_t ft)
244−{
245− return(ST_SUCCESS);
246−}
247−
248−int st_txwstartwrite(ft_t ft)
239+static int st_txwstartwrite(ft_t ft)
249240 {
250241 struct WaveHeader_ WH;
251242
@@ -276,9 +267,9 @@ int st_txwstartwrite(ft_t ft) · 24 unmodified lines
276267 return(ST_SUCCESS);
277268 }
278269
279−st_ssize_t st_txwwrite(ft_t ft, const st_sample_t *buf, st_size_t len)
270+static st_size_t st_txwwrite(ft_t ft, const st_sample_t *buf, st_size_t len)
280271 {
281− int i;
272+ st_size_t i;
282273 unsigned int w1,w2;
283274
284275 tx16w_len += len;
@@ -299,7 +290,7 @@ st_ssize_t st_txwwrite(ft_t ft, const st_sample_t *buf, st_size_t len) · 14 unmodified lines
299290 return(len);
300291 }
301292
302−int st_txwstopwrite(ft_t ft)
293+static int st_txwstopwrite(ft_t ft)
303294 {
304295 struct WaveHeader_ WH;
305296 int AttackLength, LoopLength, i;
@@ -388,7 +379,7 @@ static st_format_t st_txw_format = { · 82 unmodified lines
388379 0,
389380 st_txwstartread,
390381 st_txwread,
391− st_txwstopread,
382+ st_format_nothing,
392383 st_txwstartwrite,
393384 st_txwwrite,
394385 st_txwstopwrite,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t