X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=rust%2Fsrc%2Flib.rs;h=482bd081979a8ec060945304729680ad8c081323;hb=163d8e396c5b2fd5afd68903d08bff938f13d048;hp=5253402699c6340b470a8bef8772c644f11f5850;hpb=13d0badc005f46d33eb5a7ec4ef5d794b4512450;p=pspp diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 5253402699..482bd08197 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -6,6 +6,7 @@ pub mod raw; pub mod cooked; pub mod sack; pub mod encoding; +pub mod format; #[derive(ThisError, Debug)] pub enum Error { @@ -99,9 +100,27 @@ pub enum Error { #[error("In long string missing values record starting at offset {record_offset:#x}, value length at offset {offset:#x} is {value_len} instead of the expected 8.")] BadLongMissingValueLength { record_offset: u64, offset: u64, value_len: u32 }, - #[error("This file has corrupted metadata written by a buggy version of PSPP. To fix it, save a new copy of the file.")] + #[error("This file has corrupted metadata written by a buggy version of PSPP. To ensure that other software can read it correctly, save a new copy of the file.")] BadLongMissingValueFormat, + #[error("File creation date {creation_date} is not in the expected format \"DD MMM YY\" format. Using 01 Jan 1970.")] + InvalidCreationDate { creation_date: String }, + + #[error("File creation time {creation_time} is not in the expected format \"HH:MM:SS\" format. Using midnight.")] + InvalidCreationTime { creation_time: String }, + #[error("Details TBD")] TBD, } + +#[derive(Copy, Clone, Debug)] +pub enum Compression { + Simple, + ZLib, +} + +#[derive(Clone, Debug)] +pub enum CategoryLabels { + VarLabels, + CountedValues, +}