* \retval FLAC__Metadata_SimpleIterator*
* \c NULL if there was an error allocating memory, else the new instance.
*/
-FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new();
+FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(void);
/** Free an iterator instance. Deletes the object pointed to by \a iterator.
*
* \retval FLAC__Metadata_Chain*
* \c NULL if there was an error allocating memory, else the new instance.
*/
-FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new();
+FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new(void);
/** Free a chain instance. Deletes the object pointed to by \a chain.
*
* \retval FLAC__Metadata_Iterator*
* \c NULL if there was an error allocating memory, else the new instance.
*/
-FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new();
+FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new(void);
/** Free an iterator instance. Deletes the object pointed to by \a iterator.
*
* \retval FLAC__StreamMetadata_CueSheet_Track*
* \c NULL if there was an error allocating memory, else the new instance.
*/
-FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new();
+FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new(void);
/** Create a copy of an existing CUESHEET track object.
*
* \retval FLAC__StreamDecoder*
* \c NULL if there was an error allocating memory, else the new instance.
*/
-FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new();
+FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new(void);
/** Free a decoder instance. Deletes the object pointed to by \a decoder.
*
* \retval FLAC__StreamEncoder*
* \c NULL if there was an error allocating memory, else the new instance.
*/
-FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new();
+FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void);
/** Free an encoder instance. Deletes the object pointed to by \a encoder.
*
FLAC__bool grabbag__file_remove_file(const char *filename);
/* these will forcibly set stdin/stdout to binary mode (for OSes that require it) */
-FILE *grabbag__file_get_binary_stdin();
-FILE *grabbag__file_get_binary_stdout();
+FILE *grabbag__file_get_binary_stdin(void);
+FILE *grabbag__file_get_binary_stdout(void);
#ifdef __cplusplus
}
typedef enum { RAW, WAV, AIF, FLAC, OGGFLAC } FileFormat;
-static int do_it();
+static int do_it(void);
-static FLAC__bool init_options();
+static FLAC__bool init_options(void);
static int parse_options(int argc, char *argv[]);
static int parse_option(int short_option, const char *long_option, const char *option_argument);
-static void free_options();
+static void free_options(void);
static void add_compression_setting_bool(compression_setting_type_t type, FLAC__bool value);
static void add_compression_setting_string(compression_setting_type_t type, const char *value);
static void add_compression_setting_unsigned(compression_setting_type_t type, unsigned value);
static int usage_error(const char *message, ...);
-static void short_usage();
-static void show_version();
-static void show_help();
-static void show_explain();
+static void short_usage(void);
+static void show_version(void);
+static void show_help(void);
+static void show_explain(void);
static void format_mistake(const char *infilename, FileFormat wrong, FileFormat right);
static int encode_file(const char *infilename, FLAC__bool is_first_file, FLAC__bool is_last_file);
return retval;
}
-int do_it()
+int do_it(void)
{
int retval = 0;
return retval;
}
-FLAC__bool init_options()
+FLAC__bool init_options(void)
{
option_values.show_help = false;
option_values.show_explain = false;
return 0;
}
-void free_options()
+void free_options(void)
{
unsigned i;
if(0 != option_values.filenames) {
return 1;
}
-void show_version()
+void show_version(void)
{
printf("flac %s\n", FLAC__VERSION_STRING);
}
-static void usage_header()
+static void usage_header(void)
{
printf("===============================================================================\n");
printf("flac - Command-line FLAC encoder/decoder version %s\n", FLAC__VERSION_STRING);
printf("===============================================================================\n");
}
-static void usage_summary()
+static void usage_summary(void)
{
printf("Usage:\n");
printf("\n");
printf("\n");
}
-void short_usage()
+void short_usage(void)
{
usage_header();
printf("\n");
printf(" flac -t [INPUTFILE [...]]\n");
}
-void show_help()
+void show_help(void)
{
usage_header();
usage_summary();
printf(" --no-verify\n");
}
-void show_explain()
+void show_explain(void)
{
usage_header();
usage_summary();
*
***********************************************************************/
-FLAC__BitReader *FLAC__bitreader_new()
+FLAC__BitReader *FLAC__bitreader_new(void)
{
FLAC__BitReader *br = (FLAC__BitReader*)calloc(1, sizeof(FLAC__BitReader));
*
***********************************************************************/
-FLAC__BitWriter *FLAC__bitwriter_new()
+FLAC__BitWriter *FLAC__bitwriter_new(void)
{
FLAC__BitWriter *bw = (FLAC__BitWriter*)calloc(1, sizeof(FLAC__BitWriter));
/* note that calloc() sets all members to 0 for us */
/*
* construction, deletion, initialization, etc functions
*/
-FLAC__BitReader *FLAC__bitreader_new();
+FLAC__BitReader *FLAC__bitreader_new(void);
void FLAC__bitreader_delete(FLAC__BitReader *br);
FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__BitReaderReadCallback rcb, void *cd);
void FLAC__bitreader_free(FLAC__BitReader *br); /* does not 'free(br)' */
/*
* construction, deletion, initialization, etc functions
*/
-FLAC__BitWriter *FLAC__bitwriter_new();
+FLAC__BitWriter *FLAC__bitwriter_new(void);
void FLAC__bitwriter_delete(FLAC__BitWriter *bw);
FLAC__bool FLAC__bitwriter_init(FLAC__BitWriter *bw);
void FLAC__bitwriter_free(FLAC__BitWriter *bw); /* does not 'free(buffer)' */
#ifndef FLAC__NO_ASM
#ifdef FLAC__CPU_IA32
#ifdef FLAC__HAS_NASM
-unsigned FLAC__cpu_info_asm_ia32();
-unsigned FLAC__cpu_info_extended_amd_asm_ia32();
-unsigned FLAC__cpu_info_sse_test_asm_ia32();
+unsigned FLAC__cpu_info_asm_ia32(void);
+unsigned FLAC__cpu_info_extended_amd_asm_ia32(void);
+unsigned FLAC__cpu_info_sse_test_asm_ia32(void);
#endif
#endif
#endif
};
-FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new()
+FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(void)
{
FLAC__Metadata_SimpleIterator *iterator = (FLAC__Metadata_SimpleIterator*)calloc(1, sizeof(FLAC__Metadata_SimpleIterator));
};
-static FLAC__Metadata_Node *node_new_()
+static FLAC__Metadata_Node *node_new_(void)
{
return (FLAC__Metadata_Node*)calloc(1, sizeof(FLAC__Metadata_Node));
}
return true;
}
-FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new()
+FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new(void)
{
FLAC__Metadata_Chain *chain = (FLAC__Metadata_Chain*)calloc(1, sizeof(FLAC__Metadata_Chain));
}
-FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new()
+FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new(void)
{
FLAC__Metadata_Iterator *iterator = (FLAC__Metadata_Iterator*)calloc(1, sizeof(FLAC__Metadata_Iterator));
return ok? (int)matching : -1;
}
-FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new()
+FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new(void)
{
return (FLAC__StreamMetadata_CueSheet_Track*)calloc(1, sizeof(FLAC__StreamMetadata_CueSheet_Track));
}
***********************************************************************/
static void set_defaults_(FLAC__StreamDecoder *decoder);
-static FILE *get_binary_stdin_();
+static FILE *get_binary_stdin_(void);
static FLAC__bool allocate_output_(FLAC__StreamDecoder *decoder, unsigned size, unsigned channels);
static FLAC__bool has_id_filtered_(FLAC__StreamDecoder *decoder, FLAC__byte *id);
static FLAC__bool find_metadata_(FLAC__StreamDecoder *decoder);
* Class constructor/destructor
*
***********************************************************************/
-FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new()
+FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new(void)
{
FLAC__StreamDecoder *decoder;
unsigned i;
/*
* This will forcibly set stdin to binary mode (for OSes that require it)
*/
-FILE *get_binary_stdin_()
+FILE *get_binary_stdin_(void)
{
/* if something breaks here it is probably due to the presence or
* absence of an underscore before the identifiers 'setmode',
static FLAC__StreamEncoderSeekStatus file_seek_callback_(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data);
static FLAC__StreamEncoderTellStatus file_tell_callback_(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data);
static FLAC__StreamEncoderWriteStatus file_write_callback_(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data);
-static FILE *get_binary_stdout_();
+static FILE *get_binary_stdout_(void);
/***********************************************************************
* Class constructor/destructor
*
*/
-FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new()
+FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void)
{
FLAC__StreamEncoder *encoder;
unsigned i;
/*
* This will forcibly set stdout to binary mode (for OSes that require it)
*/
-FILE *get_binary_stdout_()
+FILE *get_binary_stdout_(void)
{
/* if something breaks here it is probably due to the presence or
* absence of an underscore before the identifiers 'setmode',
#include <stdlib.h>
#include <string.h>
-static void show_version();
+static void show_version(void);
static FLAC__bool do_major_operation(const CommandLineOptions *options);
static FLAC__bool do_major_operation_on_file(const char *filename, const CommandLineOptions *options);
static FLAC__bool do_major_operation__list(const char *filename, FLAC__Metadata_Chain *chain, const CommandLineOptions *options);
* local routines
*/
-void show_version()
+void show_version(void)
{
printf("metaflac %s\n", FLAC__VERSION_STRING);
}
* Prototypes *
**************/
-char *FLAC_plugin__charset_get_current();
+char *FLAC_plugin__charset_get_current(void);
char *FLAC_plugin__charset_convert_string(const char *string, char *from, char *to);
/* returns 1 for success, 0 for failure or no iconv */
gtk_widget_show_all(flac_configurewin);
}
-void FLAC_XMMS__aboutbox()
+void FLAC_XMMS__aboutbox(void)
{
static GtkWidget *about_window;
extern flac_config_t flac_cfg;
extern void FLAC_XMMS__configure(void);
-extern void FLAC_XMMS__aboutbox();
+extern void FLAC_XMMS__aboutbox(void);
#endif
free(utf8);
}
-static void show_tag()
+static void show_tag(void)
{
set_entry_tag(GTK_ENTRY(title_entry) , FLAC_plugin__tags_get_tag_utf8(tags_, "TITLE"));
set_entry_tag(GTK_ENTRY(artist_entry) , FLAC_plugin__tags_get_tag_utf8(tags_, "ARTIST"));
gtk_widget_destroy(window);
}
-static void show_file_info()
+static void show_file_info(void)
{
FLAC__StreamMetadata streaminfo;
struct stat _stat;
}
}
-static void show_replaygain()
+static void show_replaygain(void)
{
/* known limitation: If only one of gain and peak is set, neither will be shown. This is true for
* both track and album replaygain tags. Written so it will be easy to fix, with some trouble. */
DitherContext dither_context;
} stream_data_struct;
-static void FLAC_XMMS__init();
+static void FLAC_XMMS__init(void);
static int FLAC_XMMS__is_our_file(char *filename);
static void FLAC_XMMS__play_file(char *filename);
-static void FLAC_XMMS__stop();
+static void FLAC_XMMS__stop(void);
static void FLAC_XMMS__pause(short p);
static void FLAC_XMMS__seek(int time);
-static int FLAC_XMMS__get_time();
-static void FLAC_XMMS__cleanup();
+static int FLAC_XMMS__get_time(void);
+static void FLAC_XMMS__cleanup(void);
static void FLAC_XMMS__get_song_info(char *filename, char **title, int *length);
static void *play_loop_(void *arg);
static unsigned bitrate_history_[BITRATE_HIST_SIZE];
-InputPlugin *get_iplugin_info()
+InputPlugin *get_iplugin_info(void)
{
flac_ip.description = g_strdup_printf("Reference FLAC Player v%s", FLAC__VERSION_STRING);
return &flac_ip;
}
}
-static gchar* homedir()
+static gchar* homedir(void)
{
gchar *result;
char *env_home = getenv("HOME");
return 0 == strncasecmp(source, "http://", 7);
}
-void FLAC_XMMS__init()
+void FLAC_XMMS__init(void)
{
ConfigFile *cfg;
FLAC__uint32 test = 1;
pthread_create(&decode_thread_, NULL, play_loop_, NULL);
}
-void FLAC_XMMS__stop()
+void FLAC_XMMS__stop(void)
{
if(stream_data_.is_playing) {
stream_data_.is_playing = false;
}
}
-int FLAC_XMMS__get_time()
+int FLAC_XMMS__get_time(void)
{
if(audio_error_)
return -2;
return flac_ip.output->output_time();
}
-void FLAC_XMMS__cleanup()
+void FLAC_XMMS__cleanup(void)
{
safe_decoder_delete_(decoder_);
decoder_ = 0;
return grabbag__file_change_stats(filename, /*read_only=*/false) && 0 == unlink(filename);
}
-FILE *grabbag__file_get_binary_stdin()
+FILE *grabbag__file_get_binary_stdin(void)
{
/* if something breaks here it is probably due to the presence or
* absence of an underscore before the identifiers 'setmode',
return stdin;
}
-FILE *grabbag__file_get_binary_stdout()
+FILE *grabbag__file_get_binary_stdout(void)
{
/* if something breaks here it is probably due to the presence or
* absence of an underscore before the identifiers 'setmode',
* XORed values of both generators.
*/
-static unsigned int random_int_()
+static unsigned int random_int_(void)
{
static const unsigned char parity_[256] = {
0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
#define TOTAL_BITS(bw) ((bw)->words*sizeof(bwword)*8 + (bw)->bits)
-FLAC__bool test_bitwriter()
+FLAC__bool test_bitwriter(void)
{
FLAC__BitWriter *bw;
FLAC__bool ok;
#include "FLAC/ordinals.h"
-FLAC__bool test_bitwriter();
+FLAC__bool test_bitwriter(void);
#endif
return false;
}
-static void init_metadata_blocks_()
+static void init_metadata_blocks_(void)
{
mutils__init_metadata_blocks(&streaminfo_, &padding_, &seektable_, &application1_, &application2_, &vorbiscomment_, &cuesheet_, &picture_, &unknown_);
}
-static void free_metadata_blocks_()
+static void free_metadata_blocks_(void)
{
mutils__free_metadata_blocks(&streaminfo_, &padding_, &seektable_, &application1_, &application2_, &vorbiscomment_, &cuesheet_, &picture_, &unknown_);
}
return true;
}
-FLAC__bool test_decoders()
+FLAC__bool test_decoders(void)
{
FLAC__bool is_ogg = false;
#include "FLAC/ordinals.h"
-FLAC__bool test_decoders();
+FLAC__bool test_decoders(void);
#endif
return false;
}
-static void init_metadata_blocks_()
+static void init_metadata_blocks_(void)
{
mutils__init_metadata_blocks(&streaminfo_, &padding_, &seektable_, &application1_, &application2_, &vorbiscomment_, &cuesheet_, &picture_, &unknown_);
}
-static void free_metadata_blocks_()
+static void free_metadata_blocks_(void)
{
mutils__free_metadata_blocks(&streaminfo_, &padding_, &seektable_, &application1_, &application2_, &vorbiscomment_, &cuesheet_, &picture_, &unknown_);
}
return true;
}
-FLAC__bool test_encoders()
+FLAC__bool test_encoders(void)
{
FLAC__bool is_ogg = false;
#include "FLAC/ordinals.h"
-FLAC__bool test_encoders();
+FLAC__bool test_encoders(void);
#endif
{ 5, (const FLAC__byte*)"a=\xe1\xa5\x80", true }
};
-FLAC__bool test_format()
+FLAC__bool test_format(void)
{
unsigned i;
#include "FLAC/ordinals.h"
-FLAC__bool test_format();
+FLAC__bool test_format(void);
#endif
#include "metadata.h"
#include <stdio.h>
-extern FLAC__bool test_metadata_object();
-extern FLAC__bool test_metadata_file_manipulation();
+extern FLAC__bool test_metadata_object(void);
+extern FLAC__bool test_metadata_file_manipulation(void);
-FLAC__bool test_metadata()
+FLAC__bool test_metadata(void)
{
if(!test_metadata_object())
return false;
#include "FLAC/ordinals.h"
-FLAC__bool test_metadata();
+FLAC__bool test_metadata(void);
#endif
return true;
}
-static FLAC__bool test_level_0_()
+static FLAC__bool test_level_0_(void)
{
FLAC__StreamMetadata streaminfo;
FLAC__StreamMetadata *tags = 0;
return true;
}
-static FLAC__bool test_level_1_()
+static FLAC__bool test_level_1_(void)
{
FLAC__Metadata_SimpleIterator *iterator;
FLAC__StreamMetadata *block, *app, *padding;
return true;
}
-FLAC__bool test_metadata_file_manipulation()
+FLAC__bool test_metadata_file_manipulation(void)
{
printf("\n+++ libFLAC unit test: metadata manipulation\n\n");
block->length += len;
}
-FLAC__bool test_metadata_object()
+FLAC__bool test_metadata_object(void)
{
FLAC__StreamMetadata *block, *blockcopy, *vorbiscomment, *cuesheet, *picture;
FLAC__StreamMetadata_SeekPoint seekpoint_array[14];
}
/* a mono one-sample 16bps stream */
-static FLAC__bool generate_01()
+static FLAC__bool generate_01(void)
{
FILE *f;
FLAC__int16 x = -32768;
}
/* a stereo one-sample 16bps stream */
-static FLAC__bool generate_02()
+static FLAC__bool generate_02(void)
{
FILE *f;
FLAC__int16 xl = -32768, xr = 32767;
}
/* a mono five-sample 16bps stream */
-static FLAC__bool generate_03()
+static FLAC__bool generate_03(void)
{
FILE *f;
FLAC__int16 x[] = { -25, 0, 25, 50, 100 };
}
/* a stereo five-sample 16bps stream */
-static FLAC__bool generate_04()
+static FLAC__bool generate_04(void)
{
FILE *f;
FLAC__int16 x[] = { -25, 500, 0, 400, 25, 300, 50, 200, 100, 100 };
return false;
}
-static FLAC__bool generate_wackywavs()
+static FLAC__bool generate_wackywavs(void)
{
FILE *f;
FLAC__byte wav[] = {