{
if (!strcmp (s, PIVOT_RC_OTHER))
{
- *format = *settings_get_format ();
+ *format = settings_get_format ();
*honor_small = true;
}
else if (!strcmp (s, PIVOT_RC_COUNT) && !overridden_count_format)
include the RC_ prefix) to *FORMAT. Returns true if successful, false if S
does not name a known result class. */
bool
-pivot_result_class_change (const char *s_, const struct fmt_spec *format)
+pivot_result_class_change (const char *s_, struct fmt_spec format)
{
char *s = xasprintf ("RC_%s", s_);
struct result_class *rc = pivot_result_class_find (s);
if (rc)
{
- rc->format = *format;
+ rc->format = format;
if (!strcmp (s, PIVOT_RC_COUNT))
overridden_count_format = true;
}
const struct variable *wv)
{
if (wv)
- pivot_table_set_weight_format (table, *var_get_print_format (wv));
+ pivot_table_set_weight_format (table, var_get_print_format (wv));
}
/* Sets the format used for PIVOT_RC_COUNT cells to WFMT, which should be the
}
}
}
- value->numeric.format = *settings_get_format ();
+ value->numeric.format = settings_get_format ();
value->numeric.honor_small = true;
done:;
value->numeric.value_label != NULL);
if (show & SETTINGS_VALUE_SHOW_VALUE)
{
- const struct fmt_spec *f = &value->numeric.format;
- const struct fmt_spec *format
- = (f->type == FMT_F
+ struct fmt_spec f = value->numeric.format;
+ const struct fmt_spec format
+ = (f.type == FMT_F
&& value->numeric.honor_small
&& value->numeric.x != 0
&& fabs (value->numeric.x) < pt->small
- ? &(struct fmt_spec) { .type = FMT_E, .w = 40, .d = f->d }
+ ? (struct fmt_spec) { .type = FMT_E, .w = 40, .d = f.d }
: f);
char *s = data_out (&(union value) { .f = value->numeric.x },
encoding. */
struct pivot_value *
pivot_value_new_value (const union value *value, int width,
- const struct fmt_spec *format, const char *encoding)
+ struct fmt_spec format, const char *encoding)
{
struct pivot_value *pv = XZALLOC (struct pivot_value);
if (width > 0)
pv->type = PIVOT_VALUE_STRING;
pv->string.s = s;
- pv->string.hex = format->type == FMT_AHEX;
+ pv->string.hex = format.type == FMT_AHEX;
}
else
{
pv->type = PIVOT_VALUE_NUMERIC;
pv->numeric.x = value->f;
- pv->numeric.format = *format;
+ pv->numeric.format = format;
}
return pv;