Ben Pfaff [Sat, 19 Oct 2019 05:41:25 +0000 (05:41 +0000)]
driver: Do not accumulate marked-up text.
The output engine accumulates lines of text into blocks and outputs them
all at once. This doesn't currently work for text with markup, so this
commit disables it. It might be better to make it work, hence this
commit also adds an XXX marker.
Ben Pfaff [Sun, 10 Nov 2019 18:29:17 +0000 (18:29 +0000)]
LOOP: Limit number of iterations when IF clauses present.
The LOOP command is limited by the MXLOOPS setting in some cirumstances.
Until now, if an IF clause was present, MXLOOPS was disregarded.
However, this behavior does not match SPSS behavior. This commit makes
LOOP honor MXLOOPS even when IF is present, for compatibility.
With this commit, only the presence of an index clause makes LOOP
disregard MXLOOPS.
Ben Pfaff [Mon, 17 Jul 2017 18:38:13 +0000 (11:38 -0700)]
zip-reader: Improve error messages.
With this change, the zip-reader's error messages always include the zip
file name and, when relevant, the member name. Otherwise it wasn't always
clear what a message liek "No such file or directory" was talking about.
Ben Pfaff [Sun, 16 Jul 2017 03:22:10 +0000 (20:22 -0700)]
zip-reader: Read the whole central directory at .zip open time.
By reading the whole central directory when we open the .zip file, rather
than one entry at a time, we make it easier to get a list of entries and
make it available to the client. (This will be implemented in an upcoming
commit.)
This commit also fixes memory leaks in the error case in zip_member_open().
This commit also changes the usage model. Previously, if the caller opened
a single member more than once, all the members shared a single copy of
the member and read each other's data. Now, each caller that opens a
member gets a separate copy and a separate file pointer. Callers now need
to call zip_member_finish() when they're done with a member.
With this commit, the code only keeps an open FILE for a member if the
caller opened that member. Previously, it kept an open FILE for any
member that had been encountered.
Ben Pfaff [Mon, 2 Sep 2019 06:53:23 +0000 (06:53 +0000)]
AUTORECODE: Use minimum width output format for new variables.
The target variables don't need any decimals, since they are always
integers, and only need to be as wide as their largest value, which is
known in advance.
Ben Pfaff [Mon, 2 Sep 2019 06:37:02 +0000 (06:37 +0000)]
AUTORECODE: Properly handle value labels.
Value labels are supposed to be copied from source variables, where they
are present. Also, it's better to format the source values using the
print format rather than just assuming that %g is the right format.
Ben Pfaff [Mon, 2 Sep 2019 06:28:08 +0000 (06:28 +0000)]
variable: New function var_append_value_name__().
This variation on var_append_value_name() allows the caller to pass in the
parameter specifying how to show the value, which will be useful in an
upcoming commit.
Ben Pfaff [Mon, 2 Sep 2019 06:27:11 +0000 (06:27 +0000)]
variable: Make var_append_value_name() omit trailing white space.
This seems to be desirable in the cases where it's actually used. It only
affects one test case in the current testsuite, but it's an improvement for
an upcoming change too.
Ben Pfaff [Mon, 2 Sep 2019 05:14:52 +0000 (05:14 +0000)]
AUTORECODE: Fix treatment of missing values.
User-missing values are supposed to be recoded to a separate range above
the non-missing values. The system-missing value is supposed to not be
recoded at all. This fixes and documents that behavior.
Ben Pfaff [Sun, 21 Jul 2019 01:44:09 +0000 (18:44 -0700)]
AUTORECODE: Make GROUP option work properly with multi-length strings.
When GROUP is used, all of the variables are supposed to be put into a
single table. The implementation assumed in practice that, for string
variables, all of the strings were the same width, which caused problems.
This commit fixes the problem and updates the test to match.
Ben Pfaff [Sun, 21 Jul 2019 02:18:53 +0000 (19:18 -0700)]
value: Drop distinction between long and short string values.
The time has passed when this is a super valuable distinction. There is
basically no distinction in the language itself anymore, the efficiency
gains sound pretty marginal, and the differences lead to bugs, both
correctness- and memory leak-wise, that are hard to test for (because the
developer must make sure to test both short and long strings everywhere).
This commit changes the code so that both short and long strings are
represented the way that long strings were previously.