]> granicus.if.org Git - graphviz/log
graphviz
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_]+`

2 years agoCMake: [nfc] uppercase 'sources' variable
Matthew Fernandez [Tue, 1 Feb 2022 03:51:59 +0000 (14:51 +1100)]
CMake: [nfc] uppercase 'sources' 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: add comments to 'add_custom_command', 'add_custom_target' steps
Matthew Fernandez [Tue, 1 Feb 2022 03:50:45 +0000 (14:50 +1100)]
CMake: add comments to 'add_custom_command', 'add_custom_target' steps

Squashes “[C0113] Missing COMMENT in statement which allows it” `cmake-lint`
warnings.

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

Upcoming changes that introduce `cmake-format` checks complain that this
identifier does not comply with `[0-9A-Z_]+`.

2 years agoCMake: [nfc] wrap to 80 character column width
Matthew Fernandez [Tue, 1 Feb 2022 02:41:36 +0000 (13:41 +1100)]
CMake: [nfc] wrap to 80 character column width

Upcoming changes to introduce `cmake-format` checks default to this, which suits
Graphviz well as it matches the (claimed) `clang-format` C/C++ style.

2 years agoCMake: [nfc] fix a comment typo
Matthew Fernandez [Tue, 1 Feb 2022 02:39:57 +0000 (13:39 +1100)]
CMake: [nfc] fix a comment typo

2 years agoCMake: [nfc] standardize on 2-space indentation
Matthew Fernandez [Tue, 1 Feb 2022 01:27:04 +0000 (12:27 +1100)]
CMake: [nfc] standardize on 2-space indentation

Upcoming changes to introduce `cmake-format` checks default to this, which suits
Graphviz well as it matches the (claimed) `clang-format` C/C++ style.

2 years agoCMake: [nfc] uppercase 'PangoCairo_*' variables
Matthew Fernandez [Tue, 1 Feb 2022 01:25:33 +0000 (12:25 +1100)]
CMake: [nfc] uppercase 'PangoCairo_*' variables

Upcoming changes that introduce `cmake-format` checks complain that these
identifiers do not comply with `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`.

2 years agoCMake: [nfc] uppercase 'Svgpp_*' variables
Matthew Fernandez [Tue, 1 Feb 2022 01:05:53 +0000 (12:05 +1100)]
CMake: [nfc] uppercase 'Svgpp_*' variables

Upcoming changes that introduce `cmake-format` checks complain that these
identifiers do not comply with `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`.

2 years agoCMake: [nfc] uppercase 'RapidXml_*' variables
Matthew Fernandez [Mon, 31 Jan 2022 12:00:10 +0000 (23:00 +1100)]
CMake: [nfc] uppercase 'RapidXml_*' variables

Upcoming changes that introduce `cmake-format` checks complain that these
identifiers do not comply with `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`.

2 years agoCMake: [nfc] uppercase 'Getopt_*' variables
Matthew Fernandez [Mon, 31 Jan 2022 11:15:38 +0000 (22:15 +1100)]
CMake: [nfc] uppercase 'Getopt_*' variables

Upcoming changes that introduce `cmake-format` checks complain that these
identifiers do not comply with `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`.

2 years agoCMake: [nfc] uppercase 'Cairo_*' variables
Matthew Fernandez [Mon, 31 Jan 2022 06:57:50 +0000 (17:57 +1100)]
CMake: [nfc] uppercase 'Cairo_*' variables

Upcoming changes that introduce `cmake-format` checks complain that these
identifiers do not comply with `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`.

2 years agoMerge branch 'fix-stdout-and-stderr-flushing-at-exit-on-mingw' into 'main'
Magnus Jacobsson [Mon, 31 Jan 2022 18:11:55 +0000 (18:11 +0000)]
Merge branch 'fix-stdout-and-stderr-flushing-at-exit-on-mingw' into 'main'

Fix stdout and stderr flushing at exit on MinGW

Closes #2178

See merge request graphviz/graphviz!2416

2 years agoMerge branch 'smattr/B165A187-BED3-4E13-8876-799331BFE43F' into 'main'
Matthew Fernandez [Mon, 31 Jan 2022 11:01:03 +0000 (11:01 +0000)]
Merge branch 'smattr/B165A187-BED3-4E13-8876-799331BFE43F' into 'main'

remove unused ltmain.sh.patch

See merge request graphviz/graphviz!2420

2 years agoadd a CHANGELOG entry for the stdout/stderr not flushed fix
Magnus Jacobsson [Thu, 20 Jan 2022 20:09:54 +0000 (21:09 +0100)]
add a CHANGELOG entry for the stdout/stderr not flushed fix

2 years agoreplace all instances of return from main with graphviz_exit()
Magnus Jacobsson [Wed, 19 Jan 2022 21:30:40 +0000 (22:30 +0100)]
replace all instances of return from main with graphviz_exit()

Fixes https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agoreplace all instances of exit() with graphviz_exit()
Magnus Jacobsson [Sun, 16 Jan 2022 15:46:41 +0000 (16:46 +0100)]
replace all instances of exit() with graphviz_exit()

Partial fix for https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agolneato: autotools: add 'lib' to include directories
Magnus Jacobsson [Mon, 17 Jan 2022 22:02:03 +0000 (23:02 +0100)]
lneato: autotools: add 'lib' to include directories

An upcoming commit need this in order to be able to add an include of
cgraph/exit.h.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agolefty: autotools: add 'lib' to include directories
Magnus Jacobsson [Mon, 17 Jan 2022 07:07:40 +0000 (08:07 +0100)]
lefty: autotools: add 'lib' to include directories

An upcoming commit need this in order to be able to add an include of
cgraph/exit.h.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agodotty: autotools: add 'lib' to include directories
Magnus Jacobsson [Mon, 17 Jan 2022 20:18:44 +0000 (21:18 +0100)]
dotty: autotools: add 'lib' to include directories

An upcoming commit need this in order to be able to add an include of
cgraph/exit.h.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agodiffimg: autotools: add 'lib' to include directories
Magnus Jacobsson [Mon, 17 Jan 2022 07:07:40 +0000 (08:07 +0100)]
diffimg: autotools: add 'lib' to include directories

An upcoming commit need this in order to be able to add an include of
cgraph/exit.h.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agolneato: MSBuild: add 'lib' to additional include directories
Magnus Jacobsson [Sun, 16 Jan 2022 23:05:45 +0000 (00:05 +0100)]
lneato: MSBuild: add 'lib' to additional include directories

An upcoming commit need this in order to be able to add an include of
cgraph/exit.h.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agolefty: MSBuild: add 'lib' to additional include directories
Magnus Jacobsson [Sun, 16 Jan 2022 23:05:21 +0000 (00:05 +0100)]
lefty: MSBuild: add 'lib' to additional include directories

An upcoming commit need this in order to be able to add an include of
cgraph/exit.h.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agodotty: MSBuild: add 'lib' to additional include directories
Magnus Jacobsson [Sun, 16 Jan 2022 23:04:40 +0000 (00:04 +0100)]
dotty: MSBuild: add 'lib' to additional include directories

An upcoming commit need this in order to be able to add an include of
cgraph/exit.h.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agodiffimg: MSBuild: add 'lib' to additional include directories
Magnus Jacobsson [Sun, 16 Jan 2022 23:06:18 +0000 (00:06 +0100)]
diffimg: MSBuild: add 'lib' to additional include directories

An upcoming commit need this in order to be able to add an include of
cgraph/exit.h.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agosparse: add a graphviz_exit function to general.h if STANDALONE
Magnus Jacobsson [Sun, 16 Jan 2022 16:10:59 +0000 (17:10 +0100)]
sparse: add a graphviz_exit function to general.h if STANDALONE

An previous commit added the same function to cgraph/exit.h, but that
library is not supposed to be used when STANDALONE is defined.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agosparse: remove useless include of cgraph/sprint.h
Magnus Jacobsson [Sun, 16 Jan 2022 17:39:21 +0000 (18:39 +0100)]
sparse: remove useless include of cgraph/sprint.h

The last use of anything from sprint.h was removed in
https://gitlab.com/graphviz/graphviz/-/commit/c2d3526427a7259aa656ab72c83b43232ebfd806.

2 years agocgraph: add a graphviz_exit function in a new header file exit.h
Magnus Jacobsson [Sun, 16 Jan 2022 15:40:29 +0000 (16:40 +0100)]
cgraph: add a graphviz_exit function in a new header file exit.h

Towards https://gitlab.com/graphviz/graphviz/-/issues/2178.

2 years agoremove unused ltmain.sh.patch
Matthew Fernandez [Sun, 30 Jan 2022 21:32:56 +0000 (08:32 +1100)]
remove unused ltmain.sh.patch

Use of this patch was dropped in b9a51d568fc4c842b8d4a930c50a655526a08fa7 in
2007.

2 years agoMerge branch 'smattr/11D3486A-E1F5-44A2-B19C-139B87699C57' into 'main'
Matthew Fernandez [Thu, 27 Jan 2022 10:28:35 +0000 (10:28 +0000)]
Merge branch 'smattr/11D3486A-E1F5-44A2-B19C-139B87699C57' into 'main'

suppress XType warnings during testing on macOS

See merge request graphviz/graphviz!2418

2 years agosuppress XType warnings during testing on macOS
Matthew Fernandez [Wed, 26 Jan 2022 07:25:46 +0000 (18:25 +1100)]
suppress XType warnings during testing on macOS

When upgrading from macOS 11 to macOS 12 in CI, running Graphviz outputs:

  dot[32116:62347] XType: com.apple.fonts is not accessible.
  dot[32116:62347] XType: XTFontStaticRegistry is enabled.

This causes some spurious failures in tests that are expecting stderr to be
silent. These warnings do not seem a serious issue, so this change suppresses
them during testing.

Gitlab: #2164

2 years agoMerge branch 'smattr/A97D3899-3C26-441B-809F-236E5F6E02FF' into 'main'
Matthew Fernandez [Thu, 27 Jan 2022 09:31:16 +0000 (09:31 +0000)]
Merge branch 'smattr/A97D3899-3C26-441B-809F-236E5F6E02FF' into 'main'

CI: add Automake installation for macOS

See merge request graphviz/graphviz!2417

2 years agoCI: add Automake installation for macOS
Matthew Fernandez [Mon, 24 Jan 2022 21:13:42 +0000 (08:13 +1100)]
CI: add Automake installation for macOS

Automake (and its dependent, Autoconf) are needed for Autotools-based Graphviz
compilation. They are currently available in the CI Gitlab macOS 11 shared
runner environment incidentally due to a transitive dependency via php.¹ The
same is not true in the macOS 12 environment.²

This commit moves to explicitly installing these Graphviz dependencies rather
relying on getting them implicitly. This makes the CI task for the macOS
Autotools build pass on macOS 12.

Gitlab: #2164

¹ https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/macstadium/orka/-/blob/df5b9cad3a482ec8b79b401c8d03bbc60f2f97c4/toolchain/big-sur.yml#L105-111
² https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/macstadium/orka/-/blob/df5b9cad3a482ec8b79b401c8d03bbc60f2f97c4/toolchain/monterey.yml#L48-49

2 years agoMerge branch 'smattr/3b702435-a919-4479-b146-c17909819e6e' into 'main'
Matthew Fernandez [Thu, 20 Jan 2022 03:12:40 +0000 (03:12 +0000)]
Merge branch 'smattr/3b702435-a919-4479-b146-c17909819e6e' into 'main'

work towards removing FALSE, TRUE

See merge request graphviz/graphviz!2410

2 years agolefty: use C99 bools for 'Erun' variables
Matthew Fernandez [Sun, 16 Jan 2022 20:01:37 +0000 (12:01 -0800)]
lefty: use C99 bools for 'Erun' variables

2 years agolefty: use a C99 bool for 'gmapon'
Matthew Fernandez [Sun, 16 Jan 2022 19:59:39 +0000 (11:59 -0800)]
lefty: use a C99 bool for 'gmapon'

2 years agoscan_num: use a C99 bool for 'saw_rp'
Matthew Fernandez [Sun, 16 Jan 2022 19:58:21 +0000 (11:58 -0800)]
scan_num: use a C99 bool for 'saw_rp'

2 years agoscan_num: use a C99 bool for 'saw_digit'
Matthew Fernandez [Sun, 16 Jan 2022 19:57:53 +0000 (11:57 -0800)]
scan_num: use a C99 bool for 'saw_digit'

2 years agolefty boolop: fix incorrect type in return statement
Matthew Fernandez [Sun, 16 Jan 2022 19:56:31 +0000 (11:56 -0800)]
lefty boolop: fix incorrect type in return statement

This was accidentally omitted in e5b641c6891e52d503bc63cb9f354b54abcdce8e.

2 years agolefty: use C99 bools for 'errdo' globals
Matthew Fernandez [Sun, 16 Jan 2022 19:55:42 +0000 (11:55 -0800)]
lefty: use C99 bools for 'errdo' globals

2 years agolefty: return a C99 bool from 'orderop'
Matthew Fernandez [Sun, 16 Jan 2022 19:52:51 +0000 (11:52 -0800)]
lefty: return a C99 bool from 'orderop'

2 years agolefty: use C99 bool constants to set 'Gnocallbacks'
Matthew Fernandez [Sun, 16 Jan 2022 19:50:14 +0000 (11:50 -0800)]
lefty: use C99 bool constants to set 'Gnocallbacks'

2 years agoSparseMatrix_symmetrize: take a C99 bool instead of an int
Matthew Fernandez [Sun, 16 Jan 2022 19:46:27 +0000 (11:46 -0800)]
SparseMatrix_symmetrize: take a C99 bool instead of an int

2 years agoSparseMatrix_is_symmetric: take a C99 bool instead of an int
Matthew Fernandez [Sun, 16 Jan 2022 19:42:06 +0000 (11:42 -0800)]
SparseMatrix_is_symmetric: take a C99 bool instead of an int

2 years agolefty Mhaspointers: use C99 bool values
Matthew Fernandez [Sun, 16 Jan 2022 19:33:11 +0000 (11:33 -0800)]
lefty Mhaspointers: use C99 bool values

2 years agouse C99 bools to set 'onstack'
Matthew Fernandez [Sun, 16 Jan 2022 19:30:36 +0000 (11:30 -0800)]
use C99 bools to set 'onstack'

2 years agoremove comparisons against 'TRUE' literal
Matthew Fernandez [Sun, 16 Jan 2022 19:20:35 +0000 (11:20 -0800)]
remove comparisons against 'TRUE' literal

The variables involved here are all booleans or used exclusively as booleans.

2 years agoremove comparisons against 'FALSE' literal
Matthew Fernandez [Sun, 16 Jan 2022 19:14:55 +0000 (11:14 -0800)]
remove comparisons against 'FALSE' literal

2 years agoMerge branch 'smattr/1C578045-99DC-414C-BF4A-C517F2EC40B8' into 'main'
Matthew Fernandez [Thu, 20 Jan 2022 02:09:29 +0000 (02:09 +0000)]
Merge branch 'smattr/1C578045-99DC-414C-BF4A-C517F2EC40B8' into 'main'

mingle: replace some `unique_ptr` with `vector`

See merge request graphviz/graphviz!2412

2 years agomingle bundle: replace a 'unique_ptr' with a 'vector'
Matthew Fernandez [Sun, 16 Jan 2022 22:04:09 +0000 (14:04 -0800)]
mingle bundle: replace a 'unique_ptr' with a 'vector'

Similar to the prior commit, when the `std::unique_ptr` usage was added here in
176c8a163a951a2b801956ed4a00da05603e3a06, I was incorrectly too focused on
preserving the previous property of this being a heap-allocated array. This is
not necessary, and using a `std::vector` instead allows more flexibility. E.g.
depending on the `std::vector` implementation, it could choose to allocate this
array on the stack instead of the heap.

2 years agomingle genBundleColors: replace a 'unique_ptr' with a 'vector'
Matthew Fernandez [Sun, 16 Jan 2022 22:00:51 +0000 (14:00 -0800)]
mingle genBundleColors: replace a 'unique_ptr' with a 'vector'

When the `std::unique_ptr` usage was added here in
869891f9c87b326ddef4de461b92de98ec647b82, I was incorrectly too focused on
preserving the previous property of this being a heap-allocated array. This is
not necessary, and using a `std::vector` instead allows more flexibility. E.g.
depending on the `std::vector` implementation, it could choose to allocate this
array on the stack instead of the heap.

2 years agoMerge branch 'smattr/AC433706-8F92-4102-816C-75433E82B00D' into 'main'
Matthew Fernandez [Wed, 19 Jan 2022 17:17:53 +0000 (17:17 +0000)]
Merge branch 'smattr/AC433706-8F92-4102-816C-75433E82B00D' into 'main'

expr: fix misinterpretation of shifts

Closes #2103

See merge request graphviz/graphviz!2409

2 years agoexpr: fix misinterpretation of shifts
Matthew Fernandez [Sun, 16 Jan 2022 18:47:37 +0000 (10:47 -0800)]
expr: fix misinterpretation of shifts

It is fairly clear from the surrounding code that these instances were writing
to the wrong destination and, in some cases, reading from the wrong sources. The
effect of this bug was a little slippery as the underlying storage is a union
with `integer` and `floating` occupying the same storage, so this change does
not alter which bytes are stored to. Additionally users rarely left or right
shift within GVPR scripts, so it is unlikely this affected any real world code.

Gitlab: Fixes #2103

2 years agoexpr: remove legacy IBM compiler work around
Matthew Fernandez [Sun, 16 Jan 2022 18:37:48 +0000 (10:37 -0800)]
expr: remove legacy IBM compiler work around

Despite dredging the commit log, comp.lang, and Stack Overflow, I have been
unable to determine what these comments refer to. They read to me like working
around a register allocator bug. AFAIK every production compiler from the last
decade has been capable of these kind of one-line shifts without work arounds.

Gitlab: #2103

2 years agoMerge branch 'smattr/D5729AAE-102F-4B2D-8A3A-8E02AD0D9A7A' into 'main'
Matthew Fernandez [Wed, 19 Jan 2022 16:16:12 +0000 (16:16 +0000)]
Merge branch 'smattr/D5729AAE-102F-4B2D-8A3A-8E02AD0D9A7A' into 'main'

reformat example code

See merge request graphviz/graphviz!2408

2 years agoMerge branch 'add-missing-changlog-entry-for-fixed-lneato' into 'main'
Magnus Jacobsson [Wed, 19 Jan 2022 07:46:21 +0000 (07:46 +0000)]
Merge branch 'add-missing-changlog-entry-for-fixed-lneato' into 'main'

add a CHANGELOG entry for lneato fix

See merge request graphviz/graphviz!2415

2 years agoadd a CHANGELOG entry for lneato fix
Magnus Jacobsson [Tue, 18 Jan 2022 22:02:17 +0000 (23:02 +0100)]
add a CHANGELOG entry for lneato fix

2 years agodot.demo/dot.c: [nfc] align with C99 style and clang-format
Matthew Fernandez [Sun, 16 Jan 2022 18:19:35 +0000 (10:19 -0800)]
dot.demo/dot.c: [nfc] align with C99 style and clang-format

2 years agodot.demo/demo.c: [nfc] align with C99 style and clang-format
Matthew Fernandez [Sun, 16 Jan 2022 18:18:18 +0000 (10:18 -0800)]
dot.demo/demo.c: [nfc] align with C99 style and clang-format

2 years agodot.demo/simple.c: [nfc] align with C99 style and clang-format
Matthew Fernandez [Sun, 16 Jan 2022 18:16:16 +0000 (10:16 -0800)]
dot.demo/simple.c: [nfc] align with C99 style and clang-format

2 years agodot.demo/example.c: [nfc] align with C99 style and clang-format
Matthew Fernandez [Sun, 16 Jan 2022 18:15:01 +0000 (10:15 -0800)]
dot.demo/example.c: [nfc] align with C99 style and clang-format

2 years agodot.demo/neatopack.c:[nfc] align with C99 style and clang-format
Matthew Fernandez [Sun, 16 Jan 2022 18:11:44 +0000 (10:11 -0800)]
dot.demo/neatopack.c:[nfc]  align with C99 style and clang-format

2 years agoMerge branch 'smattr/97832B69-55F8-4C57-9704-188684569B12' into 'main'
Matthew Fernandez [Wed, 19 Jan 2022 05:43:01 +0000 (05:43 +0000)]
Merge branch 'smattr/97832B69-55F8-4C57-9704-188684569B12' into 'main'

remove Lefty from CI and portable source tarball

See merge request graphviz/graphviz!2413

2 years agoremove Lefty dependencies from CI Docker images
Matthew Fernandez [Mon, 17 Jan 2022 04:49:11 +0000 (20:49 -0800)]
remove Lefty dependencies from CI Docker images

As of the prior commit, these are no longer used.

2 years agono longer enable Lefty in Autotools builds
Matthew Fernandez [Mon, 17 Jan 2022 04:43:14 +0000 (20:43 -0800)]
no longer enable Lefty in Autotools builds

1a4ad00b59cc1e1e9302fcbd1a205495ee59cab5 made the Autotools build system default
to disabling Lefty as a step towards its deprecation. As three months have
passed, the present commit takes the next step and removes Lefty support from
the portable tarball and stops building it in CI. Users who still want Lefty can
build from source and re-enable it. If we hear from no such users in the next
three months, build system support for Lefty will be removed altogether. If a
further three months go by with no complaints, Lefty will then be deleted from
the repository.

2 years agoremove Lefty test cases
Matthew Fernandez [Mon, 17 Jan 2022 04:40:37 +0000 (20:40 -0800)]
remove Lefty test cases

The Lefty tool is deprecated and planned to be removed.
1a4ad00b59cc1e1e9302fcbd1a205495ee59cab5 toggled it to default to disabled in
the Autotools build system. The present change is a preparatory commit for
dropping explicit re-enabling of it in CI, allowing it to no longer be compiled
in CI.

2 years agoMerge branch 'smattr/BC8175D4-61E0-42FB-B7FA-EFC605CC9333' into 'main'
Matthew Fernandez [Tue, 18 Jan 2022 16:40:27 +0000 (16:40 +0000)]
Merge branch 'smattr/BC8175D4-61E0-42FB-B7FA-EFC605CC9333' into 'main'

get_cycle_centroid: undo caching or cycle list

See merge request graphviz/graphviz!2414

2 years agoget_cycle_centroid: undo caching of 'cycle' list
Matthew Fernandez [Mon, 17 Jan 2022 16:09:11 +0000 (08:09 -0800)]
get_cycle_centroid: undo caching of 'cycle' list

This function attempted to save time by caching the results of a graph cycle
search and then reusing them in a future call. The logic used for this caching
is invalid. It compares graph pointers to see if it is operating on the same
graph as last time, but this can return a false positive if the previous graph
has been deallocated and a new (unrelated) graph has been allocated at the same
address.

This logic would eventually have to be unwound or adjusted in order to support
multithreading in this code too.

It is possible this is the root cause of the issue described in #2162, though I
was never able to reproduce that issue.

2 years agoMerge branch 'smattr/884E30F6-80F8-47C7-B083-88BC1718A1F5' into 'main'
Matthew Fernandez [Tue, 18 Jan 2022 07:22:45 +0000 (07:22 +0000)]
Merge branch 'smattr/884E30F6-80F8-47C7-B083-88BC1718A1F5' into 'main'

agglomerative_ink_bundling_internal: remove disabled code

See merge request graphviz/graphviz!2411

2 years agoagglomerative_ink_bundling_internal: remove disabled code
Matthew Fernandez [Sun, 16 Jan 2022 21:57:00 +0000 (13:57 -0800)]
agglomerative_ink_bundling_internal: remove disabled code

This code has been a no-op since its first addition in
0cd264937e210404c56c195b9b74749e41ffa332. Anything ANDed with `FALSE` is
`FALSE`.

2 years agoMerge branch 'fix-lneato-on-windows' into 'main'
Magnus Jacobsson [Mon, 17 Jan 2022 17:35:34 +0000 (17:35 +0000)]
Merge branch 'fix-lneato-on-windows' into 'main'

Fix flaky lneato usage on Windows

Closes #1934

See merge request graphviz/graphviz!2407

2 years agotest_tools: remove now obsolete workaround for flaky lneato usage
Magnus Jacobsson [Sun, 16 Jan 2022 12:24:46 +0000 (13:24 +0100)]
test_tools: remove now obsolete workaround for flaky lneato usage

2 years agolneato: Windows: correct argument interpretation with respect to unicode
Magnus Jacobsson [Sun, 16 Jan 2022 09:52:23 +0000 (10:52 +0100)]
lneato: Windows: correct argument interpretation with respect to unicode

Change from WinMain to wWinMain to handle unicode correctly and avoid
the flakiness of the test_tools test.

Fixes https://gitlab.com/graphviz/graphviz/-/issues/1934.

The culprit was probably this warning which now is removed:

C:\GitLab-Runner\builds\magjac\graphviz\cmd\lneato\mswin32\lneato.c(46,40): warning C4133: 'function': incompatible types - from 'LPSTR' to 'LPCWSTR' [C:\GitLab-Runner\builds\magjac\graphviz\cmd\lneato\lneato.vcxproj]

LPSTR is a char* and LPCWSTR is a const wchar_t*. The former points to
an array of 8-bit characters, while the latter points to an array of
16-bit characters. See
https://docs.microsoft.com/en-us/windows/win32/learnwin32/working-with-strings.

In order for the argument interpretation to work correctly after this
change, another change was necessary. The type of the argv variable is
LPWSTR which is a wchar_t* so we must use wcscmp and wide-character
literal string to get a correct 16-bit unicode character comparison.

Removes this warning:

C:\GitLab-Runner\builds\magjac\graphviz\cmd\lneato\mswin32\lneato.c(47,36): warning C4133: 'function': incompatible types - from 'LPWSTR' to 'const char *' [C:\GitLab-Runner\builds\magjac\graphviz\cmd\lneato\lneato.vcxproj]

Although not necessary, this commit also renames the lpCmdLine
argument to pCmdLine in order to match the naming in the wWinMain
signature.

This commit also removes the expectation that lneato should fail at
least one time out of 100 in the test_tools test. The actual
workaround for the flakiness will be removed in the next commit in
this series.

2 years agolneato: Windows: correct argument types to WinMain
Magnus Jacobsson [Sat, 15 Jan 2022 16:38:24 +0000 (17:38 +0100)]
lneato: Windows: correct argument types to WinMain

Fixes these warnings:

C:\GitLab-Runner\builds\magjac\graphviz\cmd\lneato\mswin32\lneato.c(27,28): warning C4028: formal parameter 1 different from declaration [C:\GitLab-Runner\builds\magjac\graphviz\cmd\lneato\lneato.vcxproj]
C:\GitLab-Runner\builds\magjac\graphviz\cmd\lneato\mswin32\lneato.c(27,46): warning C4028: formal parameter 2 different from declaration [C:\GitLab-Runner\builds\magjac\graphviz\cmd\lneato\lneato.vcxproj]

See
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-winmain.

2 years agolneato: Windows: replace obsolete PASCAL declaration with WINAPI
Magnus Jacobsson [Sat, 15 Jan 2022 16:35:11 +0000 (17:35 +0100)]
lneato: Windows: replace obsolete PASCAL declaration with WINAPI

See
https://docs.microsoft.com/en-us/cpp/cpp/obsolete-calling-conventions?view=msvc-170.

2 years agoMerge branch 'smattr/34de5d89-7e39-49ff-857a-325fd4169853' into 'main'
Matthew Fernandez [Sun, 16 Jan 2022 20:00:25 +0000 (20:00 +0000)]
Merge branch 'smattr/34de5d89-7e39-49ff-857a-325fd4169853' into 'main'

move the remainder of mingle into C++

Closes #2154

See merge request graphviz/graphviz!2405

2 years agonearest_neighbor_graph_ann: use a reference for 'nz0' instead of pointer
Matthew Fernandez [Sat, 15 Jan 2022 22:18:48 +0000 (14:18 -0800)]
nearest_neighbor_graph_ann: use a reference for 'nz0' instead of pointer

This parameter is non-nullable, so we can make the type signature reflect that.

2 years agoagglomerative_ink_bundling_internal: remove 'xx' manual memory management
Matthew Fernandez [Sat, 15 Jan 2022 22:13:52 +0000 (14:13 -0800)]
agglomerative_ink_bundling_internal: remove 'xx' manual memory management

2 years agoAgglomerative_Ink_Bundling: remove 'inks' manual memory management
Matthew Fernandez [Sat, 15 Jan 2022 22:11:29 +0000 (14:11 -0800)]
Agglomerative_Ink_Bundling: remove 'inks' manual memory management

2 years agoAgglomerative_Ink_Bundling: remove unused 'prev' pointers
Matthew Fernandez [Sat, 15 Jan 2022 22:04:37 +0000 (14:04 -0800)]
Agglomerative_Ink_Bundling: remove unused 'prev' pointers

This struct was used as a node in a doubly-linked list. But the back pointers
were never used. This commit simplifies it into a singly-linked-list.

2 years agolib/mingle headers: drop 'extern "C"'
Matthew Fernandez [Sat, 15 Jan 2022 21:41:51 +0000 (13:41 -0800)]
lib/mingle headers: drop 'extern "C"'

These headers are only used by C++ code, so they no longer need to fallback to C
linkage.

Gitlab: #2154

2 years agoAgglomerative_Ink_Bundling_new: remove 'pick' manual memory management
Matthew Fernandez [Sat, 15 Jan 2022 21:34:22 +0000 (13:34 -0800)]
Agglomerative_Ink_Bundling_new: remove 'pick' manual memory management

2 years agoAgglomerative_Ink_Bundling_establish: remove unused 'mask'
Matthew Fernandez [Sat, 15 Jan 2022 21:32:45 +0000 (13:32 -0800)]
Agglomerative_Ink_Bundling_establish: remove unused 'mask'

It is unclear to me what the purpose of this local was intended to be.
Furthermore it was being mis-allocated as if it were an array of doubles, not
ints.

2 years agoAgglomerative_Ink_Bundling_establish: remove 'matching' manual memory management
Matthew Fernandez [Sat, 15 Jan 2022 21:30:52 +0000 (13:30 -0800)]
Agglomerative_Ink_Bundling_establish: remove 'matching' manual memory management

Gitlab: #2154

2 years agoremove now unused 'Vector_*' API
Matthew Fernandez [Sat, 15 Jan 2022 21:27:46 +0000 (13:27 -0800)]
remove now unused 'Vector_*' API

2 years agoAgglomerative_Ink_Bundling_establish: replace 'cedges' with a 'std::vector'
Matthew Fernandez [Sat, 15 Jan 2022 21:24:20 +0000 (13:24 -0800)]
Agglomerative_Ink_Bundling_establish: replace 'cedges' with a 'std::vector'

This simplifies the code as well as making it significantly easier for humans
and compilers to understand what is going on here.

2 years agoagglomerative_bundling.c: move into C++
Matthew Fernandez [Sat, 15 Jan 2022 21:11:09 +0000 (13:11 -0800)]
agglomerative_bundling.c: move into C++

This completes moving all of lib/mingle into C++. Closes #2154.

2 years agoagglomerative_bundling.c: explicitly cast the results of 'realloc'
Matthew Fernandez [Sat, 15 Jan 2022 21:12:31 +0000 (13:12 -0800)]
agglomerative_bundling.c: explicitly cast the results of 'realloc'

This has no effect in C, but an upcoming change will move this code to C++ where
this is required.

Gitlab: #2154

2 years agoagglomerative_bundling.c: explicitly cast the results of 'malloc'
Matthew Fernandez [Sat, 15 Jan 2022 21:09:07 +0000 (13:09 -0800)]
agglomerative_bundling.c: explicitly cast the results of 'malloc'

This has no effect in C, but an upcoming change will move this code to C++ where
this is required.

Gitlab: #2154

2 years agoMerge branch 'smattr/4d675265-10af-4846-b248-df57d7ea3ae2' into 'main'
Matthew Fernandez [Sun, 16 Jan 2022 18:46:18 +0000 (18:46 +0000)]
Merge branch 'smattr/4d675265-10af-4846-b248-df57d7ea3ae2' into 'main'

more boolean → bool modernization

See merge request graphviz/graphviz!2406

2 years agoAPI BREAK: remove now-unused 'boolean' type
Matthew Fernandez [Sun, 16 Jan 2022 00:43:17 +0000 (16:43 -0800)]
API BREAK: remove now-unused 'boolean' type

2 years agoAPI BREAK: use C99 bools for booleans in 'GVC_common_s'
Matthew Fernandez [Sun, 16 Jan 2022 00:37:40 +0000 (16:37 -0800)]
API BREAK: use C99 bools for booleans in 'GVC_common_s'

2 years agoAPI BREAK: return a C99 bool from 'gvusershape_file_access'
Matthew Fernandez [Sun, 16 Jan 2022 00:31:42 +0000 (16:31 -0800)]
API BREAK: return a C99 bool from 'gvusershape_file_access'

2 years agoAPI BREAK: use a C99 bool for 'pccomps' output parameter
Matthew Fernandez [Sun, 16 Jan 2022 00:29:57 +0000 (16:29 -0800)]
API BREAK: use a C99 bool for 'pccomps' output parameter

2 years agoAPI BREAK: use a C99 bool array for 'pack_info.fixed'
Matthew Fernandez [Sun, 16 Jan 2022 00:27:42 +0000 (16:27 -0800)]
API BREAK: use a C99 bool array for 'pack_info.fixed'