2 struct pspp_dict * T_PTRREF
3 struct variable * T_PTRREF
4 struct syswriter_info * T_PTRREF
5 struct sysreader_info * T_PTRREF
6 input_format INPUT_FMT_SPEC
7 output_format OUTPUT_FMT_SPEC
13 HV *hv = (HV *) SvRV ($arg);
14 SV** the_format = hv_fetch (hv, \"fmt\", 3, 0);
15 SV** decimals = hv_fetch (hv, \"decimals\", 8, 0);
16 SV** width = hv_fetch (hv, \"width\", 5, 0);
18 $var.type = the_format ? SvIV (*the_format) : FMT_F;
19 $var.w = width ? SvIV (*width) : 8;
20 $var.d = decimals ? SvIV (*decimals) :
21 fmt_takes_decimals ($var.type) ?
22 MIN (2, fmt_max_output_decimals ($var.type, $var.w)) : 0;
23 if ( ! fmt_check_output (&$var))
25 char buf[FMT_STRING_LEN_MAX + 1];
26 fmt_to_string (&$var, buf);
27 croak (\"%s is an invalid output format\", buf);
35 HV *hv = (HV *) SvRV ($arg);
36 SV** the_format = hv_fetch (hv, \"fmt\", 3, 0);
37 SV** decimals = hv_fetch (hv, \"decimals\", 8, 0);
38 SV** width = hv_fetch (hv, \"width\", 5, 0);
41 $var.type = the_format ? SvIV (*the_format) : FMT_F;
42 $var.w = width ? SvIV (*width) : 8;
43 $var.d = decimals ? SvIV (*decimals) :
44 fmt_takes_decimals ($var.type) ?
45 MIN (2, fmt_max_input_decimals ($var.type, $var.w)) : 0;
46 if ( ! fmt_check_input (&$var))
48 char buf[FMT_STRING_LEN_MAX + 1];
49 fmt_to_string (&$var, buf);
50 croak (\"%s is an invalid input format\", buf);