X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fdev%2Fsystem-file-format.texi;fp=doc%2Fdev%2Fsystem-file-format.texi;h=c8b37a584e9a95f916e01a7e61d932577e1c987c;hb=76357f21c7391646acd8017d1c3e1386234f2e79;hp=b8670681d9e3789a9803d1e31eae56d54ac32cc7;hpb=37c8a21f16b972b259535527f38161c611b17e2a;p=pspp diff --git a/doc/dev/system-file-format.texi b/doc/dev/system-file-format.texi index b8670681d9..c8b37a584e 100644 --- a/doc/dev/system-file-format.texi +++ b/doc/dev/system-file-format.texi @@ -1315,7 +1315,8 @@ int32 count; int32 var_name_len; char var_name[]; char n_missing_values; -long_string_missing_value values[]; +int32 value_len; +char values[values_len * n_missing_values]; @end example @table @code @@ -1342,30 +1343,25 @@ any particular boundary, nor is it null-terminated. The number of missing values, either 1, 2, or 3. (This is, unusually, a single byte instead of a 32-bit number.) -@item long_string_missing_value values[]; -The missing values themselves. This array contains exactly -@code{n_missing_values} elements, each of which has the following -substructure: - -@example -int32 value_len; -char value[]; -@end example - -@table @code @item int32 value_len; -The length of the missing value string, in bytes. This value should +The length of each missing value string, in bytes. This value should be 8, because long string variables are at least 8 bytes wide (by definition), only the first 8 bytes of a long string variable's missing values are allowed to be non-spaces, and any spaces within the first 8 bytes are included in the missing value here. -@item char value[]; -The missing value string, exactly @code{value_len} bytes, without -any padding or null terminator. -@end table +@item char values[values_len * n_missing_values] +The missing values themselves, without any padding or null +terminators. @end table +An earlier version of this document stated that @code{value_len} was +repeated before each of the missing values, so that there was an extra +@code{int32} value of 8 before each missing value after the first. +Old versions of PSPP wrote data files in this format. Readers can +tolerate this mistake, if they wish, by noticing and skipping the +extra @code{int32} values, which wouldn't ordinarily occur in strings. + @node Data File and Variable Attributes Records @section Data File and Variable Attributes Records