From: Ben Pfaff Date: Fri, 31 Oct 2014 04:54:58 +0000 (-0700) Subject: dump: Another way to express substitution? X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06fb48cc02983b8b0d7a3d55321ca6a5ba6f684c;p=pspp dump: Another way to express substitution? --- diff --git a/dump.c b/dump.c index 7994db13c1..0a92002672 100644 --- a/dump.c +++ b/dump.c @@ -152,6 +152,7 @@ dump_value(int level) for (int i = 0; i <= level; i++) printf (" "); + match_byte (0); if (match_byte (3)) { get_string(); @@ -255,13 +256,11 @@ dump_value(int level) match_byte (0); match_byte (1); } - else + else if (match_byte (0x31)) { int subn; int total_subs = 1; - match_byte (0); - match_byte_assert (0x31); match_u32_assert (0); match_u32_assert (0); subn = get_u32 (); @@ -277,6 +276,27 @@ dump_value(int level) total_subs *= n_subst; } + for (int i = 0; i < total_subs; i++) + { + putc ('\n', stdout); + dump_value (level + 1); + } + } + else + { + int total_subs = 1; + + match_byte_assert (0x58); + printf ("\"%s\" with substitutions:", get_string()); + for (;;) + { + int n_subst = get_u32(); + if (!n_subst) + break; + printf (" %d", n_subst); + total_subs *= n_subst; + } + for (int i = 0; i < total_subs; i++) { putc ('\n', stdout); diff --git a/notes b/notes index 124b9b502d..0490e6e2cd 100644 --- a/notes +++ b/notes @@ -955,6 +955,24 @@ web/6c3246ad09f0f6434a33b91c731636a3/00000000062_lightTableData.bin (descriptive 05 58 "TOMS_General" 00 00 00 00 i2 i2 i14 00 00 00 00 03 "" 58 "" "" i0 i2 i15 i0 i0 +web/17936f440753fa5f6771e084c26a1724/00000000033_lightTableData.bin (Paired Samples Statistics): + + i2 + + 03 "Variables" 58 "variable_s_1" "Variables" 01 00 00 i2 01 00 i1 00 i2 00 + 58 "Pair ^1" i1 00 00 00 00 + 01 58 F40.0(1) 00 00 01 i2 i-1 i2 + 05 58 "related" "related" i2 i2 00 00 00 00 00 00 00 00 + 05 58 "unrelated" "unrelated" i2 i2 i1 00 00 00 00 00 58 "Pair ^1" i1 00 00 00 00 + 01 58 F40.0(2) 00 00 01 i2 i-1 i2 + 05 58 "nwrelated" "related" i2 i2 i2 00 00 00 00 + 05 58 "nwunrelated" "unrelated" i2 i2 i3 00 00 00 00 + + 03 "Statistics" 58 "statistics_10" "Statistics" 01 00 01 i2 01 00 01 i1 i4 + 03 "Mean" 58 "mean" "Mean" i1 i2 00 00 00 00 00 00 00 00 + 03 "N" 58 "n" "N" i1 i2 i1 00 00 00 00 + 03 "Std. Deviation" 58 "gbar11" "Std. Deviation" i1 i2 i2 00 00 00 00 + 03 "Std. Error Mean" 58 "gfreq13" "Std. Error Mean" i1 i2 i3 00 00 00 00 Data: tdump21 (germano/Crosstabs.pdf) -------------