5959#define SWAP_BE_WORD_TO_HOST (x ) ENDSWAP_32(x)
6060#endif
6161
62- #ifdef __WATCOMC__ /* see end of file for inline issue */
63- #define FLAC__bitwriter_write_zeroes FLAC__bitwriter_write_zeroes__inl_
64- #define FLAC__bitwriter_write_raw_uint32 FLAC__bitwriter_write_raw_uint32__inl_
65- #define FLAC__bitwriter_write_raw_int32 FLAC__bitwriter_write_raw_int32__inl_
66- #define FLAC__bitwriter_write_raw_uint64 FLAC__bitwriter_write_raw_uint64__inl_
67- #define FLAC__bitwriter_write_raw_uint32_little_endian FLAC__bitwriter_write_raw_uint32_little_endian__inl_
68- #define FLAC__bitwriter_write_byte_block FLAC__bitwriter_write_byte_block__inl_
69- #endif
70-
7162/*
7263 * The default capacity here doesn't matter too much. The buffer always grows
7364 * to hold whatever is written to it. Usually the encoder will stop adding at
@@ -277,7 +268,7 @@ void FLAC__bitwriter_release_buffer(FLAC__BitWriter *bw)
277268 (void )bw ;
278269}
279270
280- inline FLAC__bool FLAC__bitwriter_write_zeroes (FLAC__BitWriter * bw , unsigned bits )
271+ FLAC__bool FLAC__bitwriter_write_zeroes (FLAC__BitWriter * bw , unsigned bits )
281272{
282273 unsigned n ;
283274
@@ -315,7 +306,7 @@ inline FLAC__bool FLAC__bitwriter_write_zeroes(FLAC__BitWriter *bw, unsigned bit
315306 return true;
316307}
317308
318- inline FLAC__bool FLAC__bitwriter_write_raw_uint32 (FLAC__BitWriter * bw , FLAC__uint32 val , unsigned bits )
309+ FLAC__bool FLAC__bitwriter_write_raw_uint32 (FLAC__BitWriter * bw , FLAC__uint32 val , unsigned bits )
319310{
320311 register unsigned left ;
321312
@@ -354,7 +345,7 @@ inline FLAC__bool FLAC__bitwriter_write_raw_uint32(FLAC__BitWriter *bw, FLAC__ui
354345 return true;
355346}
356347
357- inline FLAC__bool FLAC__bitwriter_write_raw_int32 (FLAC__BitWriter * bw , FLAC__int32 val , unsigned bits )
348+ FLAC__bool FLAC__bitwriter_write_raw_int32 (FLAC__BitWriter * bw , FLAC__int32 val , unsigned bits )
358349{
359350 /* zero-out unused bits */
360351 if (bits < 32 )
@@ -363,7 +354,7 @@ inline FLAC__bool FLAC__bitwriter_write_raw_int32(FLAC__BitWriter *bw, FLAC__int
363354 return FLAC__bitwriter_write_raw_uint32 (bw , (FLAC__uint32 )val , bits );
364355}
365356
366- inline FLAC__bool FLAC__bitwriter_write_raw_uint64 (FLAC__BitWriter * bw , FLAC__uint64 val , unsigned bits )
357+ FLAC__bool FLAC__bitwriter_write_raw_uint64 (FLAC__BitWriter * bw , FLAC__uint64 val , unsigned bits )
367358{
368359 /* this could be a little faster but it's not used for much */
369360 if (bits > 32 ) {
@@ -375,7 +366,7 @@ inline FLAC__bool FLAC__bitwriter_write_raw_uint64(FLAC__BitWriter *bw, FLAC__ui
375366 return FLAC__bitwriter_write_raw_uint32 (bw , (FLAC__uint32 )val , bits );
376367}
377368
378- inline FLAC__bool FLAC__bitwriter_write_raw_uint32_little_endian (FLAC__BitWriter * bw , FLAC__uint32 val )
369+ FLAC__bool FLAC__bitwriter_write_raw_uint32_little_endian (FLAC__BitWriter * bw , FLAC__uint32 val )
379370{
380371 /* this doesn't need to be that fast as currently it is only used for vorbis comments */
381372
@@ -391,7 +382,7 @@ inline FLAC__bool FLAC__bitwriter_write_raw_uint32_little_endian(FLAC__BitWriter
391382 return true;
392383}
393384
394- inline FLAC__bool FLAC__bitwriter_write_byte_block (FLAC__BitWriter * bw , const FLAC__byte vals [], unsigned nvals )
385+ FLAC__bool FLAC__bitwriter_write_byte_block (FLAC__BitWriter * bw , const FLAC__byte vals [], unsigned nvals )
395386{
396387 unsigned i ;
397388
@@ -843,33 +834,4 @@ FLAC__bool FLAC__bitwriter_zero_pad_to_byte_boundary(FLAC__BitWriter *bw)
843834 return true;
844835}
845836
846- /* These functions a declared inline in this file but are also callable as
847- * externs from elsewhere.
848- * According to the C99 sepc, section 6.7.4, simply providing a function
849- * prototype in a header file without 'inline' and making the function inline
850- * in this file should be sufficient.
851- * Unfortunately, the Microsoft VS compiler doesn't pick them up externally. To
852- * fix that we add extern declarations here.
853- */
854- #ifdef __WATCOMC__ /* adding externs doesn't help with Watcom */
855- #undef FLAC__bitwriter_write_zeroes
856- #undef FLAC__bitwriter_write_raw_uint32
857- #undef FLAC__bitwriter_write_raw_int32
858- #undef FLAC__bitwriter_write_raw_uint64
859- #undef FLAC__bitwriter_write_raw_uint32_little_endian
860- #undef FLAC__bitwriter_write_byte_block
861- FLAC__bool FLAC__bitwriter_write_zeroes (FLAC__BitWriter * bw , unsigned bits ) { return FLAC__bitwriter_write_zeroes__inl_ (bw , bits ); }
862- FLAC__bool FLAC__bitwriter_write_raw_uint32 (FLAC__BitWriter * bw , FLAC__uint32 val , unsigned bits ) { return FLAC__bitwriter_write_raw_uint32__inl_ (bw , val , bits ); }
863- FLAC__bool FLAC__bitwriter_write_raw_int32 (FLAC__BitWriter * bw , FLAC__int32 val , unsigned bits ) { return FLAC__bitwriter_write_raw_int32__inl_ (bw , val , bits ); }
864- FLAC__bool FLAC__bitwriter_write_raw_uint64 (FLAC__BitWriter * bw , FLAC__uint64 val , unsigned bits ) { return FLAC__bitwriter_write_raw_uint64__inl_ (bw , val , bits ); }
865- FLAC__bool FLAC__bitwriter_write_raw_uint32_little_endian (FLAC__BitWriter * bw , FLAC__uint32 val ) { return FLAC__bitwriter_write_raw_uint32_little_endian__inl_ (bw , val ); }
866- FLAC__bool FLAC__bitwriter_write_byte_block (FLAC__BitWriter * bw , const FLAC__byte vals [], unsigned nvals ) { return FLAC__bitwriter_write_byte_block__inl_ (bw , vals , nvals ); }
867- #else
868- extern FLAC__bool FLAC__bitwriter_write_zeroes (FLAC__BitWriter * bw , unsigned bits );
869- extern FLAC__bool FLAC__bitwriter_write_raw_int32 (FLAC__BitWriter * bw , FLAC__int32 val , unsigned bits );
870- extern FLAC__bool FLAC__bitwriter_write_raw_uint64 (FLAC__BitWriter * bw , FLAC__uint64 val , unsigned bits );
871- extern FLAC__bool FLAC__bitwriter_write_raw_uint32_little_endian (FLAC__BitWriter * bw , FLAC__uint32 val );
872- extern FLAC__bool FLAC__bitwriter_write_byte_block (FLAC__BitWriter * bw , const FLAC__byte vals [], unsigned nvals );
873- #endif
874-
875837#endif /* FLAC_INCLUDE_ENCODER */
0 commit comments