From 1ffe05cc3798c12cc4c42e3f3de6fd0a2466eb69 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Wed, 27 Oct 2004 19:37:01 +0000 Subject: quick commit git-svn-id: https://svn.musicpd.org/mpd/branches/shank-rewrite-config@2359 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/conf.c | 80 +++++++------------------------------------------------------- 1 file changed, 8 insertions(+), 72 deletions(-) (limited to 'src') diff --git a/src/conf.c b/src/conf.c index 04ee50942..2ea161061 100644 --- a/src/conf.c +++ b/src/conf.c @@ -154,90 +154,26 @@ void initConf() { } int readConf(char * file) { - char * conf_strings[CONF_NUMBER_OF_PARAMS] = { - "port", - "music_directory", - "playlist_directory", - "log_file", - "error_file", - "connection_timeout", - "mixer_device", - "max_connections", - "max_playlist_length", - "buffer_before_play", - "max_command_list_size", - "max_output_buffer_size", - "ao_driver", - "ao_driver_options", - "save_absolute_paths_in_playlists", - "bind_to_address", - "mixer_type", - "state_file", - "user", - "db_file", - "log_level", - "mixer_control", - "audio_write_size", - "filesystem_charset", - "password", - "default_permissions", - "audio_buffer_size", - "replaygain", - "audio_output_format", - "http_proxy_host", - "http_proxy_port", - "http_proxy_user", - "http_proxy_password", - "replaygain_preamp", - "shout_host", - "shout_port", - "shout_password", - "shout_mount", - "shout_name", - "shout_user", - "shout_quality", - "id3v1_encoding", - "shout_format" - }; - - int conf_absolutePaths[CONF_NUMBER_OF_PATHS] = { - CONF_MUSIC_DIRECTORY, - CONF_PLAYLIST_DIRECTORY, - CONF_LOG_FILE, - CONF_ERROR_FILE, - CONF_STATE_FILE, - CONF_DB_FILE - }; - - int conf_required[CONF_NUMBER_OF_REQUIRED] = { - CONF_MUSIC_DIRECTORY, - CONF_PLAYLIST_DIRECTORY, - CONF_LOG_FILE, - CONF_ERROR_FILE, - CONF_PORT - }; - - short conf_allowCat[CONF_NUMBER_OF_ALLOW_CATS] = { - CONF_PASSWORD - }; - FILE * fp; char string[MAX_STRING_SIZE+1]; char ** array; int i; int numberOfArgs; - short allowCat[CONF_NUMBER_OF_PARAMS]; int count = 0; - for(i=0;i