]> granicus.if.org Git - graphviz/log
graphviz
3 years agoMerge branch 'fix-awk-crlf-agnosticity-on-macos-catalina' into 'main'
Magnus Jacobsson [Mon, 11 Oct 2021 06:43:31 +0000 (06:43 +0000)]
Merge branch 'fix-awk-crlf-agnosticity-on-macos-catalina' into 'main'

Fix problem with awk crlf agnosticity on macOS Catalina

See merge request graphviz/graphviz!2210

3 years agocommon: CMake: make awk crlf agnostic when generating svgcolor_lib only when using...
Magnus Jacobsson [Sat, 9 Oct 2021 13:57:44 +0000 (15:57 +0200)]
common: CMake: make awk crlf agnostic when generating svgcolor_lib only when using Cygwin

3 years agocommon: autotools: make awk crlf agnostic when generating svgcolor_lib only when...
Magnus Jacobsson [Sat, 9 Oct 2021 13:58:46 +0000 (15:58 +0200)]
common: autotools: make awk crlf agnostic when generating svgcolor_lib only when using Cygwin

3 years agoMerge branch 'smattr/B8F865EA-1BE4-4990-96CF-2D5DCEB70122' into 'main'
Matthew Fernandez [Sun, 10 Oct 2021 21:35:32 +0000 (21:35 +0000)]
Merge branch 'smattr/B8F865EA-1BE4-4990-96CF-2D5DCEB70122' into 'main'

libgvc: replace header guards with more modern #pragma once

See merge request graphviz/graphviz!2212

3 years agolibgvc: replace header guards with more modern #pragma once
Matthew Fernandez [Sun, 10 Oct 2021 04:12:10 +0000 (21:12 -0700)]
libgvc: replace header guards with more modern #pragma once

3 years agoMerge branch 'smattr/0c5e6e8f-e750-47bf-b91f-d2c13242d5d1' into 'main'
Matthew Fernandez [Sun, 10 Oct 2021 20:17:12 +0000 (20:17 +0000)]
Merge branch 'smattr/0c5e6e8f-e750-47bf-b91f-d2c13242d5d1' into 'main'

remove generation of ps.h and commit generated output instead

See merge request graphviz/graphviz!2211

3 years agoremove generation of ps.h and commit generated output instead
Matthew Fernandez [Sat, 9 Oct 2021 21:24:03 +0000 (14:24 -0700)]
remove generation of ps.h and commit generated output instead

The generation of ps.h from ps.txt was trivial and ps.txt was no easier to edit
or update than the resulting generated header. Removing it and using a static
source instead accelerates all three builds, increases portability and moves
towards dropping the dependency on Awk.

Related to #2118.

3 years agoMerge branch 'smattr/a5361ad7-b54f-484d-9fde-b9b85f00e0d4' into 'main'
Matthew Fernandez [Sun, 10 Oct 2021 19:15:30 +0000 (19:15 +0000)]
Merge branch 'smattr/a5361ad7-b54f-484d-9fde-b9b85f00e0d4' into 'main'

lib/dotgen: clean up and warning squashing

See merge request graphviz/graphviz!2203

3 years agosameport: remove unused parameter
Matthew Fernandez [Thu, 7 Oct 2021 03:56:23 +0000 (20:56 -0700)]
sameport: remove unused parameter

3 years agosameport.c: remove obsolete code
Matthew Fernandez [Thu, 7 Oct 2021 03:55:37 +0000 (20:55 -0700)]
sameport.c: remove obsolete code

3 years agozapLayers: remove unused parameter
Matthew Fernandez [Thu, 7 Oct 2021 03:53:20 +0000 (20:53 -0700)]
zapLayers: remove unused parameter

3 years agocompleteregularpath: squash a -Wunused-parameter warning
Matthew Fernandez [Thu, 7 Oct 2021 03:50:21 +0000 (20:50 -0700)]
completeregularpath: squash a -Wunused-parameter warning

3 years agomake_regular_edge: use a proper boolean for checking edge type is spline
Matthew Fernandez [Thu, 7 Oct 2021 03:48:36 +0000 (20:48 -0700)]
make_regular_edge: use a proper boolean for checking edge type is spline

This change also removes a -Wshadow compiler warning.

3 years agodotsplines.c: rephrase some open coded fmin, fmax
Matthew Fernandez [Thu, 7 Oct 2021 03:43:31 +0000 (20:43 -0700)]
dotsplines.c: rephrase some open coded fmin, fmax

3 years agodotsplines.c: remove commented out code
Matthew Fernandez [Thu, 7 Oct 2021 03:43:16 +0000 (20:43 -0700)]
dotsplines.c: remove commented out code

3 years agodotsplines.c: remove unnecessary bracketing
Matthew Fernandez [Thu, 7 Oct 2021 03:34:44 +0000 (20:34 -0700)]
dotsplines.c: remove unnecessary bracketing

3 years agoportcmp: rephrase to avoid conversion to int
Matthew Fernandez [Thu, 7 Oct 2021 02:57:42 +0000 (19:57 -0700)]
portcmp: rephrase to avoid conversion to int

This function was seemingly incorrectly casting the (float) result of a float
subtraction to an integer. Apart from triggering compiler warnings, this had the
effect of concluding points that were merely close together were actually equal.

3 years ago_dot_splines: remove unnecessary cast and address operations
Matthew Fernandez [Thu, 7 Oct 2021 02:55:29 +0000 (19:55 -0700)]
_dot_splines: remove unnecessary cast and address operations

3 years agoMerge branch 'smattr/EF03B314-9D8C-4B6C-8466-8DC715A590E2' into 'main'
Matthew Fernandez [Sun, 10 Oct 2021 18:14:20 +0000 (18:14 +0000)]
Merge branch 'smattr/EF03B314-9D8C-4B6C-8466-8DC715A590E2' into 'main'

MS Build build system: remove minimal rebuild enabling

See merge request graphviz/graphviz!2207

3 years agoMS Build build system: remove minimal rebuild enabling
Matthew Fernandez [Sat, 9 Oct 2021 18:22:23 +0000 (11:22 -0700)]
MS Build build system: remove minimal rebuild enabling

This setting controls the `/Gm` flag to the compiler which is deprecated.¹ When
using this, the compiler warns:

  cl : command line warning D9035: option 'Gm' has been deprecated and will be
    removed in a future release

¹ https://docs.microsoft.com/en-us/cpp/build/reference/gm-enable-minimal-rebuild?view=msvc-160

3 years agoMerge branch 'smattr/E25E87C9-5338-4CDA-81A0-47CA52A1067A' into 'main'
Matthew Fernandez [Sun, 10 Oct 2021 16:27:12 +0000 (16:27 +0000)]
Merge branch 'smattr/E25E87C9-5338-4CDA-81A0-47CA52A1067A' into 'main'

smyrna: more dead code removal

See merge request graphviz/graphviz!2204

3 years agosmyrna: remove prototype for unimplemented 'btnTVUnhighlightAll_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 04:03:49 +0000 (21:03 -0700)]
smyrna: remove prototype for unimplemented 'btnTVUnhighlightAll_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVHighlightAll_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 04:03:22 +0000 (21:03 -0700)]
smyrna: remove prototype for unimplemented 'btnTVHighlightAll_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVUnselectAll_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 04:02:55 +0000 (21:02 -0700)]
smyrna: remove prototype for unimplemented 'btnTVUnselectAll_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVSelectAll_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 04:02:27 +0000 (21:02 -0700)]
smyrna: remove prototype for unimplemented 'btnTVSelectAll_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVFilterClear_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 04:02:01 +0000 (21:02 -0700)]
smyrna: remove prototype for unimplemented 'btnTVFilterClear_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVGotopage_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 04:01:24 +0000 (21:01 -0700)]
smyrna: remove prototype for unimplemented 'btnTVGotopage_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVLast_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 04:00:56 +0000 (21:00 -0700)]
smyrna: remove prototype for unimplemented 'btnTVLast_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVNext_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 04:00:26 +0000 (21:00 -0700)]
smyrna: remove prototype for unimplemented 'btnTVNext_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVPrevious_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 03:59:56 +0000 (20:59 -0700)]
smyrna: remove prototype for unimplemented 'btnTVPrevious_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVFirst_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 03:59:26 +0000 (20:59 -0700)]
smyrna: remove prototype for unimplemented 'btnTVFirst_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVFilter_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 03:58:51 +0000 (20:58 -0700)]
smyrna: remove prototype for unimplemented 'btnTVFilter_clicked_cb'

3 years agosmyrna: remove prototype for unimplemented 'btnTVDelete_clicked_cb'
Matthew Fernandez [Fri, 8 Oct 2021 03:58:20 +0000 (20:58 -0700)]
smyrna: remove prototype for unimplemented 'btnTVDelete_clicked_cb'

3 years agosmyrna: remove 'cgbTVSelect_toggled_cb' no-op
Matthew Fernandez [Fri, 8 Oct 2021 03:57:34 +0000 (20:57 -0700)]
smyrna: remove 'cgbTVSelect_toggled_cb' no-op

3 years agosmyrna: remove 'cgbTVVisible_toggled_cb' no-op
Matthew Fernandez [Fri, 8 Oct 2021 03:56:51 +0000 (20:56 -0700)]
smyrna: remove 'cgbTVVisible_toggled_cb' no-op

3 years agosmyrna: remove 'cgbTVHighlighted_toggled_cb' no-op
Matthew Fernandez [Fri, 8 Oct 2021 03:56:13 +0000 (20:56 -0700)]
smyrna: remove 'cgbTVHighlighted_toggled_cb' no-op

3 years agoMerge branch 'smattr/DFDF0E87-1EF5-490D-A08A-AB53B614A394' into 'main'
Matthew Fernandez [Sat, 9 Oct 2021 23:41:04 +0000 (23:41 +0000)]
Merge branch 'smattr/DFDF0E87-1EF5-490D-A08A-AB53B614A394' into 'main'

remove lib/spine

See merge request graphviz/graphviz!2206

3 years agoremove lib/spine
Matthew Fernandez [Sat, 9 Oct 2021 04:08:13 +0000 (21:08 -0700)]
remove lib/spine

Despite being compiled and hooked into all three build systems, nothing in
Graphviz uses this and none of its artifacts are installed. Its compilation
appears to be an exercise without purpose.

3 years agolibcommon: remove unused 'UF_remove'
Matthew Fernandez [Sat, 9 Oct 2021 04:06:52 +0000 (21:06 -0700)]
libcommon: remove unused 'UF_remove'

3 years agoMerge branch 'fix-bom-in-graphviz-version-file' into 'main'
Magnus Jacobsson [Sat, 9 Oct 2021 10:39:46 +0000 (10:39 +0000)]
Merge branch 'fix-bom-in-graphviz-version-file' into 'main'

CI: avoid BOM in GRAPHVIZ_VERSION file in windows build jobs

Closes #2133

See merge request graphviz/graphviz!2205

3 years agoCI: remove archiving of GRAPHVIZ_VERSION from MinGW and Cygwin CMake jobs
Magnus Jacobsson [Fri, 8 Oct 2021 05:27:33 +0000 (07:27 +0200)]
CI: remove archiving of GRAPHVIZ_VERSION from MinGW and Cygwin CMake jobs

There're no downstream jobs to use it anyway and future CMake test
jobs can generate it themselves.

3 years agoCI: remove archiving of GRAPHVIZ_VERSION from the windows-cygwin-build-using-autogen job
Magnus Jacobsson [Fri, 8 Oct 2021 05:23:35 +0000 (07:23 +0200)]
CI: remove archiving of GRAPHVIZ_VERSION from the windows-cygwin-build-using-autogen job

There's no downstream job to use it anyway and a future test job can
generate it itself.

3 years agoCI: add generation of GRAPHVIZ_VERSION also for macOS CMake test job
Magnus Jacobsson [Fri, 8 Oct 2021 05:02:10 +0000 (07:02 +0200)]
CI: add generation of GRAPHVIZ_VERSION also for macOS CMake test job

Commit b4047f93aa3c1a3718b39493e5814532fa0850fe added this for all
other jobs, but missed the macOS test job for some reason.

3 years agoCI: avoid BOM in GRAPHVIZ_VERSION file in windows-cygwin-build-using-autogen job
Magnus Jacobsson [Thu, 7 Oct 2021 18:20:32 +0000 (20:20 +0200)]
CI: avoid BOM in GRAPHVIZ_VERSION file in windows-cygwin-build-using-autogen job

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

3 years agoCI: avoid BOM in COLLECTION file in windows build jobs
Magnus Jacobsson [Thu, 7 Oct 2021 18:19:18 +0000 (20:19 +0200)]
CI: avoid BOM in COLLECTION file in windows build jobs

3 years agoCI: avoid BOM in GRAPHVIZ_VERSION file in windows build jobs
Magnus Jacobsson [Thu, 7 Oct 2021 18:19:02 +0000 (20:19 +0200)]
CI: avoid BOM in GRAPHVIZ_VERSION file in windows build jobs

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

3 years agoMerge branch 'smattr/05f4cdeb-0e09-4cfc-ac55-d8822807d4a5' into 'main'
Matthew Fernandez [Fri, 8 Oct 2021 16:00:17 +0000 (16:00 +0000)]
Merge branch 'smattr/05f4cdeb-0e09-4cfc-ac55-d8822807d4a5' into 'main'

libcommon: provide more generic XML escaping

See merge request graphviz/graphviz!2198

3 years agocommon: remove 'xml_url_string'
Matthew Fernandez [Mon, 4 Oct 2021 00:19:44 +0000 (17:19 -0700)]
common: remove 'xml_url_string'

As of the previous commit, all calls to `xml_url_string` have been replaced with
calls to `xml_escape`.

Related to #1868.

3 years agoreplace 'gvputs(… xml_url_string(…))' with 'xml_escape(…)'
Matthew Fernandez [Mon, 4 Oct 2021 00:13:29 +0000 (17:13 -0700)]
replace 'gvputs(… xml_url_string(…))' with 'xml_escape(…)'

Similar to previous `xml_string` and `xml_string0` related changes, this avoids
dynamic allocations and makes the affected code thread safe.

Related to #1868.

3 years agocommon: remove 'xml_string0'
Matthew Fernandez [Sun, 3 Oct 2021 23:53:43 +0000 (16:53 -0700)]
common: remove 'xml_string0'

All calls of this function have now been refactored to use `xml_escape`.

Related to #1868.

3 years agocommon: remove 'xml_string'
Matthew Fernandez [Sun, 3 Oct 2021 23:48:16 +0000 (16:48 -0700)]
common: remove 'xml_string'

All calls of this function have now been refactored to use `xml_escape`.

Related to #1868.

3 years agogv2gml emitAttr: replace 'fprintf(… xml_string(…))' with 'xml_escape(…)'
Matthew Fernandez [Sun, 3 Oct 2021 18:10:33 +0000 (11:10 -0700)]
gv2gml emitAttr: replace 'fprintf(… xml_string(…))' with 'xml_escape(…)'

Similar to the prior commits, this avoids dynamic allocation and improves thread
safety. This is intended to be a functional no-op.

Related to #1868.

3 years agopango_textlayout: replace 'agxbput(… xml_string0(…))' with 'xml_escape(…)'
Matthew Fernandez [Sun, 3 Oct 2021 17:30:18 +0000 (10:30 -0700)]
pango_textlayout: replace 'agxbput(… xml_string0(…))' with 'xml_escape(…)'

Similar to the prior commit, this avoids dynamic allocating – well, some,
`axbput` itself is still dynamically allocating – and improves thread safety.
This is intended to be a functional no-op.

Related to #1868.

3 years agoreplace 'gvputs(… xml_string0(…))' with 'xml_escape(…)'
Matthew Fernandez [Sun, 3 Oct 2021 17:15:48 +0000 (10:15 -0700)]
replace 'gvputs(… xml_string0(…))' with 'xml_escape(…)'

This is, again, a functional no-op. But it has the effect of removing dynamic
allocations and making this code thread-safe.

Related to #1868.

3 years agoreplace 'gvprintf(… xml_string(…))' with 'gvputs_xml'
Matthew Fernandez [Sat, 2 Oct 2021 03:35:39 +0000 (20:35 -0700)]
replace 'gvprintf(… xml_string(…))' with 'gvputs_xml'

A first demonstration of how to use the `xml_escape` functionality introduced in
preceding commits. Note that, while this is intended to be a non-functional
change, this does side step intermediate buffering in `xml_string` and escaped
output is now passed directly to `gvputs`.

Related to #1868.

3 years agoVisio plugin: replace redeclaration of 'xml_string' with a #include
Matthew Fernandez [Sun, 3 Oct 2021 17:03:07 +0000 (10:03 -0700)]
Visio plugin: replace redeclaration of 'xml_string' with a #include

There is no need for this duplicate prototype, or to lie about its type
signature.

Related to #1868.

3 years agoimplement a 'gvputs' alternative that does XML-escaping
Matthew Fernandez [Sun, 3 Oct 2021 16:35:36 +0000 (09:35 -0700)]
implement a 'gvputs' alternative that does XML-escaping

This will be used in an upcoming commit to replace `gvputs` when used in
combination with `xml_string`.

Related to #1868.

3 years agoplugin core: swap duplicated prototypes for missing includes
Matthew Fernandez [Sat, 2 Oct 2021 03:13:41 +0000 (20:13 -0700)]
plugin core: swap duplicated prototypes for missing includes

This file is calling functions `xml_string` `xml_url_string` without including
the header that prototypes them, utils.h. There seems to be no reason to avoid
this and locally re-prototype these functions.

Related to #1868.

3 years agoexpose a primitive 'xml_escape' for generic XML escaping
Matthew Fernandez [Sat, 2 Oct 2021 02:29:56 +0000 (19:29 -0700)]
expose a primitive 'xml_escape' for generic XML escaping

This function is intended to be a flexible XML-escaper that subsumes
`xml_string`, `xml_string0`, and `xml_url_string`. Unlike the preceding named
functions, calling `xml_escape` is thread-safe and does not mandate dynamic
allocation.

Related to #1868.

3 years agoxml_url_string: call xml_core instead of repeating logic
Matthew Fernandez [Sat, 2 Oct 2021 02:16:02 +0000 (19:16 -0700)]
xml_url_string: call xml_core instead of repeating logic

Related to #1868.

3 years agoxml_core: make '-' and ' ' escaping configurable
Matthew Fernandez [Sat, 2 Oct 2021 01:46:34 +0000 (18:46 -0700)]
xml_core: make '-' and ' ' escaping configurable

This is a non-functional change. It is preparation to allow `xml_url_string` to
use `xml_core`.

Related to #1868.

3 years agoxml_string0: outline the inner loop body functionality
Matthew Fernandez [Sat, 2 Oct 2021 01:35:26 +0000 (18:35 -0700)]
xml_string0: outline the inner loop body functionality

The motivation for this change is to move towards consolidating XML-escaping
functionality. The introduced function, `xml_core`, is intended to be usable by
`xml_url_string` and other Graphviz XML escaping functions in future.

This aim of consolidation hopefully also explains why this change looks more
complicated than might be expected. It is intended to be functionally a no-op.
But `xml_core` takes a generalized callback and state because it is imagined a
future caller may want to pass in, e.g. `gvputs` as their target sink for
XML-escaped data. That is, future changes may side step the static buffer usage
and allocation that happens in `xml_string0` and instead pump bytes directly
into a final target file.

Related to #1868

3 years agoxml_isentity: take a const pointer instead of a mutable one
Matthew Fernandez [Sat, 2 Oct 2021 01:10:14 +0000 (18:10 -0700)]
xml_isentity: take a const pointer instead of a mutable one

This function does not modify the pointed to data of its parameter, and this
will simplify some upcoming changes.

Related to #1868.

3 years agoxml_isentity: outline [a-zA-Z] check
Matthew Fernandez [Sat, 2 Oct 2021 00:32:41 +0000 (17:32 -0700)]
xml_isentity: outline [a-zA-Z] check

This has no functional effect, but makes the code slightly more readable.

3 years agoxml_isentity: use ctype.h functions for readability
Matthew Fernandez [Sat, 2 Oct 2021 00:16:56 +0000 (17:16 -0700)]
xml_isentity: use ctype.h functions for readability

This has no functional impact, but just makes the code simpler to read and less
error prone.

3 years agoMerge branch 'smattr/949303BC-D384-42CF-A449-3969EA5F0175' into 'main'
Matthew Fernandez [Fri, 8 Oct 2021 04:53:33 +0000 (04:53 +0000)]
Merge branch 'smattr/949303BC-D384-42CF-A449-3969EA5F0175' into 'main'

upgrade Pylint and remove 'whitelist' terminology

See merge request graphviz/graphviz!2201

3 years agoswitch to inclusive terminology 'allow-list' instead of 'whitelist' in Pylint
Matthew Fernandez [Wed, 6 Oct 2021 00:31:00 +0000 (17:31 -0700)]
switch to inclusive terminology 'allow-list' instead of 'whitelist' in Pylint

Pylint commit 12beaa0d3fa050b68dff092520966c63d2f0e437 added this alternative
spelling for this option, in line with the aim of using more inclusive
terminology. This made it into Pylint 2.7.3. As of the prior commit, Graphviz is
upgraded to Pylint 2.7.3 and can use this new spelling.

3 years agoupgrade Pylint 2.7.1 → 2.7.3
Matthew Fernandez [Wed, 6 Oct 2021 00:22:04 +0000 (17:22 -0700)]
upgrade Pylint 2.7.1 → 2.7.3

Commit a9c626e7f6a81f0949b1e4134e17c8968f13256b cherry-picked some upcoming
Pylint changes related to inclusive terminology. This and the remainder of the
changes relevant to Graphviz (the `extension-pkg-allow-list` option) made their
way into Pylint 2.7.3. By upgrading to 2.7.3 “whitelist” terminology can be
removed from Graphviz’ Pylint configuration.

Note that a9c626e7f6a81f0949b1e4134e17c8968f13256b incorrectly quotes Pylint
commit hashes from PR3961¹ that never made their way into the main Pylint branch
as-is but were rebased. The corresponding commit hashes are:

  * 850c442dbda8d332049971d5c38f82b86da44f1d became
    d19c7733717ae9ad0a527233c2950473dce3ffcf
  * 12a76469782fab5c23d78039c4bfb37e3331945a became
    12beaa0d3fa050b68dff092520966c63d2f0e437

¹ https://github.com/PyCQA/pylint/pull/3961

3 years agoMerge branch 'smattr/383BFACC-1BDD-4992-84FB-12ECD80D55FF' into 'main'
Matthew Fernandez [Fri, 8 Oct 2021 01:14:40 +0000 (01:14 +0000)]
Merge branch 'smattr/383BFACC-1BDD-4992-84FB-12ECD80D55FF' into 'main'

remove explicit support for PHP5 SWIG bindings in the Autotools build system

See merge request graphviz/graphviz!2200

3 years agoremove explicit support for PHP5 SWIG bindings in the Autotools build system
Matthew Fernandez [Mon, 4 Oct 2021 23:47:24 +0000 (16:47 -0700)]
remove explicit support for PHP5 SWIG bindings in the Autotools build system

Older versions of SWIG can generate bindings for a variety of PHP versions.
Periodically SWIG bumps the version of PHP targeted by the default flag,
`-php`:¹

  SWIG version       `-php` effect   PHP5 support?   PHP7 support?
  ================================================================
  <1.3.26            `-php4`         no              no
  ≥1.3.26, <1.3.37   `-php4`         yes             no
  ≥1.3.37, <3.0.11   `-php5`         yes             no
  ≥3.0.11, <4.0.0    `-php5`         yes             yes
  ≥4.0.0             `-php7`         yes             yes

This commit changes the behavior under the Autotools build system:

  SWIG version       old behavior     new behavior
  ================================================
  <1.3.26            target PHP4  ==  target PHP4
  ≥1.3.26, <1.3.37   target PHP5  →   target PHP4
  ≥1.3.37, <3.0.11   target PHP5  ==  target PHP5
  ≥3.0.11, <4.0.0    target PHP7  ==  target PHP7
  ≥4.0.0             target PHP7  ==  target PHP7

It seems reasonable to consider the first three rows of the above table
irrelevant. The last version of PHP5, 5.6, was EOLed on 2018-12-31,² so any
users in rows 1-3 of the table have been unsupported for some time. In practice,
only users in row 2 are affected by this change, who are using a version of SWIG
released prior to 2009-01-12.³

In future, it may make sense to drop build system support for the `-php` flag
altogether and *only* support `-php7`, given that using `-php` on an older
version of SWIG that defaults to PHP5 probably produces uncompilable code
anyway.

¹ http://www.swig.org/Doc4.0/Php.html
² https://www.php.net/eol.php
³ https://github.com/swig/swig/releases

3 years agoMerge branch 'smattr/F4CD811A-5132-47F8-A5D3-2208237B457B' into 'main'
Matthew Fernandez [Thu, 7 Oct 2021 16:51:44 +0000 (16:51 +0000)]
Merge branch 'smattr/F4CD811A-5132-47F8-A5D3-2208237B457B' into 'main'

more smyrna dead code removal

See merge request graphviz/graphviz!2199

3 years agosmyrna: remove 'btnToolMove_clicked' no-op
Matthew Fernandez [Sat, 2 Oct 2021 15:40:21 +0000 (08:40 -0700)]
smyrna: remove 'btnToolMove_clicked' no-op

3 years agosmyrna: remove 'btnToolCursor_clicked' no-op
Matthew Fernandez [Sat, 2 Oct 2021 15:39:39 +0000 (08:39 -0700)]
smyrna: remove 'btnToolCursor_clicked' no-op

3 years agosmyrna: remove unused 'btnToolFindEdge_clicked'
Matthew Fernandez [Sat, 2 Oct 2021 15:38:09 +0000 (08:38 -0700)]
smyrna: remove unused 'btnToolFindEdge_clicked'

3 years agosmyrna: remove unused 'btnToolDeleteEdge_clicked'
Matthew Fernandez [Sat, 2 Oct 2021 15:37:35 +0000 (08:37 -0700)]
smyrna: remove unused 'btnToolDeleteEdge_clicked'

3 years agosmyrna: remove unused 'btnToolAddEdge_clicked'
Matthew Fernandez [Sat, 2 Oct 2021 15:36:57 +0000 (08:36 -0700)]
smyrna: remove unused 'btnToolAddEdge_clicked'

3 years agosmyrna: remove unused 'btnToolFindNode_clicked'
Matthew Fernandez [Sat, 2 Oct 2021 15:36:26 +0000 (08:36 -0700)]
smyrna: remove unused 'btnToolFindNode_clicked'

3 years agosmyrna: remove unused 'btnToolDeleteNode_clicked'
Matthew Fernandez [Sat, 2 Oct 2021 15:35:54 +0000 (08:35 -0700)]
smyrna: remove unused 'btnToolDeleteNode_clicked'

3 years agosmyrna: remove unused 'btnToolAddNode_clicked'
Matthew Fernandez [Sat, 2 Oct 2021 15:35:17 +0000 (08:35 -0700)]
smyrna: remove unused 'btnToolAddNode_clicked'

3 years agosmyrna: remove prototypes for unimplemented toolbox functions
Matthew Fernandez [Sat, 2 Oct 2021 15:32:55 +0000 (08:32 -0700)]
smyrna: remove prototypes for unimplemented toolbox functions

The implementations of these were all removed in
02e266e74b1cf217c9bc8555e9fd4608c2d3e91a.

3 years agosmyrna: remove commented out code in smyrnadefs.h
Matthew Fernandez [Sat, 2 Oct 2021 15:19:25 +0000 (08:19 -0700)]
smyrna: remove commented out code in smyrnadefs.h

3 years agosmyrna: remove unused 'guibuffer'
Matthew Fernandez [Sat, 2 Oct 2021 15:14:37 +0000 (08:14 -0700)]
smyrna: remove unused 'guibuffer'

The last use of this was removed in b7687bc4b8964f5257e61a248270960572435532.

3 years agoMerge branch 'smattr/1B7E88AD-ABB7-4CC6-B676-7A7D653FB628' into 'main'
Matthew Fernandez [Wed, 6 Oct 2021 14:40:35 +0000 (14:40 +0000)]
Merge branch 'smattr/1B7E88AD-ABB7-4CC6-B676-7A7D653FB628' into 'main'

fix: upgrade Pytest 6.2.2 → 6.2.4

See merge request graphviz/graphviz!2202

3 years agofix: upgrade Pytest 6.2.2 → 6.2.4
Matthew Fernandez [Wed, 6 Oct 2021 02:47:17 +0000 (19:47 -0700)]
fix: upgrade Pytest 6.2.2 → 6.2.4

Python 3.10 was released on 2021-10-04 with what appears to be a breaking
change.¹ Graphviz’ Windows CI tasks (intentionally) install an unpinned
version of Python 3, so they get whatever the latest Python 3 version available
on Chocolatey is. Python 3.10 became available in Chocolatey on 2021-10-05 and
Windows CI tasks immediately started failing. The root cause is that 3.10
exposes a latent bug in Pytest.² This bug is reportedly fixed in Pytest 6.2.4,
so upgrading should repair Windows CI.

¹ https://bugs.python.org/issue43798
² https://github.com/pytest-dev/pytest/issues/8539

3 years agoRevert "plugin/core: autotools: make awk crlf agnostic when generating ps.h"
Emden R. Gansner [Tue, 5 Oct 2021 21:01:02 +0000 (17:01 -0400)]
Revert "plugin/core: autotools: make awk crlf agnostic when generating ps.h"

This reverts commit 50e7d9768b9c02287a0d68e64233c7f713d1f4b8.

In standard awk, only the first character in RS is used, so regular expressions don't work. This means the resulting ps.h in plugins/core contains an illegal C string constant.

3 years agoMerge branch 'smattr/420913E5-02E6-430D-A210-0DD8BC3F7315' into 'main'
Matthew Fernandez [Sat, 2 Oct 2021 03:57:30 +0000 (03:57 +0000)]
Merge branch 'smattr/420913E5-02E6-430D-A210-0DD8BC3F7315' into 'main'

more smyrna dead code removal

See merge request graphviz/graphviz!2196

3 years agosmyrna: remove unused 'frmObjectBtnCancel_clicked'
Matthew Fernandez [Thu, 30 Sep 2021 02:57:35 +0000 (19:57 -0700)]
smyrna: remove unused 'frmObjectBtnCancel_clicked'

3 years agosmyrna: remove unused 'on_dlgOpenGraph_btncancel_clicked'
Matthew Fernandez [Thu, 30 Sep 2021 02:56:56 +0000 (19:56 -0700)]
smyrna: remove unused 'on_dlgOpenGraph_btncancel_clicked'

3 years agosmyrna: remove unused 'frmObjectBtnOK_clicked'
Matthew Fernandez [Thu, 30 Sep 2021 02:56:23 +0000 (19:56 -0700)]
smyrna: remove unused 'frmObjectBtnOK_clicked'

3 years agosmyrna: remove unused 'on_dlgOpenGraph_btnOK_clicked'
Matthew Fernandez [Thu, 30 Sep 2021 02:55:50 +0000 (19:55 -0700)]
smyrna: remove unused 'on_dlgOpenGraph_btnOK_clicked'

3 years agosmyrna: remove unused 'attr_widgets_modifiedSlot'
Matthew Fernandez [Thu, 30 Sep 2021 02:54:47 +0000 (19:54 -0700)]
smyrna: remove unused 'attr_widgets_modifiedSlot'

3 years agosmyrna: remove 'attr_widgets_modified' that is never read
Matthew Fernandez [Thu, 30 Sep 2021 02:53:36 +0000 (19:53 -0700)]
smyrna: remove 'attr_widgets_modified' that is never read

3 years agosmyrna: remove unused gui.c globals
Matthew Fernandez [Thu, 30 Sep 2021 02:52:24 +0000 (19:52 -0700)]
smyrna: remove unused gui.c globals

3 years agosmyrna: remove unused 'Color_Widget'
Matthew Fernandez [Thu, 30 Sep 2021 02:46:27 +0000 (19:46 -0700)]
smyrna: remove unused 'Color_Widget'

3 years agosmyrna: remove past deleted prototypes
Matthew Fernandez [Thu, 30 Sep 2021 02:31:50 +0000 (19:31 -0700)]
smyrna: remove past deleted prototypes

These were all removed in 7bfe3c0d255829ff9a837ff85e3c14dd63636771.

3 years agosmyrna: remove unused 'get_attribute_string_value_from_widget'
Matthew Fernandez [Thu, 30 Sep 2021 02:37:46 +0000 (19:37 -0700)]
smyrna: remove unused 'get_attribute_string_value_from_widget'

3 years agosmyrna: remove prototypes of deleted functions
Matthew Fernandez [Thu, 30 Sep 2021 02:36:56 +0000 (19:36 -0700)]
smyrna: remove prototypes of deleted functions

These functions were removed in af92d6ce857bfa235d6fe771088074a9979b7172.

3 years agoMerge branch 'smattr/EE8B63B0-BCF9-4965-BF06-D885D15A5F4C' into 'main'
Matthew Fernandez [Sat, 2 Oct 2021 02:36:31 +0000 (02:36 +0000)]
Merge branch 'smattr/EE8B63B0-BCF9-4965-BF06-D885D15A5F4C' into 'main'

fix GVPR incorrect interpretation of color strings

Closes #1956

See merge request graphviz/graphviz!2197

3 years agofix GVPR incorrect interpretation of color strings
Matthew Fernandez [Thu, 30 Sep 2021 03:29:01 +0000 (20:29 -0700)]
fix GVPR incorrect interpretation of color strings

The logical operators here were pretty clearly meant to be `&&` not `||`. But
this kind of micro-optimization is unnecessary on modern machines anyway, so we
can just rewrite this into something that is more obvious for both readers and
the compiler.

It would have been nice to add a provoking test case for this as well, but it is
not clear to me how exactly to reach this path. This bug has been open for quite
a while, so it seems simpler to apply the obvious fix and move on.

Fixes #1956.

3 years agoMerge branch 'smattr/EFCF3C3B-5099-47C0-8C68-B580D736A900' into 'main'
Matthew Fernandez [Sat, 2 Oct 2021 01:13:14 +0000 (01:13 +0000)]
Merge branch 'smattr/EFCF3C3B-5099-47C0-8C68-B580D736A900' into 'main'

more smyrna clean up

See merge request graphviz/graphviz!2195