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.
Matthew Fernandez [Sat, 29 May 2021 17:48:35 +0000 (10:48 -0700)]
make nop usage string a constant array
The compiler could probably determine this already, but this makes it a little
more obvious that it can be inlined and the useString symbol can be the start of
the data rather than a pointer to the start of the data.
Matthew Fernandez [Sat, 29 May 2021 17:47:48 +0000 (10:47 -0700)]
remove an unnecessary open coded NULL
Matthew Fernandez [Sat, 29 May 2021 17:45:32 +0000 (10:45 -0700)]
handle unexpected getopt errors in nop
This case is never expected to be reachable. However, having a default case
helps catch when new options are introduced in the getopt call but not handled
in the switch. In a sense, this is a defensive coding measure. This also
squashes a -Wswitch-default compiler warning.
Matthew Fernandez [Sat, 29 May 2021 17:34:57 +0000 (10:34 -0700)]
replace ingraphs header guard with more modern #pragma once
Matthew Fernandez [Sat, 29 May 2021 17:33:33 +0000 (10:33 -0700)]
remove unused FREE_STATE
This has been unused since the initial revision of this file. It is unclear what
purpose it was intended to serve.
Matthew Fernandez [Sat, 29 May 2021 17:31:52 +0000 (10:31 -0700)]
remove useless #include of config.h
The generated config.h only contains a number of #defines, so its inclusion at
the end of a file has no effect. All code following this line was removed in
7cc812f5c1b64832a0324a293cc8968ba044e0a4 which should have also removed this
line but did not.
Matthew Fernandez [Fri, 4 Jun 2021 05:55:09 +0000 (05:55 +0000)]
Merge branch 'smattr/
1bbce952-8b1a-4e2b-bc72-
3a4a5a53616a' into 'main'
clean up in lib/common
See merge request graphviz/graphviz!1978
Matthew Fernandez [Sat, 29 May 2021 03:06:20 +0000 (20:06 -0700)]
remove commented out code in mincross.c
Matthew Fernandez [Sat, 29 May 2021 03:06:05 +0000 (20:06 -0700)]
remove commented out code in shapes.c
Matthew Fernandez [Sat, 29 May 2021 03:00:15 +0000 (20:00 -0700)]
remove NOTDEF-guarded code
This is not defined anywhere in the build.
Matthew Fernandez [Sat, 29 May 2021 02:57:03 +0000 (19:57 -0700)]
remove unused findAttrColor
Matthew Fernandez [Sat, 29 May 2021 02:54:54 +0000 (19:54 -0700)]
remove write_canonical_dot prototype for function that does not exist
This function was removed in
d3760b95bd696ab130c26dd36927ed498f7aae37 but its
prototype was not.
Matthew Fernandez [Sat, 29 May 2021 02:53:37 +0000 (19:53 -0700)]
remove write_attributed_dot prototype for function that does not exist
This function was removed in
d3760b95bd696ab130c26dd36927ed498f7aae37 but its
prototype was not.
Matthew Fernandez [Sat, 29 May 2021 02:50:05 +0000 (19:50 -0700)]
remove setup_graph prototype for function that does not exist
This function was removed in
ac9772156cea7cff4d8f1be7fd9396bdb6027505 but its
prototype was not.
Matthew Fernandez [Sat, 29 May 2021 02:43:04 +0000 (19:43 -0700)]
remove emit_jobs_eof prototype for function that does not exist
This function was removed in
574e183b6caed4954702929a952c06c59a141a9e but its
prototype was not.
Matthew Fernandez [Sat, 29 May 2021 01:01:18 +0000 (18:01 -0700)]
mark pps parameter to limitBoxes as const
To more obviously indicate this parameter is not modified.
Matthew Fernandez [Wed, 2 Jun 2021 01:26:04 +0000 (18:26 -0700)]
Merge branch 'smattr/
839387A5-BAE4-43F2-88C1-
C6818F406667'
Ryan Schmidt [Sat, 8 May 2021 14:11:01 +0000 (14:11 +0000)]
Add --tag=CC when compiling quartz plugin
Edit by Matthew Fernandez: When compiling libraries, libtool infers a so called
“tag” indicating the language model it should use when creating objects.
The libtool docs¹ claim `CC` is inferred when no tag is explicitly given, but
empirically this does not seem to be true. On macOS, some versions of libtool
give up when seeing a .m file with the error:
libtool: compile: unable to infer tagged configuration
libtool: error: specify a tag with '--tag'
To fix this, we now explicitly set the `CC` tag. Note that this is not guarded
to be macOS-only because this action needs to be taken in all environments with
Objective-C support that are building the Quartz plugin (if this is in fact
possible on anything other than macOS).
This commit also fixes a further problem where AM_LIBTOOLFLAGS was misspelled
as AM_LIBTOOLSFLAGS. It looks like
79aa7d77ef433d66c0142168d2817b4c7014d263
previously tried to fix this same problem but (1) the WITH_DARWIN9 guard is
insufficient for recent macOS versions and (2) the typo made this whole change
a no-op.
This issue was reported by downstream Macports users.
Fixes #2065.
¹ https://www.gnu.org/software/libtool/manual/html_node/Tags.html
Matthew Fernandez [Tue, 1 Jun 2021 15:01:32 +0000 (15:01 +0000)]
Merge branch 'smattr/
E9ACDB7A-3EE0-4BF7-B2A8-
14EB2AC31B99' into 'main'
some clean up in lib/expr
See merge request graphviz/graphviz!1976
Matthew Fernandez [Wed, 26 May 2021 01:45:59 +0000 (18:45 -0700)]
remove unused exrewind()
Matthew Fernandez [Wed, 26 May 2021 01:42:50 +0000 (18:42 -0700)]
remove commented out Makefile directives
The comments about libast’s usage of environ are legacy. This declaration was
removed in
3af3980dff0b6a8ca134ea0620b4ffb484906707.