]> granicus.if.org Git - graphviz/log
graphviz
3 years agoRTreeInsert: move definitions closer to their use and use better types
Matthew Fernandez [Wed, 24 Mar 2021 03:51:22 +0000 (20:51 -0700)]
RTreeInsert: move definitions closer to their use and use better types

3 years agoreflow RTreeInsert2 prototype
Matthew Fernandez [Wed, 24 Mar 2021 03:50:56 +0000 (20:50 -0700)]
reflow RTreeInsert2 prototype

3 years agoRTreeSearch: push definition of i closer to its use and use a better type
Matthew Fernandez [Wed, 24 Mar 2021 03:49:51 +0000 (20:49 -0700)]
RTreeSearch: push definition of i closer to its use and use a better type

3 years agoPrintData: push definition of i closer to its use and use a better type
Matthew Fernandez [Wed, 24 Mar 2021 03:48:54 +0000 (20:48 -0700)]
PrintData: push definition of i closer to its use and use a better type

3 years agoPrintIndex: push definition of i closer to its use and use a better type
Matthew Fernandez [Wed, 24 Mar 2021 03:48:23 +0000 (20:48 -0700)]
PrintIndex: push definition of i closer to its use and use a better type

3 years agoRTreeClose2: push definition of i closer to its use
Matthew Fernandez [Wed, 24 Mar 2021 03:48:02 +0000 (20:48 -0700)]
RTreeClose2: push definition of i closer to its use

3 years agoRTreeNewIndex: push definition of x closer to its use
Matthew Fernandez [Wed, 24 Mar 2021 03:47:36 +0000 (20:47 -0700)]
RTreeNewIndex: push definition of x closer to its use

3 years agoRTreeLeafListFree: push definition of tlp closer to its use
Matthew Fernandez [Wed, 24 Mar 2021 03:47:09 +0000 (20:47 -0700)]
RTreeLeafListFree: push definition of tlp closer to its use

3 years agoRTreeLeafListAdd: push nlp definition closer to its use
Matthew Fernandez [Wed, 24 Mar 2021 03:46:32 +0000 (20:46 -0700)]
RTreeLeafListAdd: push nlp definition closer to its use

3 years agosimplify printf format in PrintNode
Matthew Fernandez [Wed, 24 Mar 2021 03:41:02 +0000 (20:41 -0700)]
simplify printf format in PrintNode

Under C99, we have %p for pointers.

3 years agouse more modern #pragma once guards in lib/label
Matthew Fernandez [Wed, 24 Mar 2021 03:09:59 +0000 (20:09 -0700)]
use more modern #pragma once guards in lib/label

3 years agoremove unnecessary CoverAll declaration
Matthew Fernandez [Wed, 24 Mar 2021 03:09:30 +0000 (20:09 -0700)]
remove unnecessary CoverAll declaration

This symbol is unused in this file.

3 years agoremove commented out code
Matthew Fernandez [Wed, 24 Mar 2021 03:09:10 +0000 (20:09 -0700)]
remove commented out code

3 years agoremove cryptic comment
Matthew Fernandez [Wed, 24 Mar 2021 03:01:29 +0000 (20:01 -0700)]
remove cryptic comment

I guess this is a hint to some editor I am not aware of.

3 years agoremove unused parameter to RTreeReInsert
Matthew Fernandez [Wed, 24 Mar 2021 02:57:07 +0000 (19:57 -0700)]
remove unused parameter to RTreeReInsert

3 years agoremove unused parameter to objplpmks
Matthew Fernandez [Wed, 24 Mar 2021 02:55:35 +0000 (19:55 -0700)]
remove unused parameter to objplpmks

3 years agoremove hand rolled floor(log2())
Matthew Fernandez [Wed, 24 Mar 2021 02:53:16 +0000 (19:53 -0700)]
remove hand rolled floor(log2())

We do not need a custom optimized version of this. Modern compilers know these
functions as built-ins and can do their own better optimizations.

3 years agosquash some -Wunused-parameter warnings
Matthew Fernandez [Wed, 24 Mar 2021 02:52:48 +0000 (19:52 -0700)]
squash some -Wunused-parameter warnings

3 years agoremove some open coded fmax
Matthew Fernandez [Wed, 24 Mar 2021 02:47:51 +0000 (19:47 -0700)]
remove some open coded fmax

3 years agoMerge branch 'smattr/450AD1C4-3E9D-4E93-95C6-279FC38EFCA3' into 'main'
Matthew Fernandez [Mon, 29 Mar 2021 05:13:03 +0000 (05:13 +0000)]
Merge branch 'smattr/450AD1C4-3E9D-4E93-95C6-279FC38EFCA3' into 'main'

some clean up of neatogen

See merge request graphviz/graphviz!1865

3 years agoreplace unnecessary max() implementation with libc fmaxf
Matthew Fernandez [Tue, 23 Mar 2021 04:15:08 +0000 (21:15 -0700)]
replace unnecessary max() implementation with libc fmaxf

No need to hand roll this ourselves now that we compile with C99.

3 years agoreplace neatogen header guards with more modern #pragma once
Matthew Fernandez [Tue, 23 Mar 2021 02:22:14 +0000 (19:22 -0700)]
replace neatogen header guards with more modern #pragma once

3 years agoremove commented out code
Matthew Fernandez [Tue, 23 Mar 2021 03:45:45 +0000 (20:45 -0700)]
remove commented out code

3 years agoremove C++ alternative in embed_graph.h
Matthew Fernandez [Tue, 23 Mar 2021 03:42:19 +0000 (20:42 -0700)]
remove C++ alternative in embed_graph.h

We only compile this header under C.

3 years agoremove inline NULL definition
Matthew Fernandez [Tue, 23 Mar 2021 03:39:14 +0000 (20:39 -0700)]
remove inline NULL definition

This is guaranteed to exist in C99.

3 years agoremove C++ alternative in dijkstra.h
Matthew Fernandez [Tue, 23 Mar 2021 03:33:59 +0000 (20:33 -0700)]
remove C++ alternative in dijkstra.h

Only the C versions of these functions are implemented.

3 years agoremove incorrect C++ alternative
Matthew Fernandez [Tue, 23 Mar 2021 03:30:34 +0000 (20:30 -0700)]
remove incorrect C++ alternative

The '&' is still required, regardless of whether this code is compiled with C or
C++. Note that this issue was latent as we never build this code as C++.

3 years agoremove unused sparsegraph.h C++ alternative
Matthew Fernandez [Tue, 23 Mar 2021 02:49:03 +0000 (19:49 -0700)]
remove unused sparsegraph.h C++ alternative

Similar to previous commits, this code is unused because we do not include it in
any C++ compilation.

3 years agoremove unused kkutils.h C++ alternative
Matthew Fernandez [Tue, 23 Mar 2021 02:29:51 +0000 (19:29 -0700)]
remove unused kkutils.h C++ alternative

This code is unused and in fact many of these prototyped functions are
unimplemented.

3 years agoremove commented out inline keywords
Matthew Fernandez [Tue, 23 Mar 2021 02:26:36 +0000 (19:26 -0700)]
remove commented out inline keywords

3 years agoremove some unnecessary __cplusplus guards
Matthew Fernandez [Tue, 23 Mar 2021 02:24:06 +0000 (19:24 -0700)]
remove some unnecessary __cplusplus guards

This file is C, and we build it as such. It is not expected that anyone will
compile this source as C++.

3 years agoremove alternative C++ Queue implementation in neatogen
Matthew Fernandez [Tue, 23 Mar 2021 02:20:03 +0000 (19:20 -0700)]
remove alternative C++ Queue implementation in neatogen

This code was written to provide two versions of the same API, one for C and one
for C++. This is unnecessary because the C API is already usable from C++.
Moreover, one can just use std::queue in C++. This code was not being used as we
only ever #include it from C files, so we just remove it to ease ongoing
maintenance.

3 years agoremove commented out #include
Matthew Fernandez [Tue, 23 Mar 2021 02:18:39 +0000 (19:18 -0700)]
remove commented out #include

3 years agoMerge branch 'smattr/619aeafd-3505-4392-aa61-49cdae0077aa' into 'main'
Matthew Fernandez [Mon, 29 Mar 2021 04:35:06 +0000 (04:35 +0000)]
Merge branch 'smattr/619aeafd-3505-4392-aa61-49cdae0077aa' into 'main'

fix: correctly handle HTML content ending in ]

Closes #1893

See merge request graphviz/graphviz!1859

3 years agofix: correctly handle HTML content ending in ]
Matthew Fernandez [Sun, 21 Mar 2021 03:04:27 +0000 (20:04 -0700)]
fix: correctly handle HTML content ending in ]

As described in the source comment in this commit, expat attempts to recognize
CDATA section enders which results in some internal buffering that Graphviz did
not anticipate. Specifically, any HTML content ending in "]" or "]]" would be
parsed with these characters truncated. The next call to expat would flush this
buffered data, resulting in Graphviz believing the next content was malformed.

For example, the content "my label]]]" would be parsed as the text "my label]".
The next call to expat would return "]]" prepended to whatever was then being
parsed.

Fixes #1893.

3 years agoadd a test case for #1893
Matthew Fernandez [Sun, 21 Mar 2021 01:42:52 +0000 (18:42 -0700)]
add a test case for #1893

3 years agoMerge branch 'smattr/F391EA36-8454-4A32-B815-1FAAEFD4006E' into 'main'
Matthew Fernandez [Mon, 29 Mar 2021 03:58:10 +0000 (03:58 +0000)]
Merge branch 'smattr/F391EA36-8454-4A32-B815-1FAAEFD4006E' into 'main'

some cgraph clean up

See merge request graphviz/graphviz!1858

3 years agoreflow some code
Matthew Fernandez [Sat, 20 Mar 2021 19:09:45 +0000 (12:09 -0700)]
reflow some code

3 years agocondense a malloc;memset
Matthew Fernandez [Sat, 20 Mar 2021 19:01:19 +0000 (12:01 -0700)]
condense a malloc;memset

The calloc function does the zeroing for you and can even be more efficient for
large allocations.

3 years agouse a stronger return type in not_default_attrs
Matthew Fernandez [Sat, 20 Mar 2021 18:56:58 +0000 (11:56 -0700)]
use a stronger return type in not_default_attrs

3 years agouse a stronger return type in has_no_predecessor_below
Matthew Fernandez [Sat, 20 Mar 2021 18:56:21 +0000 (11:56 -0700)]
use a stronger return type in has_no_predecessor_below

3 years agouse a stronger return type in has_no_edges
Matthew Fernandez [Sat, 20 Mar 2021 18:55:50 +0000 (11:55 -0700)]
use a stronger return type in has_no_edges

3 years agouse a stronger return type in write_node_test
Matthew Fernandez [Sat, 20 Mar 2021 18:55:20 +0000 (11:55 -0700)]
use a stronger return type in write_node_test

3 years agouse a stronger return type for node_in_subg
Matthew Fernandez [Sat, 20 Mar 2021 18:54:43 +0000 (11:54 -0700)]
use a stronger return type for node_in_subg

3 years agouse a stronger return type in irrelevant_subgraph
Matthew Fernandez [Sat, 20 Mar 2021 18:53:53 +0000 (11:53 -0700)]
use a stronger return type in irrelevant_subgraph

3 years agouse a stronger type for root variable
Matthew Fernandez [Sat, 20 Mar 2021 18:52:25 +0000 (11:52 -0700)]
use a stronger type for root variable

3 years agouse a stronger type for hasName variable
Matthew Fernandez [Sat, 20 Mar 2021 18:51:54 +0000 (11:51 -0700)]
use a stronger type for hasName variable

3 years agosimplify agcanonhtmlstr implementation
Matthew Fernandez [Sat, 20 Mar 2021 18:48:04 +0000 (11:48 -0700)]
simplify agcanonhtmlstr implementation

3 years agouse a stronger type for backslash_pending variable
Matthew Fernandez [Sat, 20 Mar 2021 18:45:57 +0000 (11:45 -0700)]
use a stronger type for backslash_pending variable

3 years agouse a stronger type for needs_quotes variable
Matthew Fernandez [Sat, 20 Mar 2021 18:44:50 +0000 (11:44 -0700)]
use a stronger type for needs_quotes variable

3 years agocondense some boolean code
Matthew Fernandez [Sat, 20 Mar 2021 18:34:35 +0000 (11:34 -0700)]
condense some boolean code

3 years agouse a stronger type for a boolean variable
Matthew Fernandez [Sat, 20 Mar 2021 18:33:23 +0000 (11:33 -0700)]
use a stronger type for a boolean variable

3 years agoremove some commented out code
Matthew Fernandez [Sat, 20 Mar 2021 18:31:34 +0000 (11:31 -0700)]
remove some commented out code

3 years agoremove unused HAVE__BOOL define
Matthew Fernandez [Sat, 20 Mar 2021 18:25:54 +0000 (11:25 -0700)]
remove unused HAVE__BOOL define

Now that we compile with C99, stdbool.h is guaranteed to be available.

3 years agoremove commented out iconv code
Matthew Fernandez [Sat, 20 Mar 2021 18:13:13 +0000 (11:13 -0700)]
remove commented out iconv code

3 years agoremove unused exstrfree
Matthew Fernandez [Sat, 20 Mar 2021 18:10:05 +0000 (11:10 -0700)]
remove unused exstrfree

3 years agoremove unused AgraphVersion
Matthew Fernandez [Sat, 20 Mar 2021 18:05:12 +0000 (11:05 -0700)]
remove unused AgraphVersion

3 years agoMerge branch 'smattr/62d61954-d50d-44bc-9fde-6df2d9924c7c' into 'main'
Matthew Fernandez [Mon, 29 Mar 2021 03:08:35 +0000 (03:08 +0000)]
Merge branch 'smattr/62d61954-d50d-44bc-9fde-6df2d9924c7c' into 'main'

profile target generator

See merge request graphviz/graphviz!1847

3 years agoadd a script for generating graphs to profile
Matthew Fernandez [Thu, 18 Mar 2021 04:23:00 +0000 (21:23 -0700)]
add a script for generating graphs to profile

3 years agoMerge branch 'smattr/338d3e7f-bace-4703-a761-ea022a3aac14' into 'main'
Matthew Fernandez [Mon, 29 Mar 2021 02:31:31 +0000 (02:31 +0000)]
Merge branch 'smattr/338d3e7f-bace-4703-a761-ea022a3aac14' into 'main'

more gvmap cleanup

See merge request graphviz/graphviz!1844

3 years agoremove unused whatout gvmap variable
Matthew Fernandez [Wed, 17 Mar 2021 02:20:54 +0000 (19:20 -0700)]
remove unused whatout gvmap variable

3 years agoremove unused plot_labels
Matthew Fernandez [Wed, 17 Mar 2021 02:19:02 +0000 (19:19 -0700)]
remove unused plot_labels

3 years agoremove unused plot_edges
Matthew Fernandez [Wed, 17 Mar 2021 02:18:32 +0000 (19:18 -0700)]
remove unused plot_edges

3 years agoremove unused plot_points
Matthew Fernandez [Wed, 17 Mar 2021 02:18:05 +0000 (19:18 -0700)]
remove unused plot_points

3 years agoremove unused plot_polys
Matthew Fernandez [Wed, 17 Mar 2021 02:17:14 +0000 (19:17 -0700)]
remove unused plot_polys

3 years agoremove unused make_map_from_point_groups
Matthew Fernandez [Wed, 17 Mar 2021 02:15:45 +0000 (19:15 -0700)]
remove unused make_map_from_point_groups

3 years agoremove excess space, bracketing, and commented out code
Matthew Fernandez [Wed, 17 Mar 2021 02:10:57 +0000 (19:10 -0700)]
remove excess space, bracketing, and commented out code

3 years agoremove useless use_line parameter in make_map.c
Matthew Fernandez [Wed, 17 Mar 2021 01:56:47 +0000 (18:56 -0700)]
remove useless use_line parameter in make_map.c

3 years agoremove useless is_river parameter in make_map.c
Matthew Fernandez [Wed, 17 Mar 2021 01:55:06 +0000 (18:55 -0700)]
remove useless is_river parameter in make_map.c

3 years agorewrite sbuff construction in gvmap to use an agxbuf
Matthew Fernandez [Wed, 17 Mar 2021 01:45:59 +0000 (18:45 -0700)]
rewrite sbuff construction in gvmap to use an agxbuf

This massively simplifies string juggling in gvmap by delegating all of this to
agxbuf. We reduce three function parameters to one, remove manual offset
tracking, remove pre-output length calculation, and all sorts of other
previously-iniline complications.

3 years agoremove unused edge_bridge_tol parameter to make_map_internal
Matthew Fernandez [Wed, 17 Mar 2021 01:13:07 +0000 (18:13 -0700)]
remove unused edge_bridge_tol parameter to make_map_internal

3 years agomark make_map_internal static
Matthew Fernandez [Wed, 17 Mar 2021 01:02:08 +0000 (18:02 -0700)]
mark make_map_internal static

This function is not used outside its containing file.

3 years agoremove unused xcombined parameter to get_polygons
Matthew Fernandez [Wed, 17 Mar 2021 01:01:06 +0000 (18:01 -0700)]
remove unused xcombined parameter to get_polygons

3 years agoremove unused local in plot_dot_polygons
Matthew Fernandez [Wed, 17 Mar 2021 00:59:22 +0000 (17:59 -0700)]
remove unused local in plot_dot_polygons

3 years agoremove unused GRP_BBOX parameter from get_polygon_solids
Matthew Fernandez [Wed, 17 Mar 2021 00:55:22 +0000 (17:55 -0700)]
remove unused GRP_BBOX parameter from get_polygon_solids

3 years agoremove unused GRP_RANDOM parameter from get_polygon_solids
Matthew Fernandez [Wed, 17 Mar 2021 00:54:54 +0000 (17:54 -0700)]
remove unused GRP_RANDOM parameter from get_polygon_solids

3 years agoremove unused poly_groups parameter from get_polygon_solids
Matthew Fernandez [Wed, 17 Mar 2021 00:54:02 +0000 (17:54 -0700)]
remove unused poly_groups parameter from get_polygon_solids

3 years agoremove unused groups parameter from get_polygon_solids
Matthew Fernandez [Wed, 17 Mar 2021 00:53:02 +0000 (17:53 -0700)]
remove unused groups parameter from get_polygon_solids

3 years agoremove unused exclude_random parameter from get_polygon_solids
Matthew Fernandez [Wed, 17 Mar 2021 00:52:02 +0000 (17:52 -0700)]
remove unused exclude_random parameter from get_polygon_solids

3 years agoremove unused bg_color parameter to plot_dot_map
Matthew Fernandez [Wed, 17 Mar 2021 00:50:12 +0000 (17:50 -0700)]
remove unused bg_color parameter to plot_dot_map

3 years agoremove unused processing_polygon
Matthew Fernandez [Wed, 17 Mar 2021 00:48:13 +0000 (17:48 -0700)]
remove unused processing_polygon

3 years agoremove unused parameter from plot_dot_map
Matthew Fernandez [Wed, 17 Mar 2021 00:47:48 +0000 (17:47 -0700)]
remove unused parameter from plot_dot_map

3 years agoremove unused processing_one_poly
Matthew Fernandez [Wed, 17 Mar 2021 00:41:06 +0000 (17:41 -0700)]
remove unused processing_one_poly

3 years agoMerge branch 'smattr/0788fe56-dd32-4e9a-b8bf-3371c58ee5d4' into 'main'
Matthew Fernandez [Mon, 29 Mar 2021 01:13:27 +0000 (01:13 +0000)]
Merge branch 'smattr/0788fe56-dd32-4e9a-b8bf-3371c58ee5d4' into 'main'

Fix for TBbalance attribute code

Closes #1980 and #1339

See merge request graphviz/graphviz!1846

3 years agoFix for TBbalance attribute code
Steve Roush [Thu, 18 Mar 2021 01:51:10 +0000 (18:51 -0700)]
Fix for TBbalance attribute code

As described in #1339 TBbalance is an undocumented graph attribute that is
supposed to cause nodes to "rise" or "fall" to the minimum or maximum rank
possible.  The attached code snippet seems to repair the bug in this code.

Comment from Matthew Fernandez: I committed this, but I don’t understand enough
about the context to judge its correctness. The above is Steve’s description of
the situation.

Fixes #1339 and #1980.

3 years agoMerge branch 'smattr/59FA12C9-C832-4AC4-ACB6-D82DDDDD6148' into 'main'
Matthew Fernandez [Mon, 29 Mar 2021 00:36:26 +0000 (00:36 +0000)]
Merge branch 'smattr/59FA12C9-C832-4AC4-ACB6-D82DDDDD6148' into 'main'

fix incorrect reference counting of interned HTML strings

See merge request graphviz/graphviz!1857

3 years agomove HTML_BIT and CNT_BIT initialization to their definition
Matthew Fernandez [Sat, 20 Mar 2021 18:29:51 +0000 (11:29 -0700)]
move HTML_BIT and CNT_BIT initialization to their definition

The compiler can constant-fold these at compile time, allowing it to then
propagate these values through their uses and completely eliminate them.

3 years agofix incorrect reference counting of interned HTML strings
Matthew Fernandez [Sat, 20 Mar 2021 19:31:43 +0000 (12:31 -0700)]
fix incorrect reference counting of interned HTML strings

This typo meant that, instead of masking the reference counting bits, this check
was also including the HTML bit (bit 31). As a result, interned HTML strings
would never be freed. This was found by an introduced -Wlogical-op warning when
building an upcoming change with GCC 8.3.0.

3 years agoMerge branch 'smattr/DAA0EC73-A782-4820-A059-EF0529EB2934' into 'main'
Matthew Fernandez [Sun, 28 Mar 2021 23:58:44 +0000 (23:58 +0000)]
Merge branch 'smattr/DAA0EC73-A782-4820-A059-EF0529EB2934' into 'main'

fix: don't run pylint CI job on tags

Closes #1978

See merge request graphviz/graphviz!1860

3 years agofix: don't run pylint CI job on tags
Matthew Fernandez [Sun, 21 Mar 2021 15:58:29 +0000 (08:58 -0700)]
fix: don't run pylint CI job on tags

383ec8753b8007d26fc4f6eb51c61b6d8b71d12e added a pylint task in CI. This task is
unrestricted, so Gitlab thinks it is meant to run on tags as well as on master.
Every other task is restricted to only run on master (including the dependencies
of the pylint job) so CI now fails on tags. This change limits the lint job to
not run on tags. Fixes #1978.

3 years agoMerge branch 'smattr/db8f6c58-e183-4b46-a760-45021fce63e6' into 'main'
Matthew Fernandez [Sun, 28 Mar 2021 23:20:59 +0000 (23:20 +0000)]
Merge branch 'smattr/db8f6c58-e183-4b46-a760-45021fce63e6' into 'main'

more clean up and compiler warning removal

See merge request graphviz/graphviz!1856

3 years agoremove a strcmp micro-optimization
Matthew Fernandez [Sat, 20 Mar 2021 00:48:30 +0000 (17:48 -0700)]
remove a strcmp micro-optimization

3 years agorephrase unnecessarily cryptic bitwise operations
Matthew Fernandez [Fri, 19 Mar 2021 04:48:52 +0000 (21:48 -0700)]
rephrase unnecessarily cryptic bitwise operations

This is just doing boolean logic. Sometimes there is a motivation to use bitwise
operators in place of boolean operators to optimize hot paths that are
negatively affected by the stalling semantics of boolean shortcut logic. But
this is not the case here. This is not a hot path.

3 years agoremove commented out code
Matthew Fernandez [Fri, 19 Mar 2021 04:42:29 +0000 (21:42 -0700)]
remove commented out code

3 years agoremove some unnecessary casts
Matthew Fernandez [Fri, 19 Mar 2021 04:31:54 +0000 (21:31 -0700)]
remove some unnecessary casts

3 years agoclean up some awkward manual scoping
Matthew Fernandez [Fri, 19 Mar 2021 04:31:13 +0000 (21:31 -0700)]
clean up some awkward manual scoping

C99 lets us just declare the index scoped to the for loop itself.

3 years agoremove some unnecessary bracketing
Matthew Fernandez [Fri, 19 Mar 2021 04:25:06 +0000 (21:25 -0700)]
remove some unnecessary bracketing

3 years agoremove some useless boolean logic
Matthew Fernandez [Fri, 19 Mar 2021 04:22:57 +0000 (21:22 -0700)]
remove some useless boolean logic

3 years agoremove some commented out code
Matthew Fernandez [Fri, 19 Mar 2021 04:10:49 +0000 (21:10 -0700)]
remove some commented out code

3 years agoremove an open coded NULL
Matthew Fernandez [Fri, 19 Mar 2021 04:02:44 +0000 (21:02 -0700)]
remove an open coded NULL