Update usage of check_log_buffer_or_die().

This commit is contained in:
Erik de Castro Lopo 2004-05-21 00:37:31 +00:00
parent b164e152cf
commit 919e5d2a56
12 changed files with 32 additions and 32 deletions

View File

@ -128,7 +128,7 @@ rw_test (const char *filename)
{ printf ("\n\nLine %d : sf_open SFM_READ failed : %s\n\n", __LINE__, sf_strerror (NULL)) ;
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
sf_close (file) ;
/* Now open read/write and close the file. */
@ -136,7 +136,7 @@ rw_test (const char *filename)
{ printf ("\n\nLine %d : sf_open SFM_RDWR failed : %s\n\n", __LINE__, sf_strerror (NULL)) ;
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
sf_close (file) ;
/* Open again as read only again and fill in a new SF_INFO struct. */
@ -145,7 +145,7 @@ rw_test (const char *filename)
{ printf ("\n\nLine %d : sf_open SFM_RDWR failed : %s\n\n", __LINE__, sf_strerror (NULL)) ;
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
sf_close (file) ;
/* Now compare the two. */

View File

@ -78,7 +78,7 @@ main (void)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if (sf_read_raw (file, alaw_buffer, BUFFER_SIZE) != BUFFER_SIZE)
{ printf ("sf_read_raw : ") ;
@ -122,7 +122,7 @@ main (void)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if (sf_read_short (file, short_buffer, 256) != 256)
{ printf ("sf_read_short : ") ;

View File

@ -132,7 +132,7 @@ lcomp_test_int (const char *str, const char *filename, int filetype, double marg
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if ((k = sf_readf_int (file, data, datalen)) != datalen)
{ printf ("Line %d: short read (%d should be %ld).\n", __LINE__, k, datalen) ;

View File

@ -198,7 +198,7 @@ float_scaled_test (const char *filename, int allow_exit, int replace_float, int
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_read_float_or_die (file, 0, float_test, DFT_DATA_LENGTH, __LINE__) ;
@ -259,7 +259,7 @@ double_scaled_test (const char *filename, int allow_exit, int replace_float, int
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_read_double_or_die (file, 0, test_data, DFT_DATA_LENGTH, __LINE__) ;

View File

@ -97,7 +97,7 @@ main (void)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if ((k = sf_read_short (file, buffer, BUFFER_SIZE)) != BUFFER_SIZE)
{ printf ("Line %d: short read (%d).\n", __LINE__, k) ;

View File

@ -500,7 +500,7 @@ lcomp_test_short (const char *filename, int filetype, int channels, double margi
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if ((k = sf_readf_short (file, data, datalen)) != datalen)
{ printf ("Line %d: short read (%d should be %ld).\n", __LINE__, k, datalen) ;
@ -707,7 +707,7 @@ lcomp_test_int (const char *filename, int filetype, int channels, double margin)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if ((k = sf_readf_int (file, data, datalen)) != datalen)
{ printf ("Line %d: short read (%d should be %ld).\n", __LINE__, k, datalen) ;
@ -914,7 +914,7 @@ lcomp_test_float (const char *filename, int filetype, int channels, double margi
sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
@ -1123,7 +1123,7 @@ lcomp_test_double (const char *filename, int filetype, int channels, double marg
sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
@ -1333,7 +1333,7 @@ channels = 1 ;
sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if ((k = sf_read_short (file, data, datalen)) != datalen)
{ printf ("Line %d: short read (%d should be %ld).\n", __LINE__, k, datalen) ;
@ -1538,7 +1538,7 @@ channels = 1 ;
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if ((k = sf_readf_int (file, data, datalen)) != datalen)
{ printf ("int read (%d).\n", k) ;
@ -1751,7 +1751,7 @@ printf ("** fix this ** ") ;
sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if ((k = sf_read_float (file, data, datalen)) != datalen)
{ printf ("int read (%d).\n", k) ;
@ -1956,7 +1956,7 @@ channels = 1 ;
sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if ((k = sf_read_double (file, data, datalen)) != datalen)
{ printf ("int read (%d).\n", k) ;

View File

@ -178,7 +178,7 @@ pcm_test_[+ (get "name") +] (const char *filename, int filetype, int hash)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_read_short_or_die (file, 0, short_in, items, __LINE__) ;
@ -240,7 +240,7 @@ pcm_test_[+ (get "name") +] (const char *filename, int filetype, int hash)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_read_int_or_die (file, 0, int_in, items, __LINE__) ;
@ -302,7 +302,7 @@ pcm_test_[+ (get "name") +] (const char *filename, int filetype, int hash)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
@ -366,7 +366,7 @@ pcm_test_[+ (get "name") +] (const char *filename, int filetype, int hash)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
@ -456,7 +456,7 @@ pcm_test_float (const char *filename, int filetype, int hash, int replace_float)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_read_double_or_die (file, 0, data, items, __LINE__) ;
@ -580,7 +580,7 @@ pcm_test_float (const char *filename, int filetype, int hash, int replace_float)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_readf_double_or_die (file, 0, data, frames, __LINE__) ;
for (sign = -1, k = 0 ; k < items ; k++)
@ -719,7 +719,7 @@ pcm_test_double (const char *filename, int filetype, int hash, int replace_float
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_read_double_or_die (file, 0, data, items, __LINE__) ;
@ -853,7 +853,7 @@ pcm_test_double (const char *filename, int filetype, int hash, int replace_float
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_readf_double_or_die (file, 0, data, frames, __LINE__) ;

View File

@ -83,7 +83,7 @@ raw_offset_test (const char *filename, int typeminor)
sf_close (sndfile) ;
sndfile = test_open_file_or_die (filename, SFM_READ, &sfinfo, __LINE__) ;
check_log_buffer_or_die (sndfile) ;
check_log_buffer_or_die (sndfile, __LINE__) ;
if (abs (BUFFER_LEN - sfinfo.frames) > 1)
{ printf ("\n\nLine %d : Incorrect sample count (%ld should be %d)\n", __LINE__, SF_COUNT_TO_LONG (sfinfo.frames), BUFFER_LEN) ;

View File

@ -147,7 +147,7 @@ main (void)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_read_[+ (get "type_name") +]_or_die (file, 0, data_in, HALF_BUFFER_SIZE, __LINE__) ;
sf_command (file, SFC_SET_NORM_[+ (get "upper_name") +], NULL, SF_FALSE) ;

View File

@ -135,7 +135,7 @@ string_test (const char *filename, int typemajor)
file = test_open_file_or_die (filename, SFM_READ, &sfinfo, __LINE__) ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if (sfinfo.frames != BUFFER_LEN)
{ printf ("***** Bad frame count %d (should be %d)\n\n", (int) sfinfo.frames, BUFFER_LEN) ;

View File

@ -78,7 +78,7 @@ main (void)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if (sf_read_raw (file, ulaw_buffer, BUFFER_SIZE) != BUFFER_SIZE)
{ printf ("sf_read_raw : ") ;
@ -122,7 +122,7 @@ main (void)
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
if (sf_read_short (file, short_buffer, 256) != 256)
{ printf ("sf_read_short : ") ;

View File

@ -388,7 +388,7 @@ pcm_test_[+ (get "type_name") +] (const char *filename, int filetype, int long_f
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_read_[+ (get "data_type") +]_or_die (file, 0, test, items, __LINE__) ;
for (k = 0 ; k < items ; k++)
@ -652,7 +652,7 @@ pcm_test_[+ (get "type_name") +] (const char *filename, int filetype, int long_f
exit (1) ;
} ;
check_log_buffer_or_die (file) ;
check_log_buffer_or_die (file, __LINE__) ;
test_readf_[+ (get "data_type") +]_or_die (file, 0, test, frames, __LINE__) ;
for (k = 0 ; k < items ; k++)