void output_table_init( const ecl_sum_type * refcase, hash_type * output_table , const config_type * config ) { int i,j; for (i=0; i < config_get_occurences( config , "OUTPUT" ); i++) { const stringlist_type * tokens = config_iget_stringlist_ref( config , "OUTPUT" , i); const char * file = stringlist_iget( tokens , 0 ); const char * format_string = stringlist_iget( tokens , 1 ); output_type * output = output_alloc( file , format_string ); /* All the keys are just added - without any check. */ for (j = 2; j < stringlist_get_size( tokens ); j++) output_add_key( refcase , output , stringlist_iget( tokens , j)); hash_insert_hash_owned_ref( output_table , file , output , output_free__ ); } }
void output_table_init( const ecl_sum_type * refcase, hash_type * output_table , const config_content_type * config ) { int i,j; if (config_content_has_item( config , "OUTPUT")) { const config_content_item_type * output_item = config_content_get_item( config , "OUTPUT"); for (i = 0; i < config_content_item_get_size( output_item ); i++) { const config_content_node_type * output_node = config_content_item_iget_node( output_item , i ); const char * file = config_content_node_iget( output_node , 0 ); const char * format_string = config_content_node_iget( output_node , 1 ); output_type * output = output_alloc( file , format_string ); /* All the keys are just added - without any check. */ for (j = 2; j < config_content_node_get_size( output_node ); j++) output_add_key( refcase , output , config_content_node_iget( output_node , j)); hash_insert_hash_owned_ref( output_table , file , output , output_free__ ); } } }