]> granicus.if.org Git - graphviz/log
graphviz
2 years agoMerge branch 'emitSearchGraph-doc' into 'main'
Matthew Fernandez [Sat, 21 May 2022 23:15:52 +0000 (23:15 +0000)]
Merge branch 'emitSearchGraph-doc' into 'main'

doxygen comment for emitSearchGraph

See merge request graphviz/graphviz!2682

2 years agodoxygen comment for emitSearchGraph
Costa Shulyupin [Sat, 21 May 2022 17:01:37 +0000 (20:01 +0300)]
doxygen comment for emitSearchGraph

2 years agoMerge branch 'smattr/5d51a64e-f084-4c25-aa76-8e90509ab2f8' into 'main'
Matthew Fernandez [Sat, 21 May 2022 02:26:43 +0000 (02:26 +0000)]
Merge branch 'smattr/5d51a64e-f084-4c25-aa76-8e90509ab2f8' into 'main'

de-duplicate agxbuf implementations

See merge request graphviz/graphviz!2671

2 years agoxdot: replace unchecked allocations with cgraph alloc wrappers
Matthew Fernandez [Sun, 15 May 2022 16:40:15 +0000 (09:40 -0700)]
xdot: replace unchecked allocations with cgraph alloc wrappers

2 years agoxdot: replace inline agxbuf copy with canonical cgraph version
Matthew Fernandez [Sun, 15 May 2022 16:26:44 +0000 (09:26 -0700)]
xdot: replace inline agxbuf copy with canonical cgraph version

This de-duplicates some code, reducing ongoing maintenance. It also fixes some
int-as-size_t usage as well as some allocations that were unchecked for failure.

2 years agocgraph: inline agxbuf functions into their header
Matthew Fernandez [Sun, 15 May 2022 02:11:04 +0000 (19:11 -0700)]
cgraph: inline agxbuf functions into their header

These functions are good candidates for inlining, which can be made possible
even without Link-Time Optimization by inlining them into this header. However
the main motivation for this change is to allow using these in code that does
not link against cgraph, lib/xdot, and thereby de-duplicate some code.

This required adding explicit casts to the alloc wrapper calls because this code
is seen by the C++ compiler when compiling parts of Graphviz. We can also drop
the API macros and C linkage, as these are not relevant for symbols that are not
exported.

2 years agocgraph: make 'strdup'/'strndup' wrappers includable from C++ under Cygwin
Matthew Fernandez [Sun, 15 May 2022 05:20:02 +0000 (22:20 -0700)]
cgraph: make 'strdup'/'strndup' wrappers includable from C++ under Cygwin

2 years agocgraph: make alloc.h includable from C++
Matthew Fernandez [Sun, 15 May 2022 03:29:10 +0000 (20:29 -0700)]
cgraph: make alloc.h includable from C++

An upcoming change will result in this transitively being seen by the C++
compiler.

2 years agocgraph: realign 'agxbput_n' parameter name with its implementation
Matthew Fernandez [Sun, 15 May 2022 02:11:55 +0000 (19:11 -0700)]
cgraph: realign 'agxbput_n' parameter name with its implementation

2 years agocgraph: relocate agxb printing functions’ prototypes
Matthew Fernandez [Sun, 15 May 2022 01:54:55 +0000 (18:54 -0700)]
cgraph: relocate agxb printing functions’ prototypes

This will be relevant in an upcoming commit that inlines these implementations
into the header, needing to call `agxbmore` which previously was only prototyped
below them.

2 years agocgraph: rewrite agxbuf macros as functions
Matthew Fernandez [Sun, 15 May 2022 01:45:31 +0000 (18:45 -0700)]
cgraph: rewrite agxbuf macros as functions

This provides stronger type safety with no loss of performance. Note that this
also alters the implied type signature of `agxbuflen` to have a more appropriate
return type. This allows dropping one cast at a call site squashing another
warning.

2 years agoMerge branch 'smattr/CD17D4AB-0B18-4721-8C3B-2595CBAAF5D1' into 'main'
Matthew Fernandez [Fri, 20 May 2022 06:05:12 +0000 (06:05 +0000)]
Merge branch 'smattr/CD17D4AB-0B18-4721-8C3B-2595CBAAF5D1' into 'main'

gv2gml: remove 'outFile' parameters and shadowing

See merge request graphviz/graphviz!2669

2 years agogv2gml: remove 'outFile' parameter to 'indent'
Matthew Fernandez [Thu, 12 May 2022 04:44:01 +0000 (21:44 -0700)]
gv2gml: remove 'outFile' parameter to 'indent'

The only calls to this function pass `outFile`, an already available global that
this parameter was shadowing. This removes a -Wshadow warning.

2 years agogv2gml: remove 'outFile' parameter to 'emitInt'
Matthew Fernandez [Thu, 12 May 2022 04:42:35 +0000 (21:42 -0700)]
gv2gml: remove 'outFile' parameter to 'emitInt'

The only calls to this function pass `outFile`, an already available global that
this parameter was shadowing. This removes a -Wshadow warning.

2 years agogv2gml: remove 'outFile' parameter to 'emitReal'
Matthew Fernandez [Thu, 12 May 2022 04:41:17 +0000 (21:41 -0700)]
gv2gml: remove 'outFile' parameter to 'emitReal'

The only calls to this function pass `outFile`, an already available global that
this parameter was shadowing. This removes a -Wshadow warning.

2 years agogv2gml: remove 'outFile' parameter to 'emitPoint'
Matthew Fernandez [Thu, 12 May 2022 04:39:44 +0000 (21:39 -0700)]
gv2gml: remove 'outFile' parameter to 'emitPoint'

The only calls to this function pass `outFile`, an already available global that
this parameter was shadowing. This removes a -Wshadow warning.

2 years agogv2gml: remove 'outFile' parameter to 'emitSpline'
Matthew Fernandez [Thu, 12 May 2022 04:38:25 +0000 (21:38 -0700)]
gv2gml: remove 'outFile' parameter to 'emitSpline'

The only call to this function passes `outFile`, an already available global
that this parameter was shadowing. This removes numerous -Wshadow warnings.

2 years agogv2gml: remove 'outFile' parameter to 'emitAttr'
Matthew Fernandez [Thu, 12 May 2022 04:37:05 +0000 (21:37 -0700)]
gv2gml: remove 'outFile' parameter to 'emitAttr'

The only calls to this function pass `outFile`, an already available global that
this parameter was shadowing. This removes numerous -Wshadow warnings.

2 years agogv2gml: remove 'outFile' parameter to 'emitNodeAttrs'
Matthew Fernandez [Thu, 12 May 2022 04:31:29 +0000 (21:31 -0700)]
gv2gml: remove 'outFile' parameter to 'emitNodeAttrs'

The only call to this function passes `outFile`, an already available global
that this parameter was shadowing. This removes numerous -Wshadow warnings.

2 years agogv2gml: remove 'outFile' parameter to 'emitNode'
Matthew Fernandez [Thu, 12 May 2022 04:30:18 +0000 (21:30 -0700)]
gv2gml: remove 'outFile' parameter to 'emitNode'

The only call to this function passes `outFile`, an already available global
that this parameter was shadowing. This removes a -Wshadow warning.

2 years agogv2gml: remove 'outFile' parameter to 'emitEdgeAttrs'
Matthew Fernandez [Thu, 12 May 2022 04:28:50 +0000 (21:28 -0700)]
gv2gml: remove 'outFile' parameter to 'emitEdgeAttrs'

The only call to this function passes `outFile`, an already available global
that this parameter was shadowing. This removes numerous -Wshadow warnings.

2 years agogv2gml: remove 'outFile' parameter to 'emitEdge'
Matthew Fernandez [Thu, 12 May 2022 04:27:24 +0000 (21:27 -0700)]
gv2gml: remove 'outFile' parameter to 'emitEdge'

The only call to this function passes `outFile`, an already available global
that this parameter was shadowing. This removes numerous -Wshadow warnings.

2 years agogv2gml: remove 'outFile' parameter to 'emitGraphAttrs'
Matthew Fernandez [Thu, 12 May 2022 04:26:11 +0000 (21:26 -0700)]
gv2gml: remove 'outFile' parameter to 'emitGraphAttrs'

The only call to this function passes `outFile`, an already available global
that this parameter was shadowing. This removes a -Wshadow warning.

2 years agogv2gml: remove 'outFile' parameter to 'gv_to_gml'
Matthew Fernandez [Thu, 12 May 2022 04:24:49 +0000 (21:24 -0700)]
gv2gml: remove 'outFile' parameter to 'gv_to_gml'

The only call to this function passes `outFile`, an already available global
that this parameter was shadowing. This removes numerous -Wshadow warnings.

2 years agoMerge branch 'smattr/gitlab-1871' into 'main'
Matthew Fernandez [Fri, 20 May 2022 02:13:15 +0000 (02:13 +0000)]
Merge branch 'smattr/gitlab-1871' into 'main'

gml2gv: fix: recognize integer 'penwidth' values

Closes #1871

See merge request graphviz/graphviz!2666

2 years agogml2gv: fix: recognize integer 'penwidth' values
Matthew Fernandez [Sat, 14 May 2022 18:37:00 +0000 (11:37 -0700)]
gml2gv: fix: recognize integer 'penwidth' values

`gv2gml` would produce GML that `gml2gv` was unable to parse. The GML spec¹ is
imprecise about what is allowed, so lets be generous and assume integer values
are acceptable.

Gitlab: fixes #1871

¹ https://web.archive.org/web/20190303094704/http://www.fim.uni-passau.de:80/fileadmin/files/lehrstuhl/brandenburg/projekte/gml/gml-technical-report.pdf

2 years agoadd a test case for #1871
Matthew Fernandez [Sat, 14 May 2022 18:15:03 +0000 (11:15 -0700)]
add a test case for #1871

2 years agoMerge branch 'smattr/0850CA2D-477E-4ADF-AF6B-7FD191CAF944' into 'main'
Matthew Fernandez [Fri, 20 May 2022 01:06:21 +0000 (01:06 +0000)]
Merge branch 'smattr/0850CA2D-477E-4ADF-AF6B-7FD191CAF944' into 'main'

graphml2gv: some clean up and alloc wrapper roll out

See merge request graphviz/graphviz!2667

2 years agographml2gv: read XML input in chunks of 'BUFSIZ'
Matthew Fernandez [Mon, 9 May 2022 00:14:13 +0000 (17:14 -0700)]
graphml2gv: read XML input in chunks of 'BUFSIZ'

The C standard library’s stdio exposes a value for the optimal chunk size for
I/O. So use this instead of our arbitrarily chosen alternative.

2 years agographml2gv: undo micro-optimization in 'endElementHandler'
Matthew Fernandez [Mon, 9 May 2022 00:10:48 +0000 (17:10 -0700)]
graphml2gv: undo micro-optimization in 'endElementHandler'

This code was deciding between using a static stack buffer and a dynamic heap
buffer depending on the length of the string it needed to deal with. This kind
of optimization is unnecessary on modern platforms with performant allocators.
The branching and structure duplication involved in this is often now a
_de-optimization_ instead of the intended optimization.

This commit undoes this trick and instead unconditionally uses heap allocation.

2 years agographml2gv: replace 'NEW' with 'gv_alloc'
Matthew Fernandez [Mon, 9 May 2022 00:04:58 +0000 (17:04 -0700)]
graphml2gv: replace 'NEW' with 'gv_alloc'

This fixes some instances of allocations that were unchecked for failure.

2 years agographml2gv: replace 'N_NEW' with 'gv_calloc'
Matthew Fernandez [Mon, 9 May 2022 00:02:48 +0000 (17:02 -0700)]
graphml2gv: replace 'N_NEW' with 'gv_calloc'

This fixes some instances of allocations that were unchecked for failure.

2 years agographml2gv: abbreviate an open coded 'strcat'
Matthew Fernandez [Sun, 8 May 2022 23:59:16 +0000 (16:59 -0700)]
graphml2gv: abbreviate an open coded 'strcat'

2 years agoMerge branch 'conditional-demo-install' into 'main'
Matthew Fernandez [Sun, 15 May 2022 16:45:19 +0000 (16:45 +0000)]
Merge branch 'conditional-demo-install' into 'main'

Add option for disabling/customizing of demos

See merge request graphviz/graphviz!2668

2 years agoAdd option for disabling/customizing of demos
David Seifert [Sat, 14 May 2022 22:50:04 +0000 (00:50 +0200)]
Add option for disabling/customizing of demos

* Many distros have different directories for where to
  install example files to. Gentoo installs them under
  `$(docdir)/examples`. With `--without-demos`, we can suppress
  installation of the demos altogether.

2 years agoMerge branch 'minor-cleanup-in-common' into 'main'
Magnus Jacobsson [Sun, 15 May 2022 07:58:02 +0000 (07:58 +0000)]
Merge branch 'minor-cleanup-in-common' into 'main'

Minor cleanup in common

See merge request graphviz/graphviz!2650

2 years agotaper: correct data type in comment
Magnus Jacobsson [Mon, 18 Apr 2022 07:03:31 +0000 (09:03 +0200)]
taper: correct data type in comment

2 years agoarrowStartClip: remove unnecessary use of the comma operator
Magnus Jacobsson [Sun, 17 Apr 2022 17:01:14 +0000 (19:01 +0200)]
arrowStartClip: remove unnecessary use of the comma operator

2 years agoarrowEndClip: remove unnecessary use of the comma operator
Magnus Jacobsson [Sun, 17 Apr 2022 17:00:55 +0000 (19:00 +0200)]
arrowEndClip: remove unnecessary use of the comma operator

2 years agoclip_and_install: fix misindentation
Magnus Jacobsson [Sun, 17 Apr 2022 12:17:07 +0000 (14:17 +0200)]
clip_and_install: fix misindentation

2 years agoMerge branch 'smattr/3E341EA7-F157-45F6-86CB-64B42C89EE70' into 'main'
Matthew Fernandez [Sat, 14 May 2022 22:38:29 +0000 (22:38 +0000)]
Merge branch 'smattr/3E341EA7-F157-45F6-86CB-64B42C89EE70' into 'main'

gvgen: squash compiler warnings in graph_generator.c

See merge request graphviz/graphviz!2663

2 years agogvgen: remove unnecessary parens
Matthew Fernandez [Tue, 10 May 2022 01:39:32 +0000 (18:39 -0700)]
gvgen: remove unnecessary parens

2 years agogvgen: inline some power-of-2 computations into one liners
Matthew Fernandez [Tue, 10 May 2022 01:32:30 +0000 (18:32 -0700)]
gvgen: inline some power-of-2 computations into one liners

2 years agogvgen: consistently use 'int' in 'makeBinaryTree'
Matthew Fernandez [Tue, 10 May 2022 01:30:56 +0000 (18:30 -0700)]
gvgen: consistently use 'int' in 'makeBinaryTree'

These variables and numerous others in `gvgen` should probably be using
`size_t`. But everywhere else is using `int` currently, so this change at least
makes things consistent and squashes five -Wsign-conversion warnings.

2 years agogvgen: remove parameter to 'readPos' that is always 1
Matthew Fernandez [Tue, 10 May 2022 01:30:14 +0000 (18:30 -0700)]
gvgen: remove parameter to 'readPos' that is always 1

2 years agogvgen: abbreviate setting 'type' in 'makeRandom'
Matthew Fernandez [Tue, 10 May 2022 01:20:01 +0000 (18:20 -0700)]
gvgen: abbreviate setting 'type' in 'makeRandom'

2 years agoMerge branch 'smattr/35D73C8A-9B3B-4DEF-8B7A-DC3015994249' into 'main'
Matthew Fernandez [Sat, 14 May 2022 20:46:17 +0000 (20:46 +0000)]
Merge branch 'smattr/35D73C8A-9B3B-4DEF-8B7A-DC3015994249' into 'main'

gml2gv: silence a -Wimplicit-fallthrough warning

See merge request graphviz/graphviz!2664

2 years agogml2gv: silence a -Wimplicit-fallthrough warning
Matthew Fernandez [Thu, 12 May 2022 04:03:10 +0000 (21:03 -0700)]
gml2gv: silence a -Wimplicit-fallthrough warning

All paths in this case end in a call to `exit`. But the compiler is apparently
unable to determine this, so use an explicit `break` to suppress a false
positive warning.

2 years agoMerge branch 'smattr/AA0A9CEA-253F-4EBA-BC44-E90796B74DFD' into 'main'
Matthew Fernandez [Sat, 14 May 2022 19:36:26 +0000 (19:36 +0000)]
Merge branch 'smattr/AA0A9CEA-253F-4EBA-BC44-E90796B74DFD' into 'main'

mm2gv: squash -Wconversion warnings for 'tolower' usage

See merge request graphviz/graphviz!2662

2 years agomm2gv: squash -Wconversion warnings for 'tolower' usage
Matthew Fernandez [Mon, 9 May 2022 02:30:23 +0000 (19:30 -0700)]
mm2gv: squash -Wconversion warnings for 'tolower' usage

For historical reasons, C functions/macros like `tolower` are specified to take
and return an `int`. This means sometimes one set of pedantic compilers (MinGW
with -Wconversion) complains about passing `char` values into these ctype.h
interfaces and another set of pedantic compilers (GCC with -Wconversion)
complains about coercing the result into a `char`. This change suppresses both
of these false positives.

2 years agoMerge branch 'qmake-detection' into 'main'
Matthew Fernandez [Sat, 14 May 2022 18:28:39 +0000 (18:28 +0000)]
Merge branch 'qmake-detection' into 'main'

Augment QMAKE detection

See merge request graphviz/graphviz!2660

2 years agoAugment QMAKE detection
David Seifert [Sat, 14 May 2022 17:40:31 +0000 (19:40 +0200)]
Augment QMAKE detection

* Many distros (Gentoo included) version qmake nowadays. For Qt 6,
  The Qt Company has decided to use `qmake6` for versioning, and
  many distros have followed this and used the same approach for Qt 5.

2 years agoMerge branch 'smattr/102AAE2A-9760-4007-8C25-9519DC274095' into 'main'
Matthew Fernandez [Sat, 14 May 2022 17:34:23 +0000 (17:34 +0000)]
Merge branch 'smattr/102AAE2A-9760-4007-8C25-9519DC274095' into 'main'

edgepaint: remove unused 'nnodes' in 'node_distinct_coloring'

See merge request graphviz/graphviz!2665

2 years agosfdpgen: squash -Wunused warnings for 'nsuper_avg'
Matthew Fernandez [Sat, 14 May 2022 03:55:32 +0000 (20:55 -0700)]
sfdpgen: squash -Wunused warnings for 'nsuper_avg'

These are currently failing the macOS CMake build in CI.

2 years agoneatogen: remove unused 'total_gap' in 'constrained_majorization_new_with_gaps'
Matthew Fernandez [Sat, 14 May 2022 02:31:41 +0000 (19:31 -0700)]
neatogen: remove unused 'total_gap' in 'constrained_majorization_new_with_gaps'

The CMake macOS CI job has begun erroring out:

  …/lib/neatogen/quad_prog_solve.c:602:11: error: variable 'total_gap' set but
    not used [-Werror,-Wunused-but-set-variable]
    float total_gap, target_place;
          ^

While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.

2 years agomingle: remove unused 'len_total' in 'pedge_export_gv'
Matthew Fernandez [Sat, 14 May 2022 00:01:26 +0000 (17:01 -0700)]
mingle: remove unused 'len_total' in 'pedge_export_gv'

The CMake macOS CI job has begun erroring out:

  …/lib/mingle/edge_bundling.cpp:208:27: error: variable 'len_total' set but not
    used [-Werror,-Wunused-but-set-variable]
    double maxwgt = 0, len, len_total, len_total0;
                            ^

While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.

2 years agomingle: remove unused 'total_wgt' in 'agglomerative_ink_bundling_internal'
Matthew Fernandez [Fri, 13 May 2022 15:04:07 +0000 (08:04 -0700)]
mingle: remove unused 'total_wgt' in 'agglomerative_ink_bundling_internal'

The CMake macOS CI job has begun erroring out:

  …/lib/mingle/agglomerative_bundling.cpp:400:27: error: variable 'total_wgt'
    set but not used [-Werror,-Wunused-but-set-variable]
  double eps = 0., wgt, total_wgt = 0;
                        ^

While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.

2 years agoedgepaint: remove unused 'nnodes' in 'node_distinct_coloring'
Matthew Fernandez [Fri, 13 May 2022 13:49:46 +0000 (06:49 -0700)]
edgepaint: remove unused 'nnodes' in 'node_distinct_coloring'

The CMake macOS CI job has begun erroring out:

  …/lib/edgepaint/node_distinct_coloring.c:204:17: error: variable 'nnodes'
    set but not used [-Werror,-Wunused-but-set-variable]
  int i, j, jj, nnodes = 0;
                ^

While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.

2 years agoMerge branch 'smattr/EE3BD42E-42C7-4AA3-A03E-1E4F0CEEDA39' into 'main'
Matthew Fernandez [Thu, 12 May 2022 03:50:30 +0000 (03:50 +0000)]
Merge branch 'smattr/EE3BD42E-42C7-4AA3-A03E-1E4F0CEEDA39' into 'main'

tclpkg: squash some compiler warnings

See merge request graphviz/graphviz!2655

2 years agotclpkg: remove unnecessary explicit dereference and parens on function pointer
Matthew Fernandez [Fri, 6 May 2022 00:37:30 +0000 (17:37 -0700)]
tclpkg: remove unnecessary explicit dereference and parens on function pointer

The compiler already knows how to dereference and call through a function
pointer without needing explicit instruction.

2 years agotclpkg: remove unnecessary line wrapping
Matthew Fernandez [Fri, 6 May 2022 00:37:19 +0000 (17:37 -0700)]
tclpkg: remove unnecessary line wrapping

2 years agotclpkg: squash -Wunused-parameter warnings in commands
Matthew Fernandez [Fri, 6 May 2022 00:28:02 +0000 (17:28 -0700)]
tclpkg: squash -Wunused-parameter warnings in commands

These functions are used as callback so need to conform to a particular type
signature.

2 years agotclpkg: mark 'gdCmd' static
Matthew Fernandez [Fri, 6 May 2022 00:21:52 +0000 (17:21 -0700)]
tclpkg: mark 'gdCmd' static

This function is not used outside of its containing file.

2 years agoMerge branch 'smattr/A26FCACA-4EE0-449E-A1C6-9BF2D60F49B8' into 'main'
Matthew Fernandez [Thu, 12 May 2022 02:22:04 +0000 (02:22 +0000)]
Merge branch 'smattr/A26FCACA-4EE0-449E-A1C6-9BF2D60F49B8' into 'main'

neatogen: remove unused randomkit code

See merge request graphviz/graphviz!2658

2 years agoneatogen: remove unused 'rk_state' members
Matthew Fernandez [Fri, 6 May 2022 01:34:13 +0000 (18:34 -0700)]
neatogen: remove unused 'rk_state' members

2 years agoneatogen: remove unused 'rk_strerror' and 'rk_error'
Matthew Fernandez [Fri, 6 May 2022 01:29:37 +0000 (18:29 -0700)]
neatogen: remove unused 'rk_strerror' and 'rk_error'

These do _not_ appear to be the errors returned by randomkit.c at all.

2 years agoneatogen: remove unused 'rk_long'
Matthew Fernandez [Fri, 6 May 2022 01:26:30 +0000 (18:26 -0700)]
neatogen: remove unused 'rk_long'

2 years agoneatogen: remove unused 'rk_double'
Matthew Fernandez [Fri, 6 May 2022 01:25:20 +0000 (18:25 -0700)]
neatogen: remove unused 'rk_double'

2 years agoMerge branch 'smattr/CA30E255-C16A-426F-BEE2-05B541F3546F' into 'main'
Matthew Fernandez [Wed, 11 May 2022 17:06:21 +0000 (17:06 +0000)]
Merge branch 'smattr/CA30E255-C16A-426F-BEE2-05B541F3546F' into 'main'

only append 'generic' TCL include path to 'TCL_INCLUDES' if it exists

See merge request graphviz/graphviz!2656

2 years agoonly append 'generic' TCL include path to 'TCL_INCLUDES' if it exists
Matthew Fernandez [Fri, 6 May 2022 00:17:11 +0000 (17:17 -0700)]
only append 'generic' TCL include path to 'TCL_INCLUDES' if it exists

Squashes numerous -Wmissing-include-dirs compilation warnings.

2 years agoMerge branch 'smattr/D01C105D-5B09-45D9-9130-AE2DEF972D96' into 'main'
Matthew Fernandez [Wed, 11 May 2022 14:22:13 +0000 (14:22 +0000)]
Merge branch 'smattr/D01C105D-5B09-45D9-9130-AE2DEF972D96' into 'main'

unify tests/ and rtest/

See merge request graphviz/graphviz!2652

2 years agoMerge branch 'smattr/7F4532A1-7289-4917-A936-D7D27DE1AE1C' into 'main'
Matthew Fernandez [Wed, 11 May 2022 06:47:19 +0000 (06:47 +0000)]
Merge branch 'smattr/7F4532A1-7289-4917-A936-D7D27DE1AE1C' into 'main'

cgraph: fix 'gv_recalloc' bugs, replace unchecked allocations in agxbuf

See merge request graphviz/graphviz!2645

2 years agocgraph: abbreviate 'agxbdisown' string duplication to 'strdup'
Matthew Fernandez [Sat, 30 Apr 2022 23:57:37 +0000 (16:57 -0700)]
cgraph: abbreviate 'agxbdisown' string duplication to 'strdup'

2 years agocgraph: replace unchecked agxbuf allocations with alloc helpers
Matthew Fernandez [Sat, 30 Apr 2022 23:44:22 +0000 (16:44 -0700)]
cgraph: replace unchecked agxbuf allocations with alloc helpers

These allocations are at the core of some work Graphviz does and were not
checked for failure. This change swaps confusing crashes on out-of-memory for a
more graceful exit.

2 years agocgraph: fix overflow check in 'gv_recalloc'
Matthew Fernandez [Sun, 1 May 2022 01:16:34 +0000 (18:16 -0700)]
cgraph: fix overflow check in 'gv_recalloc'

2 years agocgraph: fix incorrect 'gv_recalloc' assertion
Matthew Fernandez [Sun, 1 May 2022 01:13:17 +0000 (18:13 -0700)]
cgraph: fix incorrect 'gv_recalloc' assertion

The assertion here was claiming that overflow _did_ occur when computing the
extent of the previous allocation rather than the reverse.

2 years agoMerge branch 'smattr/8283DE76-A9BE-42CF-A132-6BE3EAE609A8' into 'main'
Matthew Fernandez [Wed, 11 May 2022 05:15:14 +0000 (05:15 +0000)]
Merge branch 'smattr/8283DE76-A9BE-42CF-A132-6BE3EAE609A8' into 'main'

smyrna: squash some warnings in 'set_boundaries'

See merge request graphviz/graphviz!2654

2 years agosmyrna: simplify bounding box calculation in 'set_boundaries'
Matthew Fernandez [Thu, 5 May 2022 15:32:35 +0000 (08:32 -0700)]
smyrna: simplify bounding box calculation in 'set_boundaries'

2 years agosmyrna: squash -Wmaybe-uninitialized warnings in 'set_boundaries'
Matthew Fernandez [Thu, 5 May 2022 15:33:16 +0000 (08:33 -0700)]
smyrna: squash -Wmaybe-uninitialized warnings in 'set_boundaries'

This code is assuming there is at least one point to scan in the loop. In case
there is not (and to pacify the compiler) set an initial trivial bounding box.

2 years agoMerge branch 'smattr/2D6B3C0D-DD2F-44EA-B81B-9B1FA5B0E582' into 'main'
Matthew Fernandez [Wed, 11 May 2022 03:11:56 +0000 (03:11 +0000)]
Merge branch 'smattr/2D6B3C0D-DD2F-44EA-B81B-9B1FA5B0E582' into 'main'

some glcomp and smyrna clean up

See merge request graphviz/graphviz!2651

2 years agosmyrna: abbreviate some 'GLfloat' literals
Matthew Fernandez [Wed, 4 May 2022 15:49:33 +0000 (08:49 -0700)]
smyrna: abbreviate some 'GLfloat' literals

The `GLfloat` type is a 32-bit IEEE-754 floating point value¹ which is identical
to what the C `float` type provides on all supported platforms.

¹ https://www.khronos.org/opengl/wiki/OpenGL_Type

2 years agoglcomp: remove unused 'fontset_t'
Matthew Fernandez [Wed, 4 May 2022 15:47:07 +0000 (08:47 -0700)]
glcomp: remove unused 'fontset_t'

2 years agoglcomp: remove unnecessary 'GLfloat' casts
Matthew Fernandez [Wed, 4 May 2022 15:45:57 +0000 (08:45 -0700)]
glcomp: remove unnecessary 'GLfloat' casts

These values are already `GLfloat`s.

2 years agoglcomp: remove unused 'glCompPoly.hotKey'
Matthew Fernandez [Wed, 4 May 2022 15:42:56 +0000 (08:42 -0700)]
glcomp: remove unused 'glCompPoly.hotKey'

2 years agoglcomp: remove unused 'glCompPointI'
Matthew Fernandez [Wed, 4 May 2022 15:41:55 +0000 (08:41 -0700)]
glcomp: remove unused 'glCompPointI'

2 years agoMerge branch 'smattr/AEF4FE91-97F2-4976-9CA4-B5766149054C' into 'main'
Matthew Fernandez [Wed, 11 May 2022 00:01:12 +0000 (00:01 +0000)]
Merge branch 'smattr/AEF4FE91-97F2-4976-9CA4-B5766149054C' into 'main'

CI: attempt to fix Gitlab 'cobertura' removal

Closes #2236

See merge request graphviz/graphviz!2659

2 years agoCI: attempt to fix Gitlab 'cobertura' removal
Matthew Fernandez [Fri, 6 May 2022 14:38:51 +0000 (07:38 -0700)]
CI: attempt to fix Gitlab 'cobertura' removal

The `cobertura` keyword was deprecated in March¹ and then completely removed on
2022-05-05,² causing all CI pipelines to now fail. This is an attempt to migrate
to the new syntax. More details in
https://gitlab.com/gitlab-org/gitlab/-/issues/361615.

Gitlab: Fixes #2236

¹ https://gitlab.com/gitlab-org/gitlab/-/commit/eae7dfc843783e270607d71c6db0c1ab6a52a8d1
² https://gitlab.com/gitlab-org/gitlab/-/commit/812408bafae328b81652110fc53c6c6b89e3db81#62c40d79aabcb1ce977904c9c748b08045ff0a85

2 years agoMerge branch 'maze-doc' into 'main'
Matthew Fernandez [Thu, 5 May 2022 05:34:58 +0000 (05:34 +0000)]
Merge branch 'maze-doc' into 'main'

add doxygen comments maze.h

See merge request graphviz/graphviz!2638

2 years agoadd comments to struct maze
Costa Shulyupin [Tue, 26 Apr 2022 05:20:29 +0000 (08:20 +0300)]
add comments to struct maze

The ordered sets are created by `dtopen` with descriptor `chanItemDisc`
and method `Dtoset`.

The method is defined with

 #define DT_OSET         0000004 /* ordered set (self-adjusting tree)    */

Channels are added with function `addChan` and are retrieved by `chanSearch`

2 years agoconvert comments to doxygen format in struct maze
Costa Shulyupin [Tue, 26 Apr 2022 05:10:04 +0000 (08:10 +0300)]
convert comments to doxygen format in struct maze

2 years agocomment for struct maze
Costa Shulyupin [Tue, 26 Apr 2022 05:09:14 +0000 (08:09 +0300)]
comment for struct maze

2 years agodoxygen comment for maze cell sides
Costa Shulyupin [Tue, 26 Apr 2022 04:45:56 +0000 (07:45 +0300)]
doxygen comment for maze cell sides

2 years agocomment for maze cell
Costa Shulyupin [Tue, 26 Apr 2022 04:40:19 +0000 (07:40 +0300)]
comment for maze cell

2 years agoconvert comments to doxygen format in maze.h
Costa Shulyupin [Tue, 26 Apr 2022 04:32:01 +0000 (07:32 +0300)]
convert comments to doxygen format in maze.h

2 years agodoxygen comment for maze.h
Costa Shulyupin [Tue, 26 Apr 2022 04:28:12 +0000 (07:28 +0300)]
doxygen comment for maze.h

2 years agoremove duplicate .gitignore line
Matthew Fernandez [Thu, 5 May 2022 02:33:04 +0000 (19:33 -0700)]
remove duplicate .gitignore line

2 years agounify tests/ and rtest/
Matthew Fernandez [Thu, 5 May 2022 02:27:04 +0000 (19:27 -0700)]
unify tests/ and rtest/

For a long time, there has been confusion in the source tree with tests/ and
rtest/ each containing part of the test suite. These were initially distinct,
but over time files in tests/ have begun importing or referring to sources in
rtest/. This has been a common point of confusion for newcomers to the project:
tests/ is the logical place the test suite should live, so they run that, but
then discover it is not the full test suite.

The diff for this commit is large, so it is challenging to see that it is not a
complex change:

  1. Merge rtest/Makefile.am into tests/Makefile.am

  2. `git mv rtest/* tests/*`

  3. Adjust all Pytest invocations from `… ci/tests.py rtest tests` to
     `… ci/tests.py tests`

  4. Adjust all other references to rtest/ to tests/ (e.g. .gitignore)

Now seems to be a brief period of calm when edits to the test suite are not
in-flight, so we have less chance of a painful merge conflict. The problem of a
large part of the rtest/rtest.py suite being disabled remains and is not
affected by this commit.

2 years agoMerge branch 'vec-delete' into 'main'
Matthew Fernandez [Thu, 5 May 2022 00:58:45 +0000 (00:58 +0000)]
Merge branch 'vec-delete' into 'main'

Fix unintended recursion in vec_delete

Closes #2225

See merge request graphviz/graphviz!2572

2 years agoAdd changelog entry summarizing the fix for #2225
Mark Hansen [Fri, 8 Apr 2022 21:23:58 +0000 (07:23 +1000)]
Add changelog entry summarizing the fix for #2225

2 years agoRemove unintended recursion in vec_delete.
Mark Hansen [Fri, 8 Apr 2022 07:35:55 +0000 (17:35 +1000)]
Remove unintended recursion in vec_delete.

This prevents a segfault: Fixes #2225.

Add a little more documentation around the responsibilities of callers
to make this a little less likely to happen again.

I thought about calling this vec_vec_delete but went with cycles_delete;
the only place this is used is for cycles.

This effectively reverts c4ef19f483d577a8395a1a1f9ca5a321af3472b5,
and fixes that commit's memory leak in a different way.