For subcommands that take boolean values, `ON` and `YES` are
synonymous, as are `OFF` and `NO`, when used as subcommand values.
+<!-- toc -->
+
+# Data Input
+
The data input subcommands affect the way that data is read from data
-files. The data input subcommands are
+files. The data input subcommands are:
* `BLANKS`
This is the value assigned to an item data item that is empty or
default, is equivalent to `MSBFIRST` or `LSBFIRST` depending on the
native format of the machine running PSPP.
+# Interaction
+
Interaction subcommands affect the way that PSPP interacts with an
online user. The interaction subcommands are
virtual memory management, setting a very large workspace may cause
PSPP to abort.
+# Data Output
+
Data output subcommands affect the format of output data. These
subcommands are
default, is equivalent to `MSBFIRST` or `LSBFIRST` depending on the
native format of the machine running PSPP.
+# Output Routing
+
In the PSPP text-based interface, the output routing subcommands
affect where output is sent. The following values are allowed for each
of these subcommands:
These subcommands have no effect on output in the PSPP GUI
environment.
+# Output Driver
+
Output driver option subcommands affect output drivers' settings.
These subcommands are:
`.tlo` file in the same way as specifying `--table-look=FILE` the
PSPP command line (*note Main Options::).
-Logging subcommands affect logging of commands executed to external
+# Journal
+
+Journal subcommands affect logging of commands executed to external
files. These subcommands are
* `JOURNAL`
Whether system files created by `SAVE` or `XSAVE` are compressed by
default. The default is `ON`.
+# Security
+
Security subcommands affect the operations that commands are allowed
to perform. The security subcommands are
Contrary to intuition, this command does not affect any aspect of
the system's locale.
+# Macros
+
The following subcommands affect the interpretation of macros. For
more information, see [Macro Settings](define.md#macro-settings).
Limits the number of levels of nested macro expansions. This must
be set to a positive integer. The default is 50.
+# Not Yet Implemented
+
The following subcommands are not yet implemented, but PSPP accepts
them and ignores the settings:
path::Path,
};
-use binrw::BinRead;
+use binrw::{BinRead, error::ContextExt};
use displaydoc::Display;
use serde::Deserialize;
use zip::{ZipArchive, result::ZipError};
R: Read + Seek,
{
if self.table_structure.path.is_none() {
- let mut light = archive.by_name(&self.table_structure.data_path)?;
+ let member_name = &self.table_structure.data_path;
+ let mut light = archive.by_name(member_name)?;
let mut data = Vec::with_capacity(light.size() as usize);
light.read_to_end(&mut data)?;
- let table = LightTable::read(&mut Cursor::new(data))?;
+ let mut cursor = Cursor::new(data);
+ let table = LightTable::read(&mut cursor).map_err(|e| {
+ e.with_message(format!(
+ "While parsing {member_name:?} as light binary SPV member"
+ ))
+ })?;
let pivot_table = table.decode()?;
Ok(pivot_table.into_item().with_spv_info(
SpvInfo::new(structure_member)
use std::{
+ any::type_name,
fmt::Debug,
io::{Cursor, Read, Seek},
ops::Deref,
#[br(little)]
#[derive(Debug)]
pub struct LightTable {
+ #[br(dbg)]
header: Header,
#[br(args(header.version))]
titles: Titles,
areas: Areas,
borders: Counted<Borders>,
print_settings: Counted<PrintSettings>,
- #[br(if(header.version == Version::V3))]
+ #[br(dbg, if(header.version == Version::V3))]
table_settings: Counted<TableSettings>,
#[br(if(header.version == Version::V1), temp)]
_ts: Option<Counted<Sponge>>,
let start = reader.stream_position()?;
let result = <T>::read_options(reader, endian, args).ok();
if result.is_none() {
+ dbg!((start, type_name::<T>()));
reader.seek(std::io::SeekFrom::Start(start))?;
}
Ok(Self(result))
_x8: bool,
#[br(temp, parse_with(parse_bool))]
_x9: bool,
+ #[br(dbg)]
y0: Y0,
+ #[br(dbg)]
custom_currency: CustomCurrency,
#[br(if(version == Version::V1))]
v1: Optional<Counted<X0>>,
#[br(little)]
#[derive(Debug)]
struct FormatsV3 {
+ #[br(dbg)]
x1_x2: Counted<X1X2>,
x3: Counted<X3>,
}
struct X0 {
#[br(temp)]
_bytes: [u8; 14],
+ #[br(dbg)]
y1: Y1,
y2: Y2,
}
#[br(little)]
#[derive(Debug)]
struct Y2 {
+ #[br(dbg)]
custom_currency: CustomCurrency,
missing: u8,
#[br(temp, parse_with(parse_bool))]
#[br(little)]
#[derive(Debug)]
struct X3 {
- #[br(temp, magic = b"\x01\0")]
+ #[br(dbg, temp, magic = b"\x01\0")]
_x21: u8,
- #[br(magic = b"\0\0\0")]
+ #[br(dbg, magic = b"\0\0\0")]
y1: Y1,
+ #[br(dbg)]
small: f64,
+ #[br(dbg)]
inner: Optional<X3Inner>,
y2: Y2,
#[br(temp)]