]> granicus.if.org Git - graphviz/log
graphviz
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

2 years agoadd new test_edge_node_overlap_normal_and_inv_edge_arrows_all_modifiers test
Magnus Jacobsson [Thu, 15 Sep 2022 11:10:13 +0000 (13:10 +0200)]
add new test_edge_node_overlap_normal_and_inv_edge_arrows_all_modifiers 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_normal_and_inv_edge_arrows test
Magnus Jacobsson [Thu, 15 Sep 2022 10:52:26 +0000 (12:52 +0200)]
add new test_edge_node_overlap_normal_and_inv_edge_arrows 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 agotests: SVGAnalyzer: add fallback to bevel in SVGElement::miter_point
Magnus Jacobsson [Thu, 15 Sep 2022 16:51:26 +0000 (18:51 +0200)]
tests: SVGAnalyzer: add fallback to bevel in SVGElement::miter_point

This is necessary to handle the 'l' and 'r' arrow shape modifiers
which makes the arrow tip have a sharp angle and causes the normal
miter point to exceed the 'miter-limit' and SVG renderers to fall back
to a bevelled corner.

2 years agoadd new test_edge_node_overlap_all_edge_arrows test
Magnus Jacobsson [Thu, 15 Sep 2022 10:12:43 +0000 (12:12 +0200)]
add new test_edge_node_overlap_all_edge_arrows test

2 years agotests: test_edge_node_overlap_utilities: support arrowhead/arrowtail
Magnus Jacobsson [Mon, 5 Sep 2022 10:57:17 +0000 (12:57 +0200)]
tests: test_edge_node_overlap_utilities: support arrowhead/arrowtail

2 years agotests: test_edge_node_overlap_node_shapes: test all rank directions
Magnus Jacobsson [Tue, 30 Aug 2022 09:11:17 +0000 (11:11 +0200)]
tests: test_edge_node_overlap_node_shapes: test all rank directions

2 years agotests: use the AUTO_NAME macro in all tests
Magnus Jacobsson [Wed, 21 Sep 2022 16:35:17 +0000 (18:35 +0200)]
tests: use the AUTO_NAME macro in all tests

This macro was mistakenly not used when the
test_min_edge_node_overlap_polygon_node_shapes and
test_max_edge_node_overlap_polygon_node_shapes tests were introduced.

This ensures that the generated artifact file names begin with the
same name as the test case file (thanks @smattr).

2 years agotests: test_utilities: re-write AUTO_NAME to use filesystem::path
Magnus Jacobsson [Thu, 22 Sep 2022 06:57:17 +0000 (08:57 +0200)]
tests: test_utilities: re-write AUTO_NAME to use filesystem::path

This is a simpler version that doesn't rely on GNU statement
expressions (thanks @smattr).

2 years agoMerge branch 'smattr/56bea874-c2d8-4d15-8222-db8dc99faa60' into 'main'
Matthew Fernandez [Thu, 22 Sep 2022 00:54:44 +0000 (00:54 +0000)]
Merge branch 'smattr/56bea874-c2d8-4d15-8222-db8dc99faa60' into 'main'

pack: progress towards using cgraph wrappers for allocation

See merge request graphviz/graphviz!2850

2 years agopack isLegal: remove the need for some casting
Matthew Fernandez [Wed, 21 Sep 2022 02:32:46 +0000 (19:32 -0700)]
pack isLegal: remove the need for some casting

2 years agopack cccomps: use cgraph wrappers for allocation
Matthew Fernandez [Wed, 21 Sep 2022 02:32:22 +0000 (19:32 -0700)]
pack cccomps: 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 agopack ccomps: use cgraph wrappers for allocation
Matthew Fernandez [Wed, 21 Sep 2022 02:31:55 +0000 (19:31 -0700)]
pack ccomps: 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 agopack pccomps: use cgraph wrappers for allocation
Matthew Fernandez [Wed, 21 Sep 2022 02:31:18 +0000 (19:31 -0700)]
pack pccomps: 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 agopack setPrefix: use cgraph wrapper for allocation
Matthew Fernandez [Wed, 21 Sep 2022 02:30:37 +0000 (19:30 -0700)]
pack setPrefix: 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.

2 years agopack mode2Str: simplify some early return code
Matthew Fernandez [Wed, 21 Sep 2022 02:18:00 +0000 (19:18 -0700)]
pack mode2Str: simplify some early return code

2 years agopack putRects: simplify some early return code
Matthew Fernandez [Wed, 21 Sep 2022 02:17:33 +0000 (19:17 -0700)]
pack putRects: simplify some early return code

2 years agopack acmpf: simplify some early return code
Matthew Fernandez [Wed, 21 Sep 2022 02:17:20 +0000 (19:17 -0700)]
pack acmpf: simplify some early return code

2 years agopack ucmpf: simplify some early return code
Matthew Fernandez [Wed, 21 Sep 2022 02:17:04 +0000 (19:17 -0700)]
pack ucmpf: simplify some early return code

2 years agopack putGraphs: use cgraph wrappers for allocation
Matthew Fernandez [Wed, 21 Sep 2022 02:16:26 +0000 (19:16 -0700)]
pack putGraphs: 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 agopack polyGraphs: use cgraph wrappers for allocation
Matthew Fernandez [Wed, 21 Sep 2022 02:15:46 +0000 (19:15 -0700)]
pack polyGraphs: 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 agopack polyRects: use cgraph wrappers for allocation
Matthew Fernandez [Wed, 21 Sep 2022 02:15:13 +0000 (19:15 -0700)]
pack polyRects: 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 agopack arrayRects: use cgraph wrappers for allocation
Matthew Fernandez [Wed, 21 Sep 2022 02:14:36 +0000 (19:14 -0700)]
pack arrayRects: 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 agopack genPoly: use cgraph wrapper for allocation
Matthew Fernandez [Wed, 21 Sep 2022 02:13:48 +0000 (19:13 -0700)]
pack genPoly: 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.

2 years agoMerge branch 'smattr/c8d68dc4-9ef2-4cbd-9d41-d74138475d3b' into 'main'
Matthew Fernandez [Wed, 21 Sep 2022 02:03:58 +0000 (02:03 +0000)]
Merge branch 'smattr/c8d68dc4-9ef2-4cbd-9d41-d74138475d3b' into 'main'

topfish: more progress towards using cgraph wrappers for allocation

See merge request graphviz/graphviz!2848

2 years agotopfish findGlobalIndexesOfActiveNeighbors: use cgraph wrappers for allocation
Matthew Fernandez [Sun, 18 Sep 2022 17:16:43 +0000 (10:16 -0700)]
topfish findGlobalIndexesOfActiveNeighbors: 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 agotopfish init_ex_graph: use cgraph wrappers for allocation
Matthew Fernandez [Sun, 18 Sep 2022 17:16:07 +0000 (10:16 -0700)]
topfish init_ex_graph: 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 agotopfish set_active_levels: use cgraph wrappers for allocation
Matthew Fernandez [Sun, 18 Sep 2022 17:15:39 +0000 (10:15 -0700)]
topfish set_active_levels: 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 agotopfish create_hierarchy: use cgraph wrappers for allocation
Matthew Fernandez [Sun, 18 Sep 2022 17:15:14 +0000 (10:15 -0700)]
topfish create_hierarchy: 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 agotopfish cpExGraph: use cgraph wrappers for allocation
Matthew Fernandez [Sun, 18 Sep 2022 17:14:47 +0000 (10:14 -0700)]
topfish cpExGraph: 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 agotopfish cpGraph: use cgraph wrappers for allocation
Matthew Fernandez [Sun, 18 Sep 2022 17:14:21 +0000 (10:14 -0700)]
topfish cpGraph: 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 agotopfish coarsen_match: use cgraph wrappers for allocation
Matthew Fernandez [Sun, 18 Sep 2022 17:13:57 +0000 (10:13 -0700)]
topfish coarsen_match: 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 agotopfish make_coarse_ex_graph: use cgraph wrappers for allocation
Matthew Fernandez [Sun, 18 Sep 2022 17:13:29 +0000 (10:13 -0700)]
topfish make_coarse_ex_graph: 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 agotopfish make_coarse_graph: use cgraph wrappers for allocation
Matthew Fernandez [Sun, 18 Sep 2022 17:13:04 +0000 (10:13 -0700)]
topfish make_coarse_graph: 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 agotopfish maxmatch: use cgraph wrappers for allocation
Matthew Fernandez [Sun, 18 Sep 2022 17:12:14 +0000 (10:12 -0700)]
topfish maxmatch: 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 agotopfish fill_neighbors_vec: use 'fabsf' instead of casting to float
Matthew Fernandez [Sun, 18 Sep 2022 16:41:12 +0000 (09:41 -0700)]
topfish fill_neighbors_vec: use 'fabsf' instead of casting to float

This is simpler and more efficient when both the input and the desired output
type are floats.

2 years agoneatogen: remove 'USE_STYLES'-guarded code
Matthew Fernandez [Sun, 18 Sep 2022 16:40:08 +0000 (09:40 -0700)]
neatogen: remove 'USE_STYLES'-guarded code

Nothing in the build systems defines this.

2 years agotopfish: remove 'STYLES'-guarded code
Matthew Fernandez [Sun, 18 Sep 2022 16:38:53 +0000 (09:38 -0700)]
topfish: remove 'STYLES'-guarded code

Nothing in the build systems defines this.

2 years agoMerge branch 'smattr/24281a46-1d36-4056-9003-1cdde711ff74' into 'main'
Matthew Fernandez [Wed, 21 Sep 2022 01:10:04 +0000 (01:10 +0000)]
Merge branch 'smattr/24281a46-1d36-4056-9003-1cdde711ff74' into 'main'

glcomp: use cgraph wrappers for allocation

See merge request graphviz/graphviz!2847

2 years agoglcomp glCompPanelNew: use cgraph wrapper for allocation
Matthew Fernandez [Sat, 17 Sep 2022 00:45:07 +0000 (17:45 -0700)]
glcomp glCompPanelNew: 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.

2 years agoglcomp glCompImageNew: use cgraph wrapper for allocation
Matthew Fernandez [Sat, 17 Sep 2022 00:43:26 +0000 (17:43 -0700)]
glcomp glCompImageNew: 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.

2 years agoglcomp glCompLabelNew: fix unchecked allocation failure
Matthew Fernandez [Sat, 17 Sep 2022 00:41:46 +0000 (17:41 -0700)]
glcomp glCompLabelNew: fix unchecked allocation failure

2 years agoglcomp glCompLabelNew: use cgraph wrapper for allocation
Matthew Fernandez [Sat, 17 Sep 2022 00:41:23 +0000 (17:41 -0700)]
glcomp glCompLabelNew: 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.

2 years agoglcomp glCompSetAddObj: fix unchecked allocation failure
Matthew Fernandez [Sat, 17 Sep 2022 00:40:00 +0000 (17:40 -0700)]
glcomp glCompSetAddObj: fix unchecked allocation failure

2 years agoglcomp glCompSetNew: use cgraph wrapper for allocation
Matthew Fernandez [Sat, 17 Sep 2022 00:39:34 +0000 (17:39 -0700)]
glcomp glCompSetNew: 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.

2 years agoglcomp glNewFontFromParent: fix unchecked allocation failure
Matthew Fernandez [Sat, 17 Sep 2022 00:33:51 +0000 (17:33 -0700)]
glcomp glNewFontFromParent: fix unchecked allocation failure

2 years agoglcomp glNewFontFromParent: use cgraph wrapper for allocation
Matthew Fernandez [Sat, 17 Sep 2022 00:33:13 +0000 (17:33 -0700)]
glcomp glNewFontFromParent: 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.

2 years agoglcomp glNewFont: fix unchecked allocation failures
Matthew Fernandez [Sat, 17 Sep 2022 00:32:36 +0000 (17:32 -0700)]
glcomp glNewFont: fix unchecked allocation failures

2 years agoglcomp glCompSetAddNewTexLabel: fix unchecked allocation failures
Matthew Fernandez [Sat, 17 Sep 2022 00:27:26 +0000 (17:27 -0700)]
glcomp glCompSetAddNewTexLabel: fix unchecked allocation failures

2 years agoglcomp glCompSetAddNewTexture: use cgraph wrappers for allocation
Matthew Fernandez [Sat, 17 Sep 2022 00:26:38 +0000 (17:26 -0700)]
glcomp glCompSetAddNewTexture: 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 agoglcomp glCompButtonNew: use cgraph wrapper for allocation
Matthew Fernandez [Sat, 17 Sep 2022 00:18:25 +0000 (17:18 -0700)]
glcomp glCompButtonNew: 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.

2 years agoMerge branch 'add-more-overlap-checks-and-test-cases' into 'main'
Magnus Jacobsson [Tue, 20 Sep 2022 18:46:29 +0000 (18:46 +0000)]
Merge branch 'add-more-overlap-checks-and-test-cases' into 'main'

Add more overlap checks and test cases

See merge request graphviz/graphviz!2845

2 years agoadd new test_max_edge_stem_arrow_overlap_simple test
Magnus Jacobsson [Wed, 14 Sep 2022 10:17:46 +0000 (12:17 +0200)]
add new test_max_edge_stem_arrow_overlap_simple 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 agotests: test_edge_node_overlap_utilities: check max edge stem/arrow overlap
Magnus Jacobsson [Wed, 14 Sep 2022 09:45:52 +0000 (11:45 +0200)]
tests: test_edge_node_overlap_utilities: check max edge stem/arrow overlap

2 years agoadd new test_min_edge_stem_arrow_overlap_simple test
Magnus Jacobsson [Wed, 14 Sep 2022 07:29:36 +0000 (09:29 +0200)]
add new test_min_edge_stem_arrow_overlap_simple 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 agotests: test_edge_node_overlap_utilities: check min edge stem/arrow overlap
Magnus Jacobsson [Wed, 24 Aug 2022 10:08:13 +0000 (12:08 +0200)]
tests: test_edge_node_overlap_utilities: check min edge stem/arrow overlap

2 years agotests: SVGAnalyzer: add retrieval of edge arrow to GraphvizEdge
Magnus Jacobsson [Wed, 24 Aug 2022 09:54:30 +0000 (11:54 +0200)]
tests: SVGAnalyzer: add retrieval of edge arrow to GraphvizEdge

2 years agotests: SVGAnalyzer: add retrieval of edge stem to GraphvizEdge
Magnus Jacobsson [Wed, 24 Aug 2022 09:49:12 +0000 (11:49 +0200)]
tests: SVGAnalyzer: add retrieval of edge stem to GraphvizEdge

2 years agotests: SVGAnalyzer: add finding of child of specific type to SVGElement
Magnus Jacobsson [Wed, 24 Aug 2022 09:50:35 +0000 (11:50 +0200)]
tests: SVGAnalyzer: add finding of child of specific type to SVGElement

2 years agotests: test_edge_node_overlap_utilities: add support for edge direction
Magnus Jacobsson [Wed, 14 Sep 2022 07:29:11 +0000 (09:29 +0200)]
tests: test_edge_node_overlap_utilities: add support for edge direction

2 years agoadd new test_min_edge_node_overlap_polygon_node_shapes test
Magnus Jacobsson [Wed, 14 Sep 2022 13:28:15 +0000 (15:28 +0200)]
add new test_min_edge_node_overlap_polygon_node_shapes 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_max_edge_node_overlap_polygon_node_shapes test
Magnus Jacobsson [Wed, 14 Sep 2022 13:19:59 +0000 (15:19 +0200)]
add new test_max_edge_node_overlap_polygon_node_shapes 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_polygon_node_shapes test
Magnus Jacobsson [Sun, 28 Aug 2022 19:58:57 +0000 (21:58 +0200)]
add new test_edge_node_overlap_polygon_node_shapes 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_node_shapes test
Magnus Jacobsson [Wed, 14 Sep 2022 20:13:37 +0000 (22:13 +0200)]
add new test_edge_node_overlap_all_node_shapes test

2 years agoadd new test_max_edge_node_overlap_simple test
Magnus Jacobsson [Tue, 13 Sep 2022 08:35:48 +0000 (10:35 +0200)]
add new test_max_edge_node_overlap_simple 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_min_edge_node_overlap_simple test
Magnus Jacobsson [Tue, 13 Sep 2022 08:26:35 +0000 (10:26 +0200)]
add new test_min_edge_node_overlap_simple 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 agotests: test_edge_node_overlap_utilities: check edge/node min overlap
Magnus Jacobsson [Wed, 24 Aug 2022 14:32:25 +0000 (16:32 +0200)]
tests: test_edge_node_overlap_utilities: check edge/node min overlap

2 years agotests: test_edge_node_overlap_utilities: make max node/edge overlap check optional
Magnus Jacobsson [Tue, 13 Sep 2022 07:46:59 +0000 (09:46 +0200)]
tests: test_edge_node_overlap_utilities: make max node/edge overlap check optional

This is currently a no-op since the max overlap check is always
enabled in the currently existing test case, but an upcoming commit
will introduce a test case checking minimum overlap only.

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 agotests: test_edge_node_overlap_utilities: use a semi-transparent color
Magnus Jacobsson [Tue, 13 Sep 2022 18:14:47 +0000 (20:14 +0200)]
tests: test_edge_node_overlap_utilities: use a semi-transparent color

This makes it easier to see overlaps.

2 years agotests: test_edge_node_overlap_utilities: support all rank directions
Magnus Jacobsson [Wed, 14 Sep 2022 07:28:10 +0000 (09:28 +0200)]
tests: test_edge_node_overlap_utilities: support all rank directions

2 years agotests: test_edge_node_overlap_simple: generate DOT based on options
Magnus Jacobsson [Tue, 13 Sep 2022 11:00:51 +0000 (13:00 +0200)]
tests: test_edge_node_overlap_simple: generate DOT based on options

Generate DOT source based on given options which are also passed to
the check function. Upcoming commits will add checks which need to
know details about how the graph was generated.

2 years agotests: add AUTO_NAME macro and use it in the test_edge_node_overlap_simple test
Magnus Jacobsson [Sun, 18 Sep 2022 09:56:44 +0000 (11:56 +0200)]
tests: add AUTO_NAME macro and use it in the test_edge_node_overlap_simple test

This ensures that the generated artifact file names begin with the
same name as the test case file (thanks @smattr).

2 years agoMerge branch 'smattr/b18ec0fb-7dc6-4b8b-9a97-301e697ada52' into 'main'
Matthew Fernandez [Tue, 20 Sep 2022 15:37:01 +0000 (15:37 +0000)]
Merge branch 'smattr/b18ec0fb-7dc6-4b8b-9a97-301e697ada52' into 'main'

sparse: more progress towards using cgraph wrappers for allocation

See merge request graphviz/graphviz!2844

2 years agosparse: remove unused 'Dijkstra_masked'
Matthew Fernandez [Thu, 15 Sep 2022 01:48:08 +0000 (18:48 -0700)]
sparse: remove unused 'Dijkstra_masked'

2 years agosparse: remove unused 'SparseMatrix_level_sets_khops'
Matthew Fernandez [Thu, 15 Sep 2022 01:46:33 +0000 (18:46 -0700)]
sparse: remove unused 'SparseMatrix_level_sets_khops'

2 years agosparse: remove unused 'SparseMatrix_distance_matrix_khops'
Matthew Fernandez [Thu, 15 Sep 2022 01:46:05 +0000 (18:46 -0700)]
sparse: remove unused 'SparseMatrix_distance_matrix_khops'

2 years agosfdpgen sfdpLayout: remove 'hops' parameter that is always -1
Matthew Fernandez [Thu, 15 Sep 2022 01:44:10 +0000 (18:44 -0700)]
sfdpgen sfdpLayout: remove 'hops' parameter that is always -1

2 years agosparse SparseMatrix_has_diagonal: use a C99 bool for return type
Matthew Fernandez [Thu, 15 Sep 2022 01:32:34 +0000 (18:32 -0700)]
sparse SparseMatrix_has_diagonal: use a C99 bool for return type

2 years agosparse: remove unnecessary casts
Matthew Fernandez [Thu, 15 Sep 2022 00:53:02 +0000 (17:53 -0700)]
sparse: remove unnecessary casts

2 years agosparse SparseMatrix_distance_matrix_khops: use cgraph wrappers for allocation
Matthew Fernandez [Thu, 15 Sep 2022 01:14:34 +0000 (18:14 -0700)]
sparse SparseMatrix_distance_matrix_khops: 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 agosparse SparseMatrix_distance_matrix: use cgraph wrappers for allocation
Matthew Fernandez [Thu, 15 Sep 2022 01:14:10 +0000 (18:14 -0700)]
sparse SparseMatrix_distance_matrix: 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 agosparse SparseMatrix_set_entries_to_real_one: use cgraph wrapper for allocation
Matthew Fernandez [Thu, 15 Sep 2022 01:11:18 +0000 (18:11 -0700)]
sparse SparseMatrix_set_entries_to_real_one: 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.

2 years agosparse SparseMatrix_get_submatrix: use cgraph wrappers for allocation
Matthew Fernandez [Thu, 15 Sep 2022 01:10:43 +0000 (18:10 -0700)]
sparse SparseMatrix_get_submatrix: 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 agosparse SparseMatrix_get_augmented: use cgraph wrappers for allocation
Matthew Fernandez [Thu, 15 Sep 2022 01:09:49 +0000 (18:09 -0700)]
sparse SparseMatrix_get_augmented: 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 agosparse SparseMatrix_decompose_to_supervari…: use cgraph wrappers for allocation
Matthew Fernandez [Thu, 15 Sep 2022 01:09:07 +0000 (18:09 -0700)]
sparse SparseMatrix_decompose_to_supervari…: 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.