- gint new_type = NUMERIC;
- gint new_width = 0;
- bool result = false;
- struct fmt_spec spec;
- switch (dialog->active_button)
- {
- case BUTTON_STRING:
- new_type = ALPHA;
- new_width = width;
- result = make_output_format_try(&spec, FMT_A, width, 0);
- break;
- case BUTTON_NUMERIC:
- result = make_output_format_try(&spec, FMT_F, width, decimals);
- break;
- case BUTTON_COMMA:
- result = make_output_format_try(&spec, FMT_COMMA, width, decimals);
- break;
- case BUTTON_DOT:
- result = make_output_format_try(&spec, FMT_DOT, width, decimals);
- break;
- case BUTTON_SCIENTIFIC:
- result = make_output_format_try(&spec, FMT_E, width, decimals);
- break;
- case BUTTON_DATE:
- case BUTTON_CUSTOM:
- g_assert(check_output_specifier(&dialog->fmt_l, TRUE));
- result = memcpy(&spec, &dialog->fmt_l, sizeof(struct fmt_spec));
- break;
- case BUTTON_DOLLAR:
- result = make_output_format_try(&spec, FMT_DOLLAR, width, decimals);
- break;
- default:
- g_print("Unknown variable type: %d\n", dialog->active_button) ;
- result = false;
- break;
- }
+ gint new_type = VAL_NUMERIC;
+ gint new_width = 0;
+ bool result = false;
+ struct fmt_spec spec;
+ switch (dialog->active_button)
+ {
+ case BUTTON_STRING:
+ new_type = VAL_STRING;
+ new_width = width;
+ result = make_output_format_try (&spec, FMT_A, width, 0);
+ break;
+ case BUTTON_NUMERIC:
+ result = make_output_format_try (&spec, FMT_F, width, decimals);
+ break;
+ case BUTTON_COMMA:
+ result = make_output_format_try (&spec, FMT_COMMA, width, decimals);
+ break;
+ case BUTTON_DOT:
+ result = make_output_format_try (&spec, FMT_DOT, width, decimals);
+ break;
+ case BUTTON_SCIENTIFIC:
+ result = make_output_format_try (&spec, FMT_E, width, decimals);
+ break;
+ case BUTTON_DATE:
+ case BUTTON_CUSTOM:
+ g_assert (fmt_check_output (&dialog->fmt_l));
+ result = memcpy (&spec, &dialog->fmt_l, sizeof (struct fmt_spec));
+ break;
+ case BUTTON_DOLLAR:
+ result = make_output_format_try (&spec, FMT_DOLLAR, width, decimals);
+ break;
+ default:
+ g_print ("Unknown variable type: %d\n", dialog->active_button) ;
+ result = false;
+ break;
+ }