Matthew Fernandez [Sat, 5 Jun 2021 23:53:20 +0000 (16:53 -0700)]
remove unused glcompsetGetGroupId
Matthew Fernandez [Sat, 5 Jun 2021 23:52:44 +0000 (16:52 -0700)]
remove unused glcompsetNextGroupId
Matthew Fernandez [Sat, 5 Jun 2021 23:51:00 +0000 (16:51 -0700)]
remove prototype for non-existent glCompSetRelease
This function was removed in
9a9cfd4e90775aa14a11a0db6745783f3a59ef56.
Matthew Fernandez [Sat, 5 Jun 2021 23:50:17 +0000 (16:50 -0700)]
remove prototype for non-existent glCompSetClick
This function was removed in
9a9cfd4e90775aa14a11a0db6745783f3a59ef56.
Matthew Fernandez [Sat, 5 Jun 2021 23:49:25 +0000 (16:49 -0700)]
remove prototype for non-existent glCompSetHide
This function was removed in
9a9cfd4e90775aa14a11a0db6745783f3a59ef56.
Matthew Fernandez [Sat, 5 Jun 2021 23:48:08 +0000 (16:48 -0700)]
remove prototype for non-existent glCompSetShow
This function was removed in
9a9cfd4e90775aa14a11a0db6745783f3a59ef56.
Matthew Fernandez [Wed, 9 Jun 2021 03:05:46 +0000 (03:05 +0000)]
Merge branch 'smattr/
85FB336B-AC8F-457F-A909-
3140D5898CFF' into 'main'
remove Python 2 support
Closes #1992
See merge request graphviz/graphviz!1987
Matthew Fernandez [Thu, 3 Jun 2021 00:20:18 +0000 (17:20 -0700)]
remove support for Python 2
Python 2 was EOLed in 2020. This change removes support for building Graphviz
bindings for Python 2, as well as build system detection of Python 2. The
targets for `python` as distinct from `python3` are left in place for
environments for which the former is their name for Python 3.
Closes #1992.
Matthew Fernandez [Fri, 4 Jun 2021 15:35:49 +0000 (08:35 -0700)]
fix Python.h discovery on Ubuntu 18.04 in CI
The Autotools build system looks for the C header Python.h to determine the
include path for the local Python installation. However, on Ubuntu 18.04 it was
not finding it. The reason is that the libpython3-dev package on Ubuntu 18.04
installs Python 3.6 under a “python3.6m” prefix that it does not add to C/C++
include paths. This seems to be a deliberate choice in the structure of this
package for Ubuntu 18.04, to avoid conflicts with default Python 2.
A reasonable question to ask is then why Python 3 detection succeeds on the CI
Ubuntu 18.04 jobs. The answer is that libpython2-dev is installed. That is, the
Python 3 detection finds the Python.h from the libpython2-dev installation and
incorrectly assumes it has found the Python 3 header. This confusion may play a
role in #227 and #1042.
This coincidental alignment of headers is exposed when libpython2-dev is removed
and Python 3 detection starts failing. This commit pre-empts this failure in
upcoming changes that remove Python 2 support by explicitly making the Python 3
Python.h findable. Related to #1992.
Matthew Fernandez [Sat, 5 Jun 2021 20:40:03 +0000 (13:40 -0700)]
remove PYTHON variable in Fedora/RHEL/CentOS packaging
This is now false for all operating systems. Across all supported versions of
Fedora, RHEL, and CentOS Python 2 and Python 3 have consistent package names. So
there is no need to deal in the ambiguous Python names with no version number.
Related to #1992.
Matthew Fernandez [Sat, 5 Jun 2021 20:37:53 +0000 (13:37 -0700)]
remove RHEL/CentOS packaging overrides for Python
These values are now the same as the default Fedora settings preceding them, so
there is no need for RHEL-/CentOS-specific values here. Related to #1992.
Matthew Fernandez [Sat, 5 Jun 2021 20:07:40 +0000 (13:07 -0700)]
set enabled Python bindings uniformly on RHEL/CentOS
0af0dc91894f2598f0e19e3cd2c1b34925c9cd61 introduced a workaround for Python
packages changing names. This was relevant in the era of CentOS 6. However, now
Graphviz no longer supports CentOS 6 and furthermore CentOS 7 has converged on
the same naming as CentOS 8. As a result, the Graphviz packaging work flow was
actually *disabling* Python 3 bindings and enabling Python 2 bindings on CentOS
7.
This change unifies which Python bindings are enabled across RHEL and CentOS
versions. Though an upcoming change will remove support for the Python 2
bindings altogether. Related to #1992.
Matthew Fernandez [Sat, 5 Jun 2021 19:59:13 +0000 (12:59 -0700)]
remove useless juggling of CPPFLAGS in Python 2 detection
This was copied from the unified Python support in
32466ecc452102a1fc84f4331c0ed099da4e7edc without noticing Python 2 needs no
tweaking of the CPPFLAGS. Related to #1992.
Matthew Fernandez [Sat, 5 Jun 2021 19:25:56 +0000 (12:25 -0700)]
remove some useless Python 3 version testing
Python 3’s major version is, by definition, 3. These tests were copied from
the unified Python support in
32466ecc452102a1fc84f4331c0ed099da4e7edc with
seemingly not much consideration of what their intent was. Related to #1992.
Matthew Fernandez [Sat, 5 Jun 2021 19:23:11 +0000 (12:23 -0700)]
remove some useless Python 2 version testing
Python 2’s major version is, by definition, 2. These tests were copied from
the unified Python support in
32466ecc452102a1fc84f4331c0ed099da4e7edc with
seemingly not much consideration of what their intent was. Related to #1992.
Matthew Fernandez [Sat, 5 Jun 2021 18:25:33 +0000 (11:25 -0700)]
remove unused PYTHON3_VERSION_SHORT configuration variable
32466ecc452102a1fc84f4331c0ed099da4e7edc replicated this from the unified Python
support without noticing it is unused in the Python 3 case.
Matthew Fernandez [Sat, 5 Jun 2021 18:24:40 +0000 (11:24 -0700)]
remove unused PYTHON2_VERSION_SHORT configuration variable
32466ecc452102a1fc84f4331c0ed099da4e7edc replicated this from the unified Python
support without noticing that it is unused in the Python 2 case.
Matthew Fernandez [Sat, 5 Jun 2021 18:20:34 +0000 (11:20 -0700)]
fix typo in error message when failing to find Python 2 install dir
32466ecc452102a1fc84f4331c0ed099da4e7edc replicated the unified Python bindings
support into Python 2 and Python 3 cases. However, it incorrectly used the
Python 3 variable in this error message instead of the Python 2 variable.
Related to #1992.
Matthew Fernandez [Fri, 4 Jun 2021 00:16:49 +0000 (17:16 -0700)]
remove unused PYTHON._PREFIX config variables
These were copy-pasted from the generic Python support in
32466ecc452102a1fc84f4331c0ed099da4e7edc without noticing that they are unused
in the way Python 2 and 3 detection is written. Related to #1992.
Matthew Fernandez [Sat, 5 Jun 2021 17:38:32 +0000 (10:38 -0700)]
add a note to developer guide about PYTHONPATH
The test suite does not currently rely on the installed Graphviz Python bindings
being findable and usable. However in future test cases may be introduced that
do. This change future proofs the instructions against an update like this.
Related to #1992.
Matthew Fernandez [Wed, 9 Jun 2021 01:18:42 +0000 (01:18 +0000)]
Merge branch 'smattr/
6cd14a22-19aa-4269-a1b9-
b84287cb76bf' into 'main'
more clean up in lib/pathplan
See merge request graphviz/graphviz!1991
Matthew Fernandez [Sun, 6 Jun 2021 02:33:46 +0000 (19:33 -0700)]
use a stronger return type in directVis
Matthew Fernandez [Sun, 6 Jun 2021 02:31:52 +0000 (19:31 -0700)]
use a stronger return type for clear
Matthew Fernandez [Sun, 6 Jun 2021 02:31:02 +0000 (19:31 -0700)]
use a stronger return type for in_cone and inCone
Matthew Fernandez [Sun, 6 Jun 2021 02:29:48 +0000 (19:29 -0700)]
use a stronger return type for INTERSECT
Matthew Fernandez [Sun, 6 Jun 2021 02:28:47 +0000 (19:28 -0700)]
make intersect static
This function is not used outside of its containing file.
Matthew Fernandez [Sun, 6 Jun 2021 02:23:52 +0000 (19:23 -0700)]
use a stronger return type for inBetween
Matthew Fernandez [Sun, 6 Jun 2021 02:22:52 +0000 (19:22 -0700)]
remove unnecessary bracketing in visibility.c
Matthew Fernandez [Sun, 6 Jun 2021 02:22:14 +0000 (19:22 -0700)]
remove an open coded NULL
Matthew Fernandez [Sun, 6 Jun 2021 02:07:10 +0000 (19:07 -0700)]
use more modern #pragma once guards in lib/pathplan
Matthew Fernandez [Sun, 6 Jun 2021 02:02:29 +0000 (19:02 -0700)]
remove unused NEQ
Matthew Fernandez [Sun, 6 Jun 2021 02:01:14 +0000 (19:01 -0700)]
remove unused CW
Matthew Fernandez [Sun, 6 Jun 2021 02:01:01 +0000 (19:01 -0700)]
remove unused CCW
Matthew Fernandez [Sun, 6 Jun 2021 01:59:50 +0000 (18:59 -0700)]
remove unused OBSCURED
Matthew Fernandez [Sun, 6 Jun 2021 01:58:45 +0000 (18:58 -0700)]
remove unused freepoly
Matthew Fernandez [Sun, 6 Jun 2021 01:58:01 +0000 (18:58 -0700)]
remove unused copypoly
Matthew Fernandez [Sun, 6 Jun 2021 18:52:19 +0000 (18:52 +0000)]
Merge branch 'smattr/
3931cfd4-1c69-45b6-8aac-
0d7b0f38d47b' into 'main'
clean up in lib/sparse
See merge request graphviz/graphviz!1983
Matthew Fernandez [Mon, 31 May 2021 16:48:54 +0000 (09:48 -0700)]
remove unused SparseMatrix_delete_sparse_columns
Matthew Fernandez [Mon, 31 May 2021 16:47:55 +0000 (09:47 -0700)]
remove unused SparseMatrix_delete_empty_columns
Matthew Fernandez [Mon, 31 May 2021 16:46:45 +0000 (09:46 -0700)]
remove unused SparseMatrix_largest_component
Matthew Fernandez [Mon, 31 May 2021 16:45:59 +0000 (09:45 -0700)]
remove unused SparseMatrix_exclude_submatrix
Matthew Fernandez [Mon, 31 May 2021 16:42:47 +0000 (09:42 -0700)]
remove unused SparseMatrix_connectedQ
Matthew Fernandez [Mon, 31 May 2021 16:41:52 +0000 (09:41 -0700)]
remove unused SparseMatrix_pseudo_diameter_only
Matthew Fernandez [Mon, 31 May 2021 16:38:20 +0000 (09:38 -0700)]
remove unused SparseMatrix_crop
Matthew Fernandez [Mon, 31 May 2021 16:37:11 +0000 (09:37 -0700)]
remove unused SparseMatrix_apply_fun_general
Matthew Fernandez [Mon, 31 May 2021 16:35:45 +0000 (09:35 -0700)]
remove unused SparseMatrix_normalize_by_row
Matthew Fernandez [Mon, 31 May 2021 16:34:45 +0000 (09:34 -0700)]
remove unused SparseMatrix_normalize_to_rowsum1
Matthew Fernandez [Mon, 31 May 2021 16:20:41 +0000 (09:20 -0700)]
abbreviate open coded fmax/fmin in limitBoxes
Matthew Fernandez [Sat, 5 Jun 2021 19:02:12 +0000 (19:02 +0000)]
Merge branch 'smattr/
67e74e7b-a7dd-4ac1-b503-
e1721198551c' into 'main'
clean up in lib/pathplan
See merge request graphviz/graphviz!1982
Matthew Fernandez [Sun, 30 May 2021 17:02:30 +0000 (10:02 -0700)]
remove commented out code in triang.c
Matthew Fernandez [Sun, 30 May 2021 17:01:04 +0000 (10:01 -0700)]
remove unnecessary prototype
The definition of dpd_ccw appears before any of its uses, so having a leading
prototype is unnecessary.
Matthew Fernandez [Sun, 30 May 2021 17:00:33 +0000 (10:00 -0700)]
use C99 bools in triang.c instead of internal constants
Matthew Fernandez [Sun, 30 May 2021 16:57:51 +0000 (09:57 -0700)]
remove unused triangle_t type
Matthew Fernandez [Sun, 30 May 2021 16:57:28 +0000 (09:57 -0700)]
remove unused lvertex_2_t type
Matthew Fernandez [Sun, 30 May 2021 16:55:14 +0000 (09:55 -0700)]
remove cbrt alternative implementation
The cbrt function is guaranteed to be provided in C99, with which Graphviz is
now compiled.
Matthew Fernandez [Sun, 30 May 2021 16:50:51 +0000 (09:50 -0700)]
use C99 bools in shortest.c instead of internal constants
Matthew Fernandez [Sun, 30 May 2021 16:47:00 +0000 (09:47 -0700)]
remove duplicate #include <stdlib.h>
Matthew Fernandez [Sun, 30 May 2021 16:42:56 +0000 (09:42 -0700)]
remove unused elist_t type
Matthew Fernandez [Sun, 30 May 2021 16:42:29 +0000 (09:42 -0700)]
remove unused p2e_t type
Matthew Fernandez [Sun, 30 May 2021 16:41:55 +0000 (09:41 -0700)]
remove unused macros LT and GT
Matthew Fernandez [Sat, 5 Jun 2021 17:50:21 +0000 (17:50 +0000)]
Merge branch 'smattr/
cc687d3f-f2c0-4bfd-b2a5-
3efb2f3b6cf7' into 'main'
more clean up in lib/glcomp
See merge request graphviz/graphviz!1984
Matthew Fernandez [Wed, 2 Jun 2021 03:16:24 +0000 (20:16 -0700)]
remove commented out code in glCompLabelNew
Matthew Fernandez [Wed, 2 Jun 2021 03:15:49 +0000 (20:15 -0700)]
remove unused glCompLabelSetFontName
Matthew Fernandez [Wed, 2 Jun 2021 03:14:50 +0000 (20:14 -0700)]
remove unused glCompLabelSetFontSize
Matthew Fernandez [Wed, 2 Jun 2021 03:14:24 +0000 (20:14 -0700)]
remove unused glCompLabelSetText
Matthew Fernandez [Wed, 2 Jun 2021 03:13:53 +0000 (20:13 -0700)]
remove unused glCompLabelMouseUp
Matthew Fernandez [Wed, 2 Jun 2021 03:13:26 +0000 (20:13 -0700)]
remove unused glCompLabelMouseOver
Matthew Fernandez [Wed, 2 Jun 2021 03:12:49 +0000 (20:12 -0700)]
remove unused glCompLabelMouseOut
Matthew Fernandez [Wed, 2 Jun 2021 03:12:18 +0000 (20:12 -0700)]
remove unused glCompLabelMouseIn
Matthew Fernandez [Wed, 2 Jun 2021 03:11:39 +0000 (20:11 -0700)]
remove unused glCompLabelMouseDown
Matthew Fernandez [Wed, 2 Jun 2021 03:11:09 +0000 (20:11 -0700)]
remove unused glCompLabelDoubleClick
Matthew Fernandez [Wed, 2 Jun 2021 03:10:39 +0000 (20:10 -0700)]
remove unused glCompLabelClick
Matthew Fernandez [Wed, 2 Jun 2021 03:08:36 +0000 (20:08 -0700)]
remove glCompSetRemoveLabel prototype
This function was removed in
9a9cfd4e90775aa14a11a0db6745783f3a59ef56 but its
prototype was not.
Matthew Fernandez [Wed, 2 Jun 2021 03:07:37 +0000 (20:07 -0700)]
remove glCompSetAddLabel prototype
This function was removed in
9a9cfd4e90775aa14a11a0db6745783f3a59ef56 but its
prototype was not.
Matthew Fernandez [Sat, 5 Jun 2021 17:01:50 +0000 (17:01 +0000)]
Merge branch 'smattr/
7a64fbc3-20d4-440c-9030-
47fa929ae962' into 'main'
fix incorrect return value in inside_polygon
Closes #2082
See merge request graphviz/graphviz!1988
Matthew Fernandez [Sat, 5 Jun 2021 01:18:06 +0000 (18:18 -0700)]
fix incorrect return value in inside_polygon
A refactor in
7731b18f403b545ea6eca99f429dd9b63e0659d6 incorrectly flipped the
polarity of one of the return sites in inside_polygon. The effect of this was
confusing assertion failures. Fixes #2082.
Matthew Fernandez [Sat, 5 Jun 2021 01:10:17 +0000 (18:10 -0700)]
add a test case for #2082
Matthew Fernandez [Sat, 5 Jun 2021 03:39:51 +0000 (03:39 +0000)]
Merge branch 'smattr/
604a7505-2c95-4af0-9355-
93f51e2c5dbf' into 'main'
fix: do not fclose(NULL) in gvmap
See merge request graphviz/graphviz!1981
Matthew Fernandez [Sat, 29 May 2021 22:29:03 +0000 (15:29 -0700)]
fix: do not fclose(NULL) in gvmap
gvmap opens a debugging file to write timing information to if verbosity is
enabled. It tried to unconditionally close this file, regardless of whether
verbosity was enabled. The result was that, without verbosity enabled, it would
call fclose(NULL). The effect of this seems to vary across operating systems but
can result in a crash. This fix only tries to close the file if it was
previously opened. Related to #1822.
Unfortunately we cannot un-xfail test_gvmap_fclose because it fails for another
reason on some platforms.
Matthew Fernandez [Sat, 29 May 2021 22:42:19 +0000 (15:42 -0700)]
add a test case for gvmap crash
As discussed on #1822, gvmap currently crashes sometimes. It seems this is not
input dependent, but rather platform dependent. A fix will arrive in an upcoming
commit.
Matthew Fernandez [Sat, 29 May 2021 22:46:25 +0000 (15:46 -0700)]
remove some unused imports in test_regression.py
Matthew Fernandez [Sat, 5 Jun 2021 02:50:00 +0000 (19:50 -0700)]
fix prior merge mistake
Matthew Fernandez [Sat, 5 Jun 2021 02:44:59 +0000 (02:44 +0000)]
Merge branch 'smattr/
8c949bd7-1fa9-4b34-bcb5-
d838d72f676f' into 'main'
test case for #2078 and gvplugin bug fixing
See merge request graphviz/graphviz!1980
Matthew Fernandez [Sat, 29 May 2021 21:08:32 +0000 (14:08 -0700)]
squash some -Wsign-conversion warnings in gvplugin_library_load
Matthew Fernandez [Sat, 29 May 2021 21:07:00 +0000 (14:07 -0700)]
remove unused return value of gvplugin_activate
Matthew Fernandez [Sat, 29 May 2021 21:05:33 +0000 (14:05 -0700)]
mark name and plugin_path to gvplugin_activate as const
Neither of these are modified by the function.
Matthew Fernandez [Sat, 29 May 2021 21:04:40 +0000 (14:04 -0700)]
remove shadowing of path in gvplugin_activate
This squashes a -Wshadow compiler warning.
Matthew Fernandez [Sat, 29 May 2021 21:02:42 +0000 (14:02 -0700)]
squash a -Wsign-compare warning in a gvplugin.c loop
Matthew Fernandez [Sat, 29 May 2021 20:59:31 +0000 (13:59 -0700)]
remove temporary buffer for the name of registered GVC plugins
Similar to the previous commit, this removes a temporary buffer that was only
being used for splitting a name on a ':' separator. Using the same strategy of
maintaining start and end as pointers into the original string, we can remove
the need for the temporary buffer and remove the limitation on ≤63 character
names.
Matthew Fernandez [Sat, 29 May 2021 20:47:55 +0000 (13:47 -0700)]
remove temporary buffer for name of the GVC plugin being loaded
The GVC plugin loading machinery copied the first 63 characters of the plugin
name to a temporary buffer in order to mutate it. However the mutation is simply
chopping up the plugin name based on a ':' separator. By tracking the start and
end of each component as pointers into the original sting, we can remove the
need for this temporary buffer.
Though this saves some stack memory, the primary motivation for this change is
to remove the truncation-to-63-characters behavior. There is no need to limit
plugin names to 63 characters. Note that the names of registered plugins are
still limited to 63 characters, so this does not fully remove the restriction.
Matthew Fernandez [Sat, 29 May 2021 20:15:54 +0000 (13:15 -0700)]
fix out of bounds read when examining a registered plugin with a long name
Similar to the previous commit, the GVC plugin loading code copies the names of
registered plugins to a temporary buffer as it iterates through them to allow
mutating the name. And just like the code for mutating the name of the plugin
begin loaded, it would fail to NUL-terminate this temporary buffer, causing a
following strchr to over-read.
The fix again is to simply zero-initialize the temporary buffer, so the
copied-in string is always NUL-terminated.
Matthew Fernandez [Sat, 29 May 2021 20:08:16 +0000 (13:08 -0700)]
fix out of bounds read when loading a plugin with a long name
The GVC plugin loading code copies the first 63 characters of the name of a
plugin to a temporary buffer in order to do various string manipulation on it.
However, this buffer was not initialized and never manually terminated. As a
result, a plugin name of 63 characters or more would result in the buffer
containing a non-terminated string. Subsequent strchr on this buffer would
over-read if it never saw a ':', resulting in unpredictable behavior.
This fix simply zero-initializes the buffer to begin with, so the copied-in
string is always NUL-terminated.
Matthew Fernandez [Sat, 29 May 2021 19:52:59 +0000 (12:52 -0700)]
add a test case for #2078
Matthew Fernandez [Sat, 5 Jun 2021 01:32:15 +0000 (01:32 +0000)]
Merge branch 'smattr/
A8D77CFB-89C5-4EC3-B3BB-
5E95B152E225' into 'main'
some clean up in nop and lib/ingraphs
See merge request graphviz/graphviz!1979
Matthew Fernandez [Sat, 29 May 2021 18:06:50 +0000 (11:06 -0700)]
mark nop’s command line parameter variables static
These are not used outside of their containing file.
Matthew Fernandez [Sat, 29 May 2021 18:05:00 +0000 (11:05 -0700)]
use a C99 bool for nop’s chkOnly flag
The semantics of this flag were already a boolean value, so we can use the type
system to more obviously indicate this.
Matthew Fernandez [Sat, 29 May 2021 18:04:05 +0000 (11:04 -0700)]
remove an unnecessary cast
This pointer implicitly coerces.
Matthew Fernandez [Sat, 29 May 2021 18:03:13 +0000 (11:03 -0700)]
use a C99 bool for ingraph’s heap flag
The semantics of this flag were already a boolean value, so we can use the type
system to more obviously indicate this.
Matthew Fernandez [Sat, 29 May 2021 18:00:32 +0000 (11:00 -0700)]
use an unsigned value for ingraphs error count
Obviously the number of errors that has occurred can never be negative. An
unsigned type more accurately indicates this. The only client of ingraphs that
actually checks the error count is nop, so this change has very little effect.
Matthew Fernandez [Sat, 29 May 2021 17:56:34 +0000 (10:56 -0700)]
more portable exit status from nop
The exit status of nop was a bitwise-OR of two error counts. I do not see how
the actual value of this could ever be useful, except for being non-zero.
However, a non-zero exit status is not always an error. E.g. on VMS there are
some non-zero exit statuses that still indicate success.
This change causes nop to more reliably and portably exit with EXIT_FAILURE when
encountering errors.