]> granicus.if.org Git - graphviz/log
graphviz
2 years agocgraph.h: reformat comments for doxygen
Costa Shulyupin [Tue, 5 Jul 2022 13:15:57 +0000 (16:15 +0300)]
cgraph.h: reformat comments for doxygen

2 years agoDoxyfile: ignore attribute PRINTF_LIKE
Costa Shulyupin [Tue, 5 Jul 2022 12:34:24 +0000 (15:34 +0300)]
Doxyfile: ignore attribute PRINTF_LIKE

because it is not relevant for documentation

2 years agoMerge branch 'logic' into 'main'
Matthew Fernandez [Fri, 8 Jul 2022 03:15:21 +0000 (03:15 +0000)]
Merge branch 'logic' into 'main'

replace obsolete logic.h

See merge request graphviz/graphviz!2745

2 years agoremove obsolete unused logic.h
Costa Shulyupin [Wed, 6 Jul 2022 09:38:31 +0000 (12:38 +0300)]
remove obsolete unused logic.h

to reduce number of files in overpopulated directory lib/common
and make project a little bit more tidy

2 years agoreplace include of logic.h with stdbool.h
Costa Shulyupin [Wed, 6 Jul 2022 09:35:18 +0000 (12:35 +0300)]
replace include of logic.h with stdbool.h

and replace FALSE/TRUE with false/true

to reuse standard definitions

2 years agoremove unused includes of logic.h
Costa Shulyupin [Wed, 6 Jul 2022 09:32:46 +0000 (12:32 +0300)]
remove unused includes of logic.h

to keep the code a bit cleaner

2 years agoMerge branch 'smattr/A2FCED53-DEC0-47DE-BC19-01625CA7B4E9' into 'main'
Matthew Fernandez [Fri, 8 Jul 2022 01:00:59 +0000 (01:00 +0000)]
Merge branch 'smattr/A2FCED53-DEC0-47DE-BC19-01625CA7B4E9' into 'main'

Start 5.0.1 development

See merge request graphviz/graphviz!2747

2 years agoStart 5.0.1 development
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
Start 5.0.1 development

2 years agoMerge branch 'smattr/02831009-9CCD-442E-B5A1-42688269FF91' into 'main' 5.0.0
Matthew Fernandez [Thu, 7 Jul 2022 15:40:57 +0000 (15:40 +0000)]
Merge branch 'smattr/02831009-9CCD-442E-B5A1-42688269FF91' into 'main'

Stable Release 5.0.0

See merge request graphviz/graphviz!2738

2 years agoStable Release 5.0.0
Matthew Fernandez [Sun, 3 Jul 2022 04:49:22 +0000 (21:49 -0700)]
Stable Release 5.0.0

2 years agofix CHANGELOG link
Matthew Fernandez [Sun, 3 Jul 2022 04:48:43 +0000 (21:48 -0700)]
fix CHANGELOG link

2 years agofix markdown indentation
Matthew Fernandez [Sun, 3 Jul 2022 04:45:38 +0000 (21:45 -0700)]
fix markdown indentation

2 years agoMerge branch 'smattr/C9FBABF6-463E-4B3D-9EA4-2EE6F963B313' into 'main'
Matthew Fernandez [Tue, 5 Jul 2022 16:11:15 +0000 (16:11 +0000)]
Merge branch 'smattr/C9FBABF6-463E-4B3D-9EA4-2EE6F963B313' into 'main'

gvpr: rewrite 'indexOf' to a simpler equivalent

See merge request graphviz/graphviz!2732

2 years agogvpr: rewrite 'indexOf' to a simpler equivalent
Matthew Fernandez [Fri, 1 Jul 2022 15:13:56 +0000 (08:13 -0700)]
gvpr: rewrite 'indexOf' to a simpler equivalent

This was initially attempted in 84efe93d5c5a4da0e778dbf01ed8550d2d774fdf and
then reverted in 51d787ece01fb4443db5eabd6932046b7b715dbc when it was discovered
this introduced a bug. The present commit fixes the, now obvious in retrospect,
bug with the original change of flipping the operands in the final subtraction.

This was validated by doing an exhaustive comparison of all strlen ≤2 inputs to
both the before and after function. Not bulletproof, but it is a strong signal
that the new version is functionally identical.

2 years agoMerge branch 'smattr/FDF1EA53-08F9-4F8C-8A22-2430083D6152' into 'main'
Matthew Fernandez [Tue, 5 Jul 2022 04:44:54 +0000 (04:44 +0000)]
Merge branch 'smattr/FDF1EA53-08F9-4F8C-8A22-2430083D6152' into 'main'

some allocation call clean up

See merge request graphviz/graphviz!2734

2 years agogxl2gv: fix an unchecked allocation failure
Matthew Fernandez [Sat, 2 Jul 2022 02:46:21 +0000 (19:46 -0700)]
gxl2gv: fix an unchecked allocation failure

2 years agographml2gv: fix an unchecked allocation failure
Matthew Fernandez [Sat, 2 Jul 2022 02:45:20 +0000 (19:45 -0700)]
graphml2gv: fix an unchecked allocation failure

2 years agodiffimg: replace 'xmalloc' with central allow wrapper
Matthew Fernandez [Sat, 2 Jul 2022 02:43:29 +0000 (19:43 -0700)]
diffimg: replace 'xmalloc' with central allow wrapper

2 years agopango plugin: replace 'xstrdup' with central alloc wrapper
Matthew Fernandez [Sat, 2 Jul 2022 02:41:53 +0000 (19:41 -0700)]
pango plugin: replace 'xstrdup' with central alloc wrapper

2 years agoMerge branch 'smattr/AA938AAA-1935-4594-A534-5EC62FFFBF57' into 'main'
Matthew Fernandez [Tue, 5 Jul 2022 02:56:17 +0000 (02:56 +0000)]
Merge branch 'smattr/AA938AAA-1935-4594-A534-5EC62FFFBF57' into 'main'

reference counted strings: de-duplicate some code, introduce malloc failure checks

See merge request graphviz/graphviz!2735

2 years agoagstrdup_internal: handle allocation failures
Matthew Fernandez [Sat, 2 Jul 2022 02:06:58 +0000 (19:06 -0700)]
agstrdup_internal: handle allocation failures

2 years agooutline the common core of 'agstrdup' and 'agstrdup_html'
Matthew Fernandez [Sat, 2 Jul 2022 02:04:01 +0000 (19:04 -0700)]
outline the common core of 'agstrdup' and 'agstrdup_html'

2 years agoMerge branch 'smattr/25FB51E1-C422-452D-9D1F-130886D5BAC3' into 'main'
Matthew Fernandez [Tue, 5 Jul 2022 01:53:26 +0000 (01:53 +0000)]
Merge branch 'smattr/25FB51E1-C422-452D-9D1F-130886D5BAC3' into 'main'

core plugin: fix unchecked allocation failure in dot rendering

See merge request graphviz/graphviz!2736

2 years agocore plugin: fix unchecked allocation failure in dot rendering
Matthew Fernandez [Sat, 2 Jul 2022 15:45:18 +0000 (08:45 -0700)]
core plugin: fix unchecked allocation failure in dot rendering

2 years agoMerge branch 'smattr/c7e76059-49ef-436d-940e-f756525e7a55' into 'main'
Matthew Fernandez [Mon, 4 Jul 2022 23:19:30 +0000 (23:19 +0000)]
Merge branch 'smattr/c7e76059-49ef-436d-940e-f756525e7a55' into 'main'

gvpr simplification

See merge request graphviz/graphviz!2737

2 years agogvpr: squash -Wunused-parameter warnings in 'gvexitf'
Matthew Fernandez [Sat, 2 Jul 2022 20:50:47 +0000 (13:50 -0700)]
gvpr: squash -Wunused-parameter warnings in 'gvexitf'

This function needs to conform to the `exitf` type signature, so these
parameters cannot be removed.

2 years agogvpr: make use of 'okay' clearer in 'evalNode'
Matthew Fernandez [Sat, 2 Jul 2022 20:48:26 +0000 (13:48 -0700)]
gvpr: make use of 'okay' clearer in 'evalNode'

Squashes a -Wconversion warning.

2 years agogvpr: make use of 'okay' clearer in 'evalEdge'
Matthew Fernandez [Sat, 2 Jul 2022 20:47:40 +0000 (13:47 -0700)]
gvpr: make use of 'okay' clearer in 'evalEdge'

Squashes a -Wconversion warning.

2 years agogvpr: exit on allocation failure in 'concat'
Matthew Fernandez [Sat, 2 Jul 2022 15:37:37 +0000 (08:37 -0700)]
gvpr: exit on allocation failure in 'concat'

This function gracefully handled allocation failures by returning 0. Except its
caller does not check for this and assumes the returned pointer is non-null.

2 years agogvpr: fix unchecked allocation failures in 'resolve'
Matthew Fernandez [Sat, 2 Jul 2022 15:36:00 +0000 (08:36 -0700)]
gvpr: fix unchecked allocation failures in 'resolve'

2 years agogvpr: fix unchecked allocation failure in 'parseArgs'
Matthew Fernandez [Sat, 2 Jul 2022 15:35:46 +0000 (08:35 -0700)]
gvpr: fix unchecked allocation failure in 'parseArgs'

2 years agogvpr: simplify 'freeOpts' by passing by value
Matthew Fernandez [Sat, 2 Jul 2022 15:30:52 +0000 (08:30 -0700)]
gvpr: simplify 'freeOpts' by passing by value

This also removes the conditional on `argc` in this function. The contained loop
is a no-op when `argc` is 0 and in this case `argv` is NULL, which it is well
defined to `free`.

2 years agogvpr: stack-allocate options struct
Matthew Fernandez [Sat, 2 Jul 2022 15:28:09 +0000 (08:28 -0700)]
gvpr: stack-allocate options struct

There is no need to heap-allocate this struct that is small and whose usage is
well scoped.

2 years agoMerge branch 'cgraph' into 'main'
Matthew Fernandez [Mon, 4 Jul 2022 22:18:19 +0000 (22:18 +0000)]
Merge branch 'cgraph' into 'main'

cgraph doxygen title comments

See merge request graphviz/graphviz!2739

2 years agocgraph doxygen title comments
Costa Shulyupin [Mon, 4 Jul 2022 22:18:19 +0000 (22:18 +0000)]
cgraph doxygen title comments

2 years agoMerge branch 'smattr/gitlab-358' into 'main'
Matthew Fernandez [Mon, 4 Jul 2022 21:23:10 +0000 (21:23 +0000)]
Merge branch 'smattr/gitlab-358' into 'main'

fix: Revert "rewrite versionStr2Version to use strtoul"

Closes #358

See merge request graphviz/graphviz!2733

2 years agofix: Revert "rewrite versionStr2Version to use strtoul"
Matthew Fernandez [Sat, 2 Jul 2022 03:23:27 +0000 (20:23 -0700)]
fix: Revert "rewrite versionStr2Version to use strtoul"

This reverts commit 5aa56175c4715700cc8bf9fecad7b27665c04379. This commit
inadvertently changed the parsing of the `xdotversion` attribute to make
something like “1.7” parse as version 1.

Gitlab: fixes #358

2 years agoadd a test case for #358
Matthew Fernandez [Sat, 2 Jul 2022 03:17:18 +0000 (20:17 -0700)]
add a test case for #358

2 years agoMerge branch 'smattr/gitlab-1801' into 'main'
Matthew Fernandez [Sun, 3 Jul 2022 05:49:31 +0000 (05:49 +0000)]
Merge branch 'smattr/gitlab-1801' into 'main'

Proutespline: remove exception-style control flow

See merge request graphviz/graphviz!2731

2 years agogrowops: squash a -Wsign-conversion warning
Matthew Fernandez [Tue, 28 Jun 2022 01:44:18 +0000 (18:44 -0700)]
growops: squash a -Wsign-conversion warning

By construction, `newopn` can only ever be non-negative here. Though in the long
term a more sweeping change should be done to count items in `size_t` variables
pervasively.

2 years agoreallyroutespline: squash a -Wsign-conversion warning
Matthew Fernandez [Tue, 28 Jun 2022 01:42:29 +0000 (18:42 -0700)]
reallyroutespline: squash a -Wsign-conversion warning

By construction, `inpn` can only ever be non-negative here. Though in the long
term a more sweeping change should be done to count items in `size_t` variables
pervasively.

2 years agoProutespline: remove exception-style control flow
Matthew Fernandez [Tue, 28 Jun 2022 01:40:07 +0000 (18:40 -0700)]
Proutespline: remove exception-style control flow

Memory allocation failures now result in a conventional return, propagated up
through the call stack.

Github: #1801

2 years agoreallyroutespline: fix unchecked failures on recursion
Matthew Fernandez [Tue, 28 Jun 2022 01:20:24 +0000 (18:20 -0700)]
reallyroutespline: fix unchecked failures on recursion

2 years agoMerge branch 'smattr/5c305fc5-c55f-4cb9-a061-007ed0d2be2a' into 'main'
Matthew Fernandez [Sat, 2 Jul 2022 02:18:56 +0000 (02:18 +0000)]
Merge branch 'smattr/5c305fc5-c55f-4cb9-a061-007ed0d2be2a' into 'main'

use a string view abstraction to simplify plugin parsing code

See merge request graphviz/graphviz!2729

2 years agogvplugin_graph: fix unchecked allocation failures
Matthew Fernandez [Sun, 26 Jun 2022 20:28:20 +0000 (13:28 -0700)]
gvplugin_graph: fix unchecked allocation failures

The substring construction in `gvplugin_graph` unfortunately cannot be easily
converted to `strview_t` because it passes pointers to `agxset` which expects a
`'\0'` terminated string. We can at least fix previously unnoticed allocation
failures though.

2 years agogvPluginList: fix: manage 'q' as a 'strview_t'
Matthew Fernandez [Sun, 26 Jun 2022 20:22:57 +0000 (13:22 -0700)]
gvPluginList: fix: manage 'q' as a 'strview_t'

This fixes a memory leak that would occur when duplicate items were encountered.
The conditional block in this loop would not be entered and the memory that `q`
pointed to would be lost in the next iteration of the loop when `q` was set to a
new string.

2 years agogvPluginList: fix unchecked allocation failure
Matthew Fernandez [Sun, 26 Jun 2022 20:18:46 +0000 (13:18 -0700)]
gvPluginList: fix unchecked allocation failure

When `strdup` failed to allocate memory, this would go unnoticed, leading to a
crash.

2 years agogvPluginList: use a 'strview_t' for 'typestr_last'
Matthew Fernandez [Sun, 26 Jun 2022 20:16:34 +0000 (13:16 -0700)]
gvPluginList: use a 'strview_t' for 'typestr_last'

This has no immediate effect, but will simply the next commit.

2 years agogvPluginList: squash -Wunused-parameter warning
Matthew Fernandez [Sun, 26 Jun 2022 20:09:17 +0000 (13:09 -0700)]
gvPluginList: squash -Wunused-parameter warning

As described in the leading comment, this is intentionally unused for now.

2 years agogvplugin_list: use a 'strview_t' for 'type' in second loop
Matthew Fernandez [Sun, 26 Jun 2022 20:08:05 +0000 (13:08 -0700)]
gvplugin_list: use a 'strview_t' for 'type' in second loop

Slightly more readable and less error prone than doing this inline.

2 years agogvplugin_list: use a 'strview_t' for 'type_last'
Matthew Fernandez [Sun, 26 Jun 2022 20:03:21 +0000 (13:03 -0700)]
gvplugin_list: use a 'strview_t' for 'type_last'

Slightly more readable and less error prone than doing this inline.

2 years agogvplugin_list: use a 'strview_t' for handling prefix of 'str'
Matthew Fernandez [Sun, 26 Jun 2022 19:58:01 +0000 (12:58 -0700)]
gvplugin_list: use a 'strview_t' for handling prefix of 'str'

Slightly more readable and less error prone than doing this inline.

2 years agogvplugin_list: use a 'strview_t' for 'type' in first loop
Matthew Fernandez [Sun, 26 Jun 2022 19:47:04 +0000 (12:47 -0700)]
gvplugin_list: use a 'strview_t' for 'type' in first loop

Slightly more readable and less error prone than doing this inline.

2 years agogvplugin_load: use a 'strview_t' for 'reqtyp'
Matthew Fernandez [Sun, 26 Jun 2022 19:41:02 +0000 (12:41 -0700)]
gvplugin_load: use a 'strview_t' for 'reqtyp'

Slightly more readable and less error prone than doing this inline.

2 years agogvplugin_load: use a 'strview_t' for 'typ'
Matthew Fernandez [Sun, 26 Jun 2022 19:02:15 +0000 (12:02 -0700)]
gvplugin_load: use a 'strview_t' for 'typ'

Slightly more readable and less error prone than doing this inline.

2 years agogvplugin_load: use a 'strview_t' for 'reqdep'
Matthew Fernandez [Sun, 26 Jun 2022 18:58:06 +0000 (11:58 -0700)]
gvplugin_load: use a 'strview_t' for 'reqdep'

Slightly more readable and less error prone than doing this inline.

2 years agogvplugin_load: use a 'strview_t' for 'dep'
Matthew Fernandez [Sun, 26 Jun 2022 19:19:25 +0000 (12:19 -0700)]
gvplugin_load: use a 'strview_t' for 'dep'

Similar to the previous commit, this string is either `NULL` or terminated by a
`'\0'`, so there is little advantage in using a `strview_t` over a
`const char*`. But this will make it more consistent with surrounding code after
upcoming changes.

2 years agogvplugin_load: use a 'strview_t' for 'reqpkg'
Matthew Fernandez [Sun, 26 Jun 2022 19:10:34 +0000 (12:10 -0700)]
gvplugin_load: use a 'strview_t' for 'reqpkg'

This string is always terminated by `'\0'`, not `':'`, so there is little
advantage in using a `strview_t` over a `const char*`. But upcoming changes will
refactor the surrounding code to use `strview_t`, so it will be more readable to
use `strview_t` consistently here.

2 years agogvplugin_install: use 'strview_t' to simplify second type string comparison loop
Matthew Fernandez [Sun, 26 Jun 2022 18:46:16 +0000 (11:46 -0700)]
gvplugin_install: use 'strview_t' to simplify second type string comparison loop

2 years agogvplugin_install: use 'strview_t' to simplify type string comparison loop
Matthew Fernandez [Sun, 26 Jun 2022 18:40:13 +0000 (11:40 -0700)]
gvplugin_install: use 'strview_t' to simplify type string comparison loop

2 years agogvplugin_install: refactor 'typestr' end locating logic to use a 'strview_t'
Matthew Fernandez [Sun, 26 Jun 2022 18:24:17 +0000 (11:24 -0700)]
gvplugin_install: refactor 'typestr' end locating logic to use a 'strview_t'

Slightly more readable and less error prone than doing this inline.

2 years agoadd an abstraction for string references
Matthew Fernandez [Sun, 26 Jun 2022 18:01:38 +0000 (11:01 -0700)]
add an abstraction for string references

2 years agoMerge branch 'smattr/4C27B32D-9DA4-4AE8-846A-42EC6F6422C4' into 'main'
Matthew Fernandez [Sat, 2 Jul 2022 00:12:24 +0000 (00:12 +0000)]
Merge branch 'smattr/4C27B32D-9DA4-4AE8-846A-42EC6F6422C4' into 'main'

compiler warning squashing

See merge request graphviz/graphviz!2730

2 years agorecordlintrsx: remove unused 'xlp' parameter
Matthew Fernandez [Sun, 26 Jun 2022 22:54:39 +0000 (15:54 -0700)]
recordlintrsx: remove unused 'xlp' parameter

2 years agorecordointrsx: remove unused 'xlp' parameter
Matthew Fernandez [Sun, 26 Jun 2022 22:53:00 +0000 (15:53 -0700)]
recordointrsx: remove unused 'xlp' parameter

2 years agostress_majorization_with_hierarchy: remove unused 'nedges_graph' parameter
Matthew Fernandez [Sun, 26 Jun 2022 22:48:38 +0000 (15:48 -0700)]
stress_majorization_with_hierarchy: remove unused 'nedges_graph' parameter

2 years agostress_majorization_kD_mkernel: remove unused 'nedges_graph' parameter
Matthew Fernandez [Sun, 26 Jun 2022 22:43:35 +0000 (15:43 -0700)]
stress_majorization_kD_mkernel: remove unused 'nedges_graph' parameter

2 years agosparse_stress_subspace_majorization_kD: remove unused 'nedges_graph' parameter
Matthew Fernandez [Sun, 26 Jun 2022 22:39:04 +0000 (15:39 -0700)]
sparse_stress_subspace_majorization_kD: remove unused 'nedges_graph' parameter

2 years agoprototype 'makeTetrix', squashing a '-Wmissing-prototypes' warning
Matthew Fernandez [Sat, 25 Jun 2022 05:05:31 +0000 (22:05 -0700)]
prototype 'makeTetrix', squashing a '-Wmissing-prototypes' warning

The missing prototype appears to have two causes:

  1. 265eeb66ea0dbb4f7cdeb75dcc5f802d948b40a9 added `makeTetrix` without a
     prototype.

  2. b4947d67a4ebd48ca0105d44f92e47f044e51600 appears to have applied some
     Coverity suggestions without investigating the underlying history that led
     to the Coverity warnings.

2 years agoMerge branch 'smattr/gitlab-121' into 'main'
Matthew Fernandez [Sun, 26 Jun 2022 22:32:00 +0000 (22:32 +0000)]
Merge branch 'smattr/gitlab-121' into 'main'

fix 'merge_chain' assertion failure

Closes #121

See merge request graphviz/graphviz!2724

2 years agofix 'merge_chain' assertion failure
Matthew Fernandez [Tue, 21 Jun 2022 03:09:05 +0000 (20:09 -0700)]
fix 'merge_chain' assertion failure

When calling `merge_chain` from `interclexp`, this code apparently did not
anticipate that both the condition `ND_rank(agtail(e)) == ND_rank(aghead(e))`
and `ED_to_virt(prev) != NULL` could be true at once. In this case, the merge
can happen but the `.to_virt` member of `e` needs to be overwritten; it is not
`NULL` on entry to `merge_chain`.

This issue appears to have existed since the first revision of Graphviz.

These is a lot of uncertainty around what the expected behavior of this code is
and whether this fix is correct. So here is some of my background thoughts:¹

  `merge_chain` has a leading `assert(ED_to_virt(e) == NULL)`, presumably trying
  to express the assumption that it is not overwriting an existing back pointer.
  But the code here in `interclexp` seems to be deliberately trying to overwrite
  this pointer. There seemed to me two possible local fixes:

    1. Remove the assertion
    2. Write `NULL` to `ED_to_virt(e)` in advance

  The first possibility seemed more risky. This would allow other functions to
  accidentally call into merge_chain with a non-null `ED_to_virt(e)` and for
  this to go undetected.

  On the other hand, it's possible my change here is mistaken and what the
  original author intended was for the true case of the branch on line 181 to
  continue after updating `ED_to_virt(e) = prev`, making the call to
  `merge_chain` not reached in this scenario. It certainly looks pretty weird
  for the code after my changes to set `ED_to_virt(e)` on lines 181-184 and then
  subsequently overwrite this value on line 187. But I was guessing the initial
  write is relevant for the case where we continue.

  As you can tell, all of this is (barely) educated guess work. I find the
  intent of this code very hard to determine.

Gitlab: fixes #121

¹ Quoted from discussion on
  https://gitlab.com/graphviz/graphviz/-/merge_requests/2724#note_1005393861.

2 years agoadd a test case for #121
Matthew Fernandez [Tue, 21 Jun 2022 02:49:12 +0000 (19:49 -0700)]
add a test case for #121

2 years agoMerge branch 'smattr/6888df1f-aa29-4ebf-8fd1-824cdf74cbee' into 'main'
Matthew Fernandez [Sun, 26 Jun 2022 19:01:07 +0000 (19:01 +0000)]
Merge branch 'smattr/6888df1f-aa29-4ebf-8fd1-824cdf74cbee' into 'main'

fix: select DEB CPack back end on Debian

See merge request graphviz/graphviz!2728

2 years agofix: select DEB CPack back end on Debian
Matthew Fernandez [Sat, 25 Jun 2022 20:54:18 +0000 (13:54 -0700)]
fix: select DEB CPack back end on Debian

Debian’s /etc/os-release does not include the field `ID_LIKE`, which is perhaps
reasonable as it is a base distribution not derived from another. A side effect
of this was that CPack picked the RPM back end when generating a Graphviz
package. This change teaches it that Debian should also get the DEB back end.

2 years agoMerge branch 'smattr/14413CBC-E9B9-4119-B46C-D234278D8A87' into 'main'
Matthew Fernandez [Sun, 26 Jun 2022 00:12:04 +0000 (00:12 +0000)]
Merge branch 'smattr/14413CBC-E9B9-4119-B46C-D234278D8A87' into 'main'

gvplugin_list: remove dynamic allocations

See merge request graphviz/graphviz!2727

2 years agogvplugin_list: remove a second unnecessary duplication of 'typestr'
Matthew Fernandez [Sat, 25 Jun 2022 02:55:12 +0000 (19:55 -0700)]
gvplugin_list: remove a second unnecessary duplication of 'typestr'

By managing an extent into the original string, we can avoid a dynamic
allocation in this code. This is similar in spirit to
5a13ab3f08b2066a795ea152f9594f6719d3aaa6.

2 years agogvplugin_list: remove unnecessary duplication of 'typestr'
Matthew Fernandez [Sat, 25 Jun 2022 02:32:42 +0000 (19:32 -0700)]
gvplugin_list: remove unnecessary duplication of 'typestr'

By managing an extent into the original string, we can avoid a dynamic
allocation in this code. This is similar in spirit to
5a13ab3f08b2066a795ea152f9594f6719d3aaa6.

The code here actually looks wrong. It tries to pull out colon-separated
entries, but then uses the full string (`pnext->typestr`) in the call to
`agxbprint`. But this commit leaves this as-is for now.

2 years agogvplugin_list: remove unnecessary duplication of 'str'
Matthew Fernandez [Fri, 24 Jun 2022 14:20:09 +0000 (07:20 -0700)]
gvplugin_list: remove unnecessary duplication of 'str'

By managing an extent into the original string, we can avoid a dynamic
allocation in this code. This is similar in spirit to
5a13ab3f08b2066a795ea152f9594f6719d3aaa6.

2 years agogvplugin_package_record: replace unchecked 'strdup' with alloc wrapper
Matthew Fernandez [Fri, 24 Jun 2022 14:13:41 +0000 (07:13 -0700)]
gvplugin_package_record: replace unchecked 'strdup' with alloc wrapper

This turns what was previously a crash on out-of-memory into a graceful exit.

2 years agopango_free_layout: remove unnecessary cast
Matthew Fernandez [Fri, 24 Jun 2022 13:52:59 +0000 (06:52 -0700)]
pango_free_layout: remove unnecessary cast

2 years agoMerge branch 'smattr/gitlab-2093' into 'main'
Matthew Fernandez [Sat, 25 Jun 2022 22:30:54 +0000 (22:30 +0000)]
Merge branch 'smattr/gitlab-2093' into 'main'

gxl2gv: fix: anticipate elements with missing ID

Closes #2093

See merge request graphviz/graphviz!2726

2 years agogxl2gv: fix: anticipate elements with missing ID
Matthew Fernandez [Thu, 23 Jun 2022 04:52:47 +0000 (21:52 -0700)]
gxl2gv: fix: anticipate elements with missing ID

This fixes a previous out-of-bounds pointer dereference that occurred in
`startElementHandler`.

Gitlab: fixes #2093

2 years agoadd a test case for #2093
Matthew Fernandez [Thu, 23 Jun 2022 04:38:08 +0000 (21:38 -0700)]
add a test case for #2093

2 years agoMerge branch 'smattr/AA253658-5B4E-4DDA-AD36-EB16ABD0699A' into 'main'
Matthew Fernandez [Sat, 25 Jun 2022 20:46:39 +0000 (20:46 +0000)]
Merge branch 'smattr/AA253658-5B4E-4DDA-AD36-EB16ABD0699A' into 'main'

ortho: use 'UNUSED' to suppress warnings about debug functions

See merge request graphviz/graphviz!2688

2 years agoortho: use 'UNUSED' to suppress warnings about debug functions
Matthew Fernandez [Sun, 22 May 2022 00:36:50 +0000 (17:36 -0700)]
ortho: use 'UNUSED' to suppress warnings about debug functions

As an alternative to hiding these functions by guarding them with `DEBUG`, this
allows the compiler to see and parse these functions even when not building in
debug mode. This means we can catch syntax errors that slip into this code even
when it is not being emitted into the final binary.

This has little effect right now as debugging is forced on in this file, but
this may be a nice extra safe guard in future.

2 years agocgraph: add an abstraction for squashing unused symbol warnings
Matthew Fernandez [Sun, 22 May 2022 00:27:12 +0000 (17:27 -0700)]
cgraph: add an abstraction for squashing unused symbol warnings

2 years agoMerge branch 'smattr/gitlab-2227' into 'main'
Matthew Fernandez [Sat, 25 Jun 2022 19:33:20 +0000 (19:33 +0000)]
Merge branch 'smattr/gitlab-2227' into 'main'

CI: install librsvg on macOS

See merge request graphviz/graphviz!2723

2 years agoCI: install librsvg on macOS
Matthew Fernandez [Tue, 21 Jun 2022 00:50:58 +0000 (17:50 -0700)]
CI: install librsvg on macOS

This is a dependency of the rsvg plugin.

Gitlab: #2227

2 years agoMerge branch 'smattr/gitlab-1624' into 'main'
Matthew Fernandez [Sat, 25 Jun 2022 17:51:45 +0000 (17:51 +0000)]
Merge branch 'smattr/gitlab-1624' into 'main'

test case for #1624 and warning squashing

See merge request graphviz/graphviz!2725

2 years agonameOf: remove unnecessary cast
Matthew Fernandez [Wed, 22 Jun 2022 03:40:00 +0000 (20:40 -0700)]
nameOf: remove unnecessary cast

2 years agoremove unnecessary 'dtlink' casts
Matthew Fernandez [Wed, 22 Jun 2022 03:39:44 +0000 (20:39 -0700)]
remove unnecessary 'dtlink' casts

2 years agocommon: remove some unnecessary parens
Matthew Fernandez [Wed, 22 Jun 2022 03:32:16 +0000 (20:32 -0700)]
common: remove some unnecessary parens

2 years agouse_library: squash -Wsign-conversion warning
Matthew Fernandez [Wed, 22 Jun 2022 03:05:00 +0000 (20:05 -0700)]
use_library: squash -Wsign-conversion warning

2 years agoglobal_def: squash a -Wsign-conversion
Matthew Fernandez [Wed, 22 Jun 2022 03:00:58 +0000 (20:00 -0700)]
global_def: squash a -Wsign-conversion

`p` is guaranteed to be greater than or equal to `dcl` here.

2 years agoadd a test case for #1624
Matthew Fernandez [Wed, 22 Jun 2022 02:38:30 +0000 (19:38 -0700)]
add a test case for #1624

2 years agoMerge branch 'update-how-to-make-a-release-in-DEVELOPERS.md' into 'main'
Magnus Jacobsson [Sat, 25 Jun 2022 13:32:04 +0000 (13:32 +0000)]
Merge branch 'update-how-to-make-a-release-in-DEVELOPERS.md' into 'main'

Update how to make a release in DEVELOPERS.md

See merge request graphviz/graphviz!2711

2 years agoupdate "Updating the website" in DEVELOPERS.md
Magnus Jacobsson [Sun, 29 May 2022 11:07:10 +0000 (13:07 +0200)]
update "Updating the website" in DEVELOPERS.md

2 years agoupdate "Starting development of the next version" in DEVELOPERS.md
Magnus Jacobsson [Sun, 29 May 2022 09:04:49 +0000 (11:04 +0200)]
update "Starting development of the next version" in DEVELOPERS.md

The "returning to the development series" wording was a remnant from
when stable releases had even minor versions and development versions
had odd minor versions. There no longer are different stable and
development series so there's nothing to return to. We always go
forward. The development versions have the same version number as the
tentative next stable release version, with a ~dev suffix.

2 years agoMerge branch 'smattr/gitlab-2200' into 'main'
Matthew Fernandez [Sat, 25 Jun 2022 04:02:52 +0000 (04:02 +0000)]
Merge branch 'smattr/gitlab-2200' into 'main'

CI: make UBSan errors fatal in sanitizer job

Closes #2200

See merge request graphviz/graphviz!2722

2 years agoRevert "Add use_santizers option to CMake build"
Matthew Fernandez [Sun, 19 Jun 2022 21:52:00 +0000 (14:52 -0700)]
Revert "Add use_santizers option to CMake build"

This reverts commit 05cbff4882df91d1b05a498b3b664061aefd3fce. Given this CMake
option does not work on all platforms (e.g. it adds compiler options that will
error out when using MSVC) and has inconsistent effects on supported platforms
(e.g. it enables leak detection on Linux, but not on macOS), it seems safer to
admit we cannot abstract over this feature and remove it from the build system.
Users who want to enable sanitizers can still do this selectively and with
greater control by exporting `CFLAGS` and `CXXFLAGS` or by using the
`CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` to add toolchain-specific options.

Gitlab: #2200