pspp
3 years agode.po: Fixed wrong translation
Friedrich Beckmann [Fri, 26 Jun 2020 06:48:31 +0000 (08:48 +0200)]
de.po: Fixed wrong translation

3 years agoadded title to variable sheet dialogs
Friedrich Beckmann [Fri, 26 Jun 2020 06:37:17 +0000 (08:37 +0200)]
added title to variable sheet dialogs

3 years agohelp: added help page info to variable sheet dialogs
Friedrich Beckmann [Fri, 26 Jun 2020 06:15:52 +0000 (08:15 +0200)]
help: added help page info to variable sheet dialogs

3 years agohelp: removed yelp support
Friedrich Beckmann [Thu, 25 Jun 2020 17:53:53 +0000 (19:53 +0200)]
help: removed yelp support

The yelp tool is broken for three years and cannot show uris with
a tag. John wrote a bug report three years ago but it is not fixed
yet.

https://gitlab.gnome.org/GNOME/yelp/-/issues/116

Once yelp works again, we can revert this commit.

3 years agoautomake.mk - added 96x96 size
Friedrich Beckmann [Thu, 25 Jun 2020 11:18:18 +0000 (13:18 +0200)]
automake.mk - added 96x96 size

3 years agoartwork: categories icons moved according to new strategy
Friedrich Beckmann [Wed, 24 Jun 2020 15:48:49 +0000 (17:48 +0200)]
artwork: categories icons moved according to new strategy

3 years agoartwork: actions icons according to new strategy
Friedrich Beckmann [Wed, 24 Jun 2020 15:47:04 +0000 (17:47 +0200)]
artwork: actions icons according to new strategy

3 years agoartwork: apps - pspp.svg - removed all but scalable version from artwork
Friedrich Beckmann [Wed, 24 Jun 2020 15:39:58 +0000 (17:39 +0200)]
artwork: apps - pspp.svg - removed all but scalable version from artwork

3 years agoicons: create scaled bitmaps from one svg source
Friedrich Beckmann [Wed, 24 Jun 2020 15:16:34 +0000 (17:16 +0200)]
icons: create scaled bitmaps from one svg source

Using file-svg-load in gimp allows to scale an svg to
an arbitrary size. The artwork directory only needs
to contain svg files which differ in layout.

3 years agogui: added help in recode.ui subdialog
Friedrich Beckmann [Sun, 21 Jun 2020 22:16:04 +0000 (00:16 +0200)]
gui: added help in recode.ui subdialog

3 years agometainfo.xml - modified after validation
Friedrich Beckmann [Sun, 21 Jun 2020 11:57:40 +0000 (13:57 +0200)]
metainfo.xml - modified after validation

3 years agodesktop: add mimetypes application/x-spss-sps and application/x-spss-spv
Friedrich Beckmann [Sun, 21 Jun 2020 09:48:41 +0000 (11:48 +0200)]
desktop: add mimetypes application/x-spss-sps and application/x-spss-spv

I added an xml mime package which relates the files .sps and .spv
to a mime type. Via that mime type the files can then be openend
by clicking in the file browser.

3 years agodesktop: reversed mimetype to application/x-spss-sps
Friedrich Beckmann [Sun, 21 Jun 2020 09:39:53 +0000 (11:39 +0200)]
desktop: reversed mimetype to application/x-spss-sps

If the mimetype is of type text, then the icons are not found
or displayed in gnome Files. No application except apt seems
to define text based mime types. And for apt it does not work
either. So I reverse.

3 years agoFixed some calls to xcalloc where the quantity and size parameters had been transposed.
John Darrington [Sun, 21 Jun 2020 11:21:03 +0000 (13:21 +0200)]
Fixed some calls to xcalloc where the quantity and size parameters had been transposed.

3 years agorecode dialog: set "old and new values" sentivitity as appropriate.
John Darrington [Sun, 21 Jun 2020 07:34:11 +0000 (09:34 +0200)]
recode dialog: set "old and new values" sentivitity as appropriate.

The "Old and New Values" button should only be clickable when a row
is selected in the corresponding treeview.  This was not the
case.

Fixes bug: #58557

3 years agomatrix-reader: Fix possibly-zero second argument to xcalloc().
Ben Pfaff [Sat, 20 Jun 2020 23:49:59 +0000 (23:49 +0000)]
matrix-reader: Fix possibly-zero second argument to xcalloc().

xcalloc() is documented to disallow zero for its second argument:

  /* Allocate zeroed memory for N elements of S bytes, with error
     checking.  S must be nonzero.  */
  void *
  xcalloc (size_t n, size_t s)

This code didn't always call it properly.

Found with AFL++.
Thanks to Andrea Fioraldi for reporting the problem.
Bug #58600.

3 years agobuild-aux: Ignore more files.
Ben Pfaff [Sat, 20 Jun 2020 23:36:20 +0000 (23:36 +0000)]
build-aux: Ignore more files.

These entries were added automatically by running Smake.

3 years agosys-file-reader: Tolerate duplicate document records.
Ben Pfaff [Sat, 20 Jun 2020 23:33:14 +0000 (23:33 +0000)]
sys-file-reader: Tolerate duplicate document records.

3 years agosys-file-reader: Tolerate invalid variable names.
Ben Pfaff [Sat, 20 Jun 2020 23:26:52 +0000 (23:26 +0000)]
sys-file-reader: Tolerate invalid variable names.

This should make PSPP better at reading system files that have encoding
issues.

3 years agosys-file-reader: Accept bad variable indexes, with warnings.
Ben Pfaff [Sat, 20 Jun 2020 21:52:40 +0000 (21:52 +0000)]
sys-file-reader: Accept bad variable indexes, with warnings.

The SPSS file writer software at
https://packagist.org/packages/tiamo/spss sometimes generates malformed
variable indexes for weighting variables or value label records.  PSPP
until now has rejected these files entirely.  This commit should make
it issue a warning instead.

Thanks to István Ignácz for reporting this issue at
https://lists.gnu.org/archive/html/pspp-users/2020-06/msg00012.html

3 years agogui: Fix compatibility with older gettext.
Ben Pfaff [Sat, 20 Jun 2020 21:37:06 +0000 (21:37 +0000)]
gui: Fix compatibility with older gettext.

Older gettext does not recognize the metainfo.xml extension, only
appdata.xml.  This commit allows msgfmt to work with such older setups.

CC: Friedrich Beckmann <friedrich.beckmann@gmx.de>
Fixes: 86c5d611b3f2 ("metainfo.xml: changed id to org.fsf.pspp, added more information")
3 years agoAllow /RENAME target to use the TO keyword.
John Darrington [Sat, 20 Jun 2020 18:54:28 +0000 (20:54 +0200)]
Allow /RENAME target to use the TO keyword.

Allow code such as
 SAVE OUTFILE = "foo.sav" /RENAME= (A B C = v1 TO v2).

Closes bug: #57752

3 years agomain.c: set "register-session" property for gtk_application
Friedrich Beckmann [Sat, 20 Jun 2020 13:48:57 +0000 (15:48 +0200)]
main.c: set "register-session" property for gtk_application

To open an application by clicking an associated file like
grid.sps in the Finder on Macos requires that the property
"register-session" is set for gtk_application. I did not
find a negative impact on Debian bullseye so I hope this
works also on other platforms. The gtk support for this
will be in the next gtk-3-24 release.

See: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2098

3 years agodesktop file: added Keywords and removed Education category
Friedrich Beckmann [Sat, 20 Jun 2020 13:24:04 +0000 (15:24 +0200)]
desktop file: added Keywords and removed Education category

During debian packaging of 1.2.0-5 the missing Keywords entry
was mentionend. I removed the Education category because this
was mentioned also. Education and Science are both toplevel
categories. I added also two more mimetypes for .sps and .spv
files.

3 years agometainfo.xml: changed id to org.fsf.pspp, added more information
Friedrich Beckmann [Sat, 20 Jun 2020 11:12:43 +0000 (13:12 +0200)]
metainfo.xml: changed id to org.fsf.pspp, added more information

I read the documentation about the metainfo.xml content

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html

and changed/added some information

  - changed id from pspp.desktop to org.fsf.pspp
  - added categories
  - added releases
  - added provides

3 years agodesktop: changed translations to msgfmt and xgettext
Friedrich Beckmann [Sat, 20 Jun 2020 10:02:15 +0000 (12:02 +0200)]
desktop: changed translations to msgfmt and xgettext

During the build of the debian package 1.2.0-5 it turned out
that the pspp.appdata.xml file has a wrong structure with
respect to the translations. I did the following things

  - renamed pspp.appdata.xml to org.fsf.pspp.metainfo.xml
  - added gettext translation support for org.fsf.metainfo.xml
  - renamed pspp.desktop to org.fsf.pspp.desktop
  - replaced gen-det-desktop.sh based translation with gettext

gettext has now support for translating .desktop and .metainfo.xml
files. I took the naming conventions from the freedesktop and gnome
documentation, i.e. metainfo instead of appdata and the use of
an organization name.

3 years agoAdd a test for bug #58591
John Darrington [Sat, 20 Jun 2020 14:11:32 +0000 (16:11 +0200)]
Add a test for bug #58591

3 years agopsppire-dict.c: Avoid compiler warning
John Darrington [Sat, 20 Jun 2020 05:29:11 +0000 (07:29 +0200)]
psppire-dict.c: Avoid compiler warning

3 years agoAvoid negative overflow when the text output driver tries to print
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Avoid negative overflow when the text output driver tries to print
random binary data.

libpspp/u8-line.c (u8_line_find_pos): Deal properly with the case
where the target is not found in the search string.

libpspp/u8-line.c (u8_line_reserve): Add some assertions to prevent
negative overflow into lower function calls.

Reported by: Andrea Fioraldi

Fixes bug: #58591

3 years agolibpspp/str.c (ds_splice_uninit): Add assertion
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
libpspp/str.c (ds_splice_uninit): Add assertion

3 years agoFixed a use after free error when manipulating datasets.
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Fixed a use after free error when manipulating datasets.

Reported by: Andrea Fioraldi

Fixes bug: #58598

3 years agospv.c: Avoid warnings about uninitialised variables
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
spv.c: Avoid warnings about uninitialised variables

3 years agofind-dialog.c: Replace exp10 with our own integer version
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
find-dialog.c: Replace exp10 with our own integer version

A previous commit introduced the use of exp10 from the standard
math library.  However the use cases here don't need floating
point operands, and it's smaller and faster to implement our
own integer version.

3 years agoRevert "exp10 replaced with pow when exp10 is not available"
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Revert "exp10 replaced with pow when exp10 is not available"

This reverts commit 5f1ab307d380c4d60410b911a272b6870b65c2d8.
See the following commit for explanation.

3 years agoFix buffer overflow in lex_ellipsize__
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Fix buffer overflow in lex_ellipsize__

Reported by: Andrea Fioraldi

Fixes bug: #58586

3 years agoFix crash when parsing a badly formatted variable string.
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Fix crash when parsing a badly formatted variable string.

Reported by: Andrea Fioraldi

Fixes bug: #58594

3 years agoFix buffer overflow in linear regression.
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Fix buffer overflow in linear regression.

When the dependent variable and the indepdendent variable
are one and the same (a rather pointless situation), a buffer overflow
would occur.  This change fixes that.

Reported by: Andrea Fioraldi

Fixes bug: #58599

3 years agoFix crash when cleaning up after parsing bad MODIFY VARIABLES.
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Fix crash when cleaning up after parsing bad MODIFY VARIABLES.

Reported by: Andrea Fioraldi

Fixes Bug: #58590

3 years agoDon't crash when parsing bad MATRIX DATA commands.
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Don't crash when parsing bad MATRIX DATA commands.

Reported by: Andrea Fioraldi

Fixes bug: #58596

3 years agoFix use after free error in vector command.
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Fix use after free error in vector command.

Reported by: Andrea Fioraldi.

Fixes bug: #58592

3 years agoDon't ref or unref the inline file handle.
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Don't ref or unref the inline file handle.

The special file handle 'inline_file' is a singleton.  It should not
be reffed, or unreffed.   Doing so causes a crash.

Reported by Andrea Fioraldi.

Fixes bug #58601

3 years agoUpdate spread-sheet-widget to version 0.4
John Darrington [Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)]
Update spread-sheet-widget to version 0.4

3 years agofile-handle-def.h (fh_ref): Add WARN_UNUSED_RESULT qualifier
John Darrington [Sun, 14 Jun 2020 15:42:45 +0000 (17:42 +0200)]
file-handle-def.h (fh_ref): Add WARN_UNUSED_RESULT qualifier

3 years agoFix broken build when ./configure --without-gui is used
John Darrington [Sun, 14 Jun 2020 15:01:39 +0000 (17:01 +0200)]
Fix broken build when ./configure --without-gui is used

3 years agoPSPPIRE: Add feature to search for text in the syntax window.
John Darrington [Sun, 14 Jun 2020 13:30:47 +0000 (15:30 +0200)]
PSPPIRE: Add feature to search for text in the syntax window.

3 years agoexp10 replaced with pow when exp10 is not available
Friedrich Beckmann [Thu, 18 Jun 2020 06:15:42 +0000 (08:15 +0200)]
exp10 replaced with pow when exp10 is not available

The exp10 function that was introduced by commit aae1a8f067ddd9c09
in the find-dialog is not available on MacOS. I added a check
and replace it with pow if exp10 is not available.

3 years agoReplace use of deprecated GTimeVal with GDateTime
John Darrington [Sun, 14 Jun 2020 15:07:27 +0000 (17:07 +0200)]
Replace use of deprecated GTimeVal with GDateTime

3 years agoRemove trailing whitespace at end of lines
John Darrington [Sun, 14 Jun 2020 15:07:27 +0000 (17:07 +0200)]
Remove trailing whitespace at end of lines

3 years agosrc/libpspp/message.h (msg_error): Add printf_format attribute
John Darrington [Sun, 14 Jun 2020 15:07:27 +0000 (17:07 +0200)]
src/libpspp/message.h (msg_error): Add printf_format attribute

3 years agoGUI: Find dialog: Compare only to the decimal places of the print format.
John Darrington [Sun, 14 Jun 2020 15:07:27 +0000 (17:07 +0200)]
GUI: Find dialog: Compare only to the decimal places of the print format.

When using the find dialog of the data editor, previously a numeric value
was compared exactly on it's underlying representation (a IEEE754 double
precision float).   This is problematic, because most such floats cannot
be precisely represented in a decimal format, and even if they can be, the
precision required might well exceed that displayed in the data editor.

This change rounds both the reference and the comparand to the number of
decimal places indicated by the variable's print format.

3 years agohelp: added help_page property at various ui files
Friedrich Beckmann [Sun, 14 Jun 2020 09:02:05 +0000 (11:02 +0200)]
help: added help_page property at various ui files

I added the help_page property in the
 - k-independent.ui
 - k-related.ui
and at various sub dialogs where options are set. With the
help_page property a more meaningful page in the documentation
is called instead of the toplevel documentation.

3 years agodoc: fixed references for DESCRIPTIVES, T-TEST, RELIABILITY and REGRESSION
Friedrich Beckmann [Fri, 12 Jun 2020 13:35:19 +0000 (15:35 +0200)]
doc: fixed references for DESCRIPTIVES, T-TEST, RELIABILITY and REGRESSION

The example for the descriptives command and the command
description had the same reference. Same for T-TEST, RELIABILITY
and REGRESSION.

3 years agodoc: added prepdoc.sh script for simple working on documentation
Friedrich Beckmann [Fri, 12 Jun 2020 15:07:27 +0000 (17:07 +0200)]
doc: added prepdoc.sh script for simple working on documentation

I added the prepdoc.sh script to allow to work on the documentation
without having the full build environment. You can just checkout
from git and then run

  cd pspp/doc
  ./prepdoc.sh
  makeinfo --html pspp.texi
  open ./pspp/index.html

Maybe it is then easier for contributors to work on the documentation
without having to run Smake and configure with all the required
packages. prepdoc.sh will generate some dummy required texi files
which are normally generated during the build process.

3 years agotests: Fix misspelling in test name.
Ben Pfaff [Wed, 10 Jun 2020 16:58:32 +0000 (16:58 +0000)]
tests: Fix misspelling in test name.

3 years agoWhitespace changes only.
John Darrington [Sun, 7 Jun 2020 10:32:44 +0000 (12:32 +0200)]
Whitespace changes only.

Remove whitespace following opening parentheses and preceding closing
parentheses.

3 years agoUpdate recommended gnulib commit
John Darrington [Sun, 7 Jun 2020 10:24:27 +0000 (12:24 +0200)]
Update recommended gnulib commit

3 years agoFix crash when using the find function.
John Darrington [Sun, 7 Jun 2020 13:41:54 +0000 (15:41 +0200)]
Fix crash when using the find function.

It looks as if some experimental code had escaped the lab here.

3 years agofixed wrong goto case after opening .sav file
Friedrich Beckmann [Sun, 7 Jun 2020 09:49:05 +0000 (11:49 +0200)]
fixed wrong goto case after opening .sav file

When a .sav file was openend, then a wrong "goto case" option
is visible in the variable view. With this fix you can
open a new dataset via the file browser and the correct menu
is shown.

3 years agofixed goto case dialog
Friedrich Beckmann [Sun, 7 Jun 2020 07:08:01 +0000 (09:08 +0200)]
fixed goto case dialog

The goto case dialog did not work. The GtkTreeModel cast of the datasheet
does not work because datasheet is not derived from treemodel. Changed
types from casenumber to gint because the gtktreemodel function returns gint.
casenumber is long which my be bigger than int but the treemodel cant handle
this anyway.

3 years agofixed variable type change during text import bug #58298
Friedrich Beckmann [Sat, 6 Jun 2020 19:00:53 +0000 (21:00 +0200)]
fixed variable type change during text import bug #58298

Changing the variable type during the import dialog resulted
in a crash. The reason is that the import data is stored as
strings in a treeview and converted to union value depending
on the variable type. When the variable type is changed, there
is a discrepancy between then caseproto in the reader and the
variable. This results in an assertion.

As a fix I store the dictionary at the time of creation of the
casereader. When a variable is changed i reinitialize the
casereader.

3 years agoRemove #include "gl/dosname.h"
John Darrington [Sun, 31 May 2020 11:38:21 +0000 (13:38 +0200)]
Remove #include "gl/dosname.h"

This file is no longer part of gnublib

3 years agoavoid crash by drag-n-drop in variable dialog #58457
Friedrich Beckmann [Fri, 5 Jun 2020 09:33:52 +0000 (11:33 +0200)]
avoid crash by drag-n-drop in variable dialog #58457

The drag-n-drop was enabled in the variable dialog but
actually doing it results in a crash. See:

https://savannah.gnu.org/bugs/index.php?58475

3 years agoimprove deletion of consecutive variables #55357
Friedrich Beckmann [Fri, 5 Jun 2020 06:26:13 +0000 (08:26 +0200)]
improve deletion of consecutive variables #55357

Deleting many variables (like 300) via the gui
in a dataset with many variables (like 500) results
in long gui response times because each variable is
deleted individually by iteration. This results in many
items-changed callbacks which will result in long
gui waiting times. This patch reduces the number of
callbacks and the gui response is much faster.

3 years agopsppire: Deal properly with inverted variable selections.
John Darrington [Sun, 31 May 2020 11:31:45 +0000 (13:31 +0200)]
psppire: Deal properly with inverted variable selections.

When deleting variables, if the start of a selected range is greater
than the end of the range, then swap the start and end.

3 years agoinsert variables in var view (#55357)
Friedrich Beckmann [Sun, 31 May 2020 22:39:59 +0000 (00:39 +0200)]
insert variables in var view (#55357)

The variable insert procedure inserted new variables
via the datasheet window even if the variable
window was visible. Directly after startup the
dataview is not realized and that prevents a correct
update of the variable view. I changed the procedure
such that the ssw items_changed_cb is called for
the widgets in the variable view and the window
is correctly updated.

4 years agoCorrect syntax when generating code for autorecode with blanks as missing
John Darrington [Sun, 26 Apr 2020 12:25:34 +0000 (14:25 +0200)]
Correct syntax when generating code for autorecode with blanks as missing

4 years agoMakefile.am - added check for debian package directory
Friedrich Beckmann [Thu, 7 May 2020 15:11:52 +0000 (17:11 +0200)]
Makefile.am - added check for debian package directory

The debian package is now also maintained via git

https://salsa.debian.org/science-team/pspp

but that repository contains the distribution package. Due to the
.git directory the make process assumes that we are building
a distribution file and adds a check for some missing files. That
check fails if the distribution is under git control. I checked
for the existance of the debian directory as an indicator that
we are building the debian package and disable the check.

4 years agoFix crash when bad autorecode /blank is encountered.
John Darrington [Sun, 26 Apr 2020 12:59:11 +0000 (14:59 +0200)]
Fix crash when bad autorecode /blank is encountered.

Closes bug #58255.

4 years agoMacOS: added a setup section to avoid script in application bundle
Friedrich Beckmann [Tue, 14 Apr 2020 15:09:30 +0000 (17:09 +0200)]
MacOS: added a setup section to avoid script in application bundle

MacOS Catalina has added security features which do not allow to
start an application via a script in an application bundle. See:

https://savannah.gnu.org/bugs/?58128

With this change the application does not need to set environment
variables before start for the relocation.

4 years agosvg2png: Adapted syntax to gimp 2.10.18
Friedrich Beckmann [Tue, 14 Apr 2020 15:03:34 +0000 (17:03 +0200)]
svg2png: Adapted syntax to gimp 2.10.18

The svg2png syntax for gimp does not work for gimp 2.10.18
on MacOS. I replaced the list command with the alternative
syntax.

4 years agoSmake: added more files to remove for clean target
Friedrich Beckmann [Tue, 14 Apr 2020 15:01:08 +0000 (17:01 +0200)]
Smake: added more files to remove for clean target

Some file locations are moved and there are some new files which
are generated. I added some files to the clean target.

4 years agodocumentation: Fix build with some versions of makeinfo.
Ben Pfaff [Sat, 22 Feb 2020 19:50:16 +0000 (19:50 +0000)]
documentation: Fix build with some versions of makeinfo.

Reported by Jeremy Lavergne.

4 years agoFix order of arguments in error message
John Darrington [Sun, 9 Feb 2020 09:15:21 +0000 (10:15 +0100)]
Fix order of arguments in error message

4 years agoFix bug #57731.
John Darrington [Sun, 9 Feb 2020 12:01:12 +0000 (13:01 +0100)]
Fix bug #57731.

4 years agoFix bug #57722.
John Darrington [Sun, 2 Feb 2020 10:51:42 +0000 (11:51 +0100)]
Fix bug #57722.

The McNemar binomial probability should use the minimum of the two dissimilar
group counts.

4 years agopsppire-output-window: Avoid calling gdk_window_begin_draw_frame twice.
Ben Pfaff [Fri, 10 Jan 2020 05:53:54 +0000 (05:53 +0000)]
psppire-output-window: Avoid calling gdk_window_begin_draw_frame twice.

gdk_window_begin_draw_frame() and gdk_window_end_draw_frame() have to
be paired and not recursive, but this code didn't honor that.

Thanks to Harry Thijssen and John Darrington for pointing out the
issue.

4 years agoLIST: Fix case numbering.
Ben Pfaff [Fri, 10 Jan 2020 03:26:57 +0000 (03:26 +0000)]
LIST: Fix case numbering.

Case numbering was wrong when a starting case or a step was specified.

Bug #57534.

4 years agoascii: Correct multiple bugs regarding output width.
Ben Pfaff [Thu, 9 Jan 2020 07:22:05 +0000 (07:22 +0000)]
ascii: Correct multiple bugs regarding output width.

The SET WIDTH setting was ignored.  This makes the code honor it for
output to a file.  For output to a terminal, the terminal's width is
used instead.

Honor changes to SET WIDTH as well.

The code to detect terminal size changes wasn't properly signal safe,
and it was scattered across multiple files.  This centralizes it and
makes it signal safe.

There were bugs in updates to min_hbreak in corner cases.  This fixes
them.

Thanks to Frans Houweling and John Darrington for reporting these
bugs.

4 years agoascii: Fix parsing of -O width=<n> option.
Ben Pfaff [Thu, 9 Jan 2020 07:22:49 +0000 (07:22 +0000)]
ascii: Fix parsing of -O width=<n> option.

4 years agopivot-table: Avoid ctime_r() for portability reasons.
Ben Pfaff [Wed, 1 Jan 2020 17:19:14 +0000 (17:19 +0000)]
pivot-table: Avoid ctime_r() for portability reasons.

ctime_r() isn't in mingw or Gnulib and it's best to avoid it in any
case because POSIX says it is obsolescent and it has buffer overflow
issues.

Reported by Harry Thijssen.

4 years agospv: Make parser generators compatible with python3.
Ben Pfaff [Mon, 30 Dec 2019 15:05:04 +0000 (15:05 +0000)]
spv: Make parser generators compatible with python3.

4 years agodoc: PRINT on DO REPEAT is not yet implemented.
Ben Pfaff [Mon, 30 Dec 2019 06:59:09 +0000 (06:59 +0000)]
doc: PRINT on DO REPEAT is not yet implemented.

Reported by Nolan Void.

4 years agospv: Run Python at build time via $PYTHON variable.
Ben Pfaff [Mon, 30 Dec 2019 06:42:02 +0000 (06:42 +0000)]
spv: Run Python at build time via $PYTHON variable.

This was accidentally being run as literal "python" rather than through
a variable, so it failed on systems where there is no "python" binary
but only python2 or python3.

4 years agopsppire-import-assistant: Implement quotation checkbox and combo box.
Ben Pfaff [Mon, 30 Dec 2019 06:35:16 +0000 (06:35 +0000)]
psppire-import-assistant: Implement quotation checkbox and combo box.

This seems to have been overlooked.

Bug #57457.

4 years agopspp-convert: Add options for selecting variables and controlling output.
Ben Pfaff [Mon, 30 Dec 2019 02:48:53 +0000 (02:48 +0000)]
pspp-convert: Add options for selecting variables and controlling output.

4 years agocairo: Fix font scaling.
Ben Pfaff [Sun, 29 Dec 2019 16:25:57 +0000 (16:25 +0000)]
cairo: Fix font scaling.

It's really a mystery why a 9-point font doesn't appear 9 points tall
in PDF (etc.) output, but it doesn't.  I guess we're doing something
wrong somewhere.  But until we figure out the underlying issue, we need
to scale down font sizes for PDF and not for on-screen use.

This is a slightly better fix for font sizes than the previous commit
3c15b41c036 (pivot-table: Kluge dropping default 9-point font to make
output readable.)

4 years agopivot-table: Kluge dropping default 9-point font to make output readable.
Ben Pfaff [Sun, 29 Dec 2019 15:53:25 +0000 (15:53 +0000)]
pivot-table: Kluge dropping default 9-point font to make output readable.

The default font size for SPV output is normally 9 points, but that
makes the output window hard to read.  This drops that default entirely,
which seems to make the output use a system or Pango default.  This is
probably not the right thing to do--probably we need a way to magnify
the fonts for on-screen display.

This reverts part of commit e3c3fbe8b, which wasn't intended to have a
visible effect but did because it inadvertently introduced a 9-point
default.

Reported by John Darrington.

4 years agopspp-convert: Add --labels, --recode to usage message.
Ben Pfaff [Sun, 29 Dec 2019 15:38:57 +0000 (15:38 +0000)]
pspp-convert: Add --labels, --recode to usage message.

4 years agopspp-convert: Add --labels and --recode options.
Ben Pfaff [Sun, 29 Dec 2019 07:50:47 +0000 (07:50 +0000)]
pspp-convert: Add --labels and --recode options.

Requested by Dave Trollope <dave@knowledgehound.com>.

4 years agopspp-output: Correct manpage.
Ben Pfaff [Sun, 29 Dec 2019 07:33:37 +0000 (07:33 +0000)]
pspp-output: Correct manpage.

This was a cut-and-paste error made without thinking.

4 years agoAdd support for reading and writing SPV files.
Ben Pfaff [Sat, 19 Oct 2019 05:30:43 +0000 (05:30 +0000)]
Add support for reading and writing SPV files.

4 years agopivot-table: Add support for hiding footnotes.
Ben Pfaff [Sun, 29 Dec 2019 05:46:31 +0000 (05:46 +0000)]
pivot-table: Add support for hiding footnotes.

This will get its first real user in an upcoming commit.

4 years agopivot-table: Add support for hiding the caption.
Ben Pfaff [Sun, 29 Dec 2019 05:50:39 +0000 (05:50 +0000)]
pivot-table: Add support for hiding the caption.

This will receive its first real user in an upcoming commit that adds
support for SPV files.

4 years agooutput: Refine support for footnotes, subscripts, and superscripts.
Ben Pfaff [Sun, 29 Dec 2019 05:39:50 +0000 (05:39 +0000)]
output: Refine support for footnotes, subscripts, and superscripts.

The code for all this wasn't fully plumbed through from the pivot table
code down to the drivers.  This commit fixes all that up.

4 years agotable: Factor out common code and improve comments.
Ben Pfaff [Thu, 26 Dec 2019 17:34:14 +0000 (17:34 +0000)]
table: Factor out common code and improve comments.

4 years agotable: Replace table_joined_cell by table_cell.
Ben Pfaff [Thu, 26 Dec 2019 05:50:41 +0000 (05:50 +0000)]
table: Replace table_joined_cell by table_cell.

This eliminates some special cases.

4 years agorender: Fix up layer violation in add_footnote_page().
Ben Pfaff [Thu, 26 Dec 2019 01:14:32 +0000 (01:14 +0000)]
render: Fix up layer violation in add_footnote_page().

The layering violation came from having to look up the default style
for a footer, so we fix it by forbidding footnotes from using the
default style.

4 years agotable: Get rid of TAL_* constants.
Ben Pfaff [Thu, 26 Dec 2019 01:02:43 +0000 (01:02 +0000)]
table: Get rid of TAL_* constants.

These were the same as TABLE_STROKE_* so get rid of the extras.

4 years agotable: Get rid of TAB_* for horizontal and vertical alignment.
Ben Pfaff [Thu, 26 Dec 2019 00:52:33 +0000 (00:52 +0000)]
table: Get rid of TAB_* for horizontal and vertical alignment.

Until now, either TAB_LEFT, TAB_RIGHT, etc. could be used or the
area_style mechanism could be used.  The latter has a superset of the
former's features, so this commit eliminates the former.

4 years agopivot-table: Make pivot_area_get_default_style() return a static copy.
Ben Pfaff [Thu, 26 Dec 2019 00:43:45 +0000 (00:43 +0000)]
pivot-table: Make pivot_area_get_default_style() return a static copy.

The existing callers all want to make their own copy, but an upcoming
new caller wants an existing one, so refactor the interface a bit.