]> granicus.if.org Git - graphviz/log
graphviz
2 years agoexpr: doxygen comment
Costa Shulyupin [Wed, 5 Oct 2022 15:43:21 +0000 (18:43 +0300)]
expr: doxygen comment

2 years agolib/common: : doxygen comment
Costa Shulyupin [Wed, 5 Oct 2022 15:42:13 +0000 (18:42 +0300)]
lib/common: : doxygen comment

2 years agoMerge branch 'cgraph-module' into 'main'
Matthew Fernandez [Thu, 6 Oct 2022 16:44:48 +0000 (16:44 +0000)]
Merge branch 'cgraph-module' into 'main'

doxygen module/group cgraph_api

See merge request graphviz/graphviz!2877

2 years agodoxygen module cgraph_api
Costa Shulyupin [Wed, 5 Oct 2022 15:21:37 +0000 (18:21 +0300)]
doxygen module cgraph_api

2 years agoMerge branch 'include-rankdir-in-artifact-filenames' into 'main'
Magnus Jacobsson [Thu, 6 Oct 2022 09:30:05 +0000 (09:30 +0000)]
Merge branch 'include-rankdir-in-artifact-filenames' into 'main'

Include rankdir in artifact filenames

See merge request graphviz/graphviz!2875

2 years agotest_edge_node_overlap_polygon_node_shapes: include rankdir in filename
Magnus Jacobsson [Tue, 4 Oct 2022 10:58:34 +0000 (12:58 +0200)]
test_edge_node_overlap_polygon_node_shapes: include rankdir in filename

2 years agotest_edge_node_overlap_point_node_shape: include rankdir in filename
Magnus Jacobsson [Tue, 4 Oct 2022 10:57:57 +0000 (12:57 +0200)]
test_edge_node_overlap_point_node_shape: include rankdir in filename

2 years agotest_edge_node_overlap_ellipse_node_shapes_except_point: include rankdir in filename
Magnus Jacobsson [Tue, 4 Oct 2022 10:57:02 +0000 (12:57 +0200)]
test_edge_node_overlap_ellipse_node_shapes_except_point: include rankdir in filename

2 years agotest_edge_node_overlap_cylinder_node_shape: include rankdir in filename
Magnus Jacobsson [Tue, 4 Oct 2022 10:47:06 +0000 (12:47 +0200)]
test_edge_node_overlap_cylinder_node_shape: include rankdir in filename

2 years agoMerge branch 'common-doxygen' into 'main'
Matthew Fernandez [Wed, 5 Oct 2022 15:57:16 +0000 (15:57 +0000)]
Merge branch 'common-doxygen' into 'main'

doxygen comments in lib/common

See merge request graphviz/graphviz!2876

2 years agotextspan: doxygen comments
Costa Shulyupin [Tue, 4 Oct 2022 15:51:25 +0000 (18:51 +0300)]
textspan: doxygen comments

2 years agoxml: doxygen comment
Costa Shulyupin [Tue, 4 Oct 2022 15:38:18 +0000 (18:38 +0300)]
xml: doxygen comment

2 years agons: doxygen comment
Costa Shulyupin [Tue, 4 Oct 2022 15:32:56 +0000 (18:32 +0300)]
ns: doxygen comment

2 years agogeomprocs: doxygen comment
Costa Shulyupin [Tue, 4 Oct 2022 15:31:35 +0000 (18:31 +0300)]
geomprocs: doxygen comment

2 years agogeom: doxygen comment
Costa Shulyupin [Tue, 4 Oct 2022 15:30:55 +0000 (18:30 +0300)]
geom: doxygen comment

2 years agoemit: doxygen comment
Costa Shulyupin [Tue, 4 Oct 2022 15:30:41 +0000 (18:30 +0300)]
emit: doxygen comment

2 years agoMerge branch 'smattr/cb76abb9-9046-4de3-a70f-289acba7b52d' into 'main'
Matthew Fernandez [Wed, 5 Oct 2022 02:02:05 +0000 (02:02 +0000)]
Merge branch 'smattr/cb76abb9-9046-4de3-a70f-289acba7b52d' into 'main'

remove SWIG setup steps in Windows build preparation script

See merge request graphviz/graphviz!2870

2 years agoremove SWIG setup steps in Windows build preparation script
Matthew Fernandez [Fri, 30 Sep 2022 04:18:58 +0000 (21:18 -0700)]
remove SWIG setup steps in Windows build preparation script

As discussed on Gitlab,¹ this Windows build script tries to discover SWIG, but
none of the Windows options for building Graphviz support compiling any of the
components that use SWIG.

¹ https://gitlab.com/graphviz/graphviz/-/issues/2277#note_1100714918

2 years agoMerge branch 'smattr/711fa74b-6b92-4189-8033-1a6347315391' into 'main'
Matthew Fernandez [Wed, 5 Oct 2022 01:00:38 +0000 (01:00 +0000)]
Merge branch 'smattr/711fa74b-6b92-4189-8033-1a6347315391' into 'main'

sccmap: re-enable non-silent output when '-v' is passed

See merge request graphviz/graphviz!2873

2 years agosccmap: re-enable non-silent output when '-v' is passed
Matthew Fernandez [Sat, 1 Oct 2022 02:12:32 +0000 (19:12 -0700)]
sccmap: re-enable non-silent output when '-v' is passed

Unix command line tools generally have a “last option wins” kind of semantics,
wherein it is valid to pass options multiple times or in combination with other
options that do their opposite. Thus when calling `sccmap -S -v`, the user could
reasonably expect that `-v` (“verbose”) reversed the effect of `-S` (“silent”).
This is also what the man page implies. But this was not what the code was
doing.

2 years agosccmap: fix missing '-S' in usage summary
Matthew Fernandez [Sat, 1 Oct 2022 02:10:45 +0000 (19:10 -0700)]
sccmap: fix missing '-S' in usage summary

2 years agoMerge branch 'smattr/dcfd6cd8-86b5-45bc-9037-39c47f7c003a' into 'main'
Matthew Fernandez [Mon, 3 Oct 2022 01:26:36 +0000 (01:26 +0000)]
Merge branch 'smattr/dcfd6cd8-86b5-45bc-9037-39c47f7c003a' into 'main'

cmds/tools: progress towards using cgraph wrappers for allocation

See merge request graphviz/graphviz!2852

2 years agoremove unnecessary 'usershape_t.data' casts
Matthew Fernandez [Wed, 21 Sep 2022 04:47:44 +0000 (21:47 -0700)]
remove unnecessary 'usershape_t.data' casts

2 years agogvpack: use cgraph wrappers for allocation
Matthew Fernandez [Thu, 22 Sep 2022 04:13:13 +0000 (21:13 -0700)]
gvpack: use cgraph wrappers for allocation

The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h
wrappers except (1) they are header-only and (2) they live in a directory
(cgraph) that is at the root of the dependency tree. The long term plan is to
replace all use of lib/common/memory.h with lib/cgraph/alloc.h.

2 years agogvpack: replace CDT pair dictionaries with 'std::multiset'
Matthew Fernandez [Thu, 22 Sep 2022 04:04:35 +0000 (21:04 -0700)]
gvpack: replace CDT pair dictionaries with 'std::multiset'

This is intended to be a non-functional change with a number of benefits:

  1. This is C++ code, so no need for custom CDT data structures. The STL
     equivalents are likely more optimized, better understood by the compiler,
     and more familiar to human readers.

  2. We avoid the lib/common allocation routines (`NEW` macro and friends). Now
     allocation failures naturally propagate outwards as `std::bad_alloc`
     exceptions without any custom handling.

  3. Related to (2), we no longer need to manually free any of these objects.
     RAII takes care of all of this.

2 years agogvpack: replace CDT attribute dictionaries with std::maps
Matthew Fernandez [Thu, 22 Sep 2022 03:33:41 +0000 (20:33 -0700)]
gvpack: replace CDT attribute dictionaries with std::maps

This is intended to be a non-functional change with a number of benefits:

  1. This is C++ code, so no need for custom CDT data structures. The STL
     equivalents are likely more optimized, better understood by the compiler,
     and more familiar to human readers.

  2. We avoid the lib/common allocation routines (`NEW` macro and friends). Now
     allocation failures naturally propagate outwards as `std::bad_alloc`
     exceptions without any custom handling.

  3. Related to (2), we no longer need to manually free any of these objects.
     RAII takes care of all of this.

2 years agomm2gv makeDotGraph: use cgraph wrappers for allocation
Matthew Fernandez [Thu, 22 Sep 2022 02:51:58 +0000 (19:51 -0700)]
mm2gv makeDotGraph: use cgraph wrappers for allocation

The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h
wrappers except (1) they are header-only and (2) they live in a directory
(cgraph) that is at the root of the dependency tree. The long term plan is to
replace all use of lib/common/memory.h with lib/cgraph/alloc.h.

2 years agoMerge branch 'main' into 'main'
Matthew Fernandez [Sat, 1 Oct 2022 02:00:44 +0000 (02:00 +0000)]
Merge branch 'main' into 'main'

Make vimdot work with $EDITOR that is not a full path

See merge request graphviz/graphviz!2872

2 years agoMake vimdot work with $EDITOR that is not a full path
Jakub Kaczor [Fri, 30 Sep 2022 10:06:20 +0000 (10:06 +0000)]
Make vimdot work with $EDITOR that is not a full path

2 years agoMerge branch 'smattr/084fe373-a609-4015-855e-3a366c9415ac' into 'main'
Matthew Fernandez [Fri, 30 Sep 2022 05:02:34 +0000 (05:02 +0000)]
Merge branch 'smattr/084fe373-a609-4015-855e-3a366c9415ac' into 'main'

mingle: delete some dead code

See merge request graphviz/graphviz!2869

2 years agoremove unused 'MATRIX_SKEW' flag
Matthew Fernandez [Thu, 29 Sep 2022 04:36:30 +0000 (21:36 -0700)]
remove unused 'MATRIX_SKEW' flag

This property is sometimes set on matrices but then never read.

2 years agoremove unused 'MATRIX_HERMITIAN' flag
Matthew Fernandez [Thu, 29 Sep 2022 04:35:06 +0000 (21:35 -0700)]
remove unused 'MATRIX_HERMITIAN' flag

This property is sometimes set on matrices but then never read.

2 years agosparse SparseMatrix_init: remove dead stores to 'property'
Matthew Fernandez [Thu, 29 Sep 2022 04:32:32 +0000 (21:32 -0700)]
sparse SparseMatrix_init: remove dead stores to 'property'

`property` is cleared immediately before these lines.

2 years agomingle: remove dead store to 'dim' local
Matthew Fernandez [Thu, 29 Sep 2022 02:33:45 +0000 (19:33 -0700)]
mingle: remove dead store to 'dim' local

2 years agomingle: remove a 'flag' parameter that is always set to 0
Matthew Fernandez [Thu, 29 Sep 2022 02:00:58 +0000 (19:00 -0700)]
mingle: remove a 'flag' parameter that is always set to 0

2 years agomingle: remove 'OPENGL' guarded code
Matthew Fernandez [Thu, 29 Sep 2022 01:58:52 +0000 (18:58 -0700)]
mingle: remove 'OPENGL' guarded code

Nothing in the build systems defines this.

2 years agomingle: remove 'open_gl' parameter that is always 0
Matthew Fernandez [Thu, 29 Sep 2022 01:58:07 +0000 (18:58 -0700)]
mingle: remove 'open_gl' parameter that is always 0

2 years agoMerge branch 'smattr/b11d77f1-490c-47a6-83af-656fd86d2318' into 'main'
Matthew Fernandez [Fri, 30 Sep 2022 00:59:23 +0000 (00:59 +0000)]
Merge branch 'smattr/b11d77f1-490c-47a6-83af-656fd86d2318' into 'main'

tests: idiomatic use of Catch2’s 'INFO' macro

See merge request graphviz/graphviz!2867

2 years agotests: idiomatic use of Catch2’s 'INFO' macro
Matthew Fernandez [Wed, 28 Sep 2022 15:32:45 +0000 (08:32 -0700)]
tests: idiomatic use of Catch2’s 'INFO' macro

This is slightly more concise, efficient, and readable.

2 years agoMerge branch 'smattr/ccdbc8f7-27f6-4157-87aa-efdb65bf9bcc' into 'main'
Matthew Fernandez [Thu, 29 Sep 2022 16:36:24 +0000 (16:36 +0000)]
Merge branch 'smattr/ccdbc8f7-27f6-4157-87aa-efdb65bf9bcc' into 'main'

fix erroneous commas in JSON output of graphs with only clusters

Closes #2282

See merge request graphviz/graphviz!2868

2 years agofix erroneous commas in JSON output of graphs with only clusters
Matthew Fernandez [Thu, 29 Sep 2022 01:26:34 +0000 (18:26 -0700)]
fix erroneous commas in JSON output of graphs with only clusters

When a graph or subgraph contained exclusively subnodes that were clusters (that
is, it contained a non-zero number of subnodes, but all of them were clusters),
the output of `-Tjson` would contain an extra comma. This malformed JSON could
not be ingested by most downstream parsers.

This appears to have been a mistake in f82c51fc9644047e9ce80d860fea562e98d3311c
that introduced cluster skipping in the loop that emits nodes in JSON. It did
not account for the earlier part of the containing function that was intended to
early-exit if the loop would have a 0 iteration count.

As noted in the discussion of #2282, a couple of the maintainers believe this
manual JSON writing code is inherently fragile and likely contains more latent
bugs. But we do not have maintainer consensus on migrating to an established
JSON-writing library. This fix attempts to surgically address the current known
bug. But I cannot guarantee it does not introduce others.

Gitlab: fixes #2282

2 years agoMerge branch 'add-fedora-cmake-build-and-test-jobs-to-ci' into 'main'
Magnus Jacobsson [Thu, 29 Sep 2022 15:35:28 +0000 (15:35 +0000)]
Merge branch 'add-fedora-cmake-build-and-test-jobs-to-ci' into 'main'

Add Fedora CMake build and test jobs to CI

See merge request graphviz/graphviz!2866

2 years agoCI: add fedora36-cmake-test job
Magnus Jacobsson [Wed, 28 Sep 2022 12:26:38 +0000 (14:26 +0200)]
CI: add fedora36-cmake-test job

2 years agoCI: add fedora36-cmake-build job
Magnus Jacobsson [Wed, 28 Sep 2022 12:26:32 +0000 (14:26 +0200)]
CI: add fedora36-cmake-build job

2 years agoCI: add fedora35-cmake-test job
Magnus Jacobsson [Wed, 28 Sep 2022 12:25:05 +0000 (14:25 +0200)]
CI: add fedora35-cmake-test job

2 years agoCI: add fedora35-cmake-build job
Magnus Jacobsson [Wed, 28 Sep 2022 12:24:57 +0000 (14:24 +0200)]
CI: add fedora35-cmake-build job

2 years agoMerge branch 'add-ubuntu-20.04-cmake-jobs-to-ci' into 'main'
Magnus Jacobsson [Thu, 29 Sep 2022 13:44:34 +0000 (13:44 +0000)]
Merge branch 'add-ubuntu-20.04-cmake-jobs-to-ci' into 'main'

Add Ubuntu 20.04 CMake jobs to CI

See merge request graphviz/graphviz!2865

2 years agoCI: add ubuntu-20.04-cmake-test job
Magnus Jacobsson [Wed, 28 Sep 2022 12:02:53 +0000 (14:02 +0200)]
CI: add ubuntu-20.04-cmake-test job

2 years agoCI: add ubuntu-20.04-cmake-build job
Magnus Jacobsson [Wed, 28 Sep 2022 12:02:38 +0000 (14:02 +0200)]
CI: add ubuntu-20.04-cmake-build job

2 years agoCI: Install CMake in Ubuntu 20.04 image
Magnus Jacobsson [Wed, 28 Sep 2022 13:05:09 +0000 (15:05 +0200)]
CI: Install CMake in Ubuntu 20.04 image

2 years agoMerge branch 'consistent-os-naming-in-ci' into 'main'
Magnus Jacobsson [Thu, 29 Sep 2022 09:06:14 +0000 (09:06 +0000)]
Merge branch 'consistent-os-naming-in-ci' into 'main'

Rename CI jobs to be consistent with Docker images

See merge request graphviz/graphviz!2864

2 years agoCI: rename ubuntu-22-04* jobs to ubuntu-22.04*
Magnus Jacobsson [Wed, 28 Sep 2022 11:45:09 +0000 (13:45 +0200)]
CI: rename ubuntu-22-04* jobs to ubuntu-22.04*

This is the naming scheme that the Docker images use.

2 years agoCI: rename ubuntu22-04* jobs to ubuntu-22.04*
Magnus Jacobsson [Wed, 28 Sep 2022 11:45:09 +0000 (13:45 +0200)]
CI: rename ubuntu22-04* jobs to ubuntu-22.04*

This is the naming scheme that the Docker images use.

2 years agoCI: rename ubuntu20-04* jobs to ubuntu-20.04*
Magnus Jacobsson [Wed, 28 Sep 2022 11:45:09 +0000 (13:45 +0200)]
CI: rename ubuntu20-04* jobs to ubuntu-20.04*

This is the naming scheme that the Docker images use.

2 years agoCI: rename ubuntu18-04* jobs to ubuntu-18.04*
Magnus Jacobsson [Wed, 28 Sep 2022 11:45:09 +0000 (13:45 +0200)]
CI: rename ubuntu18-04* jobs to ubuntu-18.04*

This is the naming scheme that the Docker images use.

2 years agoMerge branch 'smattr/3b2dd4ad-92ff-457e-9f25-39ed4dab87de' into 'main'
Matthew Fernandez [Wed, 28 Sep 2022 15:53:03 +0000 (15:53 +0000)]
Merge branch 'smattr/3b2dd4ad-92ff-457e-9f25-39ed4dab87de' into 'main'

core plugin: some simplification and clean up of the JSON renderer

See merge request graphviz/graphviz!2863

2 years agocore plugin: pass around 'has_subgs' as a C99 bool
Matthew Fernandez [Tue, 27 Sep 2022 15:31:18 +0000 (08:31 -0700)]
core plugin: pass around 'has_subgs' as a C99 bool

This makes the intent and usage of this variable a little clearer.

2 years agocore plugin: pass around 'top' as a C99 bool
Matthew Fernandez [Tue, 27 Sep 2022 15:28:59 +0000 (08:28 -0700)]
core plugin: pass around 'top' as a C99 bool

This makes the intent and usage of this variable a little clearer.

2 years agocore plugin: make 'IS_CLUSTER' macro a function
Matthew Fernandez [Tue, 27 Sep 2022 15:23:27 +0000 (08:23 -0700)]
core plugin: make 'IS_CLUSTER' macro a function

This improves type safety, while still being inline-able by the compiler.

2 years agocore plugin: abbreviate 'IS_CLUSTER' macro
Matthew Fernandez [Tue, 27 Sep 2022 15:22:28 +0000 (08:22 -0700)]
core plugin: abbreviate 'IS_CLUSTER' macro

2 years agocore plugin isXDot: return a C99 bool
Matthew Fernandez [Tue, 27 Sep 2022 15:21:16 +0000 (08:21 -0700)]
core plugin isXDot: return a C99 bool

This makes the intent of this function slightly clearer.

2 years agocore plugin isXDot: take parameter as a const
Matthew Fernandez [Tue, 27 Sep 2022 15:20:22 +0000 (08:20 -0700)]
core plugin isXDot: take parameter as a const

This function does not modify its input.

2 years agocore plugin isXDot: remove string compare micro-optimization
Matthew Fernandez [Tue, 27 Sep 2022 15:19:14 +0000 (08:19 -0700)]
core plugin isXDot: remove string compare micro-optimization

Modern compilers are able to do this transformation themselves if they have
worked out that it will be faster.

2 years agoMerge branch 'articulation_pos' into 'main'
Mark Hansen [Wed, 28 Sep 2022 08:42:43 +0000 (08:42 +0000)]
Merge branch 'articulation_pos' into 'main'

Remove unused articulation_pos attribute

See merge request graphviz/graphviz!2862

2 years agoRemove unused articulation_pos attribute
Mark Hansen [Tue, 27 Sep 2022 08:07:30 +0000 (18:07 +1000)]
Remove unused articulation_pos attribute

This is never read, and seems to never have been, even going back to the
initial Graphviz git commit 17 years ago.

Towards https://gitlab.com/graphviz/graphviz.gitlab.io/-/issues/75

2 years agoMerge branch 'smattr/a089ff42-68a4-4dcc-8786-eed9d3962195' into 'main'
Matthew Fernandez [Wed, 28 Sep 2022 01:19:59 +0000 (01:19 +0000)]
Merge branch 'smattr/a089ff42-68a4-4dcc-8786-eed9d3962195' into 'main'

smyrna gvpr_select: remove unnecessary dynamic allocation

See merge request graphviz/graphviz!2860

2 years agosmyrna gvpr_select: remove unnecessary dynamic allocation
Matthew Fernandez [Tue, 27 Sep 2022 02:21:59 +0000 (19:21 -0700)]
smyrna gvpr_select: remove unnecessary dynamic allocation

2 years agoMerge branch 'smattr/gitlab-2282' into 'main'
Matthew Fernandez [Tue, 27 Sep 2022 15:53:35 +0000 (15:53 +0000)]
Merge branch 'smattr/gitlab-2282' into 'main'

add a test case for #2282

See merge request graphviz/graphviz!2861

2 years agoadd a test case for #2282
Matthew Fernandez [Tue, 27 Sep 2022 02:43:19 +0000 (19:43 -0700)]
add a test case for #2282

2 years agoMerge branch 'gs' into 'main'
Mark Hansen [Tue, 27 Sep 2022 08:39:43 +0000 (08:39 +0000)]
Merge branch 'gs' into 'main'

Stop using now-hidden gs_error_names symbol

Closes #2280

See merge request graphviz/graphviz!2856

2 years agoAdd changelog entry
Mark Hansen [Tue, 27 Sep 2022 07:53:30 +0000 (17:53 +1000)]
Add changelog entry

2 years agoStop using now-hidden gs_error_names symbol
Mark Hansen [Mon, 26 Sep 2022 10:43:39 +0000 (20:43 +1000)]
Stop using now-hidden gs_error_names symbol

GhostScript hid their gs_error_names symbol as part of a global by-default hiding of non-API symbols.

It will probably take a while for GhostScript to get a public API for these symbols back into a release, so let's stop using the symbol for now, until then.

Fixes #2280

2 years agoMerge branch 'smattr/gitlab-2279' into 'main'
Matthew Fernandez [Mon, 26 Sep 2022 16:06:49 +0000 (16:06 +0000)]
Merge branch 'smattr/gitlab-2279' into 'main'

fix smyrna regressions

Closes #2279

See merge request graphviz/graphviz!2855

2 years agosmyrna filter_attributes: take attribute as a const
Matthew Fernandez [Sun, 25 Sep 2022 19:15:26 +0000 (12:15 -0700)]
smyrna filter_attributes: take attribute as a const

This removes the need for casts, squashing some -Wcast-qual warnings.

2 years agosmyrna get_text_widget_to_attribute: remove unnecessary cast
Matthew Fernandez [Sun, 25 Sep 2022 19:14:56 +0000 (12:14 -0700)]
smyrna get_text_widget_to_attribute: remove unnecessary cast

Squashes a -Wcast-qual warning.

2 years agosmyrna create_filtered_list: fix comment typo
Matthew Fernandez [Sun, 25 Sep 2022 19:14:36 +0000 (12:14 -0700)]
smyrna create_filtered_list: fix comment typo

2 years agosmyrna mAttributesSlot: squash -Wunused-parameter warnings
Matthew Fernandez [Sun, 25 Sep 2022 18:49:08 +0000 (11:49 -0700)]
smyrna mAttributesSlot: squash -Wunused-parameter warnings

Other similar warnings in this file were squashed in
bd869436742887a0089f5ad817ecb36a1546987c. But the revert in the previous commit
brought back this function without warnings squashed.

2 years agoRevert "smyrna: remove unused mAttributesSlot"
Matthew Fernandez [Sun, 25 Sep 2022 18:25:36 +0000 (11:25 -0700)]
Revert "smyrna: remove unused mAttributesSlot"

This reverts commit 37e430722d3981faf98b38259f320c3a36e6be4d. This function _is_
used (in share/gui/smyrna.glade). It is unclear why
37e430722d3981faf98b38259f320c3a36e6be4d claimed it was not.

Gitlab: fixes #2279
Reported-by: Gagan Sidhu <gagan@g-a.ca>
2 years agosmyrna on_attrSearchBtn_clicked: use const types for attribute and regex
Matthew Fernandez [Sun, 25 Sep 2022 18:12:48 +0000 (11:12 -0700)]
smyrna on_attrSearchBtn_clicked: use const types for attribute and regex

This avoids some casting and squashes two -Wcast-qual warnings.

2 years agosmyrna on_attrSearchBtn_clicked: remove shadowing of 'attr' global
Matthew Fernandez [Sun, 25 Sep 2022 17:59:45 +0000 (10:59 -0700)]
smyrna on_attrSearchBtn_clicked: remove shadowing of 'attr' global

2 years agosmyrna on_attrSearchBtn_clicked: squash -Wunused-parameter warnings
Matthew Fernandez [Sun, 25 Sep 2022 18:46:47 +0000 (11:46 -0700)]
smyrna on_attrSearchBtn_clicked: squash -Wunused-parameter warnings

Other similar warnings in this file were squashed in
55efb8e562bca6c4090a73712342ac006e133704 and friends. But the revert in the
previous commit brought back this function without warnings squashed.

2 years agofix: Revert "smyrna: remove unused 'on_attrSearchBtn_clicked'"
Matthew Fernandez [Sat, 24 Sep 2022 01:47:13 +0000 (18:47 -0700)]
fix: Revert "smyrna: remove unused 'on_attrSearchBtn_clicked'"

This reverts commit 7e1f01ad52915498a252dd213f85daf5a058aa5d. This function _is_
used (in share/gui/smyrna.glade). It is unclear why
7e1f01ad52915498a252dd213f85daf5a058aa5d claimed it was not.

Gitlab: #2279
Reported-by: Gagan Sidhu <gagan@g-a.ca>
2 years agosmyrna gvpr_select: use cgraph wrapper for allocation
Matthew Fernandez [Sun, 25 Sep 2022 17:43:10 +0000 (10:43 -0700)]
smyrna gvpr_select: use cgraph wrapper for allocation

The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h
wrappers except (1) they are header-only and (2) they live in a directory
(cgraph) that is at the root of the dependency tree. The long term plan is to
replace all use of lib/common/memory.h with lib/cgraph/alloc.h.

The commit series ending in 78a0004fd0d1350f2c34e3a770d93032882706f7 previously
removed all uses of the lib/common/memory.h wrappers. But reverting
656a15f855a31acc6eeb162284b89ad3367253b9 brought another usage back in.

2 years agosmyrna gvpr_select: remove NULL-hinted call to 'agxbinit'
Matthew Fernandez [Sun, 25 Sep 2022 17:35:20 +0000 (10:35 -0700)]
smyrna gvpr_select: remove NULL-hinted call to 'agxbinit'

Reverting 656a15f855a31acc6eeb162284b89ad3367253b9 reintroduced a NULL-hinted
call to `agxbinit`. But in the meantime,
db5dc6497e86b886a41d52ea13f0598ecaa9c296 removed all such uses replacing them
with an equivalent zero initialization. This commit updates the `gvpr_select`
usage to be in line with other usage in the current Graphviz tree.

2 years agosmyrna gvpr_select: remove shadowing of 'attr' global
Matthew Fernandez [Sun, 25 Sep 2022 17:31:32 +0000 (10:31 -0700)]
smyrna gvpr_select: remove shadowing of 'attr' global

2 years agosmyrna gvpr_select: use a 'size_t' for parameter counting
Matthew Fernandez [Sun, 25 Sep 2022 17:21:49 +0000 (10:21 -0700)]
smyrna gvpr_select: use a 'size_t' for parameter counting

Reverting 656a15f855a31acc6eeb162284b89ad3367253b9 brought back in a use of
`run_gvpr` that passes an `int`. But e78bdfba860b58bf57e8afc7e5df6f2b073d3dd1
converted `run_gvpr` to take a `size_t` instead. This commits makes the
corresponding adjustment that would have been part of
e78bdfba860b58bf57e8afc7e5df6f2b073d3dd1, squashing a -Wsign-conversion warning.

2 years agoRevert "smyrna: remove unused 'gvpr_select'"
Matthew Fernandez [Sun, 25 Sep 2022 17:12:47 +0000 (10:12 -0700)]
Revert "smyrna: remove unused 'gvpr_select'"

This reverts commit 656a15f855a31acc6eeb162284b89ad3367253b9. An upcoming commit
will revert the removal of `on_attrSearchBtn_clicked` that calls this function.

Gitlab: #2279

2 years agosmyrna on_attrRB0_clicked: squash -Wunused-parameter warnings
Matthew Fernandez [Sat, 24 Sep 2022 01:25:02 +0000 (18:25 -0700)]
smyrna on_attrRB0_clicked: squash -Wunused-parameter warnings

Other similar warnings in this file were squashed in
55efb8e562bca6c4090a73712342ac006e133704 and friends. But the revert in the
previous commit brought back this function without warnings squashed.

2 years agofix: Revert "smyrna: remove unused 'on_attrRB0_clicked'"
Matthew Fernandez [Sat, 24 Sep 2022 01:10:52 +0000 (18:10 -0700)]
fix: Revert "smyrna: remove unused 'on_attrRB0_clicked'"

This reverts commit 856ca708006635f9917acb702916b1af476fc69a. This function _is_
used (in share/gui/smyrna.glade). It is unclear why
856ca708006635f9917acb702916b1af476fc69a claimed it was not.

Gitlab: #2279
Reported-by: Gagan Sidhu <gagan@g-a.ca>
2 years agosmyrna: fix miscalculation of bounding box
Matthew Fernandez [Sat, 24 Sep 2022 00:58:12 +0000 (17:58 -0700)]
smyrna: fix miscalculation of bounding box

This was a mistake in 014e38a46747be84e6f639389dd27683ad37867e that intended to
squash compiler warnings but accidentally pinned `top` and `bottom` to the limit
values, regardless of the bounding box.

Gitlab: #2279
Reported-by: Gagan Sidhu <gagan@g-a.ca>
2 years agoMerge branch 'smattr/60645d5f-a612-4497-99a1-4dbf3aa210d6' into 'main'
Matthew Fernandez [Sun, 25 Sep 2022 16:59:21 +0000 (16:59 +0000)]
Merge branch 'smattr/60645d5f-a612-4497-99a1-4dbf3aa210d6' into 'main'

Fix a pack bug and introduce a string prefix abstraction

See merge request graphviz/graphviz!2853

2 years agopack parsePackModeInfo: make some string prefix code more clear
Matthew Fernandez [Fri, 23 Sep 2022 04:31:42 +0000 (21:31 -0700)]
pack parsePackModeInfo: make some string prefix code more clear

2 years agopack parsePackModeInfo: fix incorrect calculation of `aspect` parameter offset
Matthew Fernandez [Fri, 23 Sep 2022 04:28:24 +0000 (21:28 -0700)]
pack parsePackModeInfo: fix incorrect calculation of `aspect` parameter offset

Looking at the surrounding code, it is possible to see this code intended to
move forwards by 6 (`strlen("aspect")`) after having seen the string “aspect”
rather than moving forwards 5 (`strlen("array")`) as it was doing.

2 years agocgraph ppDirective: make some string prefix code more clear
Matthew Fernandez [Fri, 23 Sep 2022 04:23:34 +0000 (21:23 -0700)]
cgraph ppDirective: make some string prefix code more clear

2 years agoadd an abstraction for checking string prefixes
Matthew Fernandez [Fri, 23 Sep 2022 04:19:33 +0000 (21:19 -0700)]
add an abstraction for checking string prefixes

2 years agoMerge branch 'add-even-more-overlap-test-cases' into 'main'
Magnus Jacobsson [Thu, 22 Sep 2022 09:18:33 +0000 (09:18 +0000)]
Merge branch 'add-even-more-overlap-test-cases' into 'main'

Add even more overlap test cases

See merge request graphviz/graphviz!2849

2 years agoadd new test_edge_node_overlap_cylinder_node_shape test
Magnus Jacobsson [Fri, 16 Sep 2022 10:56:01 +0000 (12:56 +0200)]
add new test_edge_node_overlap_cylinder_node_shape test

An upcoming commit series will add separate fixes for different parts
of the overlap problems. Having separate test cases for checking
maximum or minimum overlap will make it easier to see that the fixes
have the intended effect.

2 years agoadd new test_edge_node_overlap_point_node_shape test
Magnus Jacobsson [Fri, 16 Sep 2022 10:32:13 +0000 (12:32 +0200)]
add new test_edge_node_overlap_point_node_shape test

An upcoming commit series will add separate fixes for different parts
of the overlap problems. Having separate test cases for checking
maximum or minimum overlap will make it easier to see that the fixes
have the intended effect.

2 years agoadd new test_edge_node_overlap_ellipse_node_shapes_except_point test
Magnus Jacobsson [Fri, 16 Sep 2022 09:07:38 +0000 (11:07 +0200)]
add new test_edge_node_overlap_ellipse_node_shapes_except_point test

An upcoming commit series will add separate fixes for different parts
of the overlap problems. Having separate test cases for checking
maximum or minimum overlap will make it easier to see that the fixes
have the intended effect.

2 years agoadd new test_edge_node_overlap_all_primitive_edge_arrows test
Magnus Jacobsson [Thu, 15 Sep 2022 11:23:48 +0000 (13:23 +0200)]
add new test_edge_node_overlap_all_primitive_edge_arrows test