* gtk_preferences.c: functions to handle the preferences dialog box.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_preferences.c,v 1.17 2002/03/26 17:33:37 lool Exp $
+ * $Id: gtk_preferences.c,v 1.18 2002/03/26 22:30:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
+ * Loïc Minier <lool@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
case MODULE_CONFIG_ITEM_STRING:
case MODULE_CONFIG_ITEM_FILE:
case MODULE_CONFIG_ITEM_PLUGIN:
- config_PutPszVariable( p_config->psz_name, p_config->psz_value );
+ config_PutPszVariable( p_config->psz_name,
+ *p_config->psz_value? p_config->psz_value : NULL );
break;
case MODULE_CONFIG_ITEM_INTEGER:
case MODULE_CONFIG_ITEM_BOOL:
* configuration.c management of the modules configuration
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.9 2002/03/26 22:02:32 gbazin Exp $
+ * $Id: configuration.c,v 1.10 2002/03/26 22:30:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
break;
default:
- if( !*psz_option_value )
- break; /* ignore empty option */
-
vlc_mutex_lock( p_module->p_config[i].p_lock );
/* free old string */
if( p_module->p_config[i].psz_value )
free( p_module->p_config[i].psz_value );
- p_module->p_config[i].psz_value =
- strdup( psz_option_value );
+ p_module->p_config[i].psz_value = *psz_option_value ?
+ strdup( psz_option_value ) : NULL;
vlc_mutex_unlock( p_module->p_config[i].p_lock );
* options used (ie. exported) by each module.
*****************************************************************************/
int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[],
- boolean_t b_ignore_errors )
+ boolean_t b_ignore_errors )
{
int i_cmd, i, i_index, i_longopts_size;
module_t *p_module;
if( ( p_tmp = getenv( "TMP" ) ) == NULL )
{
p_homedir = strdup( "/tmp" );
- }
+ }
else p_homedir = strdup( p_tmp );
intf_ErrMsg( "config error: unable to get home directory, "