* vlc_objects.h: vlc_object_t definition.
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: vlc_objects.h,v 1.14 2002/12/13 01:56:29 gbazin Exp $
+ * $Id: vlc_objects.h,v 1.15 2003/01/27 17:41:01 ipkiss Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
VLC_EXPORT( void *, __vlc_object_find, ( vlc_object_t *, int, int ) );
VLC_EXPORT( void, __vlc_object_yield, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
-VLC_EXPORT( vlc_list_t, __vlc_list_find, ( vlc_object_t *, int, int ) );
+VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) );
VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
#define vlc_object_create(a,b) \
* familiar.c : familiar plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: familiar.c,v 1.27 2003/01/17 18:19:11 jpsaman Exp $
+ * $Id: familiar.c,v 1.28 2003/01/27 17:41:01 ipkiss Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
GtkWidget *cbautoplay;
intf_thread_t *p_intf;
int i_index;
- vlc_list_t list = vlc_list_find( p_this, VLC_OBJECT_INTF, FIND_ANYWHERE );
+ vlc_list_t *p_list = vlc_list_find( p_this, VLC_OBJECT_INTF,
+ FIND_ANYWHERE );
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_intf = (intf_thread_t *)list.p_values[i_index].p_object ;
+ p_intf = (intf_thread_t *)p_list->p_values[i_index].p_object ;
if( strcmp( MODULE_STRING, p_intf->p_module->psz_object_name ) )
{
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( cbautoplay ),
p_intf->p_sys->b_autoplayfile );
}
- vlc_list_release( &list );
+ vlc_list_release( p_list );
}
/* following functions are local */
* display.c: Gtk+ tools for main interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: display.c,v 1.7 2003/01/20 20:07:06 fenrir Exp $
+ * $Id: display.c,v 1.8 2003/01/27 17:41:01 ipkiss Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
{
intf_thread_t *p_intf;
int i_index;
- vlc_list_t list = vlc_list_find( p_this, VLC_OBJECT_INTF,
- FIND_ANYWHERE );
+ vlc_list_t *p_list = vlc_list_find( p_this, VLC_OBJECT_INTF,
+ FIND_ANYWHERE );
vlc_bool_t b_enable = config_GetInt( p_this, "gnome-tooltips" );
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_intf = (intf_thread_t *)list.p_values[i_index].p_object ;
+ p_intf = (intf_thread_t *)p_list->p_values[i_index].p_object ;
if( strcmp( MODULE_STRING, p_intf->p_module->psz_object_name ) )
{
}
}
- vlc_list_release( &list );
+ vlc_list_release( p_list );
}
#ifdef MODULE_NAME_IS_gnome
GtkToolbar * p_toolbar;
intf_thread_t *p_intf;
int i_index;
- vlc_list_t list = vlc_list_find( p_this, VLC_OBJECT_INTF,
- FIND_ANYWHERE );
+ vlc_list_t *p_list = vlc_list_find( p_this, VLC_OBJECT_INTF,
+ FIND_ANYWHERE );
style = config_GetInt( p_this, "gnome-toolbartext" )
? GTK_TOOLBAR_BOTH
: GTK_TOOLBAR_ICONS;
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_intf = (intf_thread_t *)list.p_values[i_index].p_object ;
+ p_intf = (intf_thread_t *)p_list->p_values[i_index].p_object ;
if( strcmp( MODULE_STRING, p_intf->p_module->psz_object_name ) )
{
gtk_toolbar_set_style( p_toolbar, style );
}
- vlc_list_release( &list );
+ vlc_list_release( p_list );
}
#endif
* gtk_preferences.c: functions to handle the preferences dialog box.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: preferences.c,v 1.7 2003/01/06 00:37:30 garf Exp $
+ * $Id: preferences.c,v 1.8 2003/01/27 17:41:01 ipkiss Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Loïc Minier <lool@via.ecp.fr>
intf_thread_t *p_intf )
{
module_t *p_parser = NULL;
- vlc_list_t list;
+ vlc_list_t *p_list;
module_config_t *p_item;
int i_index;
/* Look for the selected module */
- list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( psz_module_name
&& !strcmp( psz_module_name, p_parser->psz_object_name ) )
}
}
- if( !p_parser || i_index == list.i_count )
+ if( !p_parser || i_index == p_list->i_count )
{
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return;
}
{
gchar * entry[2];
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( p_parser->psz_capability,
p_item->psz_type ) )
}
while( p_item->i_type != CONFIG_HINT_END && p_item++ );
- vlc_list_release( &list );
+ vlc_list_release( p_list );
#ifndef MODULE_NAME_IS_gnome
/* Now let's add the action buttons at the bottom of the page */
intf_thread_t *p_intf;
GtkWidget *config_button;
module_t *p_parser;
- vlc_list_t list;
+ vlc_list_t *p_list;
char *psz_name;
int i_index;
}
/* look for module 'psz_name' */
- list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( p_parser->psz_object_name, psz_name ) )
{
}
}
- vlc_list_release( &list );
+ vlc_list_release( p_list );
}
/****************************************************************************
* preferences.cpp: preferences window for the kde gui
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: preferences.cpp,v 1.10 2002/12/17 09:54:32 sam Exp $
+ * $Id: preferences.cpp,v 1.11 2003/01/27 17:41:01 ipkiss Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> Mon Aug 12 2002
*
"vlc preferences", true, false, "Save")
{
module_t *p_parser = NULL;
- vlc_list_t list;
+ vlc_list_t *p_list;
module_config_t *p_item;
int i_index;
QVBox *category_table = NULL;
this->p_intf = p_intf;
/* List all modules */
- list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
/* Look for the selected module */
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( psz_module_name
&& !strcmp( psz_module_name, p_parser->psz_object_name ) )
}
}
- if( !p_parser || i_index == list.i_count )
+ if( !p_parser || i_index == p_list->i_count )
{
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return;
}
/* build a list of available plugins */
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( p_parser->psz_capability,
p_item->psz_type ) )
}
while( p_item->i_type != CONFIG_HINT_END );
- vlc_list_release( &list );
+ vlc_list_release( p_list );
exec();
}
bool KPreferences::isConfigureable(QString module)
{
module_t *p_parser;
- vlc_list_t list;
+ vlc_list_t *p_list;
int i_index;
- list = vlc_list_find( this->p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( this->p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !module.compare( p_parser->psz_object_name ) )
{
bool ret = p_parser->i_config_items != 0;
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return ret;
}
}
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return false;
}
* prefs.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: prefs.m,v 1.8 2003/01/27 00:08:31 jlj Exp $
+ * $Id: prefs.m,v 1.9 2003/01/27 17:41:01 ipkiss Exp $
*
- * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
+ * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#import "prefs.h"
/*****************************************************************************
- * VLCPrefs implementation
+ * VLCPrefs implementation
*****************************************************************************/
@implementation VLCPrefs
{
p_intf = [NSApp getIntf];
- o_pref_panels = [[NSMutableDictionary alloc] init];
+ o_pref_panels = [[NSMutableDictionary alloc] init];
o_toolbars = [[NSMutableDictionary alloc] init];
o_scroll_views = [[NSMutableDictionary alloc] init];
o_panel_views = [[NSMutableDictionary alloc] init];
- (BOOL)hasPrefs:(NSString *)o_module_name
{
module_t *p_parser;
- vlc_list_t list;
+ vlc_list_t *p_list;
char *psz_module_name;
int i_index;
psz_module_name = (char *)[o_module_name lossyCString];
/* look for module */
- list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( p_parser->psz_object_name, psz_module_name ) )
{
BOOL b_has_prefs = p_parser->i_config_items != 0;
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return( b_has_prefs );
}
}
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return( NO );
}
int i_module_tag;
module_t *p_parser = NULL;
- vlc_list_t list;
+ vlc_list_t *p_list;
module_config_t *p_item;
char *psz_module_name;
int i_index;
NSView *o_panel_view; /* panel view */
NSToolbar *o_toolbar; /* panel toolbar */
NSMutableDictionary *o_tb_items; /* panel toolbar items */
- NSScrollView *o_scroll_view; /* panel scroll view */
+ NSScrollView *o_scroll_view; /* panel scroll view */
NSRect s_scroll_rc; /* panel scroll view rect */
NSMutableDictionary *o_views; /* panel scroll view docviews */
[o_panel center];
[o_panel makeKeyAndOrderFront: nil];
return;
- }
+ }
psz_module_name = (char *)[o_module_name lossyCString];
/* Look for the selected module */
- list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( psz_module_name
&& !strcmp( psz_module_name, p_parser->psz_object_name ) )
}
}
- if( !p_parser || i_index == list.i_count )
+ if( !p_parser || i_index == p_list->i_count )
{
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return;
}
backing: NSBackingStoreBuffered
defer: YES];
o_toolbar = [[NSToolbar alloc] initWithIdentifier: o_module_name];
- [o_panel setTitle: [NSString stringWithFormat: @"%@ (%@)",
+ [o_panel setTitle: [NSString stringWithFormat: @"%@ (%@)",
_NS("Preferences"), o_module_name]];
o_panel_view = [o_panel contentView];
- s_scroll_rc = s_panel_rc;
+ s_scroll_rc = s_panel_rc;
s_scroll_rc.size.height -= 55; s_scroll_rc.origin.y += 55;
o_scroll_view = [[NSScrollView alloc] initWithFrame: s_scroll_rc];
[o_scroll_views setObject: o_scroll_view forKey: o_module_name];
- [o_scroll_view setBorderType: NSGrooveBorder];
+ [o_scroll_view setBorderType: NSGrooveBorder];
[o_scroll_view setHasVerticalScroller: YES];
[o_scroll_view setDrawsBackground: NO];
[o_scroll_view setRulersVisible: YES];
i_module_tag = 3;
#define X_ORIGIN 20
-#define Y_ORIGIN (X_ORIGIN - 10)
+#define Y_ORIGIN (X_ORIGIN - 10)
#define CHECK_VIEW_HEIGHT \
{ \
NSToolbarItem *o_tbi;
o_label = [NSApp localizedString: p_item->psz_text];
- o_tbi = [[NSToolbarItem alloc] initWithItemIdentifier: o_label];
+ o_tbi = [[NSToolbarItem alloc] initWithItemIdentifier: o_label];
[o_tbi setImage: [NSImage imageNamed: @"NSApplicationIcon"]];
[o_tbi setLabel: o_label];
[o_tbi setTarget: self];
[o_tbi setAction: @selector(selectPrefView:)];
o_key = [NSString stringWithFormat: @"%02d %@",
- i_pos, o_label];
+ i_pos, o_label];
[o_tb_items setObject: o_tbi forKey: o_key];
s_vrc = s_scroll_rc; s_vrc.size.height -= 4;
if( i_pos == 0 )
{
- [o_scroll_view setDocumentView: o_view];
+ [o_scroll_view setDocumentView: o_view];
}
i_pos++;
[o_box setContentView: [o_cview autorelease]];
s_crc = [o_cview bounds];
- s_brc = NSMakeRect( 5, 10, 200, 30 );
+ s_brc = NSMakeRect( 5, 10, 200, 30 );
o_modules = [[NSPopUpButton alloc] initWithFrame: s_brc];
[o_modules setTag: i_module_tag++];
[o_modules setTarget: self];
[o_modules setAction: @selector(moduleSelected:)];
[o_modules setToolTip: [NSApp localizedString: p_item->psz_longtext]];
- [o_cview addSubview: [o_modules autorelease]];
+ [o_cview addSubview: [o_modules autorelease]];
- MODULE_BUTTON( o_btn_configure, _NS("Configure"),
+ MODULE_BUTTON( o_btn_configure, _NS("Configure"),
configureModule: );
- s_brc = NSMakeRect( 8, s_brc.origin.y + s_brc.size.height + 10,
- 194, 25 );
+ s_brc = NSMakeRect( 8, s_brc.origin.y + s_brc.size.height + 10,
+ 194, 25 );
o_text_field = [[VLCTextField alloc] initWithFrame: s_brc];
[o_text_field setTag: i_module_tag++];
[o_text_field setAlignment: NSLeftTextAlignment];
- CONTROL_CONFIG( o_text_field, o_module_name,
+ CONTROL_CONFIG( o_text_field, o_module_name,
CONFIG_ITEM_MODULE, p_item->psz_name );
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(configChanged:)
[o_cview addSubview: [o_text_field autorelease]];
s_brc.origin.x += 3;
- MODULE_BUTTON( o_btn_select, _NS("Select"),
+ MODULE_BUTTON( o_btn_select, _NS("Select"),
selectModule: );
[o_modules addItemWithTitle: _NS("None")];
/* build a list of available modules */
{
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( p_parser->psz_capability,
p_item->psz_type ) )
{
- NSString *o_object_name = [NSString
+ NSString *o_object_name = [NSString
stringWithCString: p_parser->psz_object_name];
[o_modules addItemWithTitle: o_object_name];
}
NSString *o_value =
[NSString stringWithCString: p_item->psz_value];
- [o_text_field setStringValue: o_value];
- [o_modules selectItemWithTitle: o_value];
- [o_btn_configure setEnabled: [self hasPrefs: o_value]];
+ [o_text_field setStringValue: o_value];
+ [o_modules selectItemWithTitle: o_value];
+ [o_btn_configure setEnabled: [self hasPrefs: o_value]];
}
else
{
CHECK_VIEW_HEIGHT;
o_combo_box = [[VLCComboBox alloc] initWithFrame: s_rc];
- CONTROL_CONFIG( o_combo_box, o_module_name,
+ CONTROL_CONFIG( o_combo_box, o_module_name,
CONFIG_ITEM_STRING, p_item->psz_name );
[o_combo_box setToolTip:
[NSApp localizedString: p_item->psz_longtext]];
object: o_combo_box];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(configChanged:)
- name: NSComboBoxSelectionDidChangeNotification
+ name: NSComboBoxSelectionDidChangeNotification
object: o_combo_box];
for( i=0; p_item->ppsz_list[i]; i++ )
{
[o_combo_box addItemWithObjectValue:
- [NSString stringWithCString: p_item->ppsz_list[i]]];
+ [NSString stringWithCString: p_item->ppsz_list[i]]];
}
- CONTROL_LABEL( p_item->psz_text );
+ CONTROL_LABEL( p_item->psz_text );
s_rc.origin.y += s_rc.size.height;
s_rc.origin.x = X_ORIGIN;
case CONFIG_ITEM_INTEGER:
{
- INPUT_FIELD_INTEGER( p_item->psz_name, p_item->psz_text, 70,
+ INPUT_FIELD_INTEGER( p_item->psz_name, p_item->psz_text, 70,
p_item->i_value, p_item->psz_longtext );
}
break;
o_btn_bool = [[VLCButton alloc] initWithFrame: s_rc];
[o_btn_bool setButtonType: NSSwitchButton];
[o_btn_bool setIntValue: p_item->i_value];
- [o_btn_bool setTitle:
+ [o_btn_bool setTitle:
[NSApp localizedString: p_item->psz_text]];
[o_btn_bool setToolTip:
[NSApp localizedString: p_item->psz_longtext]];
[o_btn_bool setTarget: self];
[o_btn_bool setAction: @selector(configChanged:)];
- CONTROL_CONFIG( o_btn_bool, o_module_name,
- CONFIG_ITEM_BOOL, p_item->psz_name );
+ CONTROL_CONFIG( o_btn_bool, o_module_name,
+ CONFIG_ITEM_BOOL, p_item->psz_name );
[o_view addSubview: [o_btn_bool autorelease]];
s_rc.origin.y += s_rc.size.height;
}
while( p_item->i_type != CONFIG_HINT_END && p_item++ );
- vlc_list_release( &list );
+ vlc_list_release( p_list );
[o_toolbars setObject: o_tb_items forKey: o_module_name];
[o_toolbar setDelegate: self];
s_rc.origin.y = s_panel_rc.origin.y + 14;
s_rc.size.height = 25; s_rc.size.width = 100;
s_rc.origin.x = s_panel_rc.size.width - s_rc.size.width - 14;
- DEF_PANEL_BUTTON( 0, _NS("OK"), clickedCancelOK: );
+ DEF_PANEL_BUTTON( 0, _NS("OK"), clickedCancelOK: );
[o_panel setDefaultButtonCell: [o_button cell]];
s_rc.origin.x -= s_rc.size.width;
o_view = [o_views objectForKey: [sender label]];
o_scroll_view = [o_scroll_views objectForKey: o_module_name];
- [o_scroll_view setDocumentView: o_view];
+ [o_scroll_view setDocumentView: o_view];
}
- (void)moduleSelected:(id)sender
NSString *o_module_name;
NSPopUpButton *o_modules;
- o_modules = [[sender superview] viewWithTag: [sender tag] - 1];
+ o_modules = [[sender superview] viewWithTag: [sender tag] - 1];
o_module_name = [o_modules titleOfSelectedItem];
[self createPrefPanel: o_module_name];
id o_vlc_config = [o_unknown isKindOfClass: [NSNotification class]] ?
[o_unknown object] : o_unknown;
- NSString *o_module_name = [o_vlc_config moduleName];
- NSPanel *o_pref_panel = [o_pref_panels objectForKey: o_module_name];
+ NSString *o_module_name = [o_vlc_config moduleName];
+ NSPanel *o_pref_panel = [o_pref_panels objectForKey: o_module_name];
NSMutableArray *o_prefs = [o_save_prefs objectForKey: o_module_name];
if( [o_prefs indexOfObjectIdenticalTo: o_vlc_config] == NSNotFound )
{
NSView *o_pref_view = [o_pref_panel contentView];
- NSButton *o_btn_apply = [o_pref_view viewWithTag: 2];
+ NSButton *o_btn_apply = [o_pref_view viewWithTag: 2];
[o_prefs addObject: o_vlc_config];
[o_btn_apply setEnabled: YES];
NSEnumerator *o_enum;
NSView *o_config_view = [sender superview];
- NSWindow *o_config_panel = [o_config_view window];
- NSButton *o_btn_apply = [o_config_view viewWithTag: 2];
+ NSWindow *o_config_panel = [o_config_view window];
+ NSButton *o_btn_apply = [o_config_view viewWithTag: 2];
NSString *o_module_name = [[o_config_panel toolbar] identifier];
NSMutableArray *o_prefs = [o_save_prefs objectForKey: o_module_name];
o_value = [o_vlc_control stringValue];
psz_value = (char *)[o_value lossyCString];
- config_PutPsz( p_intf, psz_name,
+ config_PutPsz( p_intf, psz_name,
*psz_value ? psz_value : NULL );
}
break;
[o_pref_panel close];
if( [self respondsToSelector: @selector(performSelectorOnMainThread:
- withObject:waitUntilDone:)] )
+ withObject:waitUntilDone:)] )
{
[self performSelectorOnMainThread: @selector(destroyPrefPanel:)
withObject: o_module_name
@implementation VLCPrefs (NSToolbarDelegate)
-- (NSToolbarItem *)toolbar:(NSToolbar *)o_toolbar
- itemForItemIdentifier:(NSString *)o_item_id
+- (NSToolbarItem *)toolbar:(NSToolbar *)o_toolbar
+ itemForItemIdentifier:(NSString *)o_item_id
willBeInsertedIntoToolbar:(BOOL)b_flag
{
NSMutableDictionary *o_toolbar_items;
if( o_toolbar_items == nil )
{
return( nil );
- }
+ }
- o_ids = [[o_toolbar_items allKeys]
+ o_ids = [[o_toolbar_items allKeys]
sortedArrayUsingSelector: @selector(compare:)];
return( o_ids );
object MenuAddInterface: TMenuItem\r
Tag = 3\r
Caption = '&Add interface'\r
- Enabled = False\r
Hint = 'Spawn a new interface'\r
end\r
end\r
* menu.cpp: functions to handle menu items
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
- * $Id: menu.cpp,v 1.10 2003/01/26 00:51:43 sam Exp $
+ * $Id: menu.cpp,v 1.11 2003/01/27 17:41:01 ipkiss Exp $
*
* Authors: Olivier Teuliere <ipkiss@via.ecp.fr>
*
MenuAddInterface = p_window->MenuAddInterface;
/* Create the "Add interface" menu */
-#if 0
- SetupModuleMenu( "inerface", MenuAddInterface, InterfaceModuleClick );
-#endif
+ SetupModuleMenu( "interface", MenuAddInterface, InterfaceModuleClick );
}
TMenuItem *Root, TNotifyEvent MenuItemClick )
{
module_t * p_parser;
- vlc_list_t list;\r
- int i_index;\r
-\r
- /* remove previous menu */\r
+ vlc_list_t *p_list;
+ int i_index;
+
+ /* remove previous menu */
Root->Clear();
Root->Enabled = false;
- list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );\r
- for( i_index = 0; i_index < list.i_count; i_index++ )\r
- {\r
- p_parser = (module_t *)list.p_values[i_index].p_object ;\r
-\r
- if( !strcmp( p_parser->psz_capability, psz_capability ) )\r
- {\r
- TMenuItem *Item = new TMenuItem( Root );\r
- Item->Caption = p_parser->psz_object_name;\r
- Item->Hint = Item->Caption;\r
- Item->OnClick = MenuItemClick;\r
- Root->Add( Item );\r
- }\r
- }\r
-\r
- vlc_list_release( &list );\r
+ p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
+ {
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
+
+ if( !strcmp( p_parser->psz_capability, psz_capability ) )
+ {
+ TMenuItem *Item = new TMenuItem( Root );
+ Item->Caption = p_parser->psz_object_name;
+ Item->Hint = Item->Caption;
+ Item->OnClick = MenuItemClick;
+ Root->Add( Item );
+ }
+ }
+
+ vlc_list_release( p_list );
/* be sure that menu is enabled, if there is at least one item */
if( i_index > 0 )
void __fastcall TPanelPlugin::CheckListBoxClick( TObject *Sender )\r
{\r
module_t *p_parser;\r
- vlc_list_t list;\r
+ vlc_list_t *p_list;\r
int i_index;\r
\r
/* check that the click is valid (we are on an item, and the click\r
}\r
\r
/* look for module 'Name' */\r
- list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );\r
+ p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );\r
\r
- for( i_index = 0; i_index < list.i_count; i_index++ )\r
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )\r
{\r
- p_parser = (module_t *)list.p_values[i_index].p_object ;\r
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;\r
\r
if( strcmp( p_parser->psz_object_name, Name.c_str() ) == 0 )\r
{\r
break;\r
}\r
}\r
+ vlc_list_release( p_list );\r
}\r
//---------------------------------------------------------------------------\r
void __fastcall TPanelPlugin::CheckListBoxClickCheck( TObject *Sender )\r
void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )\r
{\r
module_t *p_parser;\r
- vlc_list_t list;\r
+ vlc_list_t *p_list;\r
int i_index;\r
\r
module_config_t *p_item;\r
TPanelBool *PanelBool;\r
\r
/* Look for the selected module */\r
- list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );\r
+ p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );\r
\r
- for( i_index = 0; i_index < list.i_count; i_index++ )\r
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )\r
{\r
- p_parser = (module_t *)list.p_values[i_index].p_object ;\r
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;\r
\r
if( psz_module_name\r
&& !strcmp( psz_module_name, p_parser->psz_object_name ) )\r
break;\r
}\r
}\r
- if( !p_parser || i_index == list.i_count )\r
+ if( !p_parser || i_index == p_list->i_count )\r
{\r
- vlc_list_release( &list );\r
+ vlc_list_release( p_list );\r
return;\r
}\r
\r
PanelPlugin->Parent = ScrollBox;\r
\r
/* Look for valid modules */\r
- for( i_index = 0; i_index < list.i_count; i_index++ )\r
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )\r
{\r
- p_parser = (module_t *)list.p_values[i_index].p_object ;\r
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;\r
\r
if( !strcmp( p_parser->psz_capability, p_item->psz_type ) )\r
{\r
}\r
}\r
\r
- vlc_list_release( &list );\r
+ vlc_list_release( p_list );\r
\r
/* set active tabsheet\r
* FIXME: i don't know why, but both lines are necessary */\r
* libvlc.c: main libvlc source
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: libvlc.c,v 1.58 2003/01/22 22:19:29 sigmunau Exp $
+ * $Id: libvlc.c,v 1.59 2003/01/27 17:41:01 ipkiss Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
{
free( psz_modules );
}
-
+
/*
* Get input filenames given as commandline arguments
*/
{
network_ChannelJoin( p_vlc, COMMON_CHANNEL );
}
-
+
/*
* Free allocated memory
*/
* XXX: Free module bank !
*/
//module_EndBank( p_vlc );
-
+
/*
* System specific cleaning code
*/
system_End( p_vlc );
-
+
/* Destroy mutexes */
vlc_mutex_destroy( &p_vlc->config_lock );
{
return VLC_ENOOBJ;
}
-
+
vlc_thread_set_priority( p_vlc, VLC_THREAD_PRIORITY_LOW );
p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD );
*/
#define LINE_START 8
#define PADDING_SPACES 25
- vlc_list_t list;
+ vlc_list_t *p_list;
module_t *p_parser;
module_config_t *p_item;
char psz_spaces[PADDING_SPACES+LINE_START+1];
#endif
/* List all modules */
- list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
/* Enumerate the config for each module */
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
vlc_bool_t b_help_module;
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( psz_module_name && strcmp( psz_module_name,
p_parser->psz_object_name ) )
}
/* Release the module list */
- vlc_list_release( &list );
+ vlc_list_release( p_list );
#ifdef WIN32 /* Pause the console because it's destroyed when we exit */
fprintf( stdout, _("\nPress the RETURN key to continue...\n") );
*****************************************************************************/
static void ListModules( vlc_t *p_this )
{
- vlc_list_t list;
+ vlc_list_t *p_list;
module_t *p_parser;
char psz_spaces[22];
int i_index;
fprintf( stdout, _("[module] [description]\n") );
/* List all modules */
- list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
/* Enumerate each module */
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
int i;
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
/* Nasty hack, but right now I'm too tired to think about a nice
* solution */
psz_spaces[i] = ' ';
}
- vlc_list_release( &list );
+ vlc_list_release( p_list );
#ifdef WIN32 /* Pause the console because it's destroyed when we exit */
fprintf( stdout, _("\nPress the RETURN key to continue...\n") );
* configuration.c management of the modules configuration
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.48 2003/01/06 00:37:30 garf Exp $
+ * $Id: configuration.c,v 1.49 2003/01/27 17:41:01 ipkiss Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
* represented by a string (CONFIG_ITEM_STRING, CONFIG_ITEM_FILE,
* and CONFIG_ITEM_MODULE).
*****************************************************************************/
-void __config_PutPsz( vlc_object_t *p_this,
+void __config_PutPsz( vlc_object_t *p_this,
const char *psz_name, const char *psz_value )
{
module_config_t *p_config;
*****************************************************************************/
module_config_t *config_FindConfig( vlc_object_t *p_this, const char *psz_name )
{
- vlc_list_t list;
+ vlc_list_t *p_list;
module_t *p_parser;
module_config_t *p_item;
int i_index;
if( !psz_name ) return NULL;
- list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !p_parser->i_config_items )
continue;
continue;
if( !strcmp( psz_name, p_item->psz_name ) )
{
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return p_item;
}
}
}
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return NULL;
}
*****************************************************************************/
int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
{
- vlc_list_t list;
+ vlc_list_t *p_list;
module_t *p_parser;
module_config_t *p_item;
FILE *file;
}
/* Look for the selected module, if NULL then save everything */
- list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( psz_module_name
&& strcmp( psz_module_name, p_parser->psz_object_name ) )
}
}
-
- vlc_list_release( &list );
+
+ vlc_list_release( p_list );
fclose( file );
free( psz_filename );
*
* When we save we mustn't delete the config options of the modules that
* haven't been loaded. So we cannot just create a new config file with the
- * config structures we've got in memory.
+ * config structures we've got in memory.
* I don't really know how to deal with this nicely, so I will use a completly
* dumb method ;-)
* I will load the config file in memory, but skipping all the sections of the
int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
{
module_t *p_parser;
- vlc_list_t list;
+ vlc_list_t *p_list;
module_config_t *p_item;
FILE *file;
char p_line[1024], *p_index2;
p_bigbuffer[0] = 0;
/* List all available modules */
- list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
/* backup file into memory, we only need to backup the sections we won't
* save later on */
{
/* we found a section, check if we need to do a backup */
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( ((p_index2 - &p_line[1])
== (int)strlen(p_parser->psz_object_name) )
}
}
- if( i_index == list.i_count )
+ if( i_index == p_list->i_count )
{
/* we don't have this section in our list so we need to back
* it up */
msg_Warn( p_this, "could not open config file %s for writing",
psz_filename );
free( psz_filename );
- vlc_list_release( &list );
+ vlc_list_release( p_list );
vlc_mutex_unlock( &p_this->p_vlc->config_lock );
return -1;
}
fprintf( file, "###\n### " COPYRIGHT_MESSAGE "\n###\n\n" );
/* Look for the selected module, if NULL then save everything */
- for( i_index = 0; i_index < list.i_count; i_index++ )
+ for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
- p_parser = (module_t *)list.p_values[i_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( psz_module_name && strcmp( psz_module_name,
p_parser->psz_object_name ) )
fprintf( file, "\n" );
}
- vlc_list_release( &list );
+ vlc_list_release( p_list );
/*
* Restore old settings from the config in file
{
int i_cmd, i_index, i_opts, i_shortopts, flag, i_verbose = 0;
module_t *p_parser;
- vlc_list_t list;
+ vlc_list_t *p_list;
module_config_t *p_item;
struct option *p_longopts;
int i_modules_index;
#endif
/* List all modules */
- list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
/*
* Generate the longopts and shortopts structures used by getopt_long
*/
i_opts = 0;
- for( i_modules_index = 0; i_modules_index < list.i_count;
+ for( i_modules_index = 0; i_modules_index < p_list->i_count;
i_modules_index++ )
{
- p_parser = (module_t *)list.p_values[i_modules_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_modules_index].p_object ;
/* count the number of exported configuration options (to allocate
* longopts). We also need to allocate space for too options when
if( p_longopts == NULL )
{
msg_Err( p_this, "out of memory" );
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return -1;
}
{
msg_Err( p_this, "out of memory" );
free( p_longopts );
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return -1;
}
msg_Err( p_this, "out of memory" );
free( psz_shortopts );
free( p_longopts );
- vlc_list_release( &list );
+ vlc_list_release( p_list );
return -1;
}
memcpy( ppsz_argv, p_this->p_vlc->ppsz_argv,
/* Fill the p_longopts and psz_shortopts structures */
i_index = 0;
- for( i_modules_index = 0; i_modules_index < list.i_count;
+ for( i_modules_index = 0; i_modules_index < p_list->i_count;
i_modules_index++ )
{
- p_parser = (module_t *)list.p_values[i_modules_index].p_object ;
+ p_parser = (module_t *)p_list->p_values[i_modules_index].p_object ;
if( !p_parser->i_config_items )
continue;
}
/* We don't need the module list anymore */
- vlc_list_release( &list );
+ vlc_list_release( p_list );
/* Close the longopts and shortopts structures */
memset( &p_longopts[i_index], 0, sizeof(struct option) );
* modules.c : Builtin and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.110 2003/01/19 03:16:24 sam Exp $
+ * $Id: modules.c,v 1.111 2003/01/27 17:41:01 ipkiss Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
};
module_list_t *p_list, *p_first, *p_tmp;
- vlc_list_t all;
+ vlc_list_t *p_all;
int i_which_module, i_index = 0;
vlc_bool_t b_intf = VLC_FALSE;
}
/* Sort the modules and test them */
- all = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
- p_list = malloc( all.i_count * sizeof( module_list_t ) );
+ p_all = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
+ p_list = malloc( p_all->i_count * sizeof( module_list_t ) );
p_first = NULL;
/* Parse the module list for capabilities and probe each of them */
- for( i_which_module = 0; i_which_module < all.i_count; i_which_module++ )
+ for( i_which_module = 0; i_which_module < p_all->i_count; i_which_module++ )
{
module_t * p_submodule = NULL;
int i_shortcut_bonus = 0, i_submodule;
- p_module = (module_t *)all.p_values[i_which_module].p_object;
+ p_module = (module_t *)p_all->p_values[i_which_module].p_object;
/* Test that this module can do what we need */
if( strcmp( p_module->psz_capability, psz_capability ) )
&& !strcmp( p_module->psz_program,
p_this->p_vlc->psz_object_name ) )
{
- if( !b_intf )
+ if( !b_intf )
{
/* Remove previous non-matching plugins */
i_index = 0;
}
/* We can release the list, interesting modules were yielded */
- vlc_list_release( &all );
+ vlc_list_release( p_all );
/* Parse the linked list and use the first successful module */
p_tmp = p_first;
AllocatePluginFile( p_this, psz_path );
}
}
- while( FindNextFile( handle, &finddata ) );
+ while( FindNextFile( handle, &finddata ) );
/* Close the directory */
FindClose( handle );
}
/* Now that we have successfully loaded the module, we can
- * allocate a structure for it */
+ * allocate a structure for it */
p_module = vlc_object_create( p_this, VLC_OBJECT_MODULE );
if( p_module == NULL )
{
module_t * p_module;
/* Now that we have successfully loaded the module, we can
- * allocate a structure for it */
+ * allocate a structure for it */
p_module = vlc_object_create( p_this, VLC_OBJECT_MODULE );
if( p_module == NULL )
{
int (* pf_symbol) ( module_t * p_module );
/* Try to resolve the symbol */
- pf_symbol = (int (*)(module_t *)) module_getsymbol( p_module->handle,
+ pf_symbol = (int (*)(module_t *)) module_getsymbol( p_module->handle,
psz_name );
if( pf_symbol == NULL )
* objects.c: vlc_object_t handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: objects.c,v 1.33 2002/12/14 19:34:06 gbazin Exp $
+ * $Id: objects.c,v 1.34 2003/01/27 17:41:01 ipkiss Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
static int FindIndex ( vlc_object_t *, vlc_object_t **, int );
static void SetAttachment ( vlc_object_t *, vlc_bool_t );
-static vlc_list_t NewList ( int );
+static vlc_list_t * NewList ( int );
static void ListReplace ( vlc_list_t *, vlc_object_t *, int );
static void ListAppend ( vlc_list_t *, vlc_object_t * );
static int CountChildren ( vlc_object_t *, int );
* This function recursively looks for a given object type. i_mode can be one
* of FIND_PARENT, FIND_CHILD or FIND_ANYWHERE.
*****************************************************************************/
-vlc_list_t __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
+vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
{
- vlc_list_t list;
+ vlc_list_t *p_list;
vlc_object_t **pp_current, **pp_end;
int i_count = 0, i_index = 0;
}
}
- list = NewList( i_count );
+ p_list = NewList( i_count );
pp_current = p_this->p_libvlc->pp_objects;
for( ; pp_current < pp_end ; pp_current++ )
if( (*pp_current)->b_attached
&& (*pp_current)->i_object_type == i_type )
{
- ListReplace( &list, *pp_current, i_index );
+ ListReplace( p_list, *pp_current, i_index );
if( i_index < i_count ) i_index++;
}
}
case FIND_CHILD:
i_count = CountChildren( p_this, i_type );
- list = NewList( i_count );
+ p_list = NewList( i_count );
/* Check allocation was successful */
- if( list.i_count != i_count )
+ if( p_list->i_count != i_count )
{
msg_Err( p_this, "list allocation failed!" );
- list.i_count = 0;
+ p_list->i_count = 0;
break;
}
- list.i_count = 0;
- ListChildren( &list, p_this, i_type );
+ p_list->i_count = 0;
+ ListChildren( p_list, p_this, i_type );
break;
default:
msg_Err( p_this, "unimplemented!" );
- list = NewList( 0 );
+ p_list = NewList( 0 );
break;
}
vlc_mutex_unlock( &structure_lock );
- return list;
+ return p_list;
}
/*****************************************************************************
if( *newval.psz_string )
{
vlc_object_release( p_this );
- }
+ }
}
else if( *psz_cmd == 'l' )
{
}
free( p_list->p_values );
+ free( p_list );
}
/* Following functions are local */
}
}
-static vlc_list_t NewList( int i_count )
+static vlc_list_t * NewList( int i_count )
{
- vlc_list_t list;
+ vlc_list_t * p_list = (vlc_list_t *)malloc( sizeof( vlc_list_t ) );
+ if( p_list == NULL )
+ {
+ return NULL;
+ }
- list.i_count = i_count;
+ p_list->i_count = i_count;
if( i_count == 0 )
{
- list.p_values = NULL;
- return list;
+ p_list->p_values = NULL;
+ return p_list;
}
- list.p_values = malloc( i_count * sizeof( vlc_value_t ) );
- if( list.p_values == NULL )
+ p_list->p_values = malloc( i_count * sizeof( vlc_value_t ) );
+ if( p_list->p_values == NULL )
{
- list.i_count = 0;
- return list;
+ p_list->i_count = 0;
+ return p_list;
}
- return list;
+ return p_list;
}
static void ListReplace( vlc_list_t *p_list, vlc_object_t *p_object,