*: change C-style prototypes, drop "(void)"
This commit is contained in:
parent
cd776ff1a8
commit
1c90b0c19d
@ -26,6 +26,7 @@ AudioFormat
|
|||||||
getOutputAudioFormat(AudioFormat inFormat);
|
getOutputAudioFormat(AudioFormat inFormat);
|
||||||
|
|
||||||
/* make sure initPlayerData is called before this function!! */
|
/* make sure initPlayerData is called before this function!! */
|
||||||
void initAudioConfig(void);
|
void
|
||||||
|
initAudioConfig();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
class EventLoop;
|
class EventLoop;
|
||||||
|
|
||||||
void
|
void
|
||||||
io_thread_init(void);
|
io_thread_init();
|
||||||
|
|
||||||
void
|
void
|
||||||
io_thread_start();
|
io_thread_start();
|
||||||
@ -36,7 +36,7 @@ io_thread_start();
|
|||||||
* only.
|
* only.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
io_thread_run(void);
|
io_thread_run();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ask the I/O thread to quit, but does not wait for it. Usually, you
|
* Ask the I/O thread to quit, but does not wait for it. Usually, you
|
||||||
@ -44,10 +44,10 @@ io_thread_run(void);
|
|||||||
* includes this.
|
* includes this.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
io_thread_quit(void);
|
io_thread_quit();
|
||||||
|
|
||||||
void
|
void
|
||||||
io_thread_deinit(void);
|
io_thread_deinit();
|
||||||
|
|
||||||
gcc_const
|
gcc_const
|
||||||
EventLoop &
|
EventLoop &
|
||||||
@ -58,6 +58,6 @@ io_thread_get();
|
|||||||
*/
|
*/
|
||||||
gcc_pure
|
gcc_pure
|
||||||
bool
|
bool
|
||||||
io_thread_inside(void);
|
io_thread_inside();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -78,13 +78,13 @@ idle_add(unsigned flags);
|
|||||||
* Atomically reads and resets the global idle flags value.
|
* Atomically reads and resets the global idle flags value.
|
||||||
*/
|
*/
|
||||||
unsigned
|
unsigned
|
||||||
idle_get(void);
|
idle_get();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get idle names
|
* Get idle names
|
||||||
*/
|
*/
|
||||||
const char*const*
|
const char*const*
|
||||||
idle_get_names(void);
|
idle_get_names();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse an idle name and return its mask. Returns 0 if the given
|
* Parse an idle name and return its mask. Returns 0 if the given
|
||||||
|
@ -37,10 +37,11 @@ bool
|
|||||||
log_init(bool verbose, bool use_stdout, Error &error);
|
log_init(bool verbose, bool use_stdout, Error &error);
|
||||||
|
|
||||||
void
|
void
|
||||||
log_deinit(void);
|
log_deinit();
|
||||||
|
|
||||||
void setup_log_output(bool use_stdout);
|
void setup_log_output(bool use_stdout);
|
||||||
|
|
||||||
int cycle_log_files(void);
|
int
|
||||||
|
cycle_log_files();
|
||||||
|
|
||||||
#endif /* LOG_H */
|
#endif /* LOG_H */
|
||||||
|
@ -61,7 +61,7 @@ win32_main(int argc, char *argv[]);
|
|||||||
* This function should be called just before entering main loop.
|
* This function should be called just before entering main loop.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
win32_app_started(void);
|
win32_app_started();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When running as a service reports to service control manager
|
* When running as a service reports to service control manager
|
||||||
@ -71,7 +71,7 @@ win32_app_started(void);
|
|||||||
* This function should be called just after leaving main loop.
|
* This function should be called just after leaving main loop.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
win32_app_stopping(void);
|
win32_app_stopping();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -36,7 +36,8 @@ class AllocatedPath;
|
|||||||
void
|
void
|
||||||
mapper_init(AllocatedPath &&playlist_dir);
|
mapper_init(AllocatedPath &&playlist_dir);
|
||||||
|
|
||||||
void mapper_finish(void);
|
void
|
||||||
|
mapper_finish();
|
||||||
|
|
||||||
#ifdef ENABLE_DATABASE
|
#ifdef ENABLE_DATABASE
|
||||||
|
|
||||||
@ -68,7 +69,7 @@ map_fs_to_utf8(Path path_fs);
|
|||||||
*/
|
*/
|
||||||
gcc_const
|
gcc_const
|
||||||
const AllocatedPath &
|
const AllocatedPath &
|
||||||
map_spl_path(void);
|
map_spl_path();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maps a playlist name (without the ".m3u" suffix) to a file system
|
* Maps a playlist name (without the ".m3u" suffix) to a file system
|
||||||
|
@ -28,8 +28,10 @@ static constexpr unsigned PERMISSION_ADMIN = 8;
|
|||||||
|
|
||||||
int getPermissionFromPassword(char const* password, unsigned* permission);
|
int getPermissionFromPassword(char const* password, unsigned* permission);
|
||||||
|
|
||||||
unsigned getDefaultPermissions(void);
|
unsigned
|
||||||
|
getDefaultPermissions();
|
||||||
|
|
||||||
void initPermissions(void);
|
void
|
||||||
|
initPermissions();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -36,7 +36,7 @@ extern bool playlist_saveAbsolutePaths;
|
|||||||
* Perform some global initialization, e.g. load configuration values.
|
* Perform some global initialization, e.g. load configuration values.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
spl_global_init(void);
|
spl_global_init();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether the specified string is a valid name for a
|
* Determines whether the specified string is a valid name for a
|
||||||
|
@ -29,14 +29,15 @@ extern float replay_gain_preamp;
|
|||||||
extern float replay_gain_missing_preamp;
|
extern float replay_gain_missing_preamp;
|
||||||
extern bool replay_gain_limit;
|
extern bool replay_gain_limit;
|
||||||
|
|
||||||
void replay_gain_global_init(void);
|
void
|
||||||
|
replay_gain_global_init();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current replay gain mode as a machine-readable string.
|
* Returns the current replay gain mode as a machine-readable string.
|
||||||
*/
|
*/
|
||||||
gcc_pure
|
gcc_pure
|
||||||
const char *
|
const char *
|
||||||
replay_gain_get_mode_string(void);
|
replay_gain_get_mode_string();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the replay gain mode, parsed from a string.
|
* Sets the replay gain mode, parsed from a string.
|
||||||
|
@ -22,7 +22,8 @@
|
|||||||
|
|
||||||
class Client;
|
class Client;
|
||||||
|
|
||||||
void stats_global_init(void);
|
void
|
||||||
|
stats_global_init();
|
||||||
|
|
||||||
void
|
void
|
||||||
stats_invalidate();
|
stats_invalidate();
|
||||||
|
@ -39,9 +39,11 @@ const ArchivePlugin *
|
|||||||
archive_plugin_from_name(const char *name);
|
archive_plugin_from_name(const char *name);
|
||||||
|
|
||||||
/* this is where we "load" all the "plugins" ;-) */
|
/* this is where we "load" all the "plugins" ;-) */
|
||||||
void archive_plugin_init_all(void);
|
void
|
||||||
|
archive_plugin_init_all();
|
||||||
|
|
||||||
/* this is where we "unload" all the "plugins" */
|
/* this is where we "unload" all the "plugins" */
|
||||||
void archive_plugin_deinit_all(void);
|
void
|
||||||
|
archive_plugin_deinit_all();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,13 +32,13 @@ struct ArchivePlugin {
|
|||||||
* have/need one this must false if there is an error and
|
* have/need one this must false if there is an error and
|
||||||
* true otherwise
|
* true otherwise
|
||||||
*/
|
*/
|
||||||
bool (*init)(void);
|
bool (*init)();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional, set this to nullptr if the archive plugin doesn't
|
* optional, set this to nullptr if the archive plugin doesn't
|
||||||
* have/need one
|
* have/need one
|
||||||
*/
|
*/
|
||||||
void (*finish)(void);
|
void (*finish)();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tryes to open archive file and associates handle with archive
|
* tryes to open archive file and associates handle with archive
|
||||||
|
@ -200,7 +200,8 @@ private:
|
|||||||
virtual void OnTimeout() override;
|
virtual void OnTimeout() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
void client_manager_init(void);
|
void
|
||||||
|
client_manager_init();
|
||||||
|
|
||||||
void
|
void
|
||||||
client_new(EventLoop &loop, Partition &partition,
|
client_new(EventLoop &loop, Partition &partition,
|
||||||
|
@ -257,7 +257,8 @@ handle_not_commands(Client &client, gcc_unused ConstBuffer<const char *> args)
|
|||||||
return CommandResult::OK;
|
return CommandResult::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void command_init(void)
|
void
|
||||||
|
command_init()
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
/* ensure that the command list is sorted */
|
/* ensure that the command list is sorted */
|
||||||
@ -266,7 +267,8 @@ void command_init(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void command_finish(void)
|
void
|
||||||
|
command_finish()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,9 +24,11 @@
|
|||||||
|
|
||||||
class Client;
|
class Client;
|
||||||
|
|
||||||
void command_init(void);
|
void
|
||||||
|
command_init();
|
||||||
|
|
||||||
void command_finish(void);
|
void
|
||||||
|
command_finish();
|
||||||
|
|
||||||
CommandResult
|
CommandResult
|
||||||
command_process(Client &client, unsigned num, char *line);
|
command_process(Client &client, unsigned num, char *line);
|
||||||
|
@ -29,14 +29,18 @@ class AllocatedPath;
|
|||||||
struct config_param;
|
struct config_param;
|
||||||
struct ConfigBlock;
|
struct ConfigBlock;
|
||||||
|
|
||||||
void config_global_init(void);
|
void
|
||||||
void config_global_finish(void);
|
config_global_init();
|
||||||
|
|
||||||
|
void
|
||||||
|
config_global_finish();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this function after all configuration has been evaluated. It
|
* Call this function after all configuration has been evaluated. It
|
||||||
* checks for unused parameters, and logs warnings.
|
* checks for unused parameters, and logs warnings.
|
||||||
*/
|
*/
|
||||||
void config_global_check(void);
|
void
|
||||||
|
config_global_check();
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ReadConfigFile(Path path, Error &error);
|
ReadConfigFile(Path path, Error &error);
|
||||||
|
@ -32,6 +32,6 @@ mpd_inotify_init(EventLoop &loop, Storage &storage, UpdateService &update,
|
|||||||
unsigned max_depth);
|
unsigned max_depth);
|
||||||
|
|
||||||
void
|
void
|
||||||
mpd_inotify_finish(void);
|
mpd_inotify_finish();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -34,10 +34,12 @@ const struct DecoderPlugin *
|
|||||||
decoder_plugin_from_name(const char *name);
|
decoder_plugin_from_name(const char *name);
|
||||||
|
|
||||||
/* this is where we "load" all the "plugins" ;-) */
|
/* this is where we "load" all the "plugins" ;-) */
|
||||||
void decoder_plugin_init_all(void);
|
void
|
||||||
|
decoder_plugin_init_all();
|
||||||
|
|
||||||
/* this is where we "unload" all the "plugins" */
|
/* this is where we "unload" all the "plugins" */
|
||||||
void decoder_plugin_deinit_all(void);
|
void
|
||||||
|
decoder_plugin_deinit_all();
|
||||||
|
|
||||||
template<typename F>
|
template<typename F>
|
||||||
static inline const DecoderPlugin *
|
static inline const DecoderPlugin *
|
||||||
|
@ -50,7 +50,7 @@ struct DecoderPlugin {
|
|||||||
* Deinitialize a decoder plugin which was initialized
|
* Deinitialize a decoder plugin which was initialized
|
||||||
* successfully. Optional method.
|
* successfully. Optional method.
|
||||||
*/
|
*/
|
||||||
void (*finish)(void);
|
void (*finish)();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode a stream (data read from an #InputStream object).
|
* Decode a stream (data read from an #InputStream object).
|
||||||
|
@ -33,7 +33,7 @@ class Filter;
|
|||||||
* Creates a new filter chain.
|
* Creates a new filter chain.
|
||||||
*/
|
*/
|
||||||
Filter *
|
Filter *
|
||||||
filter_chain_new(void);
|
filter_chain_new();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends a new filter at the end of the filter chain. You must call
|
* Appends a new filter at the end of the filter chain. You must call
|
||||||
|
@ -31,6 +31,7 @@ input_stream_global_init(Error &error);
|
|||||||
/**
|
/**
|
||||||
* Deinitializes this library and all #InputStream implementations.
|
* Deinitializes this library and all #InputStream implementations.
|
||||||
*/
|
*/
|
||||||
void input_stream_global_finish(void);
|
void
|
||||||
|
input_stream_global_finish();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -75,7 +75,7 @@ struct InputPlugin {
|
|||||||
* Global deinitialization. Called once before MPD shuts
|
* Global deinitialization. Called once before MPD shuts
|
||||||
* down (only if init() has returned true).
|
* down (only if init() has returned true).
|
||||||
*/
|
*/
|
||||||
void (*finish)(void);
|
void (*finish)();
|
||||||
|
|
||||||
InputStream *(*open)(const char *uri,
|
InputStream *(*open)(const char *uri,
|
||||||
Mutex &mutex, Cond &cond,
|
Mutex &mutex, Cond &cond,
|
||||||
|
@ -49,6 +49,6 @@ save_sw_volume_state(BufferedOutputStream &os);
|
|||||||
*/
|
*/
|
||||||
gcc_pure
|
gcc_pure
|
||||||
unsigned
|
unsigned
|
||||||
sw_volume_state_get_hash(void);
|
sw_volume_state_get_hash();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,7 +44,7 @@ struct AudioOutputPlugin {
|
|||||||
* Test if this plugin can provide a default output, in case
|
* Test if this plugin can provide a default output, in case
|
||||||
* none has been configured. This method is optional.
|
* none has been configured. This method is optional.
|
||||||
*/
|
*/
|
||||||
bool (*test_default_device)(void);
|
bool (*test_default_device)();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure and initialize the device, but do not open it
|
* Configure and initialize the device, but do not open it
|
||||||
|
@ -41,6 +41,6 @@ audio_output_state_save(BufferedOutputStream &os,
|
|||||||
* whether the state has changed and the state file should be saved.
|
* whether the state has changed and the state file should be saved.
|
||||||
*/
|
*/
|
||||||
unsigned
|
unsigned
|
||||||
audio_output_state_get_version(void);
|
audio_output_state_get_version();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,7 +44,7 @@ struct playlist_plugin {
|
|||||||
* Deinitialize a plugin which was initialized successfully.
|
* Deinitialize a plugin which was initialized successfully.
|
||||||
* Optional method.
|
* Optional method.
|
||||||
*/
|
*/
|
||||||
void (*finish)(void);
|
void (*finish)();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens the playlist on the specified URI. This URI has
|
* Opens the playlist on the specified URI. This URI has
|
||||||
|
@ -37,13 +37,13 @@ extern const struct playlist_plugin *const playlist_plugins[];
|
|||||||
* Initializes all playlist plugins.
|
* Initializes all playlist plugins.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
playlist_list_global_init(void);
|
playlist_list_global_init();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deinitializes all playlist plugins.
|
* Deinitializes all playlist plugins.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
playlist_list_global_finish(void);
|
playlist_list_global_finish();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a playlist by its URI.
|
* Opens a playlist by its URI.
|
||||||
|
@ -33,10 +33,10 @@ daemonize_init(const char *user, const char *group, AllocatedPath &&pidfile)
|
|||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
void
|
void
|
||||||
daemonize_finish(void);
|
daemonize_finish();
|
||||||
#else
|
#else
|
||||||
static inline void
|
static inline void
|
||||||
daemonize_finish(void)
|
daemonize_finish()
|
||||||
{ /* nop */ }
|
{ /* nop */ }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -46,11 +46,11 @@ daemonize_finish(void)
|
|||||||
*/
|
*/
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
void
|
void
|
||||||
daemonize_kill(void);
|
daemonize_kill();
|
||||||
#else
|
#else
|
||||||
#include "system/FatalError.hxx"
|
#include "system/FatalError.hxx"
|
||||||
static inline void
|
static inline void
|
||||||
daemonize_kill(void)
|
daemonize_kill()
|
||||||
{
|
{
|
||||||
FatalError("--kill is not available on WIN32");
|
FatalError("--kill is not available on WIN32");
|
||||||
}
|
}
|
||||||
@ -61,10 +61,10 @@ daemonize_kill(void)
|
|||||||
*/
|
*/
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
void
|
void
|
||||||
daemonize_close_stdin(void);
|
daemonize_close_stdin();
|
||||||
#else
|
#else
|
||||||
static inline void
|
static inline void
|
||||||
daemonize_close_stdin(void) {}
|
daemonize_close_stdin() {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,10 +72,10 @@ daemonize_close_stdin(void) {}
|
|||||||
*/
|
*/
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
void
|
void
|
||||||
daemonize_set_user(void);
|
daemonize_set_user();
|
||||||
#else
|
#else
|
||||||
static inline void
|
static inline void
|
||||||
daemonize_set_user(void)
|
daemonize_set_user()
|
||||||
{ /* nop */ }
|
{ /* nop */ }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user