appstream provides the metainfo.its file which is required for
xgettext to extract the translation strings of the
src/ui/gui/org.fsf.pspp.metainfo.xml.in file
The metainfo.its file is located in /usr/share/gettext/its on
debian and on opensuse. It is provided by the packages
John Darrington [Sat, 5 Sep 2020 03:08:12 +0000 (05:08 +0200)]
Remove the --enable-debug configure option.
In practice, it is faster and simpler to make local modifications
to the respective files which debugging rather than reconfiguring
with --enable-debug. Furthermore this is just another configure
option which confuses users and serves little purpose.
John Darrington [Sat, 5 Sep 2020 02:31:28 +0000 (04:31 +0200)]
po/automake.mk: Fixed typo in variable names.
This resulted in po/pspp.pot not getting updated when it should have been.
This is a very good demonstration of the reason why carefully desigined
languages should insist on a variable being declared before it is used.
Also make the file depend on Makefile, so that it gets rebuilt when the
PACKAGE VERSION changes.
Ben Pfaff [Wed, 2 Sep 2020 04:42:35 +0000 (21:42 -0700)]
make-file: Pass O_BINARY or O_TEXT to open() call in replace_file_start().
It's hard to imagine why this would make a difference on a real system,
because the file descriptor obtained from open() is passed to fdopen(),
which is documented to determine whether the stream is text or binary
based on the mode string. However, bug #40223 implies that it makes a
difference. I hope that this commit fixes the problem (if any!).
Ben Pfaff [Mon, 31 Aug 2020 16:03:24 +0000 (09:03 -0700)]
Makefile.am: Suppress GCC 10.x warning in gl/careadlinkat.c.
This suppresses an error in gl/careadlinkat.c that otherwise can't be
avoided in GCC 10.x:
../../gl/careadlinkat.c: In function ‘careadlinkat’:
cc1: error: function may return address of local variable
John Darrington [Sun, 30 Aug 2020 05:43:32 +0000 (07:43 +0200)]
dummy.c: Conform to exact prototypes
Apparently certain toolchains complain if the symbols in dummy.c do not
exactly match their declarations. This should not be a problem unless
the compiler has enabled a lot of warnings, and is treating those warnings
as errors, (which is inadvisable except under very special circumstances).
However, it appears that some people are doing that.
John Darrington [Sun, 30 Aug 2020 05:45:01 +0000 (07:45 +0200)]
Remove _base_init functions from custom widget definitions.
These served no purpose, and are in Gtk+ only for reasons of
legacy so far as I can make out. Also use G_TYPE_DEFINE macros
instead of explicit *_get_type function definitions.
xml-parser-generator - iterate over sorted dict - #58975
I sort the dict before iteration because the normal
iterator over a dict is not reproducible and will generate
different code in each run. This will work but the
build is not reproducible.
John Darrington [Sat, 29 Aug 2020 06:26:23 +0000 (08:26 +0200)]
src/ui/gui/psppire-conf.c: Use GError instead of strerror.
Apparently the use of strerror was causing problems on certain
platforms. In this case, since the function being checked provides
a GError argument it makes sense to use that instead.
Warning: adhere to const qualifier for initializations and assignments
This commit avoids the warnings:
warning: initialization discards ‘const’ qualifier from pointer target type
warning: assignment discards ‘const’ qualifier from pointer target type
Warnings: missing initializer for value_tables and function type cast (GObject)
I fixed the warnings:
warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’
warning: cast between incompatible function types
by replacing the handwritten type info code with G_DEFINE_TYPE...
macros (preferred). When this was not possible due to usage of
base init functions I added casts and the initializer.
Warnings: add AM_CFLAGS also for the psppire build
With the new setup the psppire and glade build honours the
AM_CFLAGS setup. This includes the Wextra warnings which
show some more warnings. The two checks which are disabled are
-Wno-sign-compare : disabled also for core pspp
-Wno-unused-parameter : many callbacks result in unused parameters
limit the number of variables in barchart from crosstabs #58968
The barchart was created with more than two variables from
the crosstabs subcommand. I added an assertion and limit
the number of variables to two. This bug resulted in a
regression failure (crash) for test
fixed range check in parse_record_placement (32Bit/64Bit issue) #58968
The regression failed for test "lexer crash due to overflow" (403)
on i386 architecture. The reason is that long is 64Bit on amd64 while
it is 32Bit on i386. The code used long as type that can hold larger
values than int which does not work on 32Bit systems.
The change keeps the value as double as long as the range checks are done.
sys-file-reader: get_text_token did not set delimiter - bug #58943
parse_mrsets used loop local variables which were not initialized.
The regression worked with low compiler optimization levels because
the value for "delimiter" was kept over the loop iterations.
get_text_token did not set the delimiter value when only delimiters
are left in the string. I set the delimiter value to the last value
in the string in that case. I initialized the variables to see the
bug also in -O0.
Ben Pfaff [Sun, 2 Aug 2020 21:26:31 +0000 (21:26 +0000)]
tests: More character encoding issues on command line.
Unix-like systems don't have a command-line encoding, so we can pass
whatever bytes we want. mingw uses some particular encoding for
command line arguments, so this screws up trying to pass UTF-8 in. This
commit side-steps the problem by passing only ASCII characters on the
command line and making the test program decode the bytes.
Ben Pfaff [Sun, 2 Aug 2020 21:26:31 +0000 (21:26 +0000)]
tests: Avoid dealing with character encoding issues on command line.
Unix-like systems don't have a command-line encoding, so we can pass
whatever bytes we want. mingw uses some particular encoding for
command line arguments, so this screws up trying to pass UTF-8 in. This
commit side-steps the problem by passing only ASCII characters on the
command line and making the test program decode the bytes.
Ben Pfaff [Sun, 2 Aug 2020 19:03:42 +0000 (19:03 +0000)]
tests: Don't output to PDF without a good reason.
PDF output can cause spurious error messages from Pango to appear in the
output (which would be nice to fix but I'm not sure how) and it's not
always configured in, so omit it in MRSETS where it's not really needed.