]> granicus.if.org Git - graphviz/log
graphviz
2 years agoadd a test case for #1871
Matthew Fernandez [Sat, 14 May 2022 18:15:03 +0000 (11:15 -0700)]
add a test case for #1871

2 years agoMerge branch 'smattr/0850CA2D-477E-4ADF-AF6B-7FD191CAF944' into 'main'
Matthew Fernandez [Fri, 20 May 2022 01:06:21 +0000 (01:06 +0000)]
Merge branch 'smattr/0850CA2D-477E-4ADF-AF6B-7FD191CAF944' into 'main'

graphml2gv: some clean up and alloc wrapper roll out

See merge request graphviz/graphviz!2667

2 years agographml2gv: read XML input in chunks of 'BUFSIZ'
Matthew Fernandez [Mon, 9 May 2022 00:14:13 +0000 (17:14 -0700)]
graphml2gv: read XML input in chunks of 'BUFSIZ'

The C standard library’s stdio exposes a value for the optimal chunk size for
I/O. So use this instead of our arbitrarily chosen alternative.

2 years agographml2gv: undo micro-optimization in 'endElementHandler'
Matthew Fernandez [Mon, 9 May 2022 00:10:48 +0000 (17:10 -0700)]
graphml2gv: undo micro-optimization in 'endElementHandler'

This code was deciding between using a static stack buffer and a dynamic heap
buffer depending on the length of the string it needed to deal with. This kind
of optimization is unnecessary on modern platforms with performant allocators.
The branching and structure duplication involved in this is often now a
_de-optimization_ instead of the intended optimization.

This commit undoes this trick and instead unconditionally uses heap allocation.

2 years agographml2gv: replace 'NEW' with 'gv_alloc'
Matthew Fernandez [Mon, 9 May 2022 00:04:58 +0000 (17:04 -0700)]
graphml2gv: replace 'NEW' with 'gv_alloc'

This fixes some instances of allocations that were unchecked for failure.

2 years agographml2gv: replace 'N_NEW' with 'gv_calloc'
Matthew Fernandez [Mon, 9 May 2022 00:02:48 +0000 (17:02 -0700)]
graphml2gv: replace 'N_NEW' with 'gv_calloc'

This fixes some instances of allocations that were unchecked for failure.

2 years agographml2gv: abbreviate an open coded 'strcat'
Matthew Fernandez [Sun, 8 May 2022 23:59:16 +0000 (16:59 -0700)]
graphml2gv: abbreviate an open coded 'strcat'

2 years agoMerge branch 'conditional-demo-install' into 'main'
Matthew Fernandez [Sun, 15 May 2022 16:45:19 +0000 (16:45 +0000)]
Merge branch 'conditional-demo-install' into 'main'

Add option for disabling/customizing of demos

See merge request graphviz/graphviz!2668

2 years agoAdd option for disabling/customizing of demos
David Seifert [Sat, 14 May 2022 22:50:04 +0000 (00:50 +0200)]
Add option for disabling/customizing of demos

* Many distros have different directories for where to
  install example files to. Gentoo installs them under
  `$(docdir)/examples`. With `--without-demos`, we can suppress
  installation of the demos altogether.

2 years agoMerge branch 'minor-cleanup-in-common' into 'main'
Magnus Jacobsson [Sun, 15 May 2022 07:58:02 +0000 (07:58 +0000)]
Merge branch 'minor-cleanup-in-common' into 'main'

Minor cleanup in common

See merge request graphviz/graphviz!2650

2 years agotaper: correct data type in comment
Magnus Jacobsson [Mon, 18 Apr 2022 07:03:31 +0000 (09:03 +0200)]
taper: correct data type in comment

2 years agoarrowStartClip: remove unnecessary use of the comma operator
Magnus Jacobsson [Sun, 17 Apr 2022 17:01:14 +0000 (19:01 +0200)]
arrowStartClip: remove unnecessary use of the comma operator

2 years agoarrowEndClip: remove unnecessary use of the comma operator
Magnus Jacobsson [Sun, 17 Apr 2022 17:00:55 +0000 (19:00 +0200)]
arrowEndClip: remove unnecessary use of the comma operator

2 years agoclip_and_install: fix misindentation
Magnus Jacobsson [Sun, 17 Apr 2022 12:17:07 +0000 (14:17 +0200)]
clip_and_install: fix misindentation

2 years agoMerge branch 'smattr/3E341EA7-F157-45F6-86CB-64B42C89EE70' into 'main'
Matthew Fernandez [Sat, 14 May 2022 22:38:29 +0000 (22:38 +0000)]
Merge branch 'smattr/3E341EA7-F157-45F6-86CB-64B42C89EE70' into 'main'

gvgen: squash compiler warnings in graph_generator.c

See merge request graphviz/graphviz!2663

2 years agogvgen: remove unnecessary parens
Matthew Fernandez [Tue, 10 May 2022 01:39:32 +0000 (18:39 -0700)]
gvgen: remove unnecessary parens

2 years agogvgen: inline some power-of-2 computations into one liners
Matthew Fernandez [Tue, 10 May 2022 01:32:30 +0000 (18:32 -0700)]
gvgen: inline some power-of-2 computations into one liners

2 years agogvgen: consistently use 'int' in 'makeBinaryTree'
Matthew Fernandez [Tue, 10 May 2022 01:30:56 +0000 (18:30 -0700)]
gvgen: consistently use 'int' in 'makeBinaryTree'

These variables and numerous others in `gvgen` should probably be using
`size_t`. But everywhere else is using `int` currently, so this change at least
makes things consistent and squashes five -Wsign-conversion warnings.

2 years agogvgen: remove parameter to 'readPos' that is always 1
Matthew Fernandez [Tue, 10 May 2022 01:30:14 +0000 (18:30 -0700)]
gvgen: remove parameter to 'readPos' that is always 1

2 years agogvgen: abbreviate setting 'type' in 'makeRandom'
Matthew Fernandez [Tue, 10 May 2022 01:20:01 +0000 (18:20 -0700)]
gvgen: abbreviate setting 'type' in 'makeRandom'

2 years agoMerge branch 'smattr/35D73C8A-9B3B-4DEF-8B7A-DC3015994249' into 'main'
Matthew Fernandez [Sat, 14 May 2022 20:46:17 +0000 (20:46 +0000)]
Merge branch 'smattr/35D73C8A-9B3B-4DEF-8B7A-DC3015994249' into 'main'

gml2gv: silence a -Wimplicit-fallthrough warning

See merge request graphviz/graphviz!2664

2 years agogml2gv: silence a -Wimplicit-fallthrough warning
Matthew Fernandez [Thu, 12 May 2022 04:03:10 +0000 (21:03 -0700)]
gml2gv: silence a -Wimplicit-fallthrough warning

All paths in this case end in a call to `exit`. But the compiler is apparently
unable to determine this, so use an explicit `break` to suppress a false
positive warning.

2 years agoMerge branch 'smattr/AA0A9CEA-253F-4EBA-BC44-E90796B74DFD' into 'main'
Matthew Fernandez [Sat, 14 May 2022 19:36:26 +0000 (19:36 +0000)]
Merge branch 'smattr/AA0A9CEA-253F-4EBA-BC44-E90796B74DFD' into 'main'

mm2gv: squash -Wconversion warnings for 'tolower' usage

See merge request graphviz/graphviz!2662

2 years agomm2gv: squash -Wconversion warnings for 'tolower' usage
Matthew Fernandez [Mon, 9 May 2022 02:30:23 +0000 (19:30 -0700)]
mm2gv: squash -Wconversion warnings for 'tolower' usage

For historical reasons, C functions/macros like `tolower` are specified to take
and return an `int`. This means sometimes one set of pedantic compilers (MinGW
with -Wconversion) complains about passing `char` values into these ctype.h
interfaces and another set of pedantic compilers (GCC with -Wconversion)
complains about coercing the result into a `char`. This change suppresses both
of these false positives.

2 years agoMerge branch 'qmake-detection' into 'main'
Matthew Fernandez [Sat, 14 May 2022 18:28:39 +0000 (18:28 +0000)]
Merge branch 'qmake-detection' into 'main'

Augment QMAKE detection

See merge request graphviz/graphviz!2660

2 years agoAugment QMAKE detection
David Seifert [Sat, 14 May 2022 17:40:31 +0000 (19:40 +0200)]
Augment QMAKE detection

* Many distros (Gentoo included) version qmake nowadays. For Qt 6,
  The Qt Company has decided to use `qmake6` for versioning, and
  many distros have followed this and used the same approach for Qt 5.

2 years agoMerge branch 'smattr/102AAE2A-9760-4007-8C25-9519DC274095' into 'main'
Matthew Fernandez [Sat, 14 May 2022 17:34:23 +0000 (17:34 +0000)]
Merge branch 'smattr/102AAE2A-9760-4007-8C25-9519DC274095' into 'main'

edgepaint: remove unused 'nnodes' in 'node_distinct_coloring'

See merge request graphviz/graphviz!2665

2 years agosfdpgen: squash -Wunused warnings for 'nsuper_avg'
Matthew Fernandez [Sat, 14 May 2022 03:55:32 +0000 (20:55 -0700)]
sfdpgen: squash -Wunused warnings for 'nsuper_avg'

These are currently failing the macOS CMake build in CI.

2 years agoneatogen: remove unused 'total_gap' in 'constrained_majorization_new_with_gaps'
Matthew Fernandez [Sat, 14 May 2022 02:31:41 +0000 (19:31 -0700)]
neatogen: remove unused 'total_gap' in 'constrained_majorization_new_with_gaps'

The CMake macOS CI job has begun erroring out:

  …/lib/neatogen/quad_prog_solve.c:602:11: error: variable 'total_gap' set but
    not used [-Werror,-Wunused-but-set-variable]
    float total_gap, target_place;
          ^

While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.

2 years agomingle: remove unused 'len_total' in 'pedge_export_gv'
Matthew Fernandez [Sat, 14 May 2022 00:01:26 +0000 (17:01 -0700)]
mingle: remove unused 'len_total' in 'pedge_export_gv'

The CMake macOS CI job has begun erroring out:

  …/lib/mingle/edge_bundling.cpp:208:27: error: variable 'len_total' set but not
    used [-Werror,-Wunused-but-set-variable]
    double maxwgt = 0, len, len_total, len_total0;
                            ^

While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.

2 years agomingle: remove unused 'total_wgt' in 'agglomerative_ink_bundling_internal'
Matthew Fernandez [Fri, 13 May 2022 15:04:07 +0000 (08:04 -0700)]
mingle: remove unused 'total_wgt' in 'agglomerative_ink_bundling_internal'

The CMake macOS CI job has begun erroring out:

  …/lib/mingle/agglomerative_bundling.cpp:400:27: error: variable 'total_wgt'
    set but not used [-Werror,-Wunused-but-set-variable]
  double eps = 0., wgt, total_wgt = 0;
                        ^

While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.

2 years agoedgepaint: remove unused 'nnodes' in 'node_distinct_coloring'
Matthew Fernandez [Fri, 13 May 2022 13:49:46 +0000 (06:49 -0700)]
edgepaint: remove unused 'nnodes' in 'node_distinct_coloring'

The CMake macOS CI job has begun erroring out:

  …/lib/edgepaint/node_distinct_coloring.c:204:17: error: variable 'nnodes'
    set but not used [-Werror,-Wunused-but-set-variable]
  int i, j, jj, nnodes = 0;
                ^

While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.

2 years agoMerge branch 'smattr/EE3BD42E-42C7-4AA3-A03E-1E4F0CEEDA39' into 'main'
Matthew Fernandez [Thu, 12 May 2022 03:50:30 +0000 (03:50 +0000)]
Merge branch 'smattr/EE3BD42E-42C7-4AA3-A03E-1E4F0CEEDA39' into 'main'

tclpkg: squash some compiler warnings

See merge request graphviz/graphviz!2655

2 years agotclpkg: remove unnecessary explicit dereference and parens on function pointer
Matthew Fernandez [Fri, 6 May 2022 00:37:30 +0000 (17:37 -0700)]
tclpkg: remove unnecessary explicit dereference and parens on function pointer

The compiler already knows how to dereference and call through a function
pointer without needing explicit instruction.

2 years agotclpkg: remove unnecessary line wrapping
Matthew Fernandez [Fri, 6 May 2022 00:37:19 +0000 (17:37 -0700)]
tclpkg: remove unnecessary line wrapping

2 years agotclpkg: squash -Wunused-parameter warnings in commands
Matthew Fernandez [Fri, 6 May 2022 00:28:02 +0000 (17:28 -0700)]
tclpkg: squash -Wunused-parameter warnings in commands

These functions are used as callback so need to conform to a particular type
signature.

2 years agotclpkg: mark 'gdCmd' static
Matthew Fernandez [Fri, 6 May 2022 00:21:52 +0000 (17:21 -0700)]
tclpkg: mark 'gdCmd' static

This function is not used outside of its containing file.

2 years agoMerge branch 'smattr/A26FCACA-4EE0-449E-A1C6-9BF2D60F49B8' into 'main'
Matthew Fernandez [Thu, 12 May 2022 02:22:04 +0000 (02:22 +0000)]
Merge branch 'smattr/A26FCACA-4EE0-449E-A1C6-9BF2D60F49B8' into 'main'

neatogen: remove unused randomkit code

See merge request graphviz/graphviz!2658

2 years agoneatogen: remove unused 'rk_state' members
Matthew Fernandez [Fri, 6 May 2022 01:34:13 +0000 (18:34 -0700)]
neatogen: remove unused 'rk_state' members

2 years agoneatogen: remove unused 'rk_strerror' and 'rk_error'
Matthew Fernandez [Fri, 6 May 2022 01:29:37 +0000 (18:29 -0700)]
neatogen: remove unused 'rk_strerror' and 'rk_error'

These do _not_ appear to be the errors returned by randomkit.c at all.

2 years agoneatogen: remove unused 'rk_long'
Matthew Fernandez [Fri, 6 May 2022 01:26:30 +0000 (18:26 -0700)]
neatogen: remove unused 'rk_long'

2 years agoneatogen: remove unused 'rk_double'
Matthew Fernandez [Fri, 6 May 2022 01:25:20 +0000 (18:25 -0700)]
neatogen: remove unused 'rk_double'

2 years agoMerge branch 'smattr/CA30E255-C16A-426F-BEE2-05B541F3546F' into 'main'
Matthew Fernandez [Wed, 11 May 2022 17:06:21 +0000 (17:06 +0000)]
Merge branch 'smattr/CA30E255-C16A-426F-BEE2-05B541F3546F' into 'main'

only append 'generic' TCL include path to 'TCL_INCLUDES' if it exists

See merge request graphviz/graphviz!2656

2 years agoonly append 'generic' TCL include path to 'TCL_INCLUDES' if it exists
Matthew Fernandez [Fri, 6 May 2022 00:17:11 +0000 (17:17 -0700)]
only append 'generic' TCL include path to 'TCL_INCLUDES' if it exists

Squashes numerous -Wmissing-include-dirs compilation warnings.

2 years agoMerge branch 'smattr/D01C105D-5B09-45D9-9130-AE2DEF972D96' into 'main'
Matthew Fernandez [Wed, 11 May 2022 14:22:13 +0000 (14:22 +0000)]
Merge branch 'smattr/D01C105D-5B09-45D9-9130-AE2DEF972D96' into 'main'

unify tests/ and rtest/

See merge request graphviz/graphviz!2652

2 years agoMerge branch 'smattr/7F4532A1-7289-4917-A936-D7D27DE1AE1C' into 'main'
Matthew Fernandez [Wed, 11 May 2022 06:47:19 +0000 (06:47 +0000)]
Merge branch 'smattr/7F4532A1-7289-4917-A936-D7D27DE1AE1C' into 'main'

cgraph: fix 'gv_recalloc' bugs, replace unchecked allocations in agxbuf

See merge request graphviz/graphviz!2645

2 years agocgraph: abbreviate 'agxbdisown' string duplication to 'strdup'
Matthew Fernandez [Sat, 30 Apr 2022 23:57:37 +0000 (16:57 -0700)]
cgraph: abbreviate 'agxbdisown' string duplication to 'strdup'

2 years agocgraph: replace unchecked agxbuf allocations with alloc helpers
Matthew Fernandez [Sat, 30 Apr 2022 23:44:22 +0000 (16:44 -0700)]
cgraph: replace unchecked agxbuf allocations with alloc helpers

These allocations are at the core of some work Graphviz does and were not
checked for failure. This change swaps confusing crashes on out-of-memory for a
more graceful exit.

2 years agocgraph: fix overflow check in 'gv_recalloc'
Matthew Fernandez [Sun, 1 May 2022 01:16:34 +0000 (18:16 -0700)]
cgraph: fix overflow check in 'gv_recalloc'

2 years agocgraph: fix incorrect 'gv_recalloc' assertion
Matthew Fernandez [Sun, 1 May 2022 01:13:17 +0000 (18:13 -0700)]
cgraph: fix incorrect 'gv_recalloc' assertion

The assertion here was claiming that overflow _did_ occur when computing the
extent of the previous allocation rather than the reverse.

2 years agoMerge branch 'smattr/8283DE76-A9BE-42CF-A132-6BE3EAE609A8' into 'main'
Matthew Fernandez [Wed, 11 May 2022 05:15:14 +0000 (05:15 +0000)]
Merge branch 'smattr/8283DE76-A9BE-42CF-A132-6BE3EAE609A8' into 'main'

smyrna: squash some warnings in 'set_boundaries'

See merge request graphviz/graphviz!2654

2 years agosmyrna: simplify bounding box calculation in 'set_boundaries'
Matthew Fernandez [Thu, 5 May 2022 15:32:35 +0000 (08:32 -0700)]
smyrna: simplify bounding box calculation in 'set_boundaries'

2 years agosmyrna: squash -Wmaybe-uninitialized warnings in 'set_boundaries'
Matthew Fernandez [Thu, 5 May 2022 15:33:16 +0000 (08:33 -0700)]
smyrna: squash -Wmaybe-uninitialized warnings in 'set_boundaries'

This code is assuming there is at least one point to scan in the loop. In case
there is not (and to pacify the compiler) set an initial trivial bounding box.

2 years agoMerge branch 'smattr/2D6B3C0D-DD2F-44EA-B81B-9B1FA5B0E582' into 'main'
Matthew Fernandez [Wed, 11 May 2022 03:11:56 +0000 (03:11 +0000)]
Merge branch 'smattr/2D6B3C0D-DD2F-44EA-B81B-9B1FA5B0E582' into 'main'

some glcomp and smyrna clean up

See merge request graphviz/graphviz!2651

2 years agosmyrna: abbreviate some 'GLfloat' literals
Matthew Fernandez [Wed, 4 May 2022 15:49:33 +0000 (08:49 -0700)]
smyrna: abbreviate some 'GLfloat' literals

The `GLfloat` type is a 32-bit IEEE-754 floating point value¹ which is identical
to what the C `float` type provides on all supported platforms.

¹ https://www.khronos.org/opengl/wiki/OpenGL_Type

2 years agoglcomp: remove unused 'fontset_t'
Matthew Fernandez [Wed, 4 May 2022 15:47:07 +0000 (08:47 -0700)]
glcomp: remove unused 'fontset_t'

2 years agoglcomp: remove unnecessary 'GLfloat' casts
Matthew Fernandez [Wed, 4 May 2022 15:45:57 +0000 (08:45 -0700)]
glcomp: remove unnecessary 'GLfloat' casts

These values are already `GLfloat`s.

2 years agoglcomp: remove unused 'glCompPoly.hotKey'
Matthew Fernandez [Wed, 4 May 2022 15:42:56 +0000 (08:42 -0700)]
glcomp: remove unused 'glCompPoly.hotKey'

2 years agoglcomp: remove unused 'glCompPointI'
Matthew Fernandez [Wed, 4 May 2022 15:41:55 +0000 (08:41 -0700)]
glcomp: remove unused 'glCompPointI'

2 years agoMerge branch 'smattr/AEF4FE91-97F2-4976-9CA4-B5766149054C' into 'main'
Matthew Fernandez [Wed, 11 May 2022 00:01:12 +0000 (00:01 +0000)]
Merge branch 'smattr/AEF4FE91-97F2-4976-9CA4-B5766149054C' into 'main'

CI: attempt to fix Gitlab 'cobertura' removal

Closes #2236

See merge request graphviz/graphviz!2659

2 years agoCI: attempt to fix Gitlab 'cobertura' removal
Matthew Fernandez [Fri, 6 May 2022 14:38:51 +0000 (07:38 -0700)]
CI: attempt to fix Gitlab 'cobertura' removal

The `cobertura` keyword was deprecated in March¹ and then completely removed on
2022-05-05,² causing all CI pipelines to now fail. This is an attempt to migrate
to the new syntax. More details in
https://gitlab.com/gitlab-org/gitlab/-/issues/361615.

Gitlab: Fixes #2236

¹ https://gitlab.com/gitlab-org/gitlab/-/commit/eae7dfc843783e270607d71c6db0c1ab6a52a8d1
² https://gitlab.com/gitlab-org/gitlab/-/commit/812408bafae328b81652110fc53c6c6b89e3db81#62c40d79aabcb1ce977904c9c748b08045ff0a85

2 years agoMerge branch 'maze-doc' into 'main'
Matthew Fernandez [Thu, 5 May 2022 05:34:58 +0000 (05:34 +0000)]
Merge branch 'maze-doc' into 'main'

add doxygen comments maze.h

See merge request graphviz/graphviz!2638

2 years agoadd comments to struct maze
Costa Shulyupin [Tue, 26 Apr 2022 05:20:29 +0000 (08:20 +0300)]
add comments to struct maze

The ordered sets are created by `dtopen` with descriptor `chanItemDisc`
and method `Dtoset`.

The method is defined with

 #define DT_OSET         0000004 /* ordered set (self-adjusting tree)    */

Channels are added with function `addChan` and are retrieved by `chanSearch`

2 years agoconvert comments to doxygen format in struct maze
Costa Shulyupin [Tue, 26 Apr 2022 05:10:04 +0000 (08:10 +0300)]
convert comments to doxygen format in struct maze

2 years agocomment for struct maze
Costa Shulyupin [Tue, 26 Apr 2022 05:09:14 +0000 (08:09 +0300)]
comment for struct maze

2 years agodoxygen comment for maze cell sides
Costa Shulyupin [Tue, 26 Apr 2022 04:45:56 +0000 (07:45 +0300)]
doxygen comment for maze cell sides

2 years agocomment for maze cell
Costa Shulyupin [Tue, 26 Apr 2022 04:40:19 +0000 (07:40 +0300)]
comment for maze cell

2 years agoconvert comments to doxygen format in maze.h
Costa Shulyupin [Tue, 26 Apr 2022 04:32:01 +0000 (07:32 +0300)]
convert comments to doxygen format in maze.h

2 years agodoxygen comment for maze.h
Costa Shulyupin [Tue, 26 Apr 2022 04:28:12 +0000 (07:28 +0300)]
doxygen comment for maze.h

2 years agoremove duplicate .gitignore line
Matthew Fernandez [Thu, 5 May 2022 02:33:04 +0000 (19:33 -0700)]
remove duplicate .gitignore line

2 years agounify tests/ and rtest/
Matthew Fernandez [Thu, 5 May 2022 02:27:04 +0000 (19:27 -0700)]
unify tests/ and rtest/

For a long time, there has been confusion in the source tree with tests/ and
rtest/ each containing part of the test suite. These were initially distinct,
but over time files in tests/ have begun importing or referring to sources in
rtest/. This has been a common point of confusion for newcomers to the project:
tests/ is the logical place the test suite should live, so they run that, but
then discover it is not the full test suite.

The diff for this commit is large, so it is challenging to see that it is not a
complex change:

  1. Merge rtest/Makefile.am into tests/Makefile.am

  2. `git mv rtest/* tests/*`

  3. Adjust all Pytest invocations from `… ci/tests.py rtest tests` to
     `… ci/tests.py tests`

  4. Adjust all other references to rtest/ to tests/ (e.g. .gitignore)

Now seems to be a brief period of calm when edits to the test suite are not
in-flight, so we have less chance of a painful merge conflict. The problem of a
large part of the rtest/rtest.py suite being disabled remains and is not
affected by this commit.

2 years agoMerge branch 'vec-delete' into 'main'
Matthew Fernandez [Thu, 5 May 2022 00:58:45 +0000 (00:58 +0000)]
Merge branch 'vec-delete' into 'main'

Fix unintended recursion in vec_delete

Closes #2225

See merge request graphviz/graphviz!2572

2 years agoAdd changelog entry summarizing the fix for #2225
Mark Hansen [Fri, 8 Apr 2022 21:23:58 +0000 (07:23 +1000)]
Add changelog entry summarizing the fix for #2225

2 years agoRemove unintended recursion in vec_delete.
Mark Hansen [Fri, 8 Apr 2022 07:35:55 +0000 (17:35 +1000)]
Remove unintended recursion in vec_delete.

This prevents a segfault: Fixes #2225.

Add a little more documentation around the responsibilities of callers
to make this a little less likely to happen again.

I thought about calling this vec_vec_delete but went with cycles_delete;
the only place this is used is for cycles.

This effectively reverts c4ef19f483d577a8395a1a1f9ca5a321af3472b5,
and fixes that commit's memory leak in a different way.

2 years agoAdd failing test case for #2225
Mark Hansen [Fri, 8 Apr 2022 07:34:40 +0000 (17:34 +1000)]
Add failing test case for #2225

This fails when I run

```
pytest test_regression.py -k test_2225
```

on macOS.

I manually reduced the test case to minimal format, starting from
`graphs/undirected/ngk10_4.gv` and removing unnecessary elements.

Co-authored-by: Matthew Fernandez <matthew.fernandez@gmail.com>
2 years agoMerge branch 'automake-cleanup' into 'main'
Matthew Fernandez [Tue, 3 May 2022 00:10:04 +0000 (00:10 +0000)]
Merge branch 'automake-cleanup' into 'main'

Move unconditional `man_MANS` -> `dist_man_MANS`

See merge request graphviz/graphviz!2649

2 years agoMove `pdf_DATA` -> `dist_pdf_DATA`
David Seifert [Mon, 2 May 2022 20:30:58 +0000 (22:30 +0200)]
Move `pdf_DATA` -> `dist_pdf_DATA`

2 years agoMove `html_DATA` -> `dist_html_DATA`
David Seifert [Mon, 2 May 2022 20:30:58 +0000 (22:30 +0200)]
Move `html_DATA` -> `dist_html_DATA`

2 years agoMove unconditional `man_MANS` -> `dist_man_MANS`
David Seifert [Mon, 2 May 2022 20:30:58 +0000 (22:30 +0200)]
Move unconditional `man_MANS` -> `dist_man_MANS`

* Avoids the repetition in `EXTRA_DIST`, and is the recommended
  Automake pattern.
* Some `man_MANS` will have to remain, since Automake has a bug
  where `dist_man_MANS` in Automake branches do not get included
  in the tarball:
    https://lists.gnu.org/archive/html/bug-automake/2008-06/msg00019.html

2 years agoMerge branch 'smattr/C84BAA48-355C-42CA-9E67-B89D004FB871' into 'main'
Matthew Fernandez [Mon, 2 May 2022 17:50:19 +0000 (17:50 +0000)]
Merge branch 'smattr/C84BAA48-355C-42CA-9E67-B89D004FB871' into 'main'

remove Awk build dependency

Closes #2118

See merge request graphviz/graphviz!2644

2 years agoadd changelog entry for Awk dependency removal
Matthew Fernandez [Mon, 11 Apr 2022 02:57:47 +0000 (19:57 -0700)]
add changelog entry for Awk dependency removal

Gitlab: closes #2118

2 years agoWindows: remove Awk setup
Matthew Fernandez [Mon, 11 Apr 2022 02:47:50 +0000 (19:47 -0700)]
Windows: remove Awk setup

Awk is no longer used by any of the build systems in use on Windows.

Gitlab: #2118

2 years agoCMake: remove required Awk detection
Matthew Fernandez [Mon, 11 Apr 2022 02:47:06 +0000 (19:47 -0700)]
CMake: remove required Awk detection

Awk is no longer used in the CMake build system.

Gitab: #2118

2 years agoAutotools: remove required Awk detection
Matthew Fernandez [Mon, 11 Apr 2022 02:46:00 +0000 (19:46 -0700)]
Autotools: remove required Awk detection

Awk is no longer used in the Autotools build system.

Gitlab: #2118

2 years agoport colortbl.h generation script to Python
Matthew Fernandez [Mon, 11 Apr 2022 02:43:04 +0000 (19:43 -0700)]
port colortbl.h generation script to Python

Note that this does not introduce an extra build dependency in any of the three
build systems:

  1. Autotools: these steps are done during construction of the portable source
     tarball, during which Python 3 is already required (see autogen.sh).

  2. CMake: Python 3 is already required by and used in the top level
     CMakeLists.txt.

  3. MS Build: Python 3 is already used in version generation in
     lib/version/version.vcxproj.

This change is motivated by the goal of removing a dependency on Awk. This
commit removes the last remaining Awk usage in all three build systems, as well
as removing dependencies on `type` and `sort` in the MS Build build system.

This commit removes the generation of the intermediate artifacts color_lib,
color_lib-sort, and color_lib-temp. Instead, we generate only the final
artifact, colortbl.h. This consolidation of logic into Python is part of what
allows the removal of dependencies described above.

Gitlab: #2118

2 years agoport brewer_lib generation script to Python
Matthew Fernandez [Mon, 11 Apr 2022 00:44:19 +0000 (17:44 -0700)]
port brewer_lib generation script to Python

Note that this does not introduce an extra build dependency in any of the three
build systems:

  1. Autotools: these steps are done during construction of the portable source
     tarball, during which Python 3 is already required (see autogen.sh).

  2. CMake: Python 3 is already required by and used in the top level
     CMakeLists.txt.

  3. MS Build: Python 3 is already used in version generation in
     lib/version/version.vcxproj.

This change is motivated by the goal of removing a dependency on Awk.

Gitlab: #2118

2 years agoport svgcolor_lib generation script to Python
Matthew Fernandez [Sun, 10 Apr 2022 21:07:36 +0000 (14:07 -0700)]
port svgcolor_lib generation script to Python

Note that this does not introduce an extra build dependency in any of the three
build systems:

  1. Autotools: these steps are done during construction of the portable source
     tarball, during which Python 3 is already required (see autogen.sh).

  2. CMake: Python 3 is already required by and used in the top level
     CMakeLists.txt.

  3. MS Build: Python 3 is already used in version generation in
     lib/version/version.vcxproj.

This change is motivated by the goal of removing a dependency on Awk. Though it
also conveniently side steps some line ending portability issues that were being
worked around with `AWK_OPTIONS`. In Python, this is unnecessary because reading
a file in text mode accounts for both flavors of line endings.

Gitlab: #2118

2 years agofix missing distclean of 'svgcolor_lib'
Matthew Fernandez [Sun, 10 Apr 2022 20:37:53 +0000 (13:37 -0700)]
fix missing distclean of 'svgcolor_lib'

This is a generated file that appears intended to be treated like `brewer_lib`
and `color_lib`.

2 years agoMerge branch 'smattr/257B56CE-F640-40F2-9EB7-43E72C4B95B3' into 'main'
Matthew Fernandez [Mon, 2 May 2022 02:02:48 +0000 (02:02 +0000)]
Merge branch 'smattr/257B56CE-F640-40F2-9EB7-43E72C4B95B3' into 'main'

cgraph, glcomp: minor clean up

See merge request graphviz/graphviz!2643

2 years agoglcomp: abbreviate 'GLfloat' literals
Matthew Fernandez [Sat, 30 Apr 2022 02:07:44 +0000 (19:07 -0700)]
glcomp: abbreviate 'GLfloat' literals

The `GLfloat` type is a 32-bit IEEE-754 floating point value¹ which is identical
to what the C `float` type provides on all supported platforms.

¹ https://www.khronos.org/opengl/wiki/OpenGL_Type

2 years agoglcomp: inline and remove 'copy_glcomp_color'
Matthew Fernandez [Sat, 30 Apr 2022 02:02:50 +0000 (19:02 -0700)]
glcomp: inline and remove 'copy_glcomp_color'

The C compiler knows how to copy a struct without needing it spelled out
member-by-member.

2 years agoglcomp: remove unused 'glCompColor.test'
Matthew Fernandez [Sat, 30 Apr 2022 02:01:13 +0000 (19:01 -0700)]
glcomp: remove unused 'glCompColor.test'

2 years agoglcomp: remove unused 'glCompColor.tag'
Matthew Fernandez [Sat, 30 Apr 2022 02:00:53 +0000 (19:00 -0700)]
glcomp: remove unused 'glCompColor.tag'

2 years agocgraph: remove prototype of unimplemented 'agrebind0'
Matthew Fernandez [Sat, 30 Apr 2022 01:27:23 +0000 (18:27 -0700)]
cgraph: remove prototype of unimplemented 'agrebind0'

This was added in the first commit, but apparently was never implemented.

2 years agoMerge branch 'smattr/ADD4EDF2-0C76-420E-B9BA-BA3D82E4A083' into 'main'
Matthew Fernandez [Mon, 2 May 2022 00:38:44 +0000 (00:38 +0000)]
Merge branch 'smattr/ADD4EDF2-0C76-420E-B9BA-BA3D82E4A083' into 'main'

remove unused 'updatePM'

See merge request graphviz/graphviz!2642

2 years agoremove unused 'updatePM'
Matthew Fernandez [Tue, 26 Apr 2022 14:47:32 +0000 (07:47 -0700)]
remove unused 'updatePM'

The last use of this was removed in 4d12d3f0826198aad637a5ee4d9c1eff21952019.

2 years agoMerge branch 'smattr/5F69683D-065F-4437-AA93-AF01343A36D7' into 'main'
Matthew Fernandez [Sun, 1 May 2022 14:35:04 +0000 (14:35 +0000)]
Merge branch 'smattr/5F69683D-065F-4437-AA93-AF01343A36D7' into 'main'

gvmap: replace unchecked allocations with cgraph alloc wrappers

See merge request graphviz/graphviz!2637

2 years agogvmap: replace unchecked allocations with cgraph alloc wrappers
Matthew Fernandez [Sat, 9 Apr 2022 18:05:41 +0000 (11:05 -0700)]
gvmap: replace unchecked allocations with cgraph alloc wrappers

These turn messy crashes into more graceful exits.

2 years agogvmap: remove unused 'plot_label'
Matthew Fernandez [Sat, 9 Apr 2022 17:48:20 +0000 (10:48 -0700)]
gvmap: remove unused 'plot_label'

2 years agogvmap: remove unused 'bg_color'
Matthew Fernandez [Sat, 9 Apr 2022 17:47:22 +0000 (10:47 -0700)]
gvmap: remove unused 'bg_color'