static void field_config_set_input_transform( field_config_type * config , const char * __input_transform_name ) { const char * input_transform_name = NULL; if (field_trans_table_has_key( config->trans_table , __input_transform_name)) input_transform_name = __input_transform_name; config->input_transform_name = util_realloc_string_copy( config->input_transform_name , input_transform_name ); if (input_transform_name != NULL) config->input_transform = field_trans_table_lookup( config->trans_table , input_transform_name); else config->input_transform = NULL; }
static void field_config_set_output_transform( field_config_type * config , const char * __output_transform_name ) { const char * output_transform_name = NULL; if (field_trans_table_has_key( config->trans_table , __output_transform_name)) output_transform_name = __output_transform_name; else if (__output_transform_name) { fprintf(stderr , "Sorry: the field transformation function:%s is not recognized \n\n",__output_transform_name); field_trans_table_fprintf(config->trans_table , stderr); util_exit("Exiting ... \n"); } config->output_transform_name = util_realloc_string_copy( config->output_transform_name , output_transform_name ); if (output_transform_name != NULL) config->output_transform = field_trans_table_lookup( config->trans_table , output_transform_name); else config->output_transform = NULL; }