]> granicus.if.org Git - graphviz/log
graphviz
2 years agoarrows: factor out arrow_type_normal0 function
Magnus Jacobsson [Sun, 17 Apr 2022 16:05:47 +0000 (18:05 +0200)]
arrows: factor out arrow_type_normal0 function

Towards https://gitlab.com/graphviz/graphviz/-/issues/372.

2 years agoarrows: refactor arrow length calculation to allow arrow type specific length functions
Magnus Jacobsson [Sun, 17 Apr 2022 15:45:24 +0000 (17:45 +0200)]
arrows: refactor arrow length calculation to allow arrow type specific length functions

Add a len function to arrowtype_t. This is currently a no-op. All
arrow types use a generic function that just returns the nominal
length. Future commits will replace the generic function with
functions specific for each arrow type.

Towards https://gitlab.com/graphviz/graphviz/-/issues/372.

2 years agosplines: bezier_clip: change to clip just inside instead of just outside the node
Magnus Jacobsson [Wed, 13 Apr 2022 21:01:41 +0000 (23:01 +0200)]
splines: bezier_clip: change to clip just inside instead of just outside the node

The previous changes removed *all* overlap between nodes and edges at
the expense of creating a very small gap instead. This is visually not
very pleasing. This change ensures that we get a very small minimum
overlap instead.

The test_min_edge_node_overlap_simple and
test_min_edge_node_overlap_node_shapes tests tests now succeed, so the
expectancy that they should fail is removed.

Towards https://gitlab.com/graphviz/graphviz/-/issues/372.

2 years agoshapes: star_inside: fix clipping of edge at node outline
Magnus Jacobsson [Wed, 14 Sep 2022 19:58:57 +0000 (21:58 +0200)]
shapes: star_inside: fix clipping of edge at node outline

Take node penwidth into account when doing the clipping of the 'star'
shape. This causes the clipping to occur at the visible node outline
instead of at the "ideal" bounding box which does not take node
penwidth into account.

For the star shape, this fixes the second part of arrow not respecting
penwidth. Similar fixes need to be applied to fix the second part for
other node shapes.

The test_max_edge_node_overlap_node_shapes test case now succeeds, so
the expectancy that it should fail is removed.

Towards https://gitlab.com/graphviz/graphviz/-/issues/372.

2 years agoshapes: poly_init/poly_inside: fix clipping of edge at node outline
Magnus Jacobsson [Mon, 11 Apr 2022 18:06:26 +0000 (20:06 +0200)]
shapes: poly_init/poly_inside: fix clipping of edge at node outline

Take node penwidth into account when doing the clipping. This causes
the clipping to occur at the visible node outline instead of at the
"ideal" bounding box which assumes a zero node penwidth.

For polygon shapes, this fixes the second part of arrow not respecting
penwidth. Similar fixes need to be applied to fix the second part for
other node shapes.

The test_max_edge_node_overlap_simple test now succeeds, so the
expectancy that it should fail is removed.

The test_min_edge_node_overlap_simple and
test_min_edge_node_overlap_node_shapes tests now fail since there's
now a small gap between the edge and the node, so they're temporarily
set to be expected to fail. This gap will be removed in an upcoming
commit in this series.

Towards https://gitlab.com/graphviz/graphviz/-/issues/372.

2 years agoAPI BREAK: types: add outline_width & outline_height to Agnodeinfo_t struct
Magnus Jacobsson [Sat, 24 Sep 2022 14:18:24 +0000 (16:18 +0200)]
API BREAK: types: add outline_width & outline_height to Agnodeinfo_t struct

2 years agoarrows: arrow_type_normal: fix positioning of normal/inv arrow
Magnus Jacobsson [Wed, 4 May 2022 19:17:12 +0000 (21:17 +0200)]
arrows: arrow_type_normal: fix positioning of normal/inv arrow

Take edge penwidth into account when calculating the outline of the
edge arrrow shape instead of using the "ideal" arrow shape assuming
zero penwidth.

This change moves the tip of the arrow so that it does not overlap the
node periphery assuming that the node penwidth is zero. To account for
the node penwidth is the second part that will be adressed in upcoming
commits.

For normal and inv arrows not using the 'l' or 'r' arrow shape
modifiers, this fixes the first part of arrow not respecting
penwith. Similar fixes need to be applied to fix the first part for
other arrow types. The 'l' and 'r' shape modifiers will handled in an
upcoming commit in this series.

The test_max_edge_stem_arrow_overlap_simple test case now fails since
there's now a slightly too large overlap between the edge stem and its
arrow heads, so the test case is temporarily set to be expected to
fail. This small overlap will be removed in an upcoming commit in this
series.

Towards https://gitlab.com/graphviz/graphviz/-/issues/372.

2 years agoarrows: refactor arrow generating functions to return the actual start point
Magnus Jacobsson [Sun, 27 Mar 2022 10:56:45 +0000 (12:56 +0200)]
arrows: refactor arrow generating functions to return the actual start point

This is currently a no-op, but upcoming commits will adjust the arrow
start point to take pendwidth into account in order to avoid
overlapping the node periphery and subsequent primitive arrow shapes
of multi-shape arrows.

The arrow start point is the point on the arrow which is farthest away
along the edge from the node it is associated with.

Towards https://gitlab.com/graphviz/graphviz/-/issues/372.

2 years agotests: remove test_regression_subset_differences test
Magnus Jacobsson [Sun, 3 Apr 2022 15:24:21 +0000 (17:24 +0200)]
tests: remove test_regression_subset_differences test

Upcoming commits will step by step make changes that affect the layout
and there's too much work to maintain the reference files, since they
differ slightly across operating systems. We only checked for
difference for a very small fraction of the subtests anyway so this
test did not add much value.

Note that the test_regression_failure test remains. It checks the exit
status of each subtest, but does not compare with reference files.

2 years agotests: SVGAnalyzer: correct fallback to bevel in SVGElement::miter_point
Magnus Jacobsson [Mon, 10 Oct 2022 06:41:06 +0000 (08:41 +0200)]
tests: SVGAnalyzer: correct fallback to bevel in SVGElement::miter_point

This corrects a mistake made in a8b2c299931c9c7037a67e9064b4749390655c0c.

2 years agotests: test_max_edge_stem_arrow_overlap_simple: correct test description
Magnus Jacobsson [Wed, 5 Oct 2022 11:47:13 +0000 (13:47 +0200)]
tests: test_max_edge_stem_arrow_overlap_simple: correct test description

2 years agotests: test_min_edge_stem_arrow_overlap_simple: correct test description
Magnus Jacobsson [Wed, 5 Oct 2022 11:47:32 +0000 (13:47 +0200)]
tests: test_min_edge_stem_arrow_overlap_simple: correct test description

2 years agoMerge branch 'start-6.0.3-dev' into 'main'
Magnus Jacobsson [Tue, 11 Oct 2022 19:37:04 +0000 (19:37 +0000)]
Merge branch 'start-6.0.3-dev' into 'main'

Start 6.0.3 development

See merge request graphviz/graphviz!2903

2 years agoStart 6.0.3 development
Magnus Jacobsson [Tue, 11 Oct 2022 17:34:48 +0000 (19:34 +0200)]
Start 6.0.3 development

2 years agoMerge branch 'stable-release-6.0.2' into 'main' 6.0.2
Magnus Jacobsson [Tue, 11 Oct 2022 18:28:33 +0000 (18:28 +0000)]
Merge branch 'stable-release-6.0.2' into 'main'

Stable release 6.0.2

See merge request graphviz/graphviz!2900

2 years agoStable release 6.0.2
Magnus Jacobsson [Mon, 10 Oct 2022 06:49:52 +0000 (08:49 +0200)]
Stable release 6.0.2

2 years agoMerge branch 'cairo-svg' into 'main'
Mark Hansen [Tue, 11 Oct 2022 10:00:54 +0000 (10:00 +0000)]
Merge branch 'cairo-svg' into 'main'

Import cairo-svg.h without cairo/ prefix

Closes #2227

See merge request graphviz/graphviz!2892

2 years agoDraft: import cairo-svg without cairo/ prefix cairo-svg
Mark Hansen [Fri, 7 Oct 2022 23:59:00 +0000 (10:59 +1100)]
Draft: import cairo-svg without cairo/ prefix

Some places in our codebase we load `cairo.h` directly.

I'm wondering whether this will pass CI

Towards #2227

2 years agoMerge branch 'gdk' into 'main'
Mark Hansen [Tue, 11 Oct 2022 06:58:26 +0000 (06:58 +0000)]
Merge branch 'gdk' into 'main'

Use _LINK_LIBRARIES to build gdk plugin

See merge request graphviz/graphviz!2893

2 years agoUse _LINK_LIBRARIES to build gdk plugin
Mark Hansen [Sat, 8 Oct 2022 06:42:23 +0000 (17:42 +1100)]
Use _LINK_LIBRARIES to build gdk plugin

This makes them work on my macOS machine that's installed GTK with
homebrew.

Otherwise I get errors like:

```
ld: library not found for -lgdk-quartz-2.0
```

Towards #2290

2 years agoMerge branch 'smattr/031b9571-2190-4d4c-b5e3-fa0403e651c3' into 'main'
Matthew Fernandez [Tue, 11 Oct 2022 06:05:04 +0000 (06:05 +0000)]
Merge branch 'smattr/031b9571-2190-4d4c-b5e3-fa0403e651c3' into 'main'

common: some minor clean up

See merge request graphviz/graphviz!2899

2 years agocommon: remove some unnecessary parens
Matthew Fernandez [Sun, 9 Oct 2022 20:21:32 +0000 (13:21 -0700)]
common: remove some unnecessary parens

2 years agocommon: replace some 'MIN' usage with 'fmax'
Matthew Fernandez [Sun, 9 Oct 2022 20:15:09 +0000 (13:15 -0700)]
common: replace some 'MIN' usage with 'fmax'

`fmin` is typically implemented as a compiler built-in and has the potential to
be more efficient than `MIN`, while also avoiding the loss of type safety and
double-expansion problems of macros.

2 years agocommon: replace some 'MAX' usage with 'fmax'
Matthew Fernandez [Sun, 9 Oct 2022 20:13:08 +0000 (13:13 -0700)]
common: replace some 'MAX' usage with 'fmax'

`fmax` is typically implemented as a compiler built-in and has the potential to
be more efficient than `MAX`, while also avoiding the loss of type safety and
double-expansion problems of macros.

2 years agocommon: remove unused 'PI' constant
Matthew Fernandez [Sun, 9 Oct 2022 20:12:07 +0000 (13:12 -0700)]
common: remove unused 'PI' constant

2 years agoMerge branch 'smattr/8908405f-7c1a-4657-8118-0c64f585ee8b' into 'main'
Matthew Fernandez [Tue, 11 Oct 2022 04:33:44 +0000 (04:33 +0000)]
Merge branch 'smattr/8908405f-7c1a-4657-8118-0c64f585ee8b' into 'main'

sfio: squash some compiler warnings

See merge request graphviz/graphviz!2884

2 years agosfio _Sftable: use C99 designated field initializers
Matthew Fernandez [Fri, 7 Oct 2022 03:46:28 +0000 (20:46 -0700)]
sfio _Sftable: use C99 designated field initializers

Squashes a number of -Wmissing-field-initializer warnings.

2 years agosfio sfcvinit: use more appropriate types, squashing -Wconversion warnings
Matthew Fernandez [Fri, 7 Oct 2022 03:46:01 +0000 (20:46 -0700)]
sfio sfcvinit: use more appropriate types, squashing -Wconversion warnings

2 years agosfio sfsync: realign 'mode' type with its use
Matthew Fernandez [Fri, 7 Oct 2022 03:25:30 +0000 (20:25 -0700)]
sfio sfsync: realign 'mode' type with its use

Squashes a -Wsign-conversion warning.

2 years agosfio sfsync: realign 'pool' type with its use
Matthew Fernandez [Fri, 7 Oct 2022 03:13:09 +0000 (20:13 -0700)]
sfio sfsync: realign 'pool' type with its use

Squashes a -Wsign-conversion warning.

2 years agosfio sfswap: realign 'f1mode' type with its use
Matthew Fernandez [Fri, 7 Oct 2022 03:00:33 +0000 (20:00 -0700)]
sfio sfswap: realign 'f1mode' type with its use

Squashes three -Wsign-conversion warnings.

2 years agoMerge branch 'smattr/2fd13139-2ce0-4774-bd07-42eaf6061030' into 'main'
Matthew Fernandez [Tue, 11 Oct 2022 03:23:37 +0000 (03:23 +0000)]
Merge branch 'smattr/2fd13139-2ce0-4774-bd07-42eaf6061030' into 'main'

glcomp: remove dead code

See merge request graphviz/graphviz!2879

2 years agoglcomp: remove 'glCompButton.glyphPos' and associated constants
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
glcomp: remove 'glCompButton.glyphPos' and associated constants

These have seemingly never been used.

2 years agoglcomp: remove unused 'glCompLabel.autosize'
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
glcomp: remove unused 'glCompLabel.autosize'

This field has seemingly never been used.

2 years agoglcomp: remove unnecessary casts of 'compset' member
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
glcomp: remove unnecessary casts of 'compset' member

2 years agoglcomp: remove unused 'C_DPI', 'R_DPI'
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
glcomp: remove unused 'C_DPI', 'R_DPI'

The last uses of these were removed in 8444026daa5f5ba70dcc2a719f9ad23b927e88ce.

2 years agoglcomp: remove unused 'FONT_MAX_LEN'
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
glcomp: remove unused 'FONT_MAX_LEN'

The last use of this was removed in ed74e24b8020a70678d05489639e0e8c4574f87d.

2 years agoglcomp: remove unused 'FONT_TAB_SPACE'
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
glcomp: remove unused 'FONT_TAB_SPACE'

The last use of this was removed in 8444026daa5f5ba70dcc2a719f9ad23b927e88ce.

2 years agoglcomp: remove unused 'GLCOMPSET_DEFAULT_PAD'
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
glcomp: remove unused 'GLCOMPSET_DEFAULT_PAD'

The last use of this was removed in 8444026daa5f5ba70dcc2a719f9ad23b927e88ce.

2 years agoglcomp: remove unused 'glCompTrackBar'
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
glcomp: remove unused 'glCompTrackBar'

The last use of this was removed in 8444026daa5f5ba70dcc2a719f9ad23b927e88ce. We
also remove `glCompOrientation` which was only used within this struct.

2 years agoMerge branch 'smattr/e78584c4-bddc-43a8-8d67-715eb74454c9' into 'main'
Matthew Fernandez [Tue, 11 Oct 2022 01:40:17 +0000 (01:40 +0000)]
Merge branch 'smattr/e78584c4-bddc-43a8-8d67-715eb74454c9' into 'main'

neatogen: progress on using cgraph wrappers for allocation

See merge request graphviz/graphviz!2885

2 years agoneatogen print_bounding_box: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 7 Oct 2022 02:37:52 +0000 (19:37 -0700)]
neatogen print_bounding_box: 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 agoneatogen OverlapSmoother_new: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 7 Oct 2022 02:37:07 +0000 (19:37 -0700)]
neatogen OverlapSmoother_new: 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 agoneatogen relative_position_constraints_new: use cgraph wrapper for allocation
Matthew Fernandez [Fri, 7 Oct 2022 02:36:26 +0000 (19:36 -0700)]
neatogen relative_position_constraints_new: 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 agoneatogen get_overlap_graph: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 7 Oct 2022 02:35:41 +0000 (19:35 -0700)]
neatogen get_overlap_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 agoMerge branch 'smattr/80a44ae4-4b4f-4df6-9e97-b9eea6f522f1' into 'main'
Matthew Fernandez [Mon, 10 Oct 2022 15:57:23 +0000 (15:57 +0000)]
Merge branch 'smattr/80a44ae4-4b4f-4df6-9e97-b9eea6f522f1' into 'main'

tclpkg: some minor clean up

See merge request graphviz/graphviz!2897

2 years agotclpkg graphcmd: shrink a buffer
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
tclpkg graphcmd: shrink a buffer

Only 12 characters are needed to print a NUL terminated 32-bit integer.

2 years agotclpkg graphcmd: remove some uses of bare 'sprintf'
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
tclpkg graphcmd: remove some uses of bare 'sprintf'

Gitlab: #1950

2 years agotclpkg: remove 'Tcl_Alloc' failure handling code
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
tclpkg: remove 'Tcl_Alloc' failure handling code

`Tcl_Alloc` panics the containing TCL interpreter on error.¹ There is no need to
anticipate it returning `NULL`.

¹ https://www.tcl-lang.org/man/tcl/TclLib/Alloc.htm

2 years agotclpkg GdPtrTypeUpdate: remove a use of bare 'sprintf'
Matthew Fernandez [Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)]
tclpkg GdPtrTypeUpdate: remove a use of bare 'sprintf'

Gitlab: #1950

2 years agoMerge branch 'automatic-artifact-filename-base-in-overlap-tests' into 'main'
Magnus Jacobsson [Mon, 10 Oct 2022 10:06:50 +0000 (10:06 +0000)]
Merge branch 'automatic-artifact-filename-base-in-overlap-tests' into 'main'

tests: use the AUTO_NAME macro in all tests

See merge request graphviz/graphviz!2883

2 years agotests: use the AUTO_NAME macro in all tests
Magnus Jacobsson [Fri, 7 Oct 2022 12:16:47 +0000 (14:16 +0200)]
tests: use the AUTO_NAME macro in all tests

This macro was mistakenly not used when the
test_edge_node_overlap_all_primitive_edge_arrows,
test_edge_node_overlap_normal_and_inv_edge_arrows and
test_edge_node_overlap_normal_and_inv_edge_arrows_all_modifiers tests
were introduced.

This ensures that the generated artifact file names begin with the
same name as the test case file.

2 years agoMerge branch 'lib-dox' into 'main'
Matthew Fernandez [Fri, 7 Oct 2022 01:14:30 +0000 (01:14 +0000)]
Merge branch 'lib-dox' into 'main'

Doxygen comments for libs

See merge request graphviz/graphviz!2878

2 years agoxdot: doxygen comment
Costa Shulyupin [Wed, 5 Oct 2022 15:45:37 +0000 (18:45 +0300)]
xdot: doxygen comment

2 years agovpsc: doxygen comment
Costa Shulyupin [Wed, 5 Oct 2022 15:45:18 +0000 (18:45 +0300)]
vpsc: doxygen comment

2 years agoortho: fix doxygen reference
Costa Shulyupin [Wed, 5 Oct 2022 15:44:19 +0000 (18:44 +0300)]
ortho: fix doxygen reference

2 years agoglcomp: doxygen comment
Costa Shulyupin [Wed, 5 Oct 2022 15:43:46 +0000 (18:43 +0300)]
glcomp: doxygen comment

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