pspp
3 years agolib/ptukey.c: Use the standard macro INFINITY from the math library
John Darrington [Sat, 4 Jul 2020 06:38:33 +0000 (08:38 +0200)]
lib/ptukey.c: Use the standard macro INFINITY from the math library

3 years agoChange all instances of "help_page" to "help-page".
John Darrington [Sat, 4 Jul 2020 06:38:33 +0000 (08:38 +0200)]
Change all instances of "help_page" to "help-page".

Signal and property names are documented as treating
'-' and '_' as equivalent.  However it helps when grepping
files if we use just one orthography.

3 years agoConditional Compilation per GCS 3.5
John Darrington [Sat, 4 Jul 2020 06:38:33 +0000 (08:38 +0200)]
Conditional Compilation per GCS 3.5

Deal with conditional compilation using the way recommended by
the GNU Coding Standards Section 3.5

https://www.gnu.org/prep/standards/html_node/Conditional-Compilation.html#Conditional-Compilation

3 years agoConform to GNU nomenclature.
John Darrington [Sat, 4 Jul 2020 06:38:33 +0000 (08:38 +0200)]
Conform to GNU nomenclature.

3 years agoFix memory leak introduced in commit e2039bc0694b89d26065899d9ed20f9bb42426f4
John Darrington [Sat, 4 Jul 2020 06:38:33 +0000 (08:38 +0200)]
Fix memory leak introduced in commit e2039bc0694b89d26065899d9ed20f9bb42426f4

3 years agoFollow-up to bugfix #58664
John Darrington [Sat, 4 Jul 2020 06:38:33 +0000 (08:38 +0200)]
Follow-up to bugfix #58664

If the width of a variable changes, then implicitly so does its
missing values --- even if the number of missing values is zero.
This is because the variable's width is cached in the missing_value
struct itself.

3 years agoFix bug #58664
John Darrington [Sat, 4 Jul 2020 06:38:33 +0000 (08:38 +0200)]
Fix bug #58664

3 years agotrim.c: avoid zero size xnrealloc memory allocation
Friedrich Beckmann [Sun, 28 Jun 2020 19:51:09 +0000 (21:51 +0200)]
trim.c: avoid zero size xnrealloc memory allocation

Without the patch the regression fails on test

GET with /KEEP=ALL crashes -- uncompressed

when I compile with -fsanitize=address on MacOS. The reason
is that xnrealloc is called with a zero size allocation. I
simply avoid this, although it might be perfectly o.k. to do so.

3 years agodesktop: open a file via xdg-open without additional output window
Friedrich Beckmann [Sun, 28 Jun 2020 16:46:43 +0000 (18:46 +0200)]
desktop: open a file via xdg-open without additional output window

Currently there is a difference between opening an additional data
file via the Edit->Open menu or by opening a file via xdg-open (same
for doubleclick on Filebrowser). In the latter case the on_open
callback is called which runs an additional post_initialize. That
results in an additional output window.

I changed the behavior such that post_initialize is only called
when there is no psppire window yet. That happens when psppire
is started from a terminal with the file as argument on linux.
Further I check if there is an empty datawindow and replace that
in the same way as it is done via the Edit->Open menu.

3 years agoFix bug #54784 (again).
John Darrington [Sat, 27 Jun 2020 16:00:16 +0000 (18:00 +0200)]
Fix bug #54784 (again).

Certain GUI entities hold pointers to variables.  To ensure that
the variables survive the lifetime of the entity which holds the
pointer, the entity must take a reference.

This is particularly important where a transformation which involves
TEMPORARY of a filter is involved.

3 years agoIntroduce reference counting for variables.
John Darrington [Sat, 27 Jun 2020 15:36:48 +0000 (17:36 +0200)]
Introduce reference counting for variables.

Necessary for upcomming commit.

3 years agopsppire-output-view.c (psppire_output_view_destroy): Fix memory leak.
John Darrington [Sat, 27 Jun 2020 11:26:39 +0000 (13:26 +0200)]
psppire-output-view.c (psppire_output_view_destroy): Fix memory leak.

3 years agodictionary.c: Don't emit callbacks when the dictionary is destroyed.
John Darrington [Sat, 27 Jun 2020 11:15:31 +0000 (13:15 +0200)]
dictionary.c: Don't emit callbacks when the dictionary is destroyed.

Also reorder some functions in order of dependence.

3 years agodata_parser: Keep a reference to the dictionary
John Darrington [Sat, 27 Jun 2020 11:15:31 +0000 (13:15 +0200)]
data_parser:  Keep a reference to the dictionary

3 years agoRevert "Fixed a use after free error when manipulating datasets."
John Darrington [Sat, 27 Jun 2020 11:15:31 +0000 (13:15 +0200)]
Revert "Fixed a use after free error when manipulating datasets."

This reverts commit 1d06ba6d498b9446d5fb8c432d24efb2bee713a9
which caused memory leaks.

3 years agotypo in title - Lable -> Label
Friedrich Beckmann [Sat, 27 Jun 2020 08:11:01 +0000 (10:11 +0200)]
typo in title - Lable -> Label

3 years agoswitched to portable control key <Primary> for accellerators
Friedrich Beckmann [Sat, 27 Jun 2020 07:44:16 +0000 (09:44 +0200)]
switched to portable control key <Primary> for accellerators

gtk supports the "Primary" key which translates to the "CMD" key
on MacOS and "Ctrl" on linux. So this is a portable way to
say the "Copy" via key.

3 years agoRevert "Fix crash in gui, when T-TEST or ONEWAY while a filter is set."
John Darrington [Sat, 27 Jun 2020 07:19:27 +0000 (09:19 +0200)]
Revert "Fix crash in gui, when T-TEST or ONEWAY while a filter is set."

This reverts commit d01a4986ffc8f5afa5ee7d29dd7233143b6de7ec
which caused memory leaks.

3 years agoImprove behaviour when importing trivial csv files.
John Darrington [Sat, 27 Jun 2020 07:19:27 +0000 (09:19 +0200)]
Improve behaviour when importing trivial csv files.

This is a follow up to commit 5312cd16f3d7226d4e62a847d64849c57d4b4843
Don't activate any check button, if there is no obvious candidate.

3 years agoAdd a test for bug #58598
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
Add a test for bug #58598

3 years agosrc/dictionary.c: Move dict_ref next to dict_unref
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
src/dictionary.c: Move dict_ref next to dict_unref

This make it easier for me to hack when I'm tracking
down memory (de)allocation errors.

3 years agoPsppireDataWindow: Fix use after free error
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
PsppireDataWindow: Fix use after free error

3 years agoPSPPIRE: Fix memory leaks in dialogs
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
PSPPIRE: Fix memory leaks in dialogs

3 years agoPSPPIRE: fix leaks of GtkAccelGroup
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
PSPPIRE: fix leaks of GtkAccelGroup

3 years agoReplace some calls to xcalloc with XCALLOC
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
Replace some calls to xcalloc with XCALLOC

3 years agosrc/ui/gui/windows-menu.c (repopulate_windows_menu): Avoid memory leak
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
src/ui/gui/windows-menu.c (repopulate_windows_menu): Avoid memory leak

3 years agoFix memory leak in src/output/table.c
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
Fix memory leak in src/output/table.c

3 years agoPSPPIRE: Fix memory leaks when creating windows
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
PSPPIRE: Fix memory leaks when creating windows

3 years agoPSPPIRE: Fix crash when cleaning after bad text import.
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
PSPPIRE: Fix crash when cleaning after bad text import.

The wrong pointer was being freed after cleaning up when
attempting to import text files with very long lines.

3 years agoPSPPIRE: Avoid memory leaks from popup memnus
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
PSPPIRE: Avoid memory leaks from popup memnus

3 years agoGUI: Fix memory leak on startup
John Darrington [Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)]
GUI: Fix memory leak on startup

3 years agopsppire-import: fixed bug with short csv file import
Friedrich Beckmann [Fri, 26 Jun 2020 16:04:17 +0000 (18:04 +0200)]
psppire-import: fixed bug with short csv file import

The import crashed with a short csv file.
Closes: https://savannah.gnu.org/bugs/?58644
3 years agopspp-mode.el: update elpa autoload comment
Friedrich Beckmann [Fri, 26 Jun 2020 12:46:54 +0000 (14:46 +0200)]
pspp-mode.el: update elpa autoload comment

The pspp-mode is not automagically active in the 1.2.0-5 debian
release which install the emacs pspp mode. The reason was this
wrong elpa autoload comment.

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.