]> granicus.if.org Git - graphviz/log
graphviz
2 years agoneatogen: [nfc] brace a single-line if block
Matthew Fernandez [Wed, 16 Feb 2022 10:11:17 +0000 (21:11 +1100)]
neatogen: [nfc] brace a single-line if block

2 years agoneatogen: [nfc] remove some temporaries
Matthew Fernandez [Tue, 15 Feb 2022 08:35:30 +0000 (19:35 +1100)]
neatogen: [nfc] remove some temporaries

These seemed to be making the code less clear rather than more clear.

2 years agoneatogen max_absf: replace open coded max with a call to 'fmaxf'
Matthew Fernandez [Tue, 15 Feb 2022 08:32:10 +0000 (19:32 +1100)]
neatogen max_absf: replace open coded max with a call to 'fmaxf'

2 years agoneatogen max_abs: replace open coded max with a call to 'fmax'
Matthew Fernandez [Tue, 15 Feb 2022 08:31:45 +0000 (19:31 +1100)]
neatogen max_abs: replace open coded max with a call to 'fmax'

2 years agoneatogen: [nfc] remove a no-op cast
Matthew Fernandez [Tue, 15 Feb 2022 08:24:12 +0000 (19:24 +1100)]
neatogen: [nfc] remove a no-op cast

2 years agoneatogen: replace float-casted calls to 'fabs' with calls to 'fabsf'
Matthew Fernandez [Tue, 15 Feb 2022 08:22:55 +0000 (19:22 +1100)]
neatogen: replace float-casted calls to 'fabs' with calls to 'fabsf'

This is simpler, more efficient, and clearer to the compiler.

2 years agoneatogen: replace float-casted calls to 'sqrt' with calls to 'sqrtf'
Matthew Fernandez [Tue, 15 Feb 2022 08:18:31 +0000 (19:18 +1100)]
neatogen: replace float-casted calls to 'sqrt' with calls to 'sqrtf'

This is simpler, more efficient, and clearer to the compiler.

2 years agoRevert "work around a bug in GCC: It generates a call to "sqrtf" for "(float)sqrt...
Matthew Fernandez [Tue, 15 Feb 2022 08:12:52 +0000 (19:12 +1100)]
Revert "work around a bug in GCC: It generates a call to "sqrtf" for "(float)sqrt(d)""

This reverts commit 0dfd6ab3449455907a5a684fb54cb8b54c5befd5.

As of fe3f9411d2c59b463ab1b64eecfd19f2db55d2fc, Graphviz requires a C99
compiler. C99 guarantees `sqrtf` so even if the “bug” discussed in the original
commit still exists, generating a `sqrtf` call is fine on a C99 toolchain.

2 years agoneatogen: [nfc] brace some single-line if blocks
Matthew Fernandez [Wed, 16 Feb 2022 10:07:47 +0000 (21:07 +1100)]
neatogen: [nfc] brace some single-line if blocks

2 years agoRevert "more sqrt"
Matthew Fernandez [Tue, 15 Feb 2022 08:08:30 +0000 (19:08 +1100)]
Revert "more sqrt"

This reverts commit ef77679d9fd51ac7a1a69e5a2635c2280856cd85. This commit was
working around a GCC bug. Quoting its predecessor
0dfd6ab3449455907a5a684fb54cb8b54c5befd5 that gives context:

  work around a bug in GCC: It generates a call to "sqrtf" for "(float)sqrt(d)"
  but sqrtf doesn't exist in libm.a.
  reported by: Aaron Digulla <digulla@hepe.com>

As of fe3f9411d2c59b463ab1b64eecfd19f2db55d2fc, Graphviz requires a C99
compiler. C99 guarantees `sqrtf` so even if this “bug” still exists, generating
a `sqrtf` call is fine on a C99 toolchain.

2 years agoneatogen: [nfc] reflow some code
Matthew Fernandez [Tue, 15 Feb 2022 08:04:42 +0000 (19:04 +1100)]
neatogen: [nfc] reflow some code

This appears to be two copies of the same copy-pasted code.

2 years agoneatogen: [nfc] rephrase some boolean accumulation
Matthew Fernandez [Tue, 15 Feb 2022 08:01:21 +0000 (19:01 +1100)]
neatogen: [nfc] rephrase some boolean accumulation

These operations can be written simpler using bitwise-or assignment.

2 years agoneatogen: [nfc] remove some unnecessary parens
Matthew Fernandez [Tue, 15 Feb 2022 07:46:12 +0000 (18:46 +1100)]
neatogen: [nfc] remove some unnecessary parens

2 years agoneatogen: [nfc] remove unused 'smooth_pivots'
Matthew Fernandez [Tue, 15 Feb 2022 07:35:57 +0000 (18:35 +1100)]
neatogen: [nfc] remove unused 'smooth_pivots'

The only code using this was removed in
0e60b06ea9daebe0ce6e46f7fe8aa9d090617209.

2 years agoMerge branch 'smattr/0F5C00D7-F0E5-4778-873C-20B1C96B5E03' into 'main'
Matthew Fernandez [Wed, 16 Feb 2022 00:28:10 +0000 (00:28 +0000)]
Merge branch 'smattr/0F5C00D7-F0E5-4778-873C-20B1C96B5E03' into 'main'

CMake: add a 'dot2gxl' symlink for 'gxl2gv', mimicking Autotools

See merge request graphviz/graphviz!2445

2 years agoCMake: add a 'dot2gxl' symlink for 'gxl2gv', mimicking Autotools
Matthew Fernandez [Mon, 14 Feb 2022 02:08:50 +0000 (13:08 +1100)]
CMake: add a 'dot2gxl' symlink for 'gxl2gv', mimicking Autotools

Gitlab: #1753, #1836

2 years agoCMake: [nfc] fix indentation in cmd/tools
Matthew Fernandez [Mon, 14 Feb 2022 04:43:11 +0000 (15:43 +1100)]
CMake: [nfc] fix indentation in cmd/tools

It is not clear to me why cmake-lint was not complaining about this. However, an
upcoming commit exposes that this indentation was not compliant.

2 years agoMerge branch 'smattr/C1FE7971-289E-489C-A464-4819A487BB51' into 'main'
Matthew Fernandez [Tue, 15 Feb 2022 21:48:07 +0000 (21:48 +0000)]
Merge branch 'smattr/C1FE7971-289E-489C-A464-4819A487BB51' into 'main'

CMake: detect and enable extra optional GD features with gdlib-config

See merge request graphviz/graphviz!2446

2 years agoCMake: detect and enable extra optional GD features with gdlib-config
Matthew Fernandez [Tue, 8 Feb 2022 03:53:58 +0000 (14:53 +1100)]
CMake: detect and enable extra optional GD features with gdlib-config

This replicates some logic from the Autotools build system, enabling output
formats like `png:gd`. Note that this only enables `png:gd` on CentOS because
other packaging ecosystems do not seem to include `gdlib-config`.

Gitlab: #1786

2 years agoCI: get more precise about when #1786 test case fails
Matthew Fernandez [Wed, 9 Feb 2022 12:11:36 +0000 (23:11 +1100)]
CI: get more precise about when #1786 test case fails

2 years agoCI: [nfc] abstract check for CMake build system
Matthew Fernandez [Wed, 9 Feb 2022 12:01:03 +0000 (23:01 +1100)]
CI: [nfc] abstract check for CMake build system

2 years agomove #1786 test case into CI-only tests
Matthew Fernandez [Wed, 9 Feb 2022 11:50:23 +0000 (22:50 +1100)]
move #1786 test case into CI-only tests

In retrospect, this test case does not make sense in the regular test suite. It
is validating a particular plugin feature is enabled. It is perfectly valid to
build a version of Graphviz without png:gd support, yet it will fail this test
case.

2 years agoMerge branch 'remove-unused' into 'main'
Matthew Fernandez [Tue, 15 Feb 2022 20:34:48 +0000 (20:34 +0000)]
Merge branch 'remove-unused' into 'main'

remove unused in lib/common

See merge request graphviz/graphviz!2443

2 years agoremove unused argument filled in cylinder_draw
Costa Shulyupin [Sun, 13 Feb 2022 09:54:54 +0000 (11:54 +0200)]
remove unused argument filled in cylinder_draw

2 years agoremove unused argument initwid in pathtolines
Costa Shulyupin [Sun, 13 Feb 2022 09:56:42 +0000 (11:56 +0200)]
remove unused argument initwid in pathtolines

2 years agoremove unused argument g in emit_end_graph
Costa Shulyupin [Sun, 13 Feb 2022 09:56:33 +0000 (11:56 +0200)]
remove unused argument g in emit_end_graph

2 years agoMerge branch 'smattr/DE7A1A76-9F51-4A03-BCDD-1ACC26BF6CAB' into 'main'
Matthew Fernandez [Tue, 15 Feb 2022 08:41:10 +0000 (08:41 +0000)]
Merge branch 'smattr/DE7A1A76-9F51-4A03-BCDD-1ACC26BF6CAB' into 'main'

remove MAXFLOAT

See merge request graphviz/graphviz!2441

2 years agoAPI BREAK: remove no longer used 'MAXFLOAT'
Matthew Fernandez [Sat, 12 Feb 2022 03:18:29 +0000 (14:18 +1100)]
API BREAK: remove no longer used 'MAXFLOAT'

2 years agoneatogen: use '-FLT_MAX' as a sentinel instead of '-MAXFLOAT'
Matthew Fernandez [Sat, 12 Feb 2022 03:15:55 +0000 (14:15 +1100)]
neatogen: use '-FLT_MAX' as a sentinel instead of '-MAXFLOAT'

This seems a more correct/appropriate way of achieving this in C99.

2 years agoneatogen: replace 'MAXFLOAT' in clamping logic with 'FLT_MAX'
Matthew Fernandez [Sat, 12 Feb 2022 03:13:49 +0000 (14:13 +1100)]
neatogen: replace 'MAXFLOAT' in clamping logic with 'FLT_MAX'

This seems a more accurate definition of what overflow would mean under C99.
Though as far as I can tell, it is not possible to reach this code with negative
values in the array, so the `< 0` check is always false. The `>= FLT_MAX` is
true for both `FLT_MAX` itself as well as positive infinity.

2 years agocommon: [nfc] remove commented out 'MAXFLOAT' usage
Matthew Fernandez [Sat, 12 Feb 2022 03:10:45 +0000 (14:10 +1100)]
common: [nfc] remove commented out 'MAXFLOAT' usage

2 years agoneatogen: [nfc] remove 'USE_MAXFLOAT' branch
Matthew Fernandez [Sat, 12 Feb 2022 03:09:55 +0000 (14:09 +1100)]
neatogen: [nfc] remove 'USE_MAXFLOAT' branch

This is never defined in the build.

2 years agoMerge branch 'smattr/EAA625F3-EE98-439D-B175-F947666A46F7' into 'main'
Matthew Fernandez [Tue, 15 Feb 2022 03:37:17 +0000 (03:37 +0000)]
Merge branch 'smattr/EAA625F3-EE98-439D-B175-F947666A46F7' into 'main'

fix incorrect clearing of bits in bitarray

See merge request graphviz/graphviz!2440

2 years agofix incorrect clearing of bits in bitarray
Matthew Fernandez [Fri, 11 Feb 2022 10:40:22 +0000 (21:40 +1100)]
fix incorrect clearing of bits in bitarray

The wrong bitwise operations were used here, resulting in e.g. a set of bit 2 of
of `0b011000` updating to `0b011100` instead of being a no-op.

This bug was present since the first introduction of this interface in
3ced90bd756bb8e56920620f2686e0ba6b482bbb, but this has not yet made it into a
release.

2 years agoadd unit tests for bitarray.h
Matthew Fernandez [Thu, 10 Feb 2022 08:45:34 +0000 (19:45 +1100)]
add unit tests for bitarray.h

This demonstrates a current bug in bit clearing.

2 years agoMerge branch 'smattr/3680D475-238E-4402-AFF9-1B68D2860757' into 'main'
Matthew Fernandez [Mon, 14 Feb 2022 21:18:53 +0000 (21:18 +0000)]
Merge branch 'smattr/3680D475-238E-4402-AFF9-1B68D2860757' into 'main'

CI: fix missing 'OS_ID' env var in ctest jobs

See merge request graphviz/graphviz!2436

2 years agoCI: fix missing 'OS_ID' env var in ctest jobs
Matthew Fernandez [Wed, 9 Feb 2022 05:55:00 +0000 (16:55 +1100)]
CI: fix missing 'OS_ID' env var in ctest jobs

Jobs inheriting from this template were attempting to set `$OS_ID` from the file
OS_ID that did not exist before `install-package.sh` was run. The result was
output in the build log like:

  export OS_ID=$( cat OS_ID )
  cat: OS_ID: No such file or directory

Somewhat surprisingly, tests were still passing. The reason is that `$OS_ID` is
only accessed in ci/tests.py and on Ubuntu (the platform used for both ctest
jobs) the only `$OS_ID`-based skip is for `mingle`, that is also coincidentally
skipped due to these jobs using the CMake build system where `mingle` is not
build. That is, the mingle check is meant to be skipped on lines 104-108, but
actually ends up skipped on lines 116-122 due to `$OS_ID` being empty.

In future, all of this should be refactored to use a less brittle technique for
asking “what distro are we running on?” When moving to Python 3.10,
`platform.freedesktop_os_release()` would be the obvious candidate.

2 years agoCI: shell escape echoed output during Windows build
Matthew Fernandez [Wed, 9 Feb 2022 05:53:46 +0000 (16:53 +1100)]
CI: shell escape echoed output during Windows build

Makes it slightly easier to copy and paste these commands if necessary.

2 years agoMerge branch 'smattr/705AB4C9-1D6E-40FF-B0A9-3668FE37D27D' into 'main'
Matthew Fernandez [Mon, 14 Feb 2022 13:09:13 +0000 (13:09 +0000)]
Merge branch 'smattr/705AB4C9-1D6E-40FF-B0A9-3668FE37D27D' into 'main'

CI: redirect stderr→stdout on Windows during build

See merge request graphviz/graphviz!2439

2 years agoCI: redirect stderr→stdout on Windows during build
Matthew Fernandez [Thu, 10 Feb 2022 11:37:45 +0000 (22:37 +1100)]
CI: redirect stderr→stdout on Windows during build

In CI, the Windows environments run ci/build_windows.py to orchestrate
compilation. This is run under PowerShell, which has the surprising behavior of
(1) hiding stderr and (2) considering any output to stderr a signal to abort the
running program. The combined effect of this is that benign CMake logging
statements like:

  message(WARNING "hello world")

abruptly terminate compilation with the baffling output:

  python : CMake Warning at cmake/FindGD.cmake:52 (message):
  At line:1 char:1
  + python ci/build_windows.py --build-system $env:build_system --platfor ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (CMake Warning a...e:52
        (message)::String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError

This behavior appears to be configurable, but it seems simpler to work around
this by avoiding any stderr output. The exit status of any build commands is
sufficient to signal failure.

Gitlab: #2097

2 years agoMerge branch 'smattr/BA5AA4C3-8A8A-42E9-A3C9-F0357D8D7FE9' into 'main'
Matthew Fernandez [Sun, 13 Feb 2022 20:16:34 +0000 (20:16 +0000)]
Merge branch 'smattr/BA5AA4C3-8A8A-42E9-A3C9-F0357D8D7FE9' into 'main'

upgrade Pytest dependency

See merge request graphviz/graphviz!2444

2 years agoupgrade Pytest dependency
Matthew Fernandez [Sat, 12 Feb 2022 23:31:17 +0000 (10:31 +1100)]
upgrade Pytest dependency

This upgrade brings with it a number of bug fixes for running with Python ≥ 3.8.

2 years agoMerge branch 'smattr/E8A2F5A2-2C7D-453C-8D7E-A309515C594E' into 'main'
Matthew Fernandez [Sat, 12 Feb 2022 21:10:08 +0000 (21:10 +0000)]
Merge branch 'smattr/E8A2F5A2-2C7D-453C-8D7E-A309515C594E' into 'main'

add a test case for #1786

Closes #1786

See merge request graphviz/graphviz!2435

2 years agoadd a test case for #1786
Matthew Fernandez [Tue, 8 Feb 2022 03:14:02 +0000 (14:14 +1100)]
add a test case for #1786

2 years agofix 'dot' test helper failing to encode string input
Matthew Fernandez [Tue, 8 Feb 2022 04:15:27 +0000 (15:15 +1100)]
fix 'dot' test helper failing to encode string input

When asking the `dot` helper function to process a graph from inline input to a
binary output format, the `universal_newlines=True` parameter would not be
passed to the underlying `subprocess.check_output` call, resulting in failure to
encode the input. That is, something like the following:

  dot("png:gd", source="digraph { a -> b; }")

would result in:

  self = <subprocess.Popen object at 0x7fbb862ae390>
      def _communicate(self, input, endtime, orig_timeout):
  …
  >           input_view = memoryview(self._input)
  E           TypeError: memoryview: a bytes-like object is required, not 'str'
  /usr/lib64/python3.6/subprocess.py:1519: TypeError

Note that this problem was latent, as no usage fitting the above scenario
currently exists. Something like this will be introduced in a future commit.

Gitlab: related to #1786

2 years agoMerge branch 'smattr/5DC1591E-4531-4D4F-AA8A-BD596A1D2C0B' into 'main'
Matthew Fernandez [Sat, 12 Feb 2022 19:58:25 +0000 (19:58 +0000)]
Merge branch 'smattr/5DC1591E-4531-4D4F-AA8A-BD596A1D2C0B' into 'main'

sfdpgen: some clean up

See merge request graphviz/graphviz!2437

2 years agosfdpgen: remove dead store of 'DistanceMatrix_restrict_matching' result
Matthew Fernandez [Thu, 10 Feb 2022 04:43:50 +0000 (15:43 +1100)]
sfdpgen: remove dead store of 'DistanceMatrix_restrict_matching' result

The returned value is immediately overwritten after being stored.

2 years agosfdpgen: [nfc] remove DistanceMatrix_restrict_cluster no-op
Matthew Fernandez [Thu, 10 Feb 2022 04:43:11 +0000 (15:43 +1100)]
sfdpgen: [nfc] remove DistanceMatrix_restrict_cluster no-op

2 years agosfdpgen: [nfc] remove duplicated comment
Matthew Fernandez [Thu, 10 Feb 2022 04:27:43 +0000 (15:27 +1100)]
sfdpgen: [nfc] remove duplicated comment

2 years agosfdpgen: [nfc] remove unnecessary casts
Matthew Fernandez [Thu, 10 Feb 2022 04:27:13 +0000 (15:27 +1100)]
sfdpgen: [nfc] remove unnecessary casts

2 years agoMerge branch 'smattr/14DF9C3A-34FA-4052-AAE4-D6D57F7D1D11' into 'main'
Matthew Fernandez [Wed, 9 Feb 2022 07:08:32 +0000 (07:08 +0000)]
Merge branch 'smattr/14DF9C3A-34FA-4052-AAE4-D6D57F7D1D11' into 'main'

enable 'dot_builtins' in RPM package

Closes #1839

See merge request graphviz/graphviz!2434

2 years agoenable 'dot_builtins' in RPM package
Matthew Fernandez [Mon, 7 Feb 2022 06:49:36 +0000 (17:49 +1100)]
enable 'dot_builtins' in RPM package

It is not clear why this was excluded. This partially reverts
e5f514b283fa5fe8690f7d82fe7555e8ce74e371.

Gitlab: closes #1839

2 years agoCI: on RHEL distros, install all RPMs
Matthew Fernandez [Mon, 7 Feb 2022 07:44:11 +0000 (18:44 +1100)]
CI: on RHEL distros, install all RPMs

Commit c334e4e81aad15d3092d7c25038a4d2cf1cbff05 altered this step to only
install RPMs necessary for the test suite at the time. However, an upcoming
commit that enables `dot_builtins` causes graphviz-nox-* to depend on
libgvplugin_webp.so.6 that was not being installed. For simplicity, the present
commit reverts c334e4e81aad15d3092d7c25038a4d2cf1cbff05.

Note that this more closely matches the only reasonable way to use the
CI-produced RPMs: install all of them.

Gitlab: related to #1839

2 years agoCI: install R on Fedora
Matthew Fernandez [Mon, 7 Feb 2022 10:05:58 +0000 (21:05 +1100)]
CI: install R on Fedora

An upcoming commit will install the Graphviz R language bindings. These depend
on the `R` package that is not a dependency of any other currently installed
package.

Gitlab: related to #1839

2 years agoCI: install Perl on Fedora
Matthew Fernandez [Mon, 7 Feb 2022 10:03:26 +0000 (21:03 +1100)]
CI: install Perl on Fedora

An upcoming commit will install the Graphviz Perl language bindings. These
depend on the `perl` package that is not a dependency of any other currently
installed package.

Gitlab: related to #1839

2 years agoMerge branch 'smattr/1301EC82-E002-4551-8386-BB449F2816D6' into 'main'
Matthew Fernandez [Tue, 8 Feb 2022 03:32:15 +0000 (03:32 +0000)]
Merge branch 'smattr/1301EC82-E002-4551-8386-BB449F2816D6' into 'main'

API BREAK: fix: typedef 'ssize_t' to 'SSIZE_T' on Windows

Closes #1804

See merge request graphviz/graphviz!2433

2 years agoAPI BREAK: fix: typedef 'ssize_t' to 'SSIZE_T' on Windows
Matthew Fernandez [Mon, 7 Feb 2022 05:29:27 +0000 (16:29 +1100)]
API BREAK: fix: typedef 'ssize_t' to 'SSIZE_T' on Windows

In several places, code was using `int` as a drop-in replacement for `ssize_t`
on Windows where it does not exist. This is incorrect on some platforms. E.g. on
x86-64 this will result in `ssize_t` being a 32-bit type instead of a 64-bit
type. This change replaces it with the correct Windows equivalent, `SSIZE_T`.¹

¹ https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types?redirectedfrom=MSDN#ssize_t

Gitlab: fixes #1804

2 years agoMerge branch 'smattr/4F4E0C69-AA2D-473F-A930-83FC0A256AAF' into 'main'
Matthew Fernandez [Mon, 7 Feb 2022 08:52:43 +0000 (08:52 +0000)]
Merge branch 'smattr/4F4E0C69-AA2D-473F-A930-83FC0A256AAF' into 'main'

some non-functional changes for simplification/cleanup

See merge request graphviz/graphviz!2432

2 years agonetogen: [nfc] rewrite 'push' and 'pop' macros as functions
Matthew Fernandez [Sun, 6 Feb 2022 06:51:16 +0000 (17:51 +1100)]
netogen: [nfc] rewrite 'push' and 'pop' macros as functions

There is no need for these to be macros. Modern compilers will easily inline
these helpers. Making them functions provides additional type safety.

2 years agoneatogen: [nfc] remove unused 'read_top' macro
Matthew Fernandez [Sun, 6 Feb 2022 06:51:26 +0000 (17:51 +1100)]
neatogen: [nfc] remove unused 'read_top' macro

This macro also appears to be incorrect; it does not use its parameter `h` but
instead uses `s`.

2 years agogrammar.y startgraph: [nfc] remove a static local
Matthew Fernandez [Sun, 6 Feb 2022 06:19:35 +0000 (17:19 +1100)]
grammar.y startgraph: [nfc] remove a static local

A simpler way of achieving the warning squashing the comment here is implying
(uninitialized struct members) is to avoid the use of a static variable
altogether. Beyond being simpler, this explains to the compiler the contents of
this variable do not need to be preserved across calls and gets this function
closer to being thread safe.

2 years agogrammar.y pop: [nfc] fix incorrect pop from global stack
Matthew Fernandez [Sun, 6 Feb 2022 06:03:48 +0000 (17:03 +1100)]
grammar.y pop: [nfc] fix incorrect pop from global stack

This function was incorrectly referencing the global stack, `S`, instead of the
stack passed in. This change is marked NFC because `pop` is only ever called
with `S` as a parameter, but it still seemed worth correcting.

2 years agoMerge branch 'smattr/886DC5C9-BF2B-47F2-9E00-7083AAB2423F' into 'main'
Matthew Fernandez [Sun, 6 Feb 2022 21:39:02 +0000 (21:39 +0000)]
Merge branch 'smattr/886DC5C9-BF2B-47F2-9E00-7083AAB2423F' into 'main'

lib/pack cleanup

See merge request graphviz/graphviz!2430

2 years agogml2gv: [nfc] remove unnecessary include
Matthew Fernandez [Sat, 5 Feb 2022 06:19:57 +0000 (17:19 +1100)]
gml2gv: [nfc] remove unnecessary include

2 years agolib/pack: [nfc] remove duplicate include
Matthew Fernandez [Sat, 5 Feb 2022 07:14:05 +0000 (18:14 +1100)]
lib/pack: [nfc] remove duplicate include

2 years agolib/pack: [nfc] remove open coded NULLs
Matthew Fernandez [Sat, 5 Feb 2022 07:13:52 +0000 (18:13 +1100)]
lib/pack: [nfc] remove open coded NULLs

2 years agolib/pack: [nfc] remove unnecessary parens
Matthew Fernandez [Sat, 5 Feb 2022 06:56:44 +0000 (17:56 +1100)]
lib/pack: [nfc] remove unnecessary parens

2 years agoinsertFn: [nfc] remove unnecessary cast
Matthew Fernandez [Sat, 5 Feb 2022 06:43:55 +0000 (17:43 +1100)]
insertFn: [nfc] remove unnecessary cast

2 years agoMerge branch 'upgrade-to-macos-12-xcode-13' into 'main'
Magnus Jacobsson [Sun, 6 Feb 2022 18:59:48 +0000 (18:59 +0000)]
Merge branch 'upgrade-to-macos-12-xcode-13' into 'main'

Upgrade to MacOS 12, Xcode 13

See merge request graphviz/graphviz!2370

2 years agoCI: upgrade to macos-12-xcode-13
Magnus Jacobsson [Mon, 27 Dec 2021 16:46:00 +0000 (17:46 +0100)]
CI: upgrade to macos-12-xcode-13

2 years agoMerge branch 'smattr/F06FAC81-75F7-4E90-9AA8-368F7D31E8D8' into 'main'
Matthew Fernandez [Sat, 5 Feb 2022 06:08:32 +0000 (06:08 +0000)]
Merge branch 'smattr/F06FAC81-75F7-4E90-9AA8-368F7D31E8D8' into 'main'

cmd/tools: [nfc] some minor cleanup

See merge request graphviz/graphviz!2429

2 years agogxl2gv: [nfc] remove the need to cast 'mapLookup' parameter
Matthew Fernandez [Sat, 5 Feb 2022 01:34:19 +0000 (12:34 +1100)]
gxl2gv: [nfc] remove the need to cast 'mapLookup' parameter

The equivalent of the prior commit on gxl2gv.

2 years agographml2gv: [nfc] remove the need to cast 'mapLookup' parameter
Matthew Fernandez [Sat, 5 Feb 2022 01:32:53 +0000 (12:32 +1100)]
graphml2gv: [nfc] remove the need to cast 'mapLookup' parameter

2 years agographml2gv: [nfc] remove the need to cast 'isAnonGraph' parameter
Matthew Fernandez [Sat, 5 Feb 2022 01:30:21 +0000 (12:30 +1100)]
graphml2gv: [nfc] remove the need to cast 'isAnonGraph' parameter

Equivalent of 3e09cc381e53ece08529dd35d27a7a436dd9ab0f on graphml2gv.

2 years agoMerge branch 'smattr/729B6BDD-7A42-455A-8B12-AA2F3A929663' into 'main'
Matthew Fernandez [Fri, 4 Feb 2022 09:53:50 +0000 (09:53 +0000)]
Merge branch 'smattr/729B6BDD-7A42-455A-8B12-AA2F3A929663' into 'main'

add a test case for #2092

See merge request graphviz/graphviz!2427

2 years agodot2gxl: de-dupe 'gcalloc' implementation
Matthew Fernandez [Thu, 3 Feb 2022 04:06:12 +0000 (15:06 +1100)]
dot2gxl: de-dupe 'gcalloc' implementation

2 years agodot2gxl: [nfc] remove the need to cast 'isAnonGraph' parameter
Matthew Fernandez [Thu, 3 Feb 2022 03:55:57 +0000 (14:55 +1100)]
dot2gxl: [nfc] remove the need to cast 'isAnonGraph' parameter

2 years agoadd a test case for #2092
Matthew Fernandez [Thu, 3 Feb 2022 01:02:06 +0000 (12:02 +1100)]
add a test case for #2092

2 years agoMerge branch 'smattr/E428EEE4-08B8-472D-B3B6-87C93C5D321E' into 'main'
Matthew Fernandez [Fri, 4 Feb 2022 08:00:00 +0000 (08:00 +0000)]
Merge branch 'smattr/E428EEE4-08B8-472D-B3B6-87C93C5D321E' into 'main'

minor test clean up

See merge request graphviz/graphviz!2425

2 years agotest 1594: [nfc] tell 'subprocess' to discard stdout
Matthew Fernandez [Tue, 1 Feb 2022 10:26:56 +0000 (21:26 +1100)]
test 1594: [nfc] tell 'subprocess' to discard stdout

This test case was capturing stdout and then discarding it. It is more efficient
to just attach stdout directly to /dev/null.

2 years agotest 1594: remove work around for #1780
Matthew Fernandez [Tue, 1 Feb 2022 10:23:20 +0000 (21:23 +1100)]
test 1594: remove work around for #1780

Issue #1780 was fixed in a286e358006dd49d2b3348abd8a2aebcffd24dec.

2 years agoMerge branch 'smattr/650B3501-D9F6-4EDA-BE4C-1C8EA4C2283F' into 'main'
Matthew Fernandez [Fri, 4 Feb 2022 06:56:16 +0000 (06:56 +0000)]
Merge branch 'smattr/650B3501-D9F6-4EDA-BE4C-1C8EA4C2283F' into 'main'

add a test case for #2179

See merge request graphviz/graphviz!2426

2 years agotextspan.c: [nfc] remove unnecessary casts
Matthew Fernandez [Wed, 2 Feb 2022 11:50:47 +0000 (22:50 +1100)]
textspan.c: [nfc] remove unnecessary casts

2 years agoadd a test case for #2179
Matthew Fernandez [Tue, 1 Feb 2022 10:21:05 +0000 (21:21 +1100)]
add a test case for #2179

2 years agotest 1449: [nfc] do not capture stdout
Matthew Fernandez [Tue, 1 Feb 2022 10:19:29 +0000 (21:19 +1100)]
test 1449: [nfc] do not capture stdout

Graphviz is being passed `-o /dev/null` in this test case, so there is no need
to capture stdout.

2 years agoMerge branch 'smattr/629BA038-E6B6-4140-8BA3-CFB49323FE14-2' into 'main'
Matthew Fernandez [Thu, 3 Feb 2022 07:22:07 +0000 (07:22 +0000)]
Merge branch 'smattr/629BA038-E6B6-4140-8BA3-CFB49323FE14-2' into 'main'

CMake: fix CMAKE_LIBRARY_PATH is not honored

Closes #1973

See merge request graphviz/graphviz!2422

2 years agoCMake: use more standard, portable mechanism for setting install paths
Matthew Fernandez [Thu, 25 Nov 2021 16:16:36 +0000 (08:16 -0800)]
CMake: use more standard, portable mechanism for setting install paths

Fixes #1973.

Suggested-by: Satadru Pramanik
2 years agoincrease CMake log-level in CI
Matthew Fernandez [Thu, 25 Nov 2021 17:15:24 +0000 (09:15 -0800)]
increase CMake log-level in CI

Allows us to more easily debug failures.

2 years agoCMake: add a variable substitution step for plugin configuration step
Matthew Fernandez [Sun, 30 Jan 2022 23:54:46 +0000 (10:54 +1100)]
CMake: add a variable substitution step for plugin configuration step

This CMake script hard codes some library paths in a way that thwarts
user/system preferences (#1973). Attempts to solve this by falling back on
standard CMake mechanisms have been unsuccessful because an install script like
this runs in an isolated environment where it (correctly) does not have access
to the configuration from the build environment. To resolve this we need a way
to pass the install script parameters/arguments from the build context.
Introducing a level of indirection here gives us such a mechanism.

This change by itself does nothing. However an upcoming change will take
advantage of the `@…@` substitution mechanism enabled by this change.

Note that the word “configure” in these files is used to refer to two distinct
mechanisms:

  1. The CMake `configure_file` command does something analogous to Autotools’
     variable substitution during `./configure`.

  2. The Graphviz `dot -c …` configure step registers installed Graphviz
     plugins.

Gitlab: #1973

2 years agoMerge branch 'smattr/A8790232-0AB5-4072-B45F-50CCECF99A65' into 'main'
Matthew Fernandez [Wed, 2 Feb 2022 12:55:51 +0000 (12:55 +0000)]
Merge branch 'smattr/A8790232-0AB5-4072-B45F-50CCECF99A65' into 'main'

remove support for '-m' command-line option

See merge request graphviz/graphviz!2424

2 years agoremove support for '-m' command-line option
Matthew Fernandez [Tue, 1 Feb 2022 07:24:56 +0000 (18:24 +1100)]
remove support for '-m' command-line option

As described in the changelog entry, LSan and friends are a more effective way
of performing this testing now.

2 years agoMerge branch 'smattr/224C0C90-0ABD-44D2-9D3F-DCAD4702E26D' into 'main'
Matthew Fernandez [Wed, 2 Feb 2022 07:48:28 +0000 (07:48 +0000)]
Merge branch 'smattr/224C0C90-0ABD-44D2-9D3F-DCAD4702E26D' into 'main'

fix Gvedit `-?` and enable building in CI on macOS

See merge request graphviz/graphviz!2419

2 years agoCI: add installation of Qt5 on macOS
Matthew Fernandez [Wed, 26 Jan 2022 09:07:04 +0000 (20:07 +1100)]
CI: add installation of Qt5 on macOS

This is a dependency for building Gvedit on macOS. Note that installation is not
added to the CMake test job because Gvedit is not currently built in the CMake
build system on macOS.

Gitlab: #1842, #1854

2 years agofix: teach Gvedit `-?` on macOS
Matthew Fernandez [Thu, 27 Jan 2022 22:08:03 +0000 (09:08 +1100)]
fix: teach Gvedit `-?` on macOS

This is the equivalent of aa695fabf4ff342488229aabd43c0970470d711f and friends,
but for Gvedit. It was not previously detected that this problem also affects
Gvedit because it is not currently built on macOS in CI. That will be improved
in an upcoming commit.

Gitlab: #1842, #1852

2 years agoMerge branch 'smattr/3D701FC9-FA35-4BB3-BD91-3C6492C688BF' into 'main'
Matthew Fernandez [Wed, 2 Feb 2022 06:45:28 +0000 (06:45 +0000)]
Merge branch 'smattr/3D701FC9-FA35-4BB3-BD91-3C6492C688BF' into 'main'

CI: add a job for enforcing CMake file formatting

See merge request graphviz/graphviz!2423

2 years agoCI: add a job for enforcing CMake file formatting
Matthew Fernandez [Mon, 31 Jan 2022 02:34:12 +0000 (13:34 +1100)]
CI: add a job for enforcing CMake file formatting

This should hopefully reduce the mental load on MR reviewers going forwards.

2 years agoCMake: [nfc] add a leading comment to a macro
Matthew Fernandez [Tue, 1 Feb 2022 04:10:18 +0000 (15:10 +1100)]
CMake: [nfc] add a leading comment to a macro

Squashes a “[C0111] Missing docstring on function or macro declaration”
`cmake-lint` warning.

2 years agoCMake: [nfc] remove excess blank line
Matthew Fernandez [Tue, 1 Feb 2022 03:55:26 +0000 (14:55 +1100)]
CMake: [nfc] remove excess blank line

Squashes a “[C0305] too many newlines between statements” `cmake-lint` warning.

2 years agoCMake: [nfc] uppercase 'dotlink' variable
Matthew Fernandez [Tue, 1 Feb 2022 03:55:01 +0000 (14:55 +1100)]
CMake: [nfc] uppercase 'dotlink' variable

Upcoming changes that introduce `cmake-format` checks complain that this
identifier does not comply with `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`

2 years agoCMake: [nfc] uppercase 'dotcopy' variable
Matthew Fernandez [Tue, 1 Feb 2022 03:54:13 +0000 (14:54 +1100)]
CMake: [nfc] uppercase 'dotcopy' variable

Upcoming changes that introduce `cmake-format` checks complain that this
identifier does not comply with `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`