Ben Pfaff [Wed, 21 Nov 2018 17:32:23 +0000 (09:32 -0800)]
output: Add support for colors for rules.
Ben Pfaff [Mon, 26 Nov 2018 01:03:16 +0000 (17:03 -0800)]
output: Support styles for text items.
Ben Pfaff [Tue, 20 Nov 2018 18:24:20 +0000 (10:24 -0800)]
output: Add support for fonts.
Ben Pfaff [Mon, 26 Nov 2018 01:01:39 +0000 (17:01 -0800)]
output: Add support for cell margins.
Until now, space between cells was implemented by adding some space on the
sides of rules. That worked fine before cells could have colored
backgrounds, but now it means that the backgrounds don't reach all the way
to the rules. Thus, this commit adds configurable margins to the cells
themselves.
Ben Pfaff [Mon, 19 Nov 2018 06:23:28 +0000 (22:23 -0800)]
output: Add support for colors in cells.
Background colors aren't painted very well until the following commit adds
support for cell margins.
Ben Pfaff [Sat, 17 Nov 2018 23:49:27 +0000 (15:49 -0800)]
output: Add support for dashed, thick, and thin rules.
Ben Pfaff [Sat, 17 Nov 2018 19:12:55 +0000 (11:12 -0800)]
output: Add support for vertical alignment of cells.
It makes sense to bottom-align top headings but to top-align data cells,
for example.
Ben Pfaff [Mon, 19 Nov 2018 01:43:56 +0000 (17:43 -0800)]
tab: Expand space for table options from 8 to 16 bits each.
Upcoming commits will need the extra bits.
Ben Pfaff [Tue, 25 Dec 2018 19:52:44 +0000 (11:52 -0800)]
testsuite: Enable color output for tests.
Ben Pfaff [Mon, 26 Nov 2018 04:43:22 +0000 (20:43 -0800)]
render: Update style of footnote rendering.
Ben Pfaff [Sat, 17 Nov 2018 04:42:13 +0000 (20:42 -0800)]
output: Expand footnote support.
This adds support for multiple footnotes per table cell and the ability
to add footnotes to titles and captions.
Ben Pfaff [Mon, 26 Nov 2018 00:39:55 +0000 (16:39 -0800)]
format: New function fmt_from_u32().
This functionality will be useful for reading SPV files as well as SAV
files.
Ben Pfaff [Fri, 30 Nov 2018 04:51:54 +0000 (20:51 -0800)]
string-map: New functions for searching by non-null terminated keys.
The first user will be added in an upcoming commit.
Ben Pfaff [Mon, 26 Nov 2018 00:41:44 +0000 (16:41 -0800)]
str: New functions ss_starts_with() and ss_find_substring().
These will have their first users in an upcoming commit.
Ben Pfaff [Mon, 26 Nov 2018 00:38:47 +0000 (16:38 -0800)]
integer-format: Add some useful helper functions.
These functions already existed in float-format.c, but they are more
generally useful, so this commit moves them into integer-format.h.
Ben Pfaff [Sun, 16 Dec 2018 16:59:47 +0000 (08:59 -0800)]
CROSSTABS: Make treatment of crosstab variables and values more uniform.
Ben Pfaff [Sat, 15 Dec 2018 22:40:44 +0000 (14:40 -0800)]
CROSSTABS: Rename pivot_table to crosstabulation.
This will make things easier later when real pivot tables are introduced at
a higher level.
Ben Pfaff [Fri, 30 Nov 2018 05:04:55 +0000 (21:04 -0800)]
output: Factor common code for command name tracking out of all drivers.
This reduces redundancy.
Ben Pfaff [Tue, 25 Dec 2018 04:51:53 +0000 (20:51 -0800)]
message: Refactor initializations for struct msg throughout the tree.
A new member will be added in an upcoming commit, and the new style of
initialization ensures that the member will always be initialized
Ben Pfaff [Tue, 25 Dec 2018 17:58:42 +0000 (09:58 -0800)]
variable: Make property function return untranslated versions.
This makes it possible for the callers to do the translation at the time
it is needed. It will be particularly useful in an upcoming commit.
Ben Pfaff [Tue, 25 Dec 2018 05:46:11 +0000 (21:46 -0800)]
missing-values: New function mv_to_string().
This seems like something that should be handled by the missing value code,
not by SYSFILE INFO.
Ben Pfaff [Tue, 25 Dec 2018 03:32:17 +0000 (19:32 -0800)]
bt, abt: Add initialization and iteration macros.
Ben Pfaff [Tue, 25 Dec 2018 05:45:52 +0000 (21:45 -0800)]
dictionary: New function dict_get_weight_format().
Just a convenience.
Ben Pfaff [Sat, 15 Dec 2018 18:43:47 +0000 (10:43 -0800)]
ascii: Get rid of the idea of pages.
In the era when I started writing this code, people still printed output on
dot-matrix printers and fanfold paper. That's no longer a realistic use
case: today, no one prints plain text output. It's just for viewing on a
screen, and on a screen there is no need or desire to break tables up
vertically into virtual "pages".
Ben Pfaff [Sun, 9 Dec 2018 20:46:17 +0000 (12:46 -0800)]
table: Get rid of TAL_GAP.
This is only necessary in pathological cases. Those cases don't really
come up in normal usage and as PSPP shifts toward pivot tables they won't
come up at all.
Ben Pfaff [Sun, 9 Dec 2018 05:50:51 +0000 (21:50 -0800)]
cairo: Get rid of useless parameter 'y' to xr_layout_cell_text().
Ben Pfaff [Sun, 23 Dec 2018 19:06:34 +0000 (11:06 -0800)]
categoricals: Convert tabs to spaces.
Ben Pfaff [Sun, 23 Dec 2018 19:06:17 +0000 (11:06 -0800)]
categoricals: Update style and modernize.
Ben Pfaff [Sun, 23 Dec 2018 19:03:40 +0000 (11:03 -0800)]
categoricals: Get rid of 'df_prod' array.
It brought minimal value in that everything it did could be recalculated
on the fly without increasing the big-O cost.
Ben Pfaff [Sun, 23 Dec 2018 18:57:50 +0000 (10:57 -0800)]
categoricals: Drop 'n_vals' member from struct variable_node.
It was redundant with counting the elements in valmap, which wasn't
used many places anyway.
Ben Pfaff [Sun, 23 Dec 2018 18:50:44 +0000 (10:50 -0800)]
categoricals: Add array of variable_nodes to reduce hash lookups.
Ben Pfaff [Sun, 23 Dec 2018 18:42:04 +0000 (10:42 -0800)]
categoricals: Avoid setting value_node indexes multiple times.
A given variable_node can be in more than one interaction, but it's only
necessary to set the variable_node's value_node indexes once each.
Ben Pfaff [Sun, 23 Dec 2018 18:27:14 +0000 (10:27 -0800)]
categoricals: Give "reverse" members more descriptive, shorter names.
Ben Pfaff [Sun, 23 Dec 2018 18:15:39 +0000 (10:15 -0800)]
categoricals: Remove unused function categoricals_get_n_variables().
This function output debugging info on stdout, so clearly it wasn't
important.
Ben Pfaff [Sun, 23 Dec 2018 18:14:28 +0000 (10:14 -0800)]
categoricals: Don't warn on hash collisions.
Hash collisions are not errors.
Ben Pfaff [Sun, 23 Dec 2018 17:20:34 +0000 (09:20 -0800)]
categoricals: Improve comments.
Ben Pfaff [Sun, 23 Dec 2018 17:07:08 +0000 (09:07 -0800)]
categoricals: Remove 'dep_excl' parameter.
It was not used for anything.
Ben Pfaff [Sun, 23 Dec 2018 18:54:01 +0000 (10:54 -0800)]
tests: Add "categorical" keyword to tests that use categoricals.
This makes it easier to run tests just for these.
Ben Pfaff [Sun, 23 Dec 2018 02:48:17 +0000 (18:48 -0800)]
interaction: Better document and update code to modern style.
Ben Pfaff [Sun, 2 Dec 2018 21:37:57 +0000 (13:37 -0800)]
output: Remove support for nested tables.
They are no longer used.
Ben Pfaff [Sun, 2 Dec 2018 21:28:44 +0000 (13:28 -0800)]
SYSFILE INFO: Get rid of nested tables.
Nested tables aren't really necessary and make a number of things harder in
the output subsystem. SYSFILE INFO and DISPLAY, which share code, were the
only code that used them, so this removes them from that code.
Ben Pfaff [Mon, 3 Dec 2018 02:36:51 +0000 (18:36 -0800)]
get-data-psql.at: Make test work with Debian pg_wrapper arrangement.
It had been years since I tested Postgres, but I was making a change that
would affect the Postgres test, and I found out that the test didn't work.
This fixes it.
Ben Pfaff [Mon, 26 Nov 2018 14:54:52 +0000 (06:54 -0800)]
segment: Fix behavior when #! line is not new-line terminated.
The code here is supposed to maintain a invariant that, when it returns a
nonnegative value, it initializes *type, but it failed to do that when a
#! line did not end in a new-line. This fixes the problem.
Bug #55101.
Thanks for Friedrich Beckmann for narrowing down the problem.
Found by the Debian buildd: https://buildd.debian.org/status/fetch.php?pkg=pspp&arch=arm64&ver=1.2.0-1&stamp=
1543183214&raw=0
Ben Pfaff [Mon, 26 Nov 2018 00:56:02 +0000 (16:56 -0800)]
ascii: Fix assertion in ascii_output_table_item().
The previous assertion did not actually detect the bug it was intended to
cover.
Ben Pfaff [Fri, 16 Nov 2018 21:51:38 +0000 (13:51 -0800)]
ascii: Update min_breaks along with width and length.
min_breaks has to be no larger than the page width (or length), otherwise
the rendering algorithm fails, but the automatic update for TTYs didn't
take that into account.
Ben Pfaff [Sun, 25 Nov 2018 06:22:18 +0000 (22:22 -0800)]
render: Use "long long" instead of "double" for arithmetic.
When I wrote this code in 2010, it seemed reasonable to me to use
floating-point arithmetic to do large integer calculations, because 64-bit
machines were not yet pervasive. Over 8 years later, 32-bit machines are
now a rarity. This commit switches types and modernizes the coding style.
This fixed an assertion failure that I was getting mysteriously while
rendering a particular table. I didn't investigate further because using
integers seemed like a much better idea anyway.
Ben Pfaff [Mon, 26 Nov 2018 01:54:17 +0000 (17:54 -0800)]
tests: Disable Address Sanitizer SIGSEGV handler for intentional SIGSEGV.
Ben Pfaff [Mon, 26 Nov 2018 01:52:29 +0000 (17:52 -0800)]
FREQUENCIES: Avoid buffer overrun when there is no valid data.
Reported by Address Sanitizer.
Ben Pfaff [Mon, 26 Nov 2018 01:47:45 +0000 (17:47 -0800)]
ONEWAY: Fix use of stack-allocated variable outside its scope.
The 'payload' object is a kind of class and should be allocated statically.
Found by Address Sanitizer.
Ben Pfaff [Sun, 25 Nov 2018 18:04:40 +0000 (10:04 -0800)]
render: Fix pathological case where column minimum width exceeds maximum.
Ben Pfaff [Sun, 27 May 2018 00:50:20 +0000 (17:50 -0700)]
data-out: Clarify the meaning of the 'encoding' parameter.
Signed-off-by: Ben Pfaff <blp@cs.stanford.edu>
Ben Pfaff [Sat, 17 Nov 2018 04:27:30 +0000 (20:27 -0800)]
psppire: Fix multiple definitions of align_enum_type and two others.
These were defined in both psppire-dict.c and widgets.c, which causes a
problem building with -fno-common (which is desirable because it allows
Address Sanitizer to work better).
Ben Pfaff [Mon, 19 Nov 2018 16:44:27 +0000 (08:44 -0800)]
Check for python interpreter at configure time and document the requirement.
Ben Pfaff [Mon, 19 Nov 2018 16:35:23 +0000 (08:35 -0800)]
test-date-input.py: Make compatible with Python 3.
Friedrich Beckmann [Fri, 16 Nov 2018 19:16:53 +0000 (20:16 +0100)]
fixed setting the font size via css syntax - Closes Bug #55006
The pspp 1.2.0 release showed a problem with setting the font via
the font selection dialog. The root cause is that the style
setting should be done via css syntax and not pango syntax. I
changed the code to do the style setting via css syntax.
See: https://savannah.gnu.org/bugs/?55006
The minimum width setting in the comment dialog does not work how
it is implemented. I removed that code part as it does not seem
to be crucial. At least on MacOS the default
width is large enough to hold 80 characters. Even without that
the user can increase the size of the dialog.
Friedrich Beckmann [Mon, 12 Nov 2018 08:05:41 +0000 (09:05 +0100)]
changed install directory for pspp.appdata.xml to metainfo
The default directory for the appdata xml file changed
from appdata to metainfo. During debian package development
lintian complained about the wrong location.
Friedrich Beckmann [Mon, 12 Nov 2018 08:04:42 +0000 (09:04 +0100)]
changed emacs mode description to comply with elpa
During the debian package development lintian proposed
to install emacs mode via the elpa system. I changed
the pspp emacs mode description to comply to elpa.
Ben Pfaff [Sun, 11 Nov 2018 16:37:45 +0000 (08:37 -0800)]
po: Update translations from translationproject.org.
Ben Pfaff [Thu, 8 Nov 2018 15:01:09 +0000 (07:01 -0800)]
po: Update translations from translationproject.org.
Ben Pfaff [Tue, 6 Nov 2018 17:06:25 +0000 (09:06 -0800)]
po: Update translations from translationproject.org.
Ben Pfaff [Tue, 6 Nov 2018 14:34:07 +0000 (06:34 -0800)]
Release version 1.2.0.
Ben Pfaff [Sat, 26 May 2018 18:04:15 +0000 (11:04 -0700)]
Add support for MTIME and YMDHMS.
Ben Pfaff [Sat, 26 May 2018 18:02:34 +0000 (11:02 -0700)]
tests: Refactor data-out tests for dates and times.
Ben Pfaff [Tue, 6 Nov 2018 13:49:24 +0000 (05:49 -0800)]
README.Git: Upgrade recommended version of Gnulib.
Thanks to Frans Houweling <fhouweling@email.it> and Bruno Haible for
identifying a problem with the previous version.
Friedrich Beckmann [Sun, 28 Oct 2018 20:51:18 +0000 (21:51 +0100)]
fixed strange character in polish translation email
The strange character results in a build failure on MacOS
Ben Pfaff [Sun, 14 Oct 2018 19:31:52 +0000 (12:31 -0700)]
hash-functions: Avoid signed integer overflow.
cppcheck reported that 0xdeadbeef + 8 yielded signed integer overflow.
This is probably harmless, as long as the compiler doesn't do something
really strange, but it's even better if we just ensure that this
arithmetic is done as unsigned.
Reported by John Darrington.
John Darrington [Sun, 14 Oct 2018 19:06:56 +0000 (21:06 +0200)]
Fix possible null pointer dereference in linreg_predict.
Found by cppcheck.
John Darrington [Sun, 14 Oct 2018 18:43:18 +0000 (20:43 +0200)]
PsppireSpreadSheetModel: Remove useless check and substitute a useful one.
Found by cppcheck.
John Darrington [Sun, 14 Oct 2018 05:35:52 +0000 (07:35 +0200)]
configure.ac: Recent ssw to 0.3+
John Darrington [Sun, 7 Oct 2018 11:22:13 +0000 (13:22 +0200)]
PspppireImportAssistant: New function textfile_create_reader.
* src/ui/gui/psppire-import-assistant.c (textfile_create_reader): New function.
Ben Pfaff [Sat, 6 Oct 2018 22:12:07 +0000 (15:12 -0700)]
lexer: Fix details of journaling.
This fixes test 1075: ASCII driver syntax printback.
Reported by John Darrington and Jeremy Lavergne.
Fixes: b4f585e70eca ("lexer: Fix buffer overread in journaling when source does not end in \n.")
Fixes: e0f9210e814d ("lexer: Add support for embedded \0 bytes and missing trailing new-line.")
John Darrington [Sat, 29 Sep 2018 10:51:02 +0000 (12:51 +0200)]
Reference count struct dictionary.
This change:
* Adds a ref count to struct dictionary.
* Wraps dict_destroy in a ref-counted wrapper dict_unref.
* Replaces most calls to dict_destroy with dict_unref.
* Adds a new function dict_ref.
* Changes PsppireDict so take a reference to the struct dict it contains.
* Fixes some leaked dictionaries in PsppireImportAssistant.
Ben Pfaff [Sat, 29 Sep 2018 22:43:39 +0000 (15:43 -0700)]
lexer: Fix buffer overread in journaling when source does not end in \n.
An earlier commit removed the requirement that a source file ends in \n,
but the lexer still made that assumption. This is intended to fix the
problem. (Probably, some new tests should be added.)
Thanks to John Darrington for reporting the problem.
Fixes: e0f9210e814d ("lexer: Add support for embedded \0 bytes and missing trailing new-line.")
John Darrington [Sat, 29 Sep 2018 14:13:25 +0000 (16:13 +0200)]
psppire-import-assistant.c (psppire_import_assistant_generate_syntax): Append newline at end of syntax.
John Darrington [Sat, 29 Sep 2018 10:27:31 +0000 (12:27 +0200)]
src/data/mdd-writer.c: Avoid compiler warning
John Darrington [Sat, 29 Sep 2018 09:10:45 +0000 (11:10 +0200)]
value-variant.c: Avoid read from beyond end of buffer in string values.
Ben Pfaff [Wed, 26 Sep 2018 23:24:40 +0000 (16:24 -0700)]
sys-file-reader: Tolerate missing MRSETS label source value.
Bug #54724.
Thanks to Peter Lemenkov <lemenkov@gmail.com> for reporting this bug.
Ben Pfaff [Wed, 26 Sep 2018 21:04:08 +0000 (14:04 -0700)]
pspp-dump-sav: Better handle unreasonable variable label lengths.
Bug #54725.
Thanks to Peter Lemenkov for reporting this bug.
Ben Pfaff [Mon, 24 Sep 2018 06:05:22 +0000 (23:05 -0700)]
variable-parser: Fix null deref on error path in parse_DATA_LIST_vars().
Bug #54685.
Thanks to Tianxiao Gu for reporting this bug.
Ben Pfaff [Mon, 24 Sep 2018 03:42:07 +0000 (20:42 -0700)]
lexer: Add support for embedded \0 bytes and missing trailing new-line.
The lexer, at a low level, has not supported \0 bytes in the input stream
because it used such a byte as the end-of-input indicator. This caused
some awkwardness for the higher-level lexer, which had to remove and flag
\0 bytes as it read them. This caused a bug in the higher-level lexer,
which raised an error for each \0 byte it removed but did so when the
lexer was in an intermediate state, which could read uninitialized data.
This commit fixes the problem by adding support for \0 bytes to the
low-level lexer (segmenter). At the same time, it adds support for input
that doesn't end in a new-line character.
Bug #54664.
Thanks to Tianxiao Gu for reporting this bug.
Ben Pfaff [Mon, 24 Sep 2018 03:26:28 +0000 (20:26 -0700)]
DO REPEAT: Avoid relying on null terminators.
find_dummy_var() currently relies on the string passed in to have a null
terminator (even though it accepts a length). This is safe in the current
tree but an upcoming commit will not ensure that it is null-terminated, so
this commit removes the dependency.
Ben Pfaff [Mon, 24 Sep 2018 02:36:22 +0000 (19:36 -0700)]
command-name: Avoid read past end of input buffer in find_word().
When the input substring S is not null-terminated, find_word() could read
past its end looking for a non-digit. This fixes the problem.
John Darrington [Sun, 23 Sep 2018 10:49:41 +0000 (12:49 +0200)]
MATRIX DATA: Fix memory leaks
Ben Pfaff [Sun, 23 Sep 2018 04:36:10 +0000 (21:36 -0700)]
sys-file-reader: Fix null deref on bad $@Role attribute.
When a variable had a bad $@Role attribute, this was effectively read as
an attribute without any values. This is the only way to produce such an
attribute. The system file reader assumed that every attribute had at
least one value and segfaulted if $@Role did not.
This commit fixes both the ultimate cause of the segfault, by dropping
attributes with no values, and the proximate cause, by ignoring $@Role
attributes with no values. Either fix by itself would be sufficient to
avoid the segfault.
Thanks to Tianxiao Gu for reporting the problem.
Bug #54687.
John Darrington [Fri, 6 Jul 2018 14:19:24 +0000 (16:19 +0200)]
Increase the required Gtk+ version to 3.18.0
Since ssw requires this version it is not sensible for
pspp have different requirements.
* configure.ac: Update Gtk+ version number.
* INSTALL: Update Gtk+ version number.
John Darrington [Fri, 6 Jul 2018 12:13:58 +0000 (14:13 +0200)]
Recommend Gtk+ version 3.22 or later.
Adresses concern in bug #52500
* INSTALL: Add a comment about GTK+ version
John Darrington [Fri, 6 Jul 2018 10:19:45 +0000 (12:19 +0200)]
ODS reader: Deal with case where /READNAMES vs. non-unity column spans.
* src/data/ods-reader.c (ods_make_reader): Populate var_specs for the entire
column span.
* tests/language/data-io/readnames.ods: New file
* tests/automake.mk: Add it.
* tests/language/data-io/get-data-spreadsheet.at: New test.
John Darrington [Thu, 5 Jul 2018 19:14:48 +0000 (21:14 +0200)]
Change signature of sheet syntax generator function.
* src/ui/gui/psppire-import-assistant.c (sheet_spec_gen_syntax): Pass mutable string
instead of returning char *.
John Darrington [Thu, 5 Jul 2018 16:49:24 +0000 (18:49 +0200)]
Import Assistant: Disallow editing of the data sheet previewer.
* src/ui/gui/psppire-import-assistant.c (formats_page_create): Set the editable
property on the data sheet.
John Darrington [Thu, 5 Jul 2018 12:29:27 +0000 (14:29 +0200)]
Gui Import Assistant: Populate the assistant when importing spreadsheets.
* src/ui/gui/psppire-import-assistant.c
John Darrington [Wed, 4 Jul 2018 19:36:48 +0000 (21:36 +0200)]
Whitespace changes only
John Darrington [Wed, 4 Jul 2018 19:33:28 +0000 (21:33 +0200)]
Update comments.
* src/data/spreadsheet-reader.h (struct spreadsheet_read_options): Elaborate
comments.
John Darrington [Wed, 4 Jul 2018 13:55:26 +0000 (15:55 +0200)]
Import Assistant: Fix minor memory leak.
* src/ui/gui/psppire-import-assistant.c (prepare_formats_page): Reduce scope and
introduce dereference variable when no longer needed.
John Darrington [Wed, 4 Jul 2018 11:12:25 +0000 (13:12 +0200)]
Fix crash when attempting to add a new variable in the middle of the dictionary.
Fixes bug #52551.
* src/ui/gui/psppire-variable-sheet.c (change_var_property): Don't attempt to
alter a variable property if it's index is more than one below the last index.
John Darrington [Wed, 4 Jul 2018 06:33:54 +0000 (08:33 +0200)]
Updated translations from translationproject.org
* po/uk.po: Update Ukranian translation.
Friedrich Beckmann [Sun, 3 Jun 2018 21:24:54 +0000 (23:24 +0200)]
gui: fixed crash when entering data for user defined currency variable
psppire crashed when data is entered for a variable of type
user defined currency. The bug description is:
https://savannah.gnu.org/bugs/index.php?54036
which was first reported by Larissa Setzer. The reason was
that currency format was not handled as number. This patch
fixes this bug.
Ben Pfaff [Mon, 30 Apr 2018 15:15:13 +0000 (08:15 -0700)]
tests: Add missing file.
Fixes: 59e520005100 ("New command SAVE DATA COLLECTION.")
Ben Pfaff [Fri, 20 Apr 2018 06:00:41 +0000 (23:00 -0700)]
New command SAVE DATA COLLECTION.
Requested by Dave Trollope.
Ben Pfaff [Mon, 30 Apr 2018 00:15:54 +0000 (17:15 -0700)]
Make libxml2 a required build dependency.
This makes the logic for what is required versus optional much simpler. An
upcoming commit will introduce a new libxml2 user.
Ben Pfaff [Wed, 21 Feb 2018 19:40:26 +0000 (11:40 -0800)]
SAVE TRANSLATE: Allow variable names with space, etc. in output.
The SPSS manuals actually document this to work and I've never noticed
before. This fixes the feature omission.
Reported by Elio Spinello <elio@drspinello.com>.