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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
sparse Dijkstra_internal: 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.
sparse SparseMatrix_weakly_connected_compone…: 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.
sparse SparseMatrix_level_sets_internal: 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.
sparse SparseMatrix_get_real_adjacency_matri…: 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.
sparse SparseMatrix_sum_repeat_entries: 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.
sparse SparseMatrix_multiply3: 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.
sparse SparseMatrix_multiply: 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.
sparse SparseMatrix_multiply_vector: 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.
sparse SparseMatrix_multiply_dense1: 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.
sparse SparseMatrix_add: 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.
sparse SparseMatrix_realloc: 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.
sparse SparseMatrix_alloc: 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.
sparse SparseMatrix_init: 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.
sparse SparseMatrix_is_symmetric: 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.
gvc auto_output_filename: avoid 'strdup' when constructing file name
This is a reattempt of 4291cc769a3eeef8b1c171e5479194733a4da6cd. The first
attempt introduced a bug where the separating `.` was not accounted for and
accidentally truncated. It was reverted in 8d662734b6a34709d9475b120e7ce3de872339e2. The present commit takes much the same
approach but ensures to account for the separating `.`.
This block of code is scanning a string of `:`-separated entries and writing
them into `buf` in reverse order `.`-separated. We can rewrite it to avoid
dynamic allocation, thus avoiding certain failure cases and locking overhead.
Unfortunately there seems to be no variant of `strrchr` that takes a length.
So we need to write our own loop for locating the last `:` with a limit.
dotgen make_regular_edge: 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.
dotgen make_flat_adj_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.
dotgen makeSimpleFlatLabels: 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.
dotgen cloneNode: 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.
dotgen cloneGraph: 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.
dotgen _dot_splines: 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.
dotgen swap_spline: 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.
dotgen swap_bezier: 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.
dotgen applyPacking2: 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.
dotgen computeLayerWidths: 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.
dotgen computeNodeGroups: 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.
dotgen: use a bit array for 'layerWidthInfo_t.removed'
By using a `bitarray_t` instead of an array of integers for this array of
boolean values, we swap a 32-bits-per-boolean representation for a
1-bit-per-boolean representation. This reduces heap pressure, and in the case of
smaller arrays avoids heap allocation altogether.
dotgen build_skeleton: 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.
cgraph: remove duplicate include and adjust another
lib/ is in the include path when building cgraph sources, so we can include
cgraph headers in a more uniform way, matching how other libraries include
cgraph headers.
This is a reattempt of 2d7852a049b729fb0db71c5a8ef2366215ae2035. The original
change introduced a bug where unterminated strings (both `qstring` and
`hstring`) would not reset the buffer, causing an assertion failure the next
time a graph was parsed. This failed attempt was reverted in 16a04fe061bf6c9b3fe5fdc6250255a9b55cd337.
The approach taken here is essentially the same as 2d7852a049b729fb0db71c5a8ef2366215ae2035, except that it resets the buffer on
error conditions. This appears to be the only way to exit the `qstring` and
`hstring` states that was not covered by the original attempt.
According to Google Translate, this is Mandarin that means “but a little, dance
partner.” I do not see how this is helpful in understanding the surrounding
code.
sfdpgen multilevel_spring_electrical_embedd…: 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.
sfdpgen shorting_edge_label_nodes: 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.