Ben Pfaff [Fri, 4 Apr 2014 04:59:47 +0000 (21:59 -0700)]
psppire-syntax-window: Recode file from final encoding, not original one.
When syntax_load() reads a syntax file, it can guess the correct encoding
using encoding_guess_whole_file(). When it does that, it's supposed to
use the guessed encoding to recode the file data into UTF-8. In fact, it
was using the original (NULL or "") encoding, which didn't work out well.
This commit makes it use the guessed encoding.
John Darrington [Sat, 29 Mar 2014 07:12:43 +0000 (08:12 +0100)]
T-TEST: Fixed a bug in reporting the independent samples std err of the difference
The standard error of the difference and the confidence interval
for the unequal variances case was reported where the equal variances
case should have been. This change fixes that.
Reported by: Michael Schneider <m-schneider.klh@uni-wuerzburg.de>
Ben Pfaff [Sun, 9 Mar 2014 23:01:25 +0000 (16:01 -0700)]
line-reader: Fix bad math when size_t is bigger than off_t.
When size_t is bigger than off_t, pos - r->length will end up very large,
instead of negative, when r->length > pos, so the MAX didn't help to get
rid of negative values. I'm not sure that this should really happen in
practice, but it's better to avoid it.
John Darrington [Sat, 22 Feb 2014 14:07:31 +0000 (15:07 +0100)]
Fixed bug importing ODS files.
There was a typo which caused the import of ODS files in the gui to
not properly function. This change fixes the typo, but also re-arranges
the code such that similar errors are less likely to go unnoticed in the
future. It also brings the code more in concord with the GNU Coding
Standards (which were written that way exactly to prevent these errors).
John Darrington [Fri, 21 Feb 2014 09:06:00 +0000 (10:06 +0100)]
Replace syntactical keywords in error/warning messages by printf directives.
A number of translators are still making the mistake of translating syntax
keywords in messages (such as "REPEAT") into thier literal equivalents in
the target language. This change avoids the posibility of that mistake,
by removing the keywords from the translatable string.
Ben Pfaff [Thu, 20 Feb 2014 16:33:21 +0000 (08:33 -0800)]
sys-file-reader: Don't skip "too many value labels" test anymore.
Previously the maximum number of value labels depended on the size of
size_t, so that it was impossible to have too many on 64-bit systems, but
a recent change made the maximum number of value labels depend on the
size of unsigned int instead, so now 32- and 64-bit systems are the same.
This commit reverts the code that skips the test.
Ben Pfaff [Mon, 17 Feb 2014 05:28:26 +0000 (21:28 -0800)]
data-out: Avoid excessive spaces in data_out_stretchy() output.
By formatting all numbers with width 40, the output almost always began
with a long string of spaces. That tended to stretch out table cells.
This commit fixes the problem.
Ben Pfaff [Sun, 9 Feb 2014 21:26:32 +0000 (13:26 -0800)]
sys-file-reader: Break reading a system file into two stages.
This paves the way to add a way to obtain strings from the system file, to
allow to more intelligently offer users a choice of encodings, by allowing
a client to open a system file before deciding what encoding should be
used to decode it.
Ben Pfaff [Sun, 16 Feb 2014 07:11:56 +0000 (23:11 -0800)]
sys-file-reader: Get rid of longjmp().
longjmp() makes code harder to understand, and I was finding its
usage here was making it harder for me to make reasonable changes
to the system file reader.
Ben Pfaff [Sun, 16 Feb 2014 07:06:13 +0000 (23:06 -0800)]
pspp-dump-sav: More gracefully handle empty multiple response sets.
Some multiple response sets have no variables, although I don't know why,
and pspp-dump-sav is more useful if it doesn't stop reading when it arrives
at one.
Ben Pfaff [Tue, 4 Feb 2014 05:37:53 +0000 (21:37 -0800)]
Change many %g format specifiers to %.*g with precision DBL_DIG + 1.
The high precision should ensure that in most cases the value is formatted
with enough digits to fully express the internal precision. Without this
change, %g by itself only expresses 6 digits of precision, so that an
integer value like 99999999 is formatted as 1e8. This fixes the problem.
This commit adds a test to MISSING VALUES because this was in particular
reported as a problem.
Thanks to Andre Müller <Andre.Mueller@gesis.org> for reporting this issue.
Ben Pfaff [Fri, 10 Jan 2014 05:08:10 +0000 (21:08 -0800)]
pspp-convert: Fix Mac OS build by eliminating redundant linking.
The Mach-O object format used on Mac OS handles redundant linking against
a shared object badly, whereas ELF doesn't have a problem, so this commit
fixes a crash on Mac OS.
John Darrington [Fri, 3 Jan 2014 06:22:19 +0000 (07:22 +0100)]
doc/tutorial.texi: Correct the text describing intepretation of the Levene test.
The text which described the interpretation of the Levene test, in the
independent samples T-TEST output erroneously inverted the sense of the conclusion.
This change corrects the text.
Ben Pfaff [Tue, 24 Dec 2013 03:24:42 +0000 (19:24 -0800)]
cmac-aes256: Correct size of local rk[] array.
This array was undersized, yielding undefined behavior. It happened to
work OK when compiled -O2 with GCC 4.7.x for x86, and fail with compiled
-O0 in the same environment. This fixes the problem.
Previously, any_reader_may_open returned bool. This change makes it
return a tri-state variable. YES, NO or ERROR. This is useful to
distinguish between a file which is not "readable" (ie not in a format
which PSPP knows how to read) and a file which cannot be opened due
to lack of permission or other lower level errors.
Ben Pfaff [Sat, 16 Nov 2013 04:32:28 +0000 (20:32 -0800)]
psppire-data-window: Set default filter in File|Save As to show all files.
The File|Save As dialog box showed "System Files" in two places: in the
filter dropdown and in the format dropdown. It was surprising to users
that changing the filter dropdown had no effect on the format of the file
actually saved. This commit makes it more obvious which dropdown needs to
be changed, by only showing "System Files" in the right place.