work - now all files in the corpus successfully load
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 16 Oct 2025 20:05:46 +0000 (13:05 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 16 Oct 2025 20:15:49 +0000 (13:15 -0700)
rust/doc/src/spv/light-detail.md
rust/pspp/src/output/spv/light.rs

index de82b758e13c3825250cae655739541b32711280..bd335a5e6e501471cd7b3ec5570aed85e1ba61d5 100644 (file)
@@ -1153,4 +1153,3 @@ from the right side of the cell, in [pt](#pt).
 
 `left-margin`, `right-margin`, `top-margin`, and `bottom-margin` are
 in [pt](#pt).
-
index 9430f85404f6e208fa89b1941a8e7693783e3ae3..1bea946d022f62274eb26bec3cbdb41aad03cdf2 100644 (file)
@@ -796,7 +796,7 @@ struct Formats {
     y0: Y0,
     custom_currency: CustomCurrency,
     #[br(if(version == Version::V1))]
-    v1: Optional<Counted<N0>>,
+    v1: Counted<Optional<N0>>,
     #[br(if(version == Version::V3))]
     v3: Option<Counted<FormatsV3>>,
 }
@@ -1353,11 +1353,29 @@ struct ValueMods {
     #[br(parse_with(parse_vec))]
     subscripts: Vec<U32String>,
     #[br(if(version == Version::V1))]
-    v1: Option<Sponge>,
+    v1: Option<ValueModsV1>,
     #[br(if(version == Version::V3), parse_with(parse_counted))]
     v3: ValueModsV3,
 }
 
+#[binread]
+#[br(little)]
+#[derive(Debug, Default)]
+struct ValueModsV1 {
+    #[br(temp, magic(0u8), assert(_1 == 1 || _1 == 2))]
+    _1: i32,
+    #[br(temp)]
+    _0: Optional<Zero>,
+    #[br(temp)]
+    _1: Optional<Zero>,
+    #[br(temp)]
+    _2: i32,
+    #[br(temp)]
+    _3: Optional<Zero>,
+    #[br(temp)]
+    _4: Optional<Zero>,
+}
+
 #[binread]
 #[br(little)]
 #[derive(Debug, Default)]