]> granicus.if.org Git - graphviz/log
graphviz
2 years agopatchwork: inline 'initCList' into a C99 initialization
Matthew Fernandez [Thu, 1 Dec 2022 04:46:33 +0000 (20:46 -0800)]
patchwork: inline 'initCList' into a C99 initialization

2 years agopatchwork tree_map: use cgraph wrapper for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
patchwork tree_map: 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 agooutline 'boxes_t' implementation into a generic list
Matthew Fernandez [Sat, 3 Dec 2022 18:27:48 +0000 (10:27 -0800)]
outline 'boxes_t' implementation into a generic list

This will allow us to avoid reimplementing variants of the same list data
structure repeatedly. It extends the boxes functions with some other useful
additions and slightly modifies the growth strategy. On first addition, a single
element is now allocated instead of 128. This seems more appropriate for a data
structure that we intend to use more pervasively.

This also replaces common/memory.h allocation that was used in boxes.h with
cgraph/alloc.h calls.

2 years agopatchwork squarify: replace 'MAX', 'MIN' with stdlib equivalents
Matthew Fernandez [Thu, 1 Dec 2022 01:15:20 +0000 (17:15 -0800)]
patchwork squarify: replace 'MAX', 'MIN' with stdlib equivalents

2 years agopatchwork: replace 'rectangle_new' with C99 initialization
Matthew Fernandez [Thu, 1 Dec 2022 01:10:49 +0000 (17:10 -0800)]
patchwork: replace 'rectangle_new' with C99 initialization

2 years agopatchwork: remove unused 'rectangle_struct' name
Matthew Fernandez [Thu, 1 Dec 2022 01:08:25 +0000 (17:08 -0800)]
patchwork: remove unused 'rectangle_struct' name

2 years agoMerge branch 'smattr/c8daf543-cbfe-4778-b845-a93a91f92189' into 'main'
Matthew Fernandez [Sun, 4 Dec 2022 17:49:31 +0000 (17:49 +0000)]
Merge branch 'smattr/c8daf543-cbfe-4778-b845-a93a91f92189' into 'main'

neatogen: more cgraph allocation wrapper migration

See merge request graphviz/graphviz!2987

2 years agoneatogen assign_digcola_levels: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen assign_digcola_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 agoneatogen generateNonoverlapConstraints: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen generateNonoverlapConstraints: 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 initCMajVPSC: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen initCMajVPSC: 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: remove commented out logging statements
Matthew Fernandez [Sat, 3 Dec 2022 21:15:20 +0000 (13:15 -0800)]
neatogen: remove commented out logging statements

2 years agoneatogen _neato_set_aspect: abbreviate coordinate swapping
Matthew Fernandez [Sat, 3 Dec 2022 21:11:56 +0000 (13:11 -0800)]
neatogen _neato_set_aspect: abbreviate coordinate swapping

2 years agoneatogen _spline_edges: use cgraph wrapper for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen _spline_edges: 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 makeObstacle: use a C99 bool for 'isPoly'
Matthew Fernandez [Sat, 3 Dec 2022 21:11:15 +0000 (13:11 -0800)]
neatogen makeObstacle: use a C99 bool for 'isPoly'

2 years agoneatogen _neato_set_aspect: replace 'MIN' with its stdlib equivalent
Matthew Fernandez [Sat, 3 Dec 2022 21:10:53 +0000 (13:10 -0800)]
neatogen _neato_set_aspect: replace 'MIN' with its stdlib equivalent

2 years agoneatogen _spline_edges: remove unused 'P' local
Matthew Fernandez [Sat, 3 Dec 2022 20:53:54 +0000 (12:53 -0800)]
neatogen _spline_edges: remove unused 'P' local

2 years agoneatogen makeObstacle: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen makeObstacle: 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 makeSelfArcs: use cgraph wrapper for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen makeSelfArcs: 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 newitem: use cgraph wrapper for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen newitem: 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 make_barriers: use cgraph wrapper for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen make_barriers: 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 compute_new_weights: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen compute_new_weights: 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 fcmpf: use early return style and add braces
Matthew Fernandez [Sat, 3 Dec 2022 20:49:26 +0000 (12:49 -0800)]
neatogen fcmpf: use early return style and add braces

2 years agoneatogen compute_apsp_simple: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen compute_apsp_simple: 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.

We can also squash a -Wsign-conversion warning at the same time, noting that the
square of a signed number is always non-negative.

2 years agoneatogen compute_apsp_dijkstra: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen compute_apsp_dijkstra: 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.

We can also squash a -Wsign-conversion warning at the same time, noting that the
square of a signed number is always non-negative.

2 years agoMerge branch 'smattr/3c4308aa-6a8e-4737-8f3f-fe806685038f' into 'main'
Matthew Fernandez [Sat, 3 Dec 2022 17:22:27 +0000 (17:22 +0000)]
Merge branch 'smattr/3c4308aa-6a8e-4737-8f3f-fe806685038f' into 'main'

Start 7.0.5 development

See merge request graphviz/graphviz!2984

2 years agoStart 7.0.5 development
Matthew Fernandez [Sat, 3 Dec 2022 16:34:44 +0000 (08:34 -0800)]
Start 7.0.5 development

2 years agoMerge branch 'smattr/76b52b3e-e98d-43e3-9717-6d816a840f54' into 'main' 7.0.4
Matthew Fernandez [Sat, 3 Dec 2022 16:31:35 +0000 (16:31 +0000)]
Merge branch 'smattr/76b52b3e-e98d-43e3-9717-6d816a840f54' into 'main'

Stable release 7.0.4

See merge request graphviz/graphviz!2980

2 years agoStable release 7.0.4
Matthew Fernandez [Mon, 28 Nov 2022 15:47:51 +0000 (07:47 -0800)]
Stable release 7.0.4

2 years agoadd a test for date typos in the CHANGELOG
Matthew Fernandez [Wed, 30 Nov 2022 05:31:37 +0000 (21:31 -0800)]
add a test for date typos in the CHANGELOG

The first cut of the upcoming release had such a typo in it.

2 years agoMerge branch 'smattr/2c47a1a1-8699-4dc9-8c0c-20090089c3bf' into 'main'
Matthew Fernandez [Thu, 1 Dec 2022 15:47:21 +0000 (15:47 +0000)]
Merge branch 'smattr/2c47a1a1-8699-4dc9-8c0c-20090089c3bf' into 'main'

fix changelog entry that was entered under an older release

See merge request graphviz/graphviz!2983

2 years agofix changelog entry that was entered under an older release
Matthew Fernandez [Wed, 30 Nov 2022 06:05:56 +0000 (22:05 -0800)]
fix changelog entry that was entered under an older release

When rebasing 8f60584180071ab9c0f212c3f31aac1d53ed4757, I mistakenly forgot to
adjust its changelog entry for the release that had happened in the intervening
time.

Gitlab: #56

2 years agoMerge branch 'smattr/gitlab-56' into 'main'
Matthew Fernandez [Wed, 30 Nov 2022 05:03:32 +0000 (05:03 +0000)]
Merge branch 'smattr/gitlab-56' into 'main'

ortho: dynamically manage trapezoid structures

Closes #1880 and #56

See merge request graphviz/graphviz!2973

2 years agoortho add_segment: use C99 bools for some boolean locals
Matthew Fernandez [Thu, 24 Nov 2022 18:56:05 +0000 (10:56 -0800)]
ortho add_segment: use C99 bools for some boolean locals

2 years agoortho: push trapezoids allocation into 'construct_trapezoids'
Matthew Fernandez [Thu, 24 Nov 2022 18:52:55 +0000 (10:52 -0800)]
ortho: push trapezoids allocation into 'construct_trapezoids'

This makes it more obvious to readers and the compiler that the value of this
on-entry to `construct_trapezoids` is unimportant and the value does not need to
be retained between the two `construct_trapezoids` calls in `partition`.

2 years agoortho: allocate trapezoid structures on-demand
Matthew Fernandez [Thu, 24 Nov 2022 18:41:03 +0000 (10:41 -0800)]
ortho: allocate trapezoid structures on-demand

The ortho library estimated the number of trapezoid structures it would need
upfront based on the number of segments it was operating on. This estimation was
wrong. Some inputs could exceed the estimation, at which point Graphviz would
abort with an error message.

This change makes trapezoid allocation dynamic, with the trapezoid collection
being expanded on-demand as new trapezoids are needed. The number of the
trapezoids is now only constrained by how much available memory there is.

Gitlab: fixes #56, fixes #1880

2 years agoortho: use a dynamic collection for final intersected boxes
Matthew Fernandez [Thu, 24 Nov 2022 18:26:09 +0000 (10:26 -0800)]
ortho: use a dynamic collection for final intersected boxes

This is a simplification that removes the need for over-allocation and then
later shrinking.

Gitlab: #56

2 years agoortho: stop passing decomposition boxes size around
Matthew Fernandez [Thu, 24 Nov 2022 18:19:56 +0000 (10:19 -0800)]
ortho: stop passing decomposition boxes size around

With the horizontal and vertical decomposition boxes being managed dynamically,
their size is already stored in the `boxes_t` struct and we can use that
instead.

Gitlab: #56

2 years agoortho: manage decomposition boxes as dynamic arrays
Matthew Fernandez [Thu, 24 Nov 2022 18:03:35 +0000 (10:03 -0800)]
ortho: manage decomposition boxes as dynamic arrays

There is now no need to predict the number of horizontal and vertical
decomposition boxes upfront. The arrays for both are expanded on-demand.

This is a step towards resolving an issue where the upfront estimated trapezoid
count is exceeded, but this is likely an optimization for most workloads where
the estimation is not exceeded. Now fewer decomposition boxes will be allocated
because we generally do not need the full count that was estimated previously.

Gitlab: #56

2 years agooutline dynamic box array logic into a header
Matthew Fernandez [Thu, 24 Nov 2022 17:52:01 +0000 (09:52 -0800)]
outline dynamic box array logic into a header

This is not great practice, putting functions like this into a header. But this
is a stepping stone to reusing this code in lib/ortho and it seems cleaner than
trying to manage yet another set of partially exported symbols.

Gitlab: #56

2 years agoortho: use a bit array for trapezoid 'visited' array
Matthew Fernandez [Thu, 24 Nov 2022 17:40:02 +0000 (09:40 -0800)]
ortho: use a bit array for trapezoid 'visited' array

Slightly reduces memory usage.

2 years agoortho monotonate_trapezoids: allocate structures based on trapezoid count
Matthew Fernandez [Thu, 24 Nov 2022 17:31:02 +0000 (09:31 -0800)]
ortho monotonate_trapezoids: allocate structures based on trapezoid count

`tr->length` and `TRSIZE(nsegs)` are the same value here, so this has no
immediate effect. This is a step towards moving to on-demand allocation.

Gitlab: #56

2 years agoortho: allocate qnodes on-demand
Matthew Fernandez [Thu, 24 Nov 2022 17:21:01 +0000 (09:21 -0800)]
ortho: allocate qnodes on-demand

The number of elements in this array is no longer calculated upfront; we simply
expand the array as needed. This removes one blocker to removing calculation of
the number of trapezoids upfront.

As noted in the comment in this commit, the first element (index 0) is reserved.
I do not know the motivation for this, but various places use index > 0 to
decide if they are dealing with a real node.

Gitlab: #56

2 years agoortho init_query_structure: separate assignment statements
Matthew Fernandez [Thu, 24 Nov 2022 21:32:58 +0000 (13:32 -0800)]
ortho init_query_structure: separate assignment statements

This looks like a pure readability change, but is actually preparation for an
upcoming commit. A future commit alters `newnode` to reallocate `qs->data`.
Without the current change, there is no sequence point between the index into
`qs->data` at the start of these lines and the reallocation (in future)
performed by the function call at the end of these lines. This is undefined
behavior with respect to the C standard.

This is quite a subtle problem. I initially did not spot it and was only alerted
by failures under CentOS 7, which encountered nodes with an invalid `nodetype`.
This problem was not reproducible on any other platform, even under ASan and
UBSan. What I believe was going on here is that the combination of the C
compiler and the Glibc on CentOS 7 is the only environment we have which
accidentally leveraged this undefined behavior, by sequencing these operations
as indexing into `qs->data` and _then_ performing the reallocation, resulting in
a write to invalid heap memory.

Gitlab: #56

2 years agoortho: use qnodes length, removing the need for 'QSIZE' global
Matthew Fernandez [Thu, 24 Nov 2022 17:12:24 +0000 (09:12 -0800)]
ortho: use qnodes length, removing the need for 'QSIZE' global

Gitlab: #56

2 years agoortho: track number of qnodes with its array
Matthew Fernandez [Thu, 24 Nov 2022 17:07:01 +0000 (09:07 -0800)]
ortho: track number of qnodes with its array

Similar to the prior changes to `trap_t`, this is a step towards allocating
these on-demand and thus removing predictions/estimations about the total
required qnodes.

Gitlab: #56

2 years agoortho: remove 'TRSIZE' and rely on trapezoid collection length
Matthew Fernandez [Thu, 24 Nov 2022 16:54:06 +0000 (08:54 -0800)]
ortho: remove 'TRSIZE' and rely on trapezoid collection length

We no longer need the global here. Apart from progress towards #56, this
makes progress towards thread-safety too.

Gitlab: #56

2 years agoortho: track number of trapezoids along with its array
Matthew Fernandez [Thu, 24 Nov 2022 16:48:48 +0000 (08:48 -0800)]
ortho: track number of trapezoids along with its array

This is an alternative to passing around `ntraps` or relying on the `TRSIZE`
computation. It is a step towards fixing an issue where the allocated number of
trapezoids is exceeded.

The diff looks large but most of this change is mechanical, migrating `tr` uses
to be aware of the new structure.

This introduces some new warnings, but the intention is to remove these in
upcoming commits as we switch to on-demand allocation.

Gitlab: #56

2 years agoMerge branch 'smattr/6b2dad73-a529-45a8-8b2f-fe276aab3c22' into 'main'
Matthew Fernandez [Wed, 30 Nov 2022 04:01:06 +0000 (04:01 +0000)]
Merge branch 'smattr/6b2dad73-a529-45a8-8b2f-fe276aab3c22' into 'main'

remove some unused 'flag' parameters

See merge request graphviz/graphviz!2979

2 years agosfdpgen uniform_stress: remove 'flag' that is always set to 0
Matthew Fernandez [Mon, 28 Nov 2022 00:48:50 +0000 (16:48 -0800)]
sfdpgen uniform_stress: remove 'flag' that is always set to 0

2 years agosfdpgen post_process_smoothing: remove 'flag' that is always set to 0
Matthew Fernandez [Mon, 28 Nov 2022 00:46:54 +0000 (16:46 -0800)]
sfdpgen post_process_smoothing: remove 'flag' that is always set to 0

2 years agosparse QuadTree_get_supernodes: remove 'flag' that is always set to 0
Matthew Fernandez [Mon, 28 Nov 2022 00:40:50 +0000 (16:40 -0800)]
sparse QuadTree_get_supernodes: remove 'flag' that is always set to 0

Note that we can also remove follow on checks after calls to this function when
`flag` is known to be 0 based on its prior initialization.

2 years agosparse QuadTree_get_supernodes_internal: remove unused 'flag' parameter
Matthew Fernandez [Mon, 28 Nov 2022 00:36:54 +0000 (16:36 -0800)]
sparse QuadTree_get_supernodes_internal: remove unused 'flag' parameter

2 years agosparse QuadTree_get_repulsive_force: remove 'flag' that is always set to 0
Matthew Fernandez [Mon, 28 Nov 2022 00:34:19 +0000 (16:34 -0800)]
sparse QuadTree_get_repulsive_force: remove 'flag' that is always set to 0

2 years agoMerge branch 'smattr/9b5de12a-8002-429a-9971-a7b8b86494df' into 'main'
Matthew Fernandez [Wed, 30 Nov 2022 01:53:11 +0000 (01:53 +0000)]
Merge branch 'smattr/9b5de12a-8002-429a-9971-a7b8b86494df' into 'main'

sfdpgen: remove dead code

See merge request graphviz/graphviz!2978

2 years agosfdpgen spring_electrical_embedding: remove unused 'xold'
Matthew Fernandez [Sun, 27 Nov 2022 19:33:08 +0000 (11:33 -0800)]
sfdpgen spring_electrical_embedding: remove unused 'xold'

2 years agosfdpgen spring_electrical_embedding_slow: remove unused 'xold'
Matthew Fernandez [Sun, 27 Nov 2022 19:32:35 +0000 (11:32 -0800)]
sfdpgen spring_electrical_embedding_slow: remove unused 'xold'

2 years agosfdpgen spring_electrical_embedding_fast: remove unused 'xold'
Matthew Fernandez [Sun, 27 Nov 2022 19:32:09 +0000 (11:32 -0800)]
sfdpgen spring_electrical_embedding_fast: remove unused 'xold'

2 years agosfdpgen spring_electrical_embedding_slow: remove allocation of unused qtree_lev…
Matthew Fernandez [Sun, 27 Nov 2022 19:29:00 +0000 (11:29 -0800)]
sfdpgen spring_electrical_embedding_slow: remove allocation of unused qtree_lev…

`qtree_level_optimizer` was being allocated, but unused after propagating
deletion of the always-false `USE_QT`.

2 years agosfdpgen spring_electrical_embedding_slow: remove 'qtree_cpu' that is always 0
Matthew Fernandez [Sat, 26 Nov 2022 17:39:04 +0000 (09:39 -0800)]
sfdpgen spring_electrical_embedding_slow: remove 'qtree_cpu' that is always 0

2 years agosfdpgen spring_electrical_embedding_slow: remove 'qt' that is always NULL
Matthew Fernandez [Sat, 26 Nov 2022 17:34:30 +0000 (09:34 -0800)]
sfdpgen spring_electrical_embedding_slow: remove 'qt' that is always NULL

2 years agosfdpgen spring_electrical_embedding_slow: remove 'counts_avg' that is always 0
Matthew Fernandez [Sat, 26 Nov 2022 17:33:41 +0000 (09:33 -0800)]
sfdpgen spring_electrical_embedding_slow: remove 'counts_avg' that is always 0

2 years agosfdpgen spring_electrical_embedding_slow: remove 'nsuper_avg' that is always 0
Matthew Fernandez [Sat, 26 Nov 2022 17:32:34 +0000 (09:32 -0800)]
sfdpgen spring_electrical_embedding_slow: remove 'nsuper_avg' that is always 0

2 years agosfdpgen spring_electrical_embedding_slow: remove unused allocations
Matthew Fernandez [Sat, 26 Nov 2022 17:26:04 +0000 (09:26 -0800)]
sfdpgen spring_electrical_embedding_slow: remove unused allocations

2 years agosfdpgen spring_electrical_embedding_slow: remove 'USE_QT' local
Matthew Fernandez [Sat, 26 Nov 2022 17:18:25 +0000 (09:18 -0800)]
sfdpgen spring_electrical_embedding_slow: remove 'USE_QT' local

This is unconditionally set to false before it is read.

2 years agosfdpgen spring_electrical_embedding_slow: fix memory leak
Matthew Fernandez [Sun, 27 Nov 2022 19:24:35 +0000 (11:24 -0800)]
sfdpgen spring_electrical_embedding_slow: fix memory leak

`qtree_level_optimizer` would be optionally allocated based on
`n >= ctrl->quadtree_size` but then would only be freed if `USE_QT` was set.
`USE_QT` is always false (it will be removed in an upcoming commit), so this
clean up never runs. This seems latent; I suspect the branch that allocates
`qtree_level_optimizer` is unreachable because this function appears to have
been copy-pasted from one of the other variants in this file with little regard
to how much of it is dead code. But it still seems wise to fix this issue.

2 years agosfdpgen check_int_array_size: use cgraph wrapper for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
sfdpgen check_int_array_size: 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 agosfdpgen check_real_array_size: use cgraph wrapper for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
sfdpgen check_real_array_size: 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 agosfdpgen export_embedding: swap 'MAX', 'MIN' calls for stdlib equivalents
Matthew Fernandez [Sat, 26 Nov 2022 17:16:52 +0000 (09:16 -0800)]
sfdpgen export_embedding: swap 'MAX', 'MIN' calls for stdlib equivalents

2 years agodotgen: simplify 'makeregularend'
Matthew Fernandez [Sat, 26 Nov 2022 17:07:25 +0000 (09:07 -0800)]
dotgen: simplify 'makeregularend'

This function is only called with `BOTTOM` and `TOP`, so we can abbreviate it
squashing a -Wswitch-default warning.

2 years agoMerge branch 'smattr/79d48d4f-c0e9-4bda-9fe4-53fd36a173b1' into 'main'
Matthew Fernandez [Sun, 27 Nov 2022 20:27:24 +0000 (20:27 +0000)]
Merge branch 'smattr/79d48d4f-c0e9-4bda-9fe4-53fd36a173b1' into 'main'

remove use of '$<' in Makefiles

Closes #2317

See merge request graphviz/graphviz!2976

2 years agoremove use of '$<' in Makefiles
Matthew Fernandez [Fri, 25 Nov 2022 19:15:28 +0000 (11:15 -0800)]
remove use of '$<' in Makefiles

This is a GNU Make extension that is not supported in BSD Make.

Gitlab: closes #2317

2 years agoMerge branch 'smattr/gitlab-2317' into 'main'
Matthew Fernandez [Sun, 27 Nov 2022 19:27:36 +0000 (19:27 +0000)]
Merge branch 'smattr/gitlab-2317' into 'main'

remove unused 'PLATFORMSDKINCLUDE_ESCAPED' build system variable

See merge request graphviz/graphviz!2974

2 years agoremove unused 'PLATFORMSDKINCLUDE_ESCAPED' build system variable
Matthew Fernandez [Thu, 24 Nov 2022 21:50:03 +0000 (13:50 -0800)]
remove unused 'PLATFORMSDKINCLUDE_ESCAPED' build system variable

This was using syntax incompatible with POSIX /bin/sh. But the last use of this
was removed in bd879b4583b32e4d13e4b36bea0c20f530fbca0c, so lets just remove it.

Gitlab: #2317

2 years agoremove legacy Windows Makefile
Matthew Fernandez [Thu, 24 Nov 2022 21:45:00 +0000 (13:45 -0800)]
remove legacy Windows Makefile

This has not been used in sometime. The supported ways of building on Windows
are:

  1. Native MS Build via the .sln, .vcxproj files
  2. Native/Cygwin/MinGW CMake
  3. Cygwin/MinGW Autotools

2 years agoMerge branch 'smattr/gitlab-2319' into 'main'
Matthew Fernandez [Sat, 26 Nov 2022 16:59:57 +0000 (16:59 +0000)]
Merge branch 'smattr/gitlab-2319' into 'main'

Revert "core plugin: stop emitting an empty 'alt' tag in cmap output"

Closes #2319

See merge request graphviz/graphviz!2975

2 years agoRevert "core plugin: stop emitting an empty 'alt' tag in cmap output"
Matthew Fernandez [Fri, 25 Nov 2022 18:23:46 +0000 (10:23 -0800)]
Revert "core plugin: stop emitting an empty 'alt' tag in cmap output"

This reverts commit a214b9dc2be6b4a9d27196e2c43f7bf2b0ff0002. It turns out the
W3C specification for this part of HTML requires the `alt` attribute if the
`href` attribute is set. We will need to figure out an alternative of what to
set this to for accessibility.

Gitlab: closes #2319, re-opens #265
Reported-by: Albert
2 years agoMerge branch 'smattr/749ad12f-81a8-4363-bb61-738703792fde' into 'main'
Matthew Fernandez [Sat, 26 Nov 2022 05:58:03 +0000 (05:58 +0000)]
Merge branch 'smattr/749ad12f-81a8-4363-bb61-738703792fde' into 'main'

Start 7.0.4 development

See merge request graphviz/graphviz!2977

2 years agoStart 7.0.4 development
Matthew Fernandez [Sat, 26 Nov 2022 05:08:40 +0000 (21:08 -0800)]
Start 7.0.4 development

2 years agoMerge branch 'smattr/fa89b6d9-51b5-4fc5-b74b-b88127233b73' into 'main' 7.0.3
Matthew Fernandez [Sat, 26 Nov 2022 05:06:45 +0000 (05:06 +0000)]
Merge branch 'smattr/fa89b6d9-51b5-4fc5-b74b-b88127233b73' into 'main'

Stable release 7.0.3

See merge request graphviz/graphviz!2966

2 years agoStable release 7.0.3
Matthew Fernandez [Sun, 20 Nov 2022 19:38:07 +0000 (11:38 -0800)]
Stable release 7.0.3

2 years agoMerge branch 'smattr/b8de6beb-5521-4afd-bfb6-33015afa544d' into 'main'
Matthew Fernandez [Fri, 25 Nov 2022 19:23:35 +0000 (19:23 +0000)]
Merge branch 'smattr/b8de6beb-5521-4afd-bfb6-33015afa544d' into 'main'

neatogen: some cleanup and migration to cgraph allocation wrappers

See merge request graphviz/graphviz!2965

2 years agoneatogen updateGraph: use a clearer iteration idiom
Matthew Fernandez [Sun, 20 Nov 2022 00:22:09 +0000 (16:22 -0800)]
neatogen updateGraph: use a clearer iteration idiom

2 years agoneatogen rePos: use a clearer iteration idiom
Matthew Fernandez [Sun, 20 Nov 2022 00:21:32 +0000 (16:21 -0800)]
neatogen rePos: use a clearer iteration idiom

2 years agoneatogen newPos: use a clearer iteration idiom
Matthew Fernandez [Sun, 20 Nov 2022 00:20:56 +0000 (16:20 -0800)]
neatogen newPos: use a clearer iteration idiom

2 years agoneatogen addCorners: use a clearer iteration idiom
Matthew Fernandez [Sun, 20 Nov 2022 00:20:18 +0000 (16:20 -0800)]
neatogen addCorners: use a clearer iteration idiom

2 years agoneatogen countOverlap: use a clearer iteration idiom
Matthew Fernandez [Sun, 20 Nov 2022 00:19:20 +0000 (16:19 -0800)]
neatogen countOverlap: use a clearer iteration idiom

2 years agoneatogen geomUpdate: use a clearer iteration idiom
Matthew Fernandez [Sun, 20 Nov 2022 00:15:33 +0000 (16:15 -0800)]
neatogen geomUpdate: use a clearer iteration idiom

2 years agoneatogen sortSites: use a clearer iteration idiom
Matthew Fernandez [Sun, 20 Nov 2022 00:12:46 +0000 (16:12 -0800)]
neatogen sortSites: use a clearer iteration idiom

2 years agoneatogen makeInfo: use a clearer iteration idiom
Matthew Fernandez [Sun, 20 Nov 2022 00:09:10 +0000 (16:09 -0800)]
neatogen makeInfo: use a clearer iteration idiom

2 years agoneatogen chkBoundBox: use a clearer iteration idiom
Matthew Fernandez [Sun, 20 Nov 2022 00:07:38 +0000 (16:07 -0800)]
neatogen chkBoundBox: use a clearer iteration idiom

2 years agoneatogen freeNodes: use clearer iteration idiom
Matthew Fernandez [Sat, 19 Nov 2022 23:59:14 +0000 (15:59 -0800)]
neatogen freeNodes: use clearer iteration idiom

2 years agoneatogen: use a clearer type for 'doAll'
Matthew Fernandez [Sat, 19 Nov 2022 23:56:57 +0000 (15:56 -0800)]
neatogen: use a clearer type for 'doAll'

2 years agoneatogen: convert 'Site.refcnt' to unsigned
Matthew Fernandez [Sat, 19 Nov 2022 23:46:19 +0000 (15:46 -0800)]
neatogen: convert 'Site.refcnt' to unsigned

This count is never intended to go negative. So using an unsigned type gives us
one more bit. Though reference counts of this object are not expected to reach
2³¹, so this is mostly just for clarity.

2 years agoneatogen: represent 'nsites' as a 'size_t'
Matthew Fernandez [Sat, 19 Nov 2022 23:42:27 +0000 (15:42 -0800)]
neatogen: represent 'nsites' as a 'size_t'

This squashes 3 -Wsign-conversion warnings. Note that this required also
converting `nvertices` and `Site.sitenbr` to `size_t` too.

2 years agoneatogen: mark 'adjustMode' const
Matthew Fernandez [Sat, 19 Nov 2022 23:18:26 +0000 (15:18 -0800)]
neatogen: mark 'adjustMode' const

This makes it more obvious to the compiler it can e.g. unroll and inline loops
involving this array.

2 years agoneatogen parseFactor: replace 'MIN' and 'MAX' with stdlib equivalents
Matthew Fernandez [Sat, 19 Nov 2022 23:11:35 +0000 (15:11 -0800)]
neatogen parseFactor: replace 'MIN' and 'MAX' with stdlib equivalents

2 years agoneatogen ISZERO: remove some unnecessary parens
Matthew Fernandez [Sat, 19 Nov 2022 23:11:21 +0000 (15:11 -0800)]
neatogen ISZERO: remove some unnecessary parens

2 years agoneatogen vpscAdjust: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen vpscAdjust: 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 fdpAdjust: use cgraph wrapper for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen fdpAdjust: 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 makeMatrix: use cgraph wrappers for allocation
Matthew Fernandez [Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)]
neatogen makeMatrix: 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.