]> granicus.if.org Git - graphviz/log
graphviz
2 years agofix integer overflow in ordering function
Matthew Fernandez [Sun, 19 Jun 2022 21:38:37 +0000 (14:38 -0700)]
fix integer overflow in ordering function

The test case for #1906 triggers an overflow in this function, viewable with
UBSan:

  $ dot -Kirco -Tgv -o /dev/null tests/graphs/root.gv
  /builds/graphviz/graphviz/lib/label/xlabels.c:35:15: runtime error: signed
    integer overflow: -1884993080 - 1219985688 cannot be represented in type
    'int'

Gitlab: #1906

2 years agoCI: include a stack trace on UBSan failures
Matthew Fernandez [Sun, 19 Jun 2022 21:14:54 +0000 (14:14 -0700)]
CI: include a stack trace on UBSan failures

2 years agoCI: manage ASan, UBSan enabling through env instead of 'use_sanitizers'
Matthew Fernandez [Sun, 19 Jun 2022 05:00:09 +0000 (22:00 -0700)]
CI: manage ASan, UBSan enabling through env instead of 'use_sanitizers'

This will allow us more precise control over compiler flags. Managing these
through CMake settings is challenging when enabling these is toolchain dependent
(e.g. the existing `use_sanitizers` option does not work with MSVC) and
operating system dependent (e.g. ASan leak detection is enabled by default on
Linux but not on macOS).

Gitlab: #2200

2 years agoMerge branch 'smattr/gitlab-827' into 'main'
Matthew Fernandez [Thu, 23 Jun 2022 04:59:21 +0000 (04:59 +0000)]
Merge branch 'smattr/gitlab-827' into 'main'

fix: anticipate non-normal edges during path construction

Closes #827

See merge request graphviz/graphviz!2719

2 years agofix: anticipate non-normal edges during path construction
Matthew Fernandez [Sat, 18 Jun 2022 22:23:41 +0000 (15:23 -0700)]
fix: anticipate non-normal edges during path construction

When constructing a path, the `beginpath` and `endpath` functions assumed they
could follow a chain of `.to_orig` back pointers to eventually reach a normal
edge. However this is not necessarily true, a situation exemplified by
tests/graphs/b15.gv that caused these traversal loops to eventually reach the
start of this linked list and then dereference a null pointer.

The fix in this commit is to simply treat the head of the list as the original
edge if we have not encountered a normal edge before then. Whether this is
correct or not seems unimportant, as a graph that causes this scenario is
incorrect. This change turns a crash during path construction into a graceful
exit later when the lack of normal edges is discovered.

This fix has similarities with 84e468e775e1d1b293624f1c8e70c226eb4a6e41. Perhaps
the code base should be audited for all such traversal loops, which seem to have
been written prior to a time when constructing a non-normal-edge-containing list
became possible.

Gitlab: fixes #827

2 years agobeginpath: remove an unnecessary cast
Matthew Fernandez [Sat, 18 Jun 2022 22:22:52 +0000 (15:22 -0700)]
beginpath: remove an unnecessary cast

2 years agoendpath: remove parens and dereferences of function pointer
Matthew Fernandez [Sat, 18 Jun 2022 22:22:01 +0000 (15:22 -0700)]
endpath: remove parens and dereferences of function pointer

The compiler knows how to do this without needing to be explicitly told.

2 years agobeginpath: remove parens and dereferences of function pointer
Matthew Fernandez [Sat, 18 Jun 2022 22:21:26 +0000 (15:21 -0700)]
beginpath: remove parens and dereferences of function pointer

The compiler knows how to do this without needing to be explicitly told.

2 years agomake_regular_edge: remove some unnecessary parens
Matthew Fernandez [Sat, 18 Jun 2022 22:21:01 +0000 (15:21 -0700)]
make_regular_edge: remove some unnecessary parens

2 years agoadd a test case for b15.gv crash
Matthew Fernandez [Sat, 18 Jun 2022 22:05:05 +0000 (15:05 -0700)]
add a test case for b15.gv crash

Unfortunately the xfail in this commit cannot be marked `strict=True` because
the ASan CI job turns the deterministic crash of this test case into a
`exit(1)`.

Gitlab: #827

2 years agoMerge branch 'smattr/gitlab-1285' into 'main'
Matthew Fernandez [Wed, 22 Jun 2022 04:40:47 +0000 (04:40 +0000)]
Merge branch 'smattr/gitlab-1285' into 'main'

fix: use '-module -avoid-version' when compiling TCL packages

Closes #1285

See merge request graphviz/graphviz!2718

2 years agofix: use '-module -avoid-version' when compiling TCL packages
Matthew Fernandez [Fri, 17 Jun 2022 03:36:56 +0000 (20:36 -0700)]
fix: use '-module -avoid-version' when compiling TCL packages

Quoting from #1285:

  They are runtime loadable (dlopen, or equivalent, from tcl program, via
  'load') rather than shared libraries for dynamic linking by others. On OS X,
  these two concepts have different extensions (.so vs .dylib). It's confusing
  when a runtime-loadable module has a dynamic-linker extension. In commit
  40123aedcd2761e98d8c9917be6040ea6187c97f, the -module flag was added to
  LDFLAGS in tclpkg/gv/Makefile.am, which fixes libgv_tcl.
  Could the same change be applied to the other tclpkg/*/Makefile.am LDFLAGS?

Gitlab: fixes #1285
Suggested-by: Daniel Macks
2 years agoMerge branch 'smattr/gitlab-146' into 'main'
Matthew Fernandez [Wed, 22 Jun 2022 03:03:08 +0000 (03:03 +0000)]
Merge branch 'smattr/gitlab-146' into 'main'

fix: in SVG output, set opacity 0 for text with 0 alpha value

Closes #146

See merge request graphviz/graphviz!2717

2 years agofix: in SVG output, set opacity 0 for text with 0 alpha value
Matthew Fernandez [Fri, 17 Jun 2022 00:32:08 +0000 (17:32 -0700)]
fix: in SVG output, set opacity 0 for text with 0 alpha value

Gitlab: fixes #146

2 years agoadd a test case for lacking transparency in SVG text
Matthew Fernandez [Fri, 17 Jun 2022 00:20:10 +0000 (17:20 -0700)]
add a test case for lacking transparency in SVG text

Gitlab: #146

2 years agoMerge branch 'smattr/gitlab-1979' into 'main'
Matthew Fernandez [Wed, 22 Jun 2022 01:51:24 +0000 (01:51 +0000)]
Merge branch 'smattr/gitlab-1979' into 'main'

fix: include Windows links in deployment-produced JSON

Closes #1979

See merge request graphviz/graphviz!2720

2 years agofix: include Windows links in deployment-produced JSON
Matthew Fernandez [Sun, 19 Jun 2022 04:06:23 +0000 (21:06 -0700)]
fix: include Windows links in deployment-produced JSON

This is a second attempt at 6117abe680037824d134149b0de42f589fb24466. It seems
the previous attempt did not account for the fact that the source path of an
artifact has not yet been safely escaped into a filename and contains directory
separators (`/`). This change was made by studying the last deploy.py execution
logs and making a best guess. There is no easy way to test this other than
running the release deployment process, so we should do one soon to validate
this.

Gitlab: fixes #1979 (I hope)

2 years agoCI: abbreviate chmod during deployment
Matthew Fernandez [Sun, 19 Jun 2022 03:58:17 +0000 (20:58 -0700)]
CI: abbreviate chmod during deployment

2 years agoMerge branch 'smattr/3e19ec8a-a29e-485f-b185-64f7fb406302' into 'main'
Matthew Fernandez [Wed, 22 Jun 2022 00:52:41 +0000 (00:52 +0000)]
Merge branch 'smattr/3e19ec8a-a29e-485f-b185-64f7fb406302' into 'main'

avoid dynamic allocation of token buffer during style parsing

See merge request graphviz/graphviz!2721

2 years agodefault_pencolor: use 'size_t' when representing the length of strings
Matthew Fernandez [Sun, 19 Jun 2022 17:32:52 +0000 (10:32 -0700)]
default_pencolor: use 'size_t' when representing the length of strings

Squashes 3 -Wconversion compiler warnings.

2 years agodefault_pencolor: fix comment typo
Matthew Fernandez [Sun, 19 Jun 2022 17:30:01 +0000 (10:30 -0700)]
default_pencolor: fix comment typo

2 years agoemit_xdot: squash a -Wswitch-default warning
Matthew Fernandez [Sun, 19 Jun 2022 17:28:16 +0000 (10:28 -0700)]
emit_xdot: squash a -Wswitch-default warning

This switch is exhaustive.

2 years agoselectedLayer: rephrase a switch into if-else
Matthew Fernandez [Sun, 19 Jun 2022 17:24:19 +0000 (10:24 -0700)]
selectedLayer: rephrase a switch into if-else

This is easier to understand, less code, and squashes a -Wswitch-default
compiler warning.

2 years agocommon: squash 2 -Wundef compiler warnings
Matthew Fernandez [Sun, 19 Jun 2022 17:08:54 +0000 (10:08 -0700)]
common: squash 2 -Wundef compiler warnings

2 years agoavoid dynamic allocation of token buffer during style parsing
Matthew Fernandez [Sun, 19 Jun 2022 16:54:29 +0000 (09:54 -0700)]
avoid dynamic allocation of token buffer during style parsing

The style parsing code repeatedly calls `style_token` to tokenize input. It was
extracting the token into a dynamic buffer, `xb`. However, this is unnecessary.
Instead we can yield tokens as base and offset into the original input string,
avoiding heap allocation altogether.

It is possible this approach could be pushed “outwards,” applying the same
optimization to construction of the style itself that is returned by
`parse_style`. This would remove what the leading comment describes as “one of
the worst internal designs in graphviz.” However, this would be an API break,
and a pretty subtle one. The style buffer of `'\0'` separated strings is
available to plugins and applications in the GVC `.rawstyle` field. Altering
how this field represents the style could lead to uncaught and confusing
downstream problems. If this kind of change is done in future, I would recommend
renaming the field entirely to make any external uses break loudly at
compilation time.

2 years agoMerge branch 'smattr/20D1B54B-E878-4154-B54F-D1EC764E5FEF' into 'main'
Magnus Jacobsson [Sat, 18 Jun 2022 15:40:19 +0000 (15:40 +0000)]
Merge branch 'smattr/20D1B54B-E878-4154-B54F-D1EC764E5FEF' into 'main'

label: dead code clean up

See merge request graphviz/graphviz!2708

2 years agolabel: remove unused 'METHODS'
Matthew Fernandez [Sat, 7 May 2022 18:17:33 +0000 (11:17 -0700)]
label: remove unused 'METHODS'

2 years agolabel: remove unused 'ListNode_t'
Matthew Fernandez [Sat, 7 May 2022 18:15:11 +0000 (11:15 -0700)]
label: remove unused 'ListNode_t'

2 years agolabel: remove unused 'RTree' timing members
Matthew Fernandez [Sat, 7 May 2022 18:13:56 +0000 (11:13 -0700)]
label: remove unused 'RTree' timing members

2 years agolabel: remove unused 'rtp' parameter to 'RTreeNewIndex'
Matthew Fernandez [Sat, 28 May 2022 17:31:54 +0000 (10:31 -0700)]
label: remove unused 'rtp' parameter to 'RTreeNewIndex'

2 years agolabel: remove unused 'rtp' parameter to 'RTreeNewNode'
Matthew Fernandez [Sat, 28 May 2022 17:30:24 +0000 (10:30 -0700)]
label: remove unused 'rtp' parameter to 'RTreeNewNode'

2 years agolabel: remove unused 'RTree' statistics
Matthew Fernandez [Sat, 7 May 2022 18:11:55 +0000 (11:11 -0700)]
label: remove unused 'RTree' statistics

The documentation for this was also inaccurate; `SeTouchCount` was manipulated
even when `StatFlag` was unsett.

2 years agolabel: remove unused 'RTree.Deleting'
Matthew Fernandez [Sat, 7 May 2022 18:06:02 +0000 (11:06 -0700)]
label: remove unused 'RTree.Deleting'

2 years agolabel: remove unused 'RTree.*LeafCount' tracking
Matthew Fernandez [Sat, 7 May 2022 18:03:16 +0000 (11:03 -0700)]
label: remove unused 'RTree.*LeafCount' tracking

2 years agolabel: remove now unused 'RTreeFreeNode'
Matthew Fernandez [Sat, 7 May 2022 18:01:41 +0000 (11:01 -0700)]
label: remove now unused 'RTreeFreeNode'

2 years agolabel: remove unused 'RTreeDelete'
Matthew Fernandez [Sat, 7 May 2022 17:59:40 +0000 (10:59 -0700)]
label: remove unused 'RTreeDelete'

2 years agoMerge branch 'smattr/159E7054-9634-48DB-B9A0-C3F5FBCD8382' into 'main'
Matthew Fernandez [Thu, 16 Jun 2022 15:51:04 +0000 (15:51 +0000)]
Merge branch 'smattr/159E7054-9634-48DB-B9A0-C3F5FBCD8382' into 'main'

CI: remove Fedora 34 jobs

See merge request graphviz/graphviz!2716

2 years agoCI: remove Fedora 34 jobs
Matthew Fernandez [Sat, 11 Jun 2022 20:21:31 +0000 (13:21 -0700)]
CI: remove Fedora 34 jobs

Fedora 34 was EOLed on 2022-06-07.¹

¹ https://docs.fedoraproject.org/en-US/releases/eol/

2 years agoMerge branch 'smattr/DEF0F23B-6793-42AC-9A16-B619D1F3CC2F' into 'main'
Matthew Fernandez [Sat, 11 Jun 2022 21:14:55 +0000 (21:14 +0000)]
Merge branch 'smattr/DEF0F23B-6793-42AC-9A16-B619D1F3CC2F' into 'main'

CI: add Fedora 36 jobs

See merge request graphviz/graphviz!2714

2 years agoCI: add Fedora 36 jobs
Matthew Fernandez [Tue, 7 Jun 2022 00:55:31 +0000 (17:55 -0700)]
CI: add Fedora 36 jobs

2 years agoCI: remove Docker comments that appeared orphaned from any code
Matthew Fernandez [Sat, 11 Jun 2022 18:35:10 +0000 (11:35 -0700)]
CI: remove Docker comments that appeared orphaned from any code

2 years agoMerge branch 'fix-14' into 'main'
Matthew Fernandez [Sat, 11 Jun 2022 19:23:13 +0000 (19:23 +0000)]
Merge branch 'fix-14' into 'main'

final fix of four 🪲🪲🪲🪲 ortho bugs 🎉

Closes #1990, #1658, #1408, and #14

See merge request graphviz/graphviz!2672

2 years agofix ortho: add epsilon to floating point comparison
Costa Shulyupin [Mon, 16 May 2022 07:05:55 +0000 (10:05 +0300)]
fix ortho: add epsilon to floating point comparison

Thanks to good bug description #1408, I've compared logs of
bad and good version. I found that sometimes there is
difference ~1E-15 between t->hi.y and t->lo.y because of
precision issues. It caused false positive conditional statement.

The workaround is to tolerate insignificant deviations.

fixes #1408, fixes #1990, fixes #1658

2 years agofix vcmpid and hcmpid with float_cmp
Costa Shulyupin [Wed, 13 Apr 2022 05:57:58 +0000 (08:57 +0300)]
fix vcmpid and hcmpid with float_cmp

Original functions misbehaved due to precision issues:
`1E-15 > 0` but it should be considered as equal.

fixes #14 - 8 years old bug!

2 years agodfp_cmp - double floating point three-way comparison
Costa Shulyupin [Sun, 15 May 2022 19:19:14 +0000 (22:19 +0300)]
dfp_cmp - double floating point three-way comparison

2 years agoMerge branch 'smattr/gitlab-2246' into 'main'
Matthew Fernandez [Sat, 11 Jun 2022 18:28:00 +0000 (18:28 +0000)]
Merge branch 'smattr/gitlab-2246' into 'main'

gvcolor: fix: link -lm

Closes #2246

See merge request graphviz/graphviz!2715

2 years agogvcolor: fix: link -lm
Matthew Fernandez [Wed, 8 Jun 2022 03:20:44 +0000 (20:20 -0700)]
gvcolor: fix: link -lm

Commit 0efe2864048439507ddceda1d82d2159ad171f0d introduced a dependency on libm
functions but missed adding this dependency to the Autotools build system.

Gitlab: fixes #2246

2 years agoxdot: take a double instead of a float parameter in 'printFloat'
Matthew Fernandez [Sun, 5 Jun 2022 17:54:16 +0000 (10:54 -0700)]
xdot: take a double instead of a float parameter in 'printFloat'

Every call to this function passes a double. This change squashes 12
-Wfloat-conversion warnings.

2 years agoCMake: link -lm globally on Unix instead of fine-grained
Matthew Fernandez [Wed, 8 Jun 2022 01:52:45 +0000 (18:52 -0700)]
CMake: link -lm globally on Unix instead of fine-grained

It is simpler to express this dependency globally than to try to manage a
dependency on such a fundamental part of the C standard library on a
case-by-case basis.

2 years agoMerge branch 'smattr/DBFE7206-E60E-4B98-8B49-0B4F51AC2B86' into 'main'
Matthew Fernandez [Sun, 5 Jun 2022 19:24:02 +0000 (19:24 +0000)]
Merge branch 'smattr/DBFE7206-E60E-4B98-8B49-0B4F51AC2B86' into 'main'

Revert !2620

See merge request graphviz/graphviz!2713

2 years agoRevert "API BREAK: change 'Agiodisc_t' output function from puts-alike to printf...
Matthew Fernandez [Sat, 4 Jun 2022 15:27:27 +0000 (08:27 -0700)]
Revert "API BREAK: change 'Agiodisc_t' output function from puts-alike to printf-alike"

This reverts commit 4915673bd8826641c4227bb6e32e1d759f3b1df5. This also adds a
changelog entry for this.

Commit 4915673bd8826641c4227bb6e32e1d759f3b1df5 introduced a bug where
`gvprintf` was cast and stored into an incompatible pointer type, one returning
an `int` instead of `void`. On platforms like x86-64, this coincidentally works
out with no ill effects. But on platforms like Web Assembly this prevents using
plugins containing this code.

2 years agoRevert "common: remove “slimey” comment"
Matthew Fernandez [Sat, 4 Jun 2022 15:25:11 +0000 (08:25 -0700)]
Revert "common: remove “slimey” comment"

This reverts commit 7e324d56c12d639c4bdeca387790c3588606ea10.

2 years agoRevert "common: inline and remove 'printstring'"
Matthew Fernandez [Sat, 4 Jun 2022 15:25:01 +0000 (08:25 -0700)]
Revert "common: inline and remove 'printstring'"

This reverts commit d7beb4590d683879cf8501a90fc70ce094ec5691.

2 years agoRevert "common: inline and remove 'printint'"
Matthew Fernandez [Sat, 4 Jun 2022 15:24:53 +0000 (08:24 -0700)]
Revert "common: inline and remove 'printint'"

This reverts commit 4e12bb0867503ceb142227e5b620b476abe77d52.

2 years agoRevert "common: inline and remove 'printdouble'"
Matthew Fernandez [Sat, 4 Jun 2022 15:24:46 +0000 (08:24 -0700)]
Revert "common: inline and remove 'printdouble'"

This reverts commit eb9c96face472a4f8e6b44834dbe2e5d79d80c53.

2 years agoRevert "common: fuse adjacent 'print' calls"
Matthew Fernandez [Sat, 4 Jun 2022 15:24:39 +0000 (08:24 -0700)]
Revert "common: fuse adjacent 'print' calls"

This reverts commit c34df972f39b01b0b177faf88d548fd5c813b83b.

2 years agoRevert "common: inline and remove 'agputs'"
Matthew Fernandez [Sat, 4 Jun 2022 15:24:29 +0000 (08:24 -0700)]
Revert "common: inline and remove 'agputs'"

This reverts commit f42fcb6759c1614fc07bae546a9da47c20d389bb.

2 years agoMerge branch 'smattr/293EA9CE-1621-4467-B751-1ECF9AF7195B' into 'main'
Matthew Fernandez [Sat, 4 Jun 2022 20:23:55 +0000 (20:23 +0000)]
Merge branch 'smattr/293EA9CE-1621-4467-B751-1ECF9AF7195B' into 'main'

common: squash spurious -Wconversion warnings in 'new_virtual_edge'

See merge request graphviz/graphviz!2706

2 years agocommon: squash spurious -Wconversion warnings in 'new_virtual_edge'
Matthew Fernandez [Sun, 8 May 2022 19:55:35 +0000 (12:55 -0700)]
common: squash spurious -Wconversion warnings in 'new_virtual_edge'

By doing these assignments all in a single line, the compiler was fooled into
believing there was some unintentional narrowing happening:

  fastgr.c: In function 'new_virtual_edge':
  ../../lib/common/types.h:592:22: warning: conversion from 'int' to 'short int'
    may change value [-Wconversion]
    592 | #define ED_weight(e) (((Agedgeinfo_t*)AGDATA(e))->weight)
        |                      ^
  fastgr.c:192:55: note: in expansion of macro 'ED_weight'
    192 |         ED_minlen(e) = ED_count(e) = ED_xpenalty(e) = ED_weight(e) = 1
        |                                                       ^~~~~~~~~
  ../../lib/common/types.h:569:21: warning: conversion to 'short unsigned int'
    from 'short int' may change the sign of the result [-Wsign-conversion]
    569 | #define ED_count(e) (((Agedgeinfo_t*)AGDATA(e))->count)
        |                     ^
  fastgr.c:192:24: note: in expansion of macro 'ED_count'
    192 |         ED_minlen(e) = ED_count(e) = ED_xpenalty(e) = ED_weight(e) = 1
        |                        ^~~~~~~~

We can make it clearer and avoid these warnings by separating the assignments.

2 years agoMerge branch 'smattr/9C9FEE40-4CE7-4250-A1BC-BE5185A4AC44' into 'main'
Matthew Fernandez [Sat, 4 Jun 2022 17:18:20 +0000 (17:18 +0000)]
Merge branch 'smattr/9C9FEE40-4CE7-4250-A1BC-BE5185A4AC44' into 'main'

smyrna warning squashing

See merge request graphviz/graphviz!2699

2 years agosmyrna: squash some -Wfloat-conversion warnings
Matthew Fernandez [Fri, 6 May 2022 00:54:45 +0000 (17:54 -0700)]
smyrna: squash some -Wfloat-conversion warnings

2 years agosmyrna: mark 'copy_attr' static
Matthew Fernandez [Fri, 6 May 2022 00:52:06 +0000 (17:52 -0700)]
smyrna: mark 'copy_attr' static

This function is not used outside of its containing file.

2 years agosmyrna: remove unused return value of 'cb_game_mode'
Matthew Fernandez [Fri, 6 May 2022 00:50:43 +0000 (17:50 -0700)]
smyrna: remove unused return value of 'cb_game_mode'

2 years agosmyrna: propagate and remove 'fullscreen' parameter to 'cb_glutinit'
Matthew Fernandez [Fri, 6 May 2022 00:48:53 +0000 (17:48 -0700)]
smyrna: propagate and remove 'fullscreen' parameter to 'cb_glutinit'

This function did not properly support non-fullscreen mode, as evidenced by the
`x` and `y` parameters (removed in the previous commit) that it was ignoring.

2 years agosmyrna: remove unused parameter to 'cb_glutinit'
Matthew Fernandez [Fri, 6 May 2022 00:46:30 +0000 (17:46 -0700)]
smyrna: remove unused parameter to 'cb_glutinit'

2 years agosmyrna: squash -Wunused-parameter warnings for GLUT callbacks
Matthew Fernandez [Fri, 6 May 2022 00:42:13 +0000 (17:42 -0700)]
smyrna: squash -Wunused-parameter warnings for GLUT callbacks

These functions need to conform to a particular type signature.

2 years agoMerge branch 'smattr/1175FE55-FCE5-4173-B59E-6C30DFBE6AF1' into 'main'
Matthew Fernandez [Sat, 4 Jun 2022 16:16:58 +0000 (16:16 +0000)]
Merge branch 'smattr/1175FE55-FCE5-4173-B59E-6C30DFBE6AF1' into 'main'

sparse: remove 'transpose' parameter from 'SparseMatrix_multiply_vector'

See merge request graphviz/graphviz!2703

2 years agosparse: remove 'transpose' parameter from 'SparseMatrix_multiply_vector'
Matthew Fernandez [Fri, 27 May 2022 01:38:19 +0000 (18:38 -0700)]
sparse: remove 'transpose' parameter from 'SparseMatrix_multiply_vector'

This function is only used to multiply untransposed matrices.

2 years agoMerge branch 'smattr/ED48F907-F75B-4B57-B10D-B9C95033FDAB' into 'main'
Matthew Fernandez [Sat, 4 Jun 2022 06:06:28 +0000 (06:06 +0000)]
Merge branch 'smattr/ED48F907-F75B-4B57-B10D-B9C95033FDAB' into 'main'

bcomps: replace unchecked allocations with alloc helpers

See merge request graphviz/graphviz!2709

2 years agobcomps: replace unchecked allocations with alloc helpers
Matthew Fernandez [Sat, 28 May 2022 19:26:52 +0000 (12:26 -0700)]
bcomps: replace unchecked allocations with alloc helpers

This addresses some instances where out-of-memory would go undetected, leading
to a crash and/or data corruption.

2 years agoMerge branch 'smattr/2095BD9E-3E7D-4BD9-BC12-1B5EA3B75D3D' into 'main'
Matthew Fernandez [Sat, 4 Jun 2022 04:37:39 +0000 (04:37 +0000)]
Merge branch 'smattr/2095BD9E-3E7D-4BD9-BC12-1B5EA3B75D3D' into 'main'

dotgen: squash -Wsign-conversion warnings in 'medians'

See merge request graphviz/graphviz!2698

2 years agodotgen: squash -Wsign-conversion warnings in 'medians'
Matthew Fernandez [Sun, 8 May 2022 23:41:17 +0000 (16:41 -0700)]
dotgen: squash -Wsign-conversion warnings in 'medians'

The compiler says:

  mincross.c: In function 'medians':
  mincross.c:1803:25: warning: conversion to 'size_t' {aka 'long unsigned int'}
    from 'int' may change the sign of the result [-Wsign-conversion]
   1803 |             qsort(list, j, sizeof(int), (qsort_cmpf) ordercmpf);
        |                         ^

By doing array indexing in this function universally as `size_t` we can avoid
this.

2 years agoMerge branch 'smattr/51D1DF21-4D0E-4E0F-9E2A-3E9F3CA0D5C4' into 'main'
Matthew Fernandez [Sat, 4 Jun 2022 03:32:23 +0000 (03:32 +0000)]
Merge branch 'smattr/51D1DF21-4D0E-4E0F-9E2A-3E9F3CA0D5C4' into 'main'

sparse: remove support for three-way multiplication of non-real matrices

See merge request graphviz/graphviz!2704

2 years agosparse: remove support for three-way multiplication of non-real matrices
Matthew Fernandez [Fri, 27 May 2022 14:31:21 +0000 (07:31 -0700)]
sparse: remove support for three-way multiplication of non-real matrices

The function `SparseMatrix_multiply3` is only used to multiple real matrices.

2 years agoMerge branch 'start-4.0.1-dev' into 'main'
Magnus Jacobsson [Sun, 29 May 2022 10:49:11 +0000 (10:49 +0000)]
Merge branch 'start-4.0.1-dev' into 'main'

Start 4.0.1 development

See merge request graphviz/graphviz!2710

2 years agoStart 4.0.1 development
Magnus Jacobsson [Sun, 29 May 2022 08:51:15 +0000 (10:51 +0200)]
Start 4.0.1 development

2 years agoMerge branch 'stable-release-4.0.0' into 'main' 4.0.0
Magnus Jacobsson [Sun, 29 May 2022 09:37:45 +0000 (09:37 +0000)]
Merge branch 'stable-release-4.0.0' into 'main'

Stable Release 4.0.0

See merge request graphviz/graphviz!2694

2 years agoStable Release 4.0.0
Magnus Jacobsson [Tue, 24 May 2022 07:21:05 +0000 (09:21 +0200)]
Stable Release 4.0.0

2 years agoMerge branch 'smattr/BCE20F0D-9459-499B-A828-5DD50E5827A3' into 'main'
Matthew Fernandez [Sat, 28 May 2022 22:31:04 +0000 (22:31 +0000)]
Merge branch 'smattr/BCE20F0D-9459-499B-A828-5DD50E5827A3' into 'main'

sparse: remove some dead code paths

See merge request graphviz/graphviz!2697

2 years agosparse: remove 'weight' from 'QuadTree_new_from_point_list'
Matthew Fernandez [Tue, 24 May 2022 04:37:40 +0000 (21:37 -0700)]
sparse: remove 'weight' from 'QuadTree_new_from_point_list'

This parameter is always passed as `NULL`.

2 years agosfdpgen: remove unused 'node_weights' from 'spring_maxent_embedding'
Matthew Fernandez [Tue, 24 May 2022 03:19:32 +0000 (20:19 -0700)]
sfdpgen: remove unused 'node_weights' from 'spring_maxent_embedding'

2 years agosfdpgen: remove unused 'node_weights' from 'spring_electrical_embedding'
Matthew Fernandez [Tue, 24 May 2022 03:18:02 +0000 (20:18 -0700)]
sfdpgen: remove unused 'node_weights' from 'spring_electrical_embedding'

2 years agosfdpgen: remove unused 'node_weights' from 'spring_electrical_embedding_slow'
Matthew Fernandez [Tue, 24 May 2022 03:14:48 +0000 (20:14 -0700)]
sfdpgen: remove unused 'node_weights' from 'spring_electrical_embedding_slow'

2 years agosfdpgen: remove unused 'node_weights' from 'spring_electrical_embedding_fast'
Matthew Fernandez [Tue, 24 May 2022 03:13:03 +0000 (20:13 -0700)]
sfdpgen: remove unused 'node_weights' from 'spring_electrical_embedding_fast'

2 years agosfdpgen: remove always-false 'use_node_weights'
Matthew Fernandez [Tue, 24 May 2022 03:10:00 +0000 (20:10 -0700)]
sfdpgen: remove always-false 'use_node_weights'

2 years agosfdpgen: remove 'node_weights' from 'spring_electrical_spring_embedding'
Matthew Fernandez [Tue, 24 May 2022 02:53:01 +0000 (19:53 -0700)]
sfdpgen: remove 'node_weights' from 'spring_electrical_spring_embedding'

This parameter is always passed as `NULL`.

2 years agosfdpgen: remove 'node_weights' from 'SpringSmoother_smooth'
Matthew Fernandez [Tue, 24 May 2022 02:48:34 +0000 (19:48 -0700)]
sfdpgen: remove 'node_weights' from 'SpringSmoother_smooth'

This parameter is always passed as `NULL`.

2 years agosfdpgen: remove 'node_weights' from 'post_process_smoothing'
Matthew Fernandez [Tue, 24 May 2022 02:46:34 +0000 (19:46 -0700)]
sfdpgen: remove 'node_weights' from 'post_process_smoothing'

This parameter is always passed as `NULL`.

2 years agosfdpgen: remove 'node_weights' from 'Multilevel_new'
Matthew Fernandez [Tue, 24 May 2022 02:44:34 +0000 (19:44 -0700)]
sfdpgen: remove 'node_weights' from 'Multilevel_new'

This parameter is always passed as `NULL`.

2 years agosparse: remove 'node_weights' from 'multilevel_spring_electrical_embedding'
Matthew Fernandez [Tue, 24 May 2022 02:39:44 +0000 (19:39 -0700)]
sparse: remove 'node_weights' from 'multilevel_spring_electrical_embedding'

This parameter is always passed as `NULL`.

2 years agoMerge branch 'trapezoidation' into 'main'
Matthew Fernandez [Fri, 27 May 2022 15:01:00 +0000 (15:01 +0000)]
Merge branch 'trapezoidation' into 'main'

comment about theory and 📜 origins of trapezoids for ortho

See merge request graphviz/graphviz!2696

2 years agocomment about theory and origins of trap.h
Costa Shulyupin [Tue, 24 May 2022 19:29:26 +0000 (22:29 +0300)]
comment about theory and origins of trap.h

2 years agocomment about theory and origins of trapezoid.c
Costa Shulyupin [Tue, 24 May 2022 19:16:39 +0000 (22:16 +0300)]
comment about theory and origins of trapezoid.c

2 years agoMerge branch 'smattr/C8308E84-5819-47FC-B5A1-2C8A9A0D4BB5' into 'main'
Matthew Fernandez [Fri, 27 May 2022 05:54:22 +0000 (05:54 +0000)]
Merge branch 'smattr/C8308E84-5819-47FC-B5A1-2C8A9A0D4BB5' into 'main'

dotgen: remove shadowing of 'n' in 'build_ranks'

See merge request graphviz/graphviz!2687

2 years agodotgen: remove shadowing of 'n' in 'build_ranks'
Matthew Fernandez [Sun, 8 May 2022 20:47:20 +0000 (13:47 -0700)]
dotgen: remove shadowing of 'n' in 'build_ranks'

The compiler was warning:

  mincross.c:1404:17: warning: declaration of 'n' shadows a previous local
    [-Wshadow]
   1404 |             int n, ndiv2;
        |                 ^
  mincross.c:1359:13: note: shadowed declaration is here
   1359 |     node_t *n, *n0;
        |             ^

We can trivially rephrase the code to avoid this noise.

2 years agoMerge branch 'smattr/1CFC93CE-61B4-4BC3-AFD5-CE4AD8428B92' into 'main'
Matthew Fernandez [Fri, 27 May 2022 03:16:47 +0000 (03:16 +0000)]
Merge branch 'smattr/1CFC93CE-61B4-4BC3-AFD5-CE4AD8428B92' into 'main'

upgrade Pylint

See merge request graphviz/graphviz!2677

2 years agoupgrade Pylint
Matthew Fernandez [Fri, 20 May 2022 00:45:06 +0000 (17:45 -0700)]
upgrade Pylint

2 years agoMerge branch 'smattr/2B028903-89AB-434A-9AC9-F7D4D737A1BF' into 'main'
Matthew Fernandez [Fri, 27 May 2022 02:02:07 +0000 (02:02 +0000)]
Merge branch 'smattr/2B028903-89AB-434A-9AC9-F7D4D737A1BF' into 'main'

sparse: simplify 'SparseMatrix_coordinate_form_add_entries'

See merge request graphviz/graphviz!2691

2 years agosparse: remove incorrect comment in 'SparseMatrix_delete'
Matthew Fernandez [Mon, 23 May 2022 00:57:50 +0000 (17:57 -0700)]
sparse: remove incorrect comment in 'SparseMatrix_delete'

This appears to have been accidentally copy-pasted from
`SparseMatrix_general_new`.

2 years agosparse: take 'jcn' as a value instead of pointer
Matthew Fernandez [Mon, 23 May 2022 00:54:34 +0000 (17:54 -0700)]
sparse: take 'jcn' as a value instead of pointer