]> granicus.if.org Git - graphviz/log
graphviz
2 years agodotgen: squash -Wsign-conversion warning in 'doDot'
Matthew Fernandez [Sun, 8 May 2022 20:02:31 +0000 (13:02 -0700)]
dotgen: squash -Wsign-conversion warning in 'doDot'

The compiler says:

  dotinit.c: In function 'doDot':
  dotinit.c:454:24: warning: conversion to 'unsigned int' from 'int' may change
    the sign of the result [-Wsign-conversion]
  454 |         pinfo.margin = Pack;
      |                        ^~~~

But from the surrounding code and the implementation of `getPack`, we can
statically determine that `Pack` is non-negative at this point.

2 years agoMerge branch 'cleanup-arrow-length-use' into 'main'
Magnus Jacobsson [Wed, 25 May 2022 12:36:10 +0000 (12:36 +0000)]
Merge branch 'cleanup-arrow-length-use' into 'main'

remove unnecessary use of arrow_length function and make it static

See merge request graphviz/graphviz!2693

2 years agocommon: mark 'arrow_length' static
Magnus Jacobsson [Sun, 22 May 2022 15:33:22 +0000 (17:33 +0200)]
common: mark 'arrow_length' static

This function is no longer used outside of its containing file.

2 years agosameport: replace goto with return
Magnus Jacobsson [Sun, 22 May 2022 15:27:26 +0000 (17:27 +0200)]
sameport: replace goto with return

2 years agosameport: remove unused n_arr field from same_t struct
Magnus Jacobsson [Sun, 22 May 2022 15:25:13 +0000 (17:25 +0200)]
sameport: remove unused n_arr field from same_t struct

2 years agosameport: remove unused arr_len field from same_t struct
Magnus Jacobsson [Sun, 22 May 2022 15:20:19 +0000 (17:20 +0200)]
sameport: remove unused arr_len field from same_t struct

2 years agoMerge branch 'upgrade-centos7-docker-image' into 'main'
Magnus Jacobsson [Wed, 25 May 2022 08:39:23 +0000 (08:39 +0000)]
Merge branch 'upgrade-centos7-docker-image' into 'main'

Upgrade Centos7 Dockerfile

See merge request graphviz/graphviz!2695

2 years agoupgrade git to 2.36 in Centos7 Dockerfile
Magnus Jacobsson [Tue, 24 May 2022 09:39:29 +0000 (11:39 +0200)]
upgrade git to 2.36 in Centos7 Dockerfile

Version 2.24 is no longer available.

Fixes this error when building the Docker image:

Cannot open: https://repo.ius.io/7/x86_64/packages/g/git224-2.24.3-1.el7.ius.x86_64.rpm. Skipping.

2 years agoupgrade epel-release to latest-7 in Centos7 Dockerfile
Magnus Jacobsson [Tue, 24 May 2022 09:39:12 +0000 (11:39 +0200)]
upgrade epel-release to latest-7 in Centos7 Dockerfile

Version 7.12 is no longer available.

Fixes this error when building the Docker image:

Cannot open: https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-12.noarch.rpm. Skipping.

2 years agoMerge branch 'smattr/C351F03D-D182-43E4-92A6-4A4308AF78B9' into 'main'
Matthew Fernandez [Tue, 24 May 2022 05:29:07 +0000 (05:29 +0000)]
Merge branch 'smattr/C351F03D-D182-43E4-92A6-4A4308AF78B9' into 'main'

gvpr: squash -Wconversion warning from 'read' return

See merge request graphviz/graphviz!2675

2 years agogvpr: squash -Wconversion warning from 'read' return
Matthew Fernandez [Mon, 16 May 2022 04:31:25 +0000 (21:31 -0700)]
gvpr: squash -Wconversion warning from 'read' return

This call is asked to read an `int` length of bytes, so cannot return more than
`INT_MAX`.

2 years agoMerge branch 'smattr/3A15FDA7-0604-425F-A34A-EBCF8A7B2050' into 'main'
Matthew Fernandez [Tue, 24 May 2022 04:20:19 +0000 (04:20 +0000)]
Merge branch 'smattr/3A15FDA7-0604-425F-A34A-EBCF8A7B2050' into 'main'

gvpr: squash some -Wunused-parameter warnings

See merge request graphviz/graphviz!2676

2 years agogvpr: remove unused 'uopts' parameter from 'scanArgs'
Matthew Fernandez [Mon, 16 May 2022 04:42:45 +0000 (21:42 -0700)]
gvpr: remove unused 'uopts' parameter from 'scanArgs'

2 years agogvpr: squash -Wunused-parameter warnings in 'matchval'
Matthew Fernandez [Mon, 16 May 2022 04:40:39 +0000 (21:40 -0700)]
gvpr: squash -Wunused-parameter warnings in 'matchval'

These parameters cannot be removed because this function is used as a callback.

2 years agogvpr: squash -Wunused-parameter warnings in 'keyval'
Matthew Fernandez [Mon, 16 May 2022 04:39:37 +0000 (21:39 -0700)]
gvpr: squash -Wunused-parameter warnings in 'keyval'

These parameters cannot be removed because this function is used as a callback.

2 years agogvpr: squash -Wunused-parameter warnings in 'convert'
Matthew Fernandez [Mon, 16 May 2022 04:38:25 +0000 (21:38 -0700)]
gvpr: squash -Wunused-parameter warnings in 'convert'

These parameters cannot be removed because this function is used as a callback.

2 years agogvpr: squash -Wunused-parameter warnings in 'binary'
Matthew Fernandez [Mon, 16 May 2022 04:36:53 +0000 (21:36 -0700)]
gvpr: squash -Wunused-parameter warnings in 'binary'

These parameters cannot be removed because this function is used as a callback.

2 years agogvpr: squash -Wunused-parameter warnings in 'refval'
Matthew Fernandez [Mon, 16 May 2022 04:35:27 +0000 (21:35 -0700)]
gvpr: squash -Wunused-parameter warnings in 'refval'

These parameters cannot be removed because this function is used as a callback.

2 years agogvpr: squash -Wunused-parameter warnings in 'setval'
Matthew Fernandez [Mon, 16 May 2022 04:34:29 +0000 (21:34 -0700)]
gvpr: squash -Wunused-parameter warnings in 'setval'

These parameters cannot be removed because this function is used as a callback.

2 years agoMerge branch 'maze-doc' into 'main'
Matthew Fernandez [Tue, 24 May 2022 03:12:09 +0000 (03:12 +0000)]
Merge branch 'maze-doc' into 'main'

Doxygen comments for maze.c

Closes #2236

See merge request graphviz/graphviz!2661

2 years agodoxygen comment for mkMaze
Costa Shulyupin [Tue, 10 May 2022 16:04:57 +0000 (19:04 +0300)]
doxygen comment for mkMaze

2 years agodoxygen comment for mkMazeGraph
Costa Shulyupin [Tue, 10 May 2022 16:02:51 +0000 (19:02 +0300)]
doxygen comment for mkMazeGraph

2 years agodoxygen comment for findSVert
Costa Shulyupin [Tue, 10 May 2022 16:01:48 +0000 (19:01 +0300)]
doxygen comment for findSVert

2 years agodoxygen comment for createSEdges
Costa Shulyupin [Tue, 10 May 2022 16:01:25 +0000 (19:01 +0300)]
doxygen comment for createSEdges

2 years agoconvert markSmall comment to doxygen
Costa Shulyupin [Tue, 10 May 2022 16:00:36 +0000 (19:00 +0300)]
convert markSmall comment to doxygen

2 years agodoxygen comments for updateWt and updateWts
Costa Shulyupin [Tue, 10 May 2022 15:59:22 +0000 (18:59 +0300)]
doxygen comments for updateWt and updateWts

2 years agodoxygen comments for vcmpid and hcmpid
Costa Shulyupin [Tue, 10 May 2022 15:57:49 +0000 (18:57 +0300)]
doxygen comments for vcmpid and hcmpid

2 years agodoxygen comment for psdump
Costa Shulyupin [Tue, 10 May 2022 15:56:56 +0000 (18:56 +0300)]
doxygen comment for psdump

2 years agoMerge branch 'smattr/5ACB60F9-F951-4162-8F8C-81C590EF69EB' into 'main'
Matthew Fernandez [Tue, 24 May 2022 01:59:18 +0000 (01:59 +0000)]
Merge branch 'smattr/5ACB60F9-F951-4162-8F8C-81C590EF69EB' into 'main'

remove Autotools 'sort' discovery

See merge request graphviz/graphviz!2685

2 years agoremove Autotools 'sort' discovery
Matthew Fernandez [Sat, 21 May 2022 19:58:07 +0000 (12:58 -0700)]
remove Autotools 'sort' discovery

ea6b4c99ec32127619b6e5c3a5ff58be51aa4829 removed the last use of `$SORT` in the
Autotools build system.

2 years agoMerge branch 'smattr/CEAAF3D2-013D-47DF-AD73-0ED48E8FFF5C' into 'main'
Matthew Fernandez [Mon, 23 May 2022 15:16:58 +0000 (15:16 +0000)]
Merge branch 'smattr/CEAAF3D2-013D-47DF-AD73-0ED48E8FFF5C' into 'main'

ortho: some clean up of 'segCmp'

See merge request graphviz/graphviz!2689

2 years agoortho: use early return style pervasively in 'segCmp'
Matthew Fernandez [Sun, 22 May 2022 02:36:02 +0000 (19:36 -0700)]
ortho: use early return style pervasively in 'segCmp'

Because the leaf of each conditional was returning, we can write all this logic
without `else`. The result seems marginally cleaner and easier to read.

2 years agoortho: remove dead code in 'segCmp'
Matthew Fernandez [Sun, 22 May 2022 02:28:01 +0000 (19:28 -0700)]
ortho: remove dead code in 'segCmp'

Squashes a warning about unreachable code by MSVC.

2 years agoMerge branch 'smattr/4BC11EAE-57EF-4815-9C8B-F1C944042E12' into 'main'
Matthew Fernandez [Mon, 23 May 2022 06:07:12 +0000 (06:07 +0000)]
Merge branch 'smattr/4BC11EAE-57EF-4815-9C8B-F1C944042E12' into 'main'

cgraph and common warning squashing and clean up

See merge request graphviz/graphviz!2681

2 years agocommon: squash -Wsign-conversion, -Wconversion warnings
Matthew Fernandez [Sat, 21 May 2022 03:35:31 +0000 (20:35 -0700)]
common: squash -Wsign-conversion, -Wconversion warnings

`byte` is known in-range in these instances.

2 years agocommon: squash -Wswitch-default warning in 'closestSide'
Matthew Fernandez [Sat, 21 May 2022 03:30:19 +0000 (20:30 -0700)]
common: squash -Wswitch-default warning in 'closestSide'

This switch is exhaustive due to the containing loop.

2 years agocommon: squash -Wswitch-default warning in 'cvtPt'
Matthew Fernandez [Sat, 21 May 2022 03:28:21 +0000 (20:28 -0700)]
common: squash -Wswitch-default warning in 'cvtPt'

This switch is exhaustive, as `rankdir` is only intended to be one of the four
covered rank direction constants.

2 years agocommon: use a C99 bool for 'LR' parameter of 'parse_reclbl'
Matthew Fernandez [Sat, 21 May 2022 03:25:01 +0000 (20:25 -0700)]
common: use a C99 bool for 'LR' parameter of 'parse_reclbl'

Squashes a -Wconversion warning.

2 years agocommon: squash -Wswitch-default warning in 'invflip_side'
Matthew Fernandez [Sat, 21 May 2022 03:21:12 +0000 (20:21 -0700)]
common: squash -Wswitch-default warning in 'invflip_side'

This switch is exhaustive, as `rankdir` is only intended to be one of the four
covered rank direction constants.

2 years agocommon: rename 'path' in 'cat_libfile', removing a -Wshadow warning
Matthew Fernandez [Sat, 21 May 2022 03:12:22 +0000 (20:12 -0700)]
common: rename 'path' in 'cat_libfile', removing a -Wshadow warning

2 years agocommon: use a 'size_t' for 'fread' return, squashing a -Wconversion warning
Matthew Fernandez [Sat, 21 May 2022 03:10:32 +0000 (20:10 -0700)]
common: use a 'size_t' for 'fread' return, squashing a -Wconversion warning

2 years agocommon: cast stat size results, squashing -Wsign-conversion warnings
Matthew Fernandez [Sat, 21 May 2022 03:08:35 +0000 (20:08 -0700)]
common: cast stat size results, squashing -Wsign-conversion warnings

The `st_size` field coming out of the `stat` call is always non-negative.

2 years agocgraph: take initial agxbuf backing memory as a char buffer
Matthew Fernandez [Sat, 21 May 2022 02:33:02 +0000 (19:33 -0700)]
cgraph: take initial agxbuf backing memory as a char buffer

Removes some cast noise.

2 years agocgraph: use char pointers instead of unsigned char pointers in agxbuf
Matthew Fernandez [Sat, 21 May 2022 02:19:49 +0000 (19:19 -0700)]
cgraph: use char pointers instead of unsigned char pointers in agxbuf

This is simpler than casting at every usage site.

2 years agosmyrna: remove unnecessary casts in 'vertexCallback'
Matthew Fernandez [Sat, 21 May 2022 01:45:05 +0000 (18:45 -0700)]
smyrna: remove unnecessary casts in 'vertexCallback'

2 years agoMerge branch 'smattr/2A1D6F79-DE60-42C3-BE91-E03A32CEAF49' into 'main'
Matthew Fernandez [Mon, 23 May 2022 04:56:36 +0000 (04:56 +0000)]
Merge branch 'smattr/2A1D6F79-DE60-42C3-BE91-E03A32CEAF49' into 'main'

gv2gxl: some cleanup and addressing unchecked allocations

See merge request graphviz/graphviz!2678

2 years agogv2gxl: replace unchecked allocations with cgraph alloc helpers
Matthew Fernandez [Fri, 20 May 2022 05:18:45 +0000 (22:18 -0700)]
gv2gxl: replace unchecked allocations with cgraph alloc helpers

2 years agogv2gxl: undo micro-optimization in 'writeHdr'
Matthew Fernandez [Fri, 20 May 2022 05:16:14 +0000 (22:16 -0700)]
gv2gxl: undo micro-optimization in 'writeHdr'

Allocation within this function chose between an on-stack buffer and a
heap-allocated buffer based on the length of the input string. With a modern
performant allocator this is often a de-optimization. This change switches to
unconditionally using a heap-allocated buffer, simplifying the code.

2 years agogv2gxl: undo micro-optimization in 'createEdgeId'
Matthew Fernandez [Fri, 20 May 2022 05:11:53 +0000 (22:11 -0700)]
gv2gxl: undo micro-optimization in 'createEdgeId'

Allocation within this function chose between an on-stack buffer and a
heap-allocated buffer based on the length of the input string. With a modern
performant allocator this is often a de-optimization. This change switches to
unconditionally using a heap-allocated buffer, simplifying the code.

2 years agoMerge branch 'smattr/30CAF70F-6306-453C-8BB6-E06725601179' into 'main'
Matthew Fernandez [Mon, 23 May 2022 03:33:39 +0000 (03:33 +0000)]
Merge branch 'smattr/30CAF70F-6306-453C-8BB6-E06725601179' into 'main'

gvpr: rephrase unorthodox way of clamping a signed byte

See merge request graphviz/graphviz!2686

2 years agogvpr: rephrase unorthodox way of clamping a signed byte
Matthew Fernandez [Mon, 16 May 2022 04:24:58 +0000 (21:24 -0700)]
gvpr: rephrase unorthodox way of clamping a signed byte

This new code is less confusing to the compiler and removes a -Wsign-conversion
warning.

2 years agoMerge branch 'smattr/5DC60227-8471-48EC-B804-9F7121EEE0D4' into 'main'
Matthew Fernandez [Mon, 23 May 2022 00:44:19 +0000 (00:44 +0000)]
Merge branch 'smattr/5DC60227-8471-48EC-B804-9F7121EEE0D4' into 'main'

gxl2gv: avoid large on-stack buffer

See merge request graphviz/graphviz!2679

2 years agogxl2gv: avoid large on-stack buffer
Matthew Fernandez [Fri, 20 May 2022 05:27:49 +0000 (22:27 -0700)]
gxl2gv: avoid large on-stack buffer

MSVC warns:

  C:\GitLab-Runner\builds\graphviz\graphviz\cmd\tools\gxl2gv.c(694): warning
    C6262: Function uses '20020' bytes of stack:  exceeds /analyze:stacksize
    '16384'.  Consider moving some data to heap.
    [C:\GitLab-Runner\builds\graphviz\graphviz\cmd\tools\gxl2gv.vcxproj]

So this function attempts to allocate ~20KB of stack data. Most of this is due
to the `buf` array. Using this much stack can cause crashes in constrained
environments. The buffer in question is used to read XML data in chunks, so we
can instead use the C standard library’s constant `BUFSIZ` that tells us the
optimal chunk size with which to perform I/O.

This change avoids the described problem as well as being a performance
optimization.

2 years agoMerge branch 'smattr/B73F2441-00A2-41E2-BADC-F58C855EAFDF' into 'main'
Matthew Fernandez [Sun, 22 May 2022 19:54:03 +0000 (19:54 +0000)]
Merge branch 'smattr/B73F2441-00A2-41E2-BADC-F58C855EAFDF' into 'main'

gml2gv: simplify string construction during parsing

See merge request graphviz/graphviz!2680

2 years agogml2gv: simplify string construction during parsing
Matthew Fernandez [Thu, 12 May 2022 04:16:08 +0000 (21:16 -0700)]
gml2gv: simplify string construction during parsing

This also removes the possibility of unchecked allocation failures in this code.

2 years agoMerge branch 'smattr/0400262B-2B65-4AC6-ADE1-8A6FC8110BF0' into 'main'
Matthew Fernandez [Sun, 22 May 2022 18:42:26 +0000 (18:42 +0000)]
Merge branch 'smattr/0400262B-2B65-4AC6-ADE1-8A6FC8110BF0' into 'main'

add 'gvmap' and 'gvmap.sh' to the CMake build system

See merge request graphviz/graphviz!2683

2 years agoadd 'gvmap' and 'gvmap.sh' to the CMake build system
Matthew Fernandez [Sun, 1 May 2022 21:47:25 +0000 (14:47 -0700)]
add 'gvmap' and 'gvmap.sh' to the CMake build system

Something strange I discovered while integrating this: the CI CentOS Autotools
jobs happily build and install `gvmap` and `cluster` despite not having libgts
installed. That is, the libgts dependency claimed in cmd/gvmap/Makefile.am
appears spurious. This all works out because nothing in that Makefile properly
indicates a requirement for libgts, so Make happily evaluates `$(GTS_LIBS)` to
the empty string.

And yet, when you attempt to remove this libgts usage you will find the CI
Ubuntu Autotools jobs fail. There is apparently a transitive dependency on
libgts when it is installed. So we leave everything as-is for now.

None of this is a concern in the CMake build system because CMake understands
transitive dependencies and applies these without having to be explicitly told.
But in future we should probably trace what the exact relationship of these
tools to libgts is.

Gitlab: #1753, #1836

2 years agogvmap: fix pointer-vs-int confusion in calling 'gv_recalloc'
Matthew Fernandez [Sun, 1 May 2022 23:20:31 +0000 (16:20 -0700)]
gvmap: fix pointer-vs-int confusion in calling 'gv_recalloc'

This was a typo in 0e53497fae6e05a59c31b7f124ddd1166901759f. It seemingly went
unnoticed amid the torrent of warnings the Autotools build emits. I only picked
this up when enabling this code in the CMake build system that compiles with
-Werror in CI.

2 years agoMerge branch 'smattr/E1146520-260F-4418-AE8D-1BCD48DEE4C2' into 'main'
Matthew Fernandez [Sun, 22 May 2022 17:33:19 +0000 (17:33 +0000)]
Merge branch 'smattr/E1146520-260F-4418-AE8D-1BCD48DEE4C2' into 'main'

mm2gv clean up

See merge request graphviz/graphviz!2684

2 years agomm2gv: remove unused 'test_flag'
Matthew Fernandez [Mon, 9 May 2022 00:54:42 +0000 (17:54 -0700)]
mm2gv: remove unused 'test_flag'

This appears to have never been used.

2 years agomm2gv: remove unused 'MALLOC'
Matthew Fernandez [Mon, 9 May 2022 00:52:17 +0000 (17:52 -0700)]
mm2gv: remove unused 'MALLOC'

The last use of this was removed in 46c60f72975db0bef2ee53d7cf3a0c6a912065e2.

2 years agomm2gv: squash -Wswitch-default warning
Matthew Fernandez [Mon, 9 May 2022 00:51:48 +0000 (17:51 -0700)]
mm2gv: squash -Wswitch-default warning

2 years agoMerge branch 'add-missing-ubuntu-22.04-ci-jobs' into 'main'
Magnus Jacobsson [Sun, 22 May 2022 13:43:58 +0000 (13:43 +0000)]
Merge branch 'add-missing-ubuntu-22.04-ci-jobs' into 'main'

Add missing Ubuntu 22.04 CI jobs

See merge request graphviz/graphviz!2670

2 years agoreplace ubuntu21.10-cmake-ASan-test-including-ctest CI job with ubuntu22.04-cmake...
Magnus Jacobsson [Sat, 14 May 2022 15:06:25 +0000 (17:06 +0200)]
replace ubuntu21.10-cmake-ASan-test-including-ctest CI job with ubuntu22.04-cmake-ASan-test-including-ctest

2 years agoupgrade jinja2 to version 2.11.3
Magnus Jacobsson [Sun, 15 May 2022 09:19:26 +0000 (11:19 +0200)]
upgrade jinja2 to version 2.11.3

Fixes this error when using python 3.10:

Traceback (most recent call last):
  File "/usr/bin/gcovr", line 33, in <module>
    sys.exit(load_entry_point('gcovr==5.0', 'console_scripts', 'gcovr')())
  File "/usr/lib/python3/dist-packages/gcovr/__main__.py", line 280, in main
    error_occurred = print_reports(covdata, options, logger)
  File "/usr/lib/python3/dist-packages/gcovr/__main__.py", line 432, in print_reports
    if generator(covdata, output.abspath, options):
  File "/usr/lib/python3/dist-packages/gcovr/writer/html.py", line 281, in print_html_report
    css_data = CssRenderer.render(options)
  File "/usr/lib/python3/dist-packages/gcovr/writer/html.py", line 121, in render
    template = templates().get_template('style.css')
  File "/usr/lib/python3/dist-packages/gcovr/writer/html.py", line 44, in __call__
    return self.get(*args)
  File "/usr/lib/python3/dist-packages/gcovr/writer/html.py", line 33, in load
    result = fn(*args)
  File "/usr/lib/python3/dist-packages/gcovr/writer/html.py", line 52, in templates
    from jinja2 import Environment, PackageLoader
  File "/root/.local/lib/python3.10/site-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/root/.local/lib/python3.10/site-packages/jinja2/environment.py", line 16, in <module>
    from jinja2.defaults import BLOCK_START_STRING, \
  File "/root/.local/lib/python3.10/site-packages/jinja2/defaults.py", line 32, in <module>
    from jinja2.tests import TESTS as DEFAULT_TESTS
  File "/root/.local/lib/python3.10/site-packages/jinja2/tests.py", line 13, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

We cannot upgrade to jinja 3.x since gcovr would then give this error:

Traceback (most recent call last):
  File "/usr/bin/gcovr", line 33, in <module>
    sys.exit(load_entry_point('gcovr==5.0', 'console_scripts', 'gcovr')())
  File "/usr/lib/python3/dist-packages/gcovr/__main__.py", line 280, in main
    error_occurred = print_reports(covdata, options, logger)
  File "/usr/lib/python3/dist-packages/gcovr/__main__.py", line 432, in print_reports
    if generator(covdata, output.abspath, options):
  File "/usr/lib/python3/dist-packages/gcovr/writer/html.py", line 401, in print_html_report
    lines = formatter.highlighter_for_file(data['filename'])(source_file.read())
  File "/usr/lib/python3/dist-packages/gcovr/writer/html.py", line 159, in highlighter_for_file
    from jinja2 import Markup
ImportError: cannot import name 'Markup' from 'jinja2' (/root/.local/lib/python3.10/site-packages/jinja2/__init__.py)

2 years agoinstall lcov in Ubuntu 22.04 Docker image
Magnus Jacobsson [Sat, 14 May 2022 16:57:05 +0000 (18:57 +0200)]
install lcov in Ubuntu 22.04 Docker image

For some reason this was not necessary in earlier Ubuntu releases.

Without this, the test_coverage.py script fails with:

FileNotFoundError: [Errno 2] No such file or directory: 'lcov'

2 years agoreplace ubuntu21-10-cmake-ASan-build-for-ctest CI job with ubuntu22-04-cmake-ASan...
Magnus Jacobsson [Sat, 14 May 2022 15:06:04 +0000 (17:06 +0200)]
replace ubuntu21-10-cmake-ASan-build-for-ctest CI job with ubuntu22-04-cmake-ASan-build-for-ctest

2 years agoreplace ubuntu21-10-cmake-minimal-build CI job with ubuntu22-04-cmake-minimal-build
Magnus Jacobsson [Sat, 14 May 2022 15:05:45 +0000 (17:05 +0200)]
replace ubuntu21-10-cmake-minimal-build CI job with ubuntu22-04-cmake-minimal-build

2 years agoreplace ubuntu21-10-static-build CI job with ubuntu22-04-static-build
Magnus Jacobsson [Sat, 14 May 2022 15:05:01 +0000 (17:05 +0200)]
replace ubuntu21-10-static-build CI job with ubuntu22-04-static-build

2 years agochange out-of-source-build CI job to run on Ubuntu 22.10 instead of 21.10
Magnus Jacobsson [Sat, 14 May 2022 15:04:36 +0000 (17:04 +0200)]
change out-of-source-build CI job to run on Ubuntu 22.10 instead of 21.10

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.