]> granicus.if.org Git - graphviz/log
graphviz
3 years agofindStopColor: [nfc] use a C99 bool return type instead of boolean
Matthew Fernandez [Sun, 19 Dec 2021 20:04:44 +0000 (12:04 -0800)]
findStopColor: [nfc] use a C99 bool return type instead of boolean

3 years agoMerge branch 'smattr/95e25ecc-fefe-433a-9c35-6909841b342b' into 'main'
Matthew Fernandez [Mon, 20 Dec 2021 00:13:31 +0000 (00:13 +0000)]
Merge branch 'smattr/95e25ecc-fefe-433a-9c35-6909841b342b' into 'main'

some dijkstra clean up

See merge request graphviz/graphviz!2349

3 years agodijkstra.c: reflow some text
Matthew Fernandez [Sun, 19 Dec 2021 19:52:47 +0000 (11:52 -0800)]
dijkstra.c: reflow some text

3 years agodijkstra.c: use standard 'FLT_MAX' instead of 'MAXFLOAT'
Matthew Fernandez [Sun, 19 Dec 2021 19:37:41 +0000 (11:37 -0800)]
dijkstra.c: use standard 'FLT_MAX' instead of 'MAXFLOAT'

This code is simply relying on some initial value that is “larger than any
reasonable result from the following computation.” So `FLT_MAX` is clearer and
more portable.

3 years agodijkstra_bounded: remove an allocator optimization
Matthew Fernandez [Sun, 19 Dec 2021 19:46:01 +0000 (11:46 -0800)]
dijkstra_bounded: remove an allocator optimization

Similar to the prior commit, the previous code was actually a _deoptimization_.

3 years agodijkstra: remove an allocator optimization
Matthew Fernandez [Sun, 19 Dec 2021 19:30:03 +0000 (11:30 -0800)]
dijkstra: remove an allocator optimization

This function was using a static local for the index array under the assumption
that resizing an existing dynamically allocated buffer is cheaper than
allocating a new one. This is generally not true in this use case. Calling
`realloc` here was (incorrectly) telling the allocator the caller needed to
retain the prior content of the array. In other words, this was actually a
_deoptimization_. Undoing this and letting the allocator more accurately
perceive that this is a transient array allocation results in (1) more efficient
behavior and (2) less unnecessarily retained memory.

3 years agodijkstra.c: make 'DIST_MAX' a 'DistType' instead of 'double'
Matthew Fernandez [Sun, 19 Dec 2021 19:20:02 +0000 (11:20 -0800)]
dijkstra.c: make 'DIST_MAX' a 'DistType' instead of 'double'

It is not clear to me why this value was type cast to a `double` when all uses
of it either explicitly or implicitly cast it back to `DistType`.

3 years agodijkstra: remove use of raw 'INT_MAX'
Matthew Fernandez [Sun, 19 Dec 2021 19:17:59 +0000 (11:17 -0800)]
dijkstra: remove use of raw 'INT_MAX'

This code was relying on this value being the same as `DIST_MAX`. `DIST_MAX` is
currently set to `INT_MAX`, but using `INT_MAX` directly here implied it was
safe to change the definition of `DIST_MAX` without updating this location,
which was not true.

3 years agoremove NONCORE-guarded code
Matthew Fernandez [Sun, 19 Dec 2021 19:03:17 +0000 (11:03 -0800)]
remove NONCORE-guarded code

Nothing in the build systems ever define this.

3 years agoMerge branch 'remove-pathplan-def-file' into 'main'
Magnus Jacobsson [Sun, 19 Dec 2021 21:17:16 +0000 (21:17 +0000)]
Merge branch 'remove-pathplan-def-file' into 'main'

Remove pathplan.def file

See merge request graphviz/graphviz!2338

3 years agopathplan: MSBuild: define GVDLL
Magnus Jacobsson [Sun, 12 Dec 2021 21:08:29 +0000 (22:08 +0100)]
pathplan: MSBuild: define GVDLL

3 years agopathplan: remove now empty and obsolete pathplan.def file
Magnus Jacobsson [Sat, 31 Jul 2021 20:20:14 +0000 (22:20 +0200)]
pathplan: remove now empty and obsolete pathplan.def file

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

3 years agopathplan: MSBuild: remove use of now empty and obsolete pathplan.def file
Magnus Jacobsson [Sat, 31 Jul 2021 20:20:14 +0000 (22:20 +0200)]
pathplan: MSBuild: remove use of now empty and obsolete pathplan.def file

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

3 years agopathplan: autotools: remove use of now empty and obsolete pathplan.def file
Magnus Jacobsson [Sat, 31 Jul 2021 20:20:14 +0000 (22:20 +0200)]
pathplan: autotools: remove use of now empty and obsolete pathplan.def file

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

3 years agopathplan: CMake: remove use of now empty and obsolete pathplan.def file
Magnus Jacobsson [Sat, 31 Jul 2021 20:20:14 +0000 (22:20 +0200)]
pathplan: CMake: remove use of now empty and obsolete pathplan.def file

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

3 years agoRevert "pathplan: autotools: use pathplan.def"
Magnus Jacobsson [Sat, 11 Dec 2021 06:33:39 +0000 (07:33 +0100)]
Revert "pathplan: autotools: use pathplan.def"

This reverts commit b63144316c65e992712ed9d6385af59ab5a9bc7e.

This file is now empty and obsolete.

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

3 years agopathplan: remove now obsolete exporting of vispath.h symbols from pathplan.def
Magnus Jacobsson [Sun, 12 Dec 2021 18:18:49 +0000 (19:18 +0100)]
pathplan: remove now obsolete exporting of vispath.h symbols from pathplan.def

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

3 years agopathplan: add storage-class attribute declarations in vispath.h
Magnus Jacobsson [Sat, 24 Jul 2021 14:24:48 +0000 (16:24 +0200)]
pathplan: add storage-class attribute declarations in vispath.h

This will allow removing the vispath.h symbols from the pathplan.def
file in an upcoming commit.

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

3 years agopathplan: remove now obsolete exporting of pathgeom.h symbols from pathplan.def
Magnus Jacobsson [Sun, 12 Dec 2021 18:15:48 +0000 (19:15 +0100)]
pathplan: remove now obsolete exporting of pathgeom.h symbols from pathplan.def

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

3 years agopathplan: add storage-class attribute declarations in pathgeom.h
Magnus Jacobsson [Thu, 22 Jul 2021 19:40:24 +0000 (21:40 +0200)]
pathplan: add storage-class attribute declarations in pathgeom.h

This will allow removing the pathgeom.h symbols from the pathplan.def
file in an upcoming commit.

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

3 years agocommon: add explicit include of pathgeom.h in emit.c
Magnus Jacobsson [Fri, 27 Aug 2021 10:03:43 +0000 (12:03 +0200)]
common: add explicit include of pathgeom.h in emit.c

emit.c explicitly uses e.g. freePath from the public pathgeom.h header
file, so even if it gets it implicitly through another header file,
including it explicitly is the right thing to do.

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

3 years agopathplan: remove now obsolete exporting of tri.h symbols from pathplan.def
Magnus Jacobsson [Sun, 12 Dec 2021 18:14:34 +0000 (19:14 +0100)]
pathplan: remove now obsolete exporting of tri.h symbols from pathplan.def

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

3 years agopathplan: add storage-class attribute declarations in tri.h
Magnus Jacobsson [Wed, 11 Aug 2021 13:41:26 +0000 (15:41 +0200)]
pathplan: add storage-class attribute declarations in tri.h

This will allow removing the tri.h symbols from the pathplan.def file in an
upcoming commit.

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

3 years agopathplan: remove now obsolete exporting of pathplan.h symbols from pathplan.def
Magnus Jacobsson [Sun, 12 Dec 2021 18:12:03 +0000 (19:12 +0100)]
pathplan: remove now obsolete exporting of pathplan.h symbols from pathplan.def

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

3 years agopathplan: add storage-class attribute declarations in pathplan.h
Magnus Jacobsson [Thu, 22 Jul 2021 19:22:11 +0000 (21:22 +0200)]
pathplan: add storage-class attribute declarations in pathplan.h

This will allow removing the pathplan.h symbols from the pathplan.def
file in an upcoming commit.

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

3 years agopathplan: remove now obsolete exporting of vis.h symbols from pathplan.def
Magnus Jacobsson [Sun, 12 Dec 2021 18:00:21 +0000 (19:00 +0100)]
pathplan: remove now obsolete exporting of vis.h symbols from pathplan.def

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

3 years agopathplan: add support for the dllexport storage-class attribute in vis.h
Magnus Jacobsson [Thu, 22 Jul 2021 14:00:24 +0000 (16:00 +0200)]
pathplan: add support for the dllexport storage-class attribute in vis.h

Also, storage-class attributes are now added only when the GVDLL
symbol is defined.

This will allow removing the viz.h symbols from the pathplan.def file
in an upcoming commit.

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

3 years agopathplan: remove now obsolete exporting of pathutil.h symbols from pathplan.def
Magnus Jacobsson [Sun, 12 Dec 2021 17:58:18 +0000 (18:58 +0100)]
pathplan: remove now obsolete exporting of pathutil.h symbols from pathplan.def

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

3 years agopathplan: add support for the dllexport storage-class attribute in pathutil.h
Magnus Jacobsson [Thu, 22 Jul 2021 14:00:24 +0000 (16:00 +0200)]
pathplan: add support for the dllexport storage-class attribute in pathutil.h

Also, storage-class attributes are now added only when the GVDLL
symbol is defined.

This will allow removing the pathutil.h symbols from the pathplan.def
file in an upcoming commit.

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

3 years agopathplan: add missing storage-class attribute declaration for in_poly
Magnus Jacobsson [Sat, 24 Jul 2021 14:24:28 +0000 (16:24 +0200)]
pathplan: add missing storage-class attribute declaration for in_poly

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

3 years agoneatogen: remove duplicate declaration of in_poly in neatosplines.c
Magnus Jacobsson [Sun, 1 Aug 2021 13:00:32 +0000 (15:00 +0200)]
neatogen: remove duplicate declaration of in_poly in neatosplines.c

The in_poly function is already declared in lib/pathplan/pathutil.h.

Without this change, an upcoming commit that adds dllimport/dllexport
storage-class attribute declarations in lib/pathplan/pathutil.h would
cause the following warning for the duplicate definition:

C:\Users\magja\graphviz\lib\neatogen\neatosplines.c(27,48): warning C4273: 'in_poly': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\neatogen\neatogen.vcxproj]

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

3 years agopathplan: remove exporting of solve* symbols from pathplan.def
Magnus Jacobsson [Sun, 12 Dec 2021 18:21:29 +0000 (19:21 +0100)]
pathplan: remove exporting of solve* symbols from pathplan.def

These functions are not used outside the pathplan library and are not
part of the public API.

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

3 years agoMerge branch 'smattr/26E51B39-300A-4245-A02E-A0607F0E3141' into 'main'
Matthew Fernandez [Sun, 19 Dec 2021 19:29:38 +0000 (19:29 +0000)]
Merge branch 'smattr/26E51B39-300A-4245-A02E-A0607F0E3141' into 'main'

more boolean → bool modernization

See merge request graphviz/graphviz!2347

3 years agoflat_search: [nfc] use a C99 bool instead of boolean
Matthew Fernandez [Sat, 18 Dec 2021 16:40:39 +0000 (08:40 -0800)]
flat_search: [nfc] use a C99 bool instead of boolean

3 years agomerge_trapezoids: [nfc] use a C99 bool instead of boolean
Matthew Fernandez [Sat, 18 Dec 2021 16:39:47 +0000 (08:39 -0800)]
merge_trapezoids: [nfc] use a C99 bool instead of boolean

3 years agomakeBottomFlatEnd: [nfc] use a C99 bool instead of boolean
Matthew Fernandez [Sat, 18 Dec 2021 16:38:59 +0000 (08:38 -0800)]
makeBottomFlatEnd: [nfc] use a C99 bool instead of boolean

3 years agomakeFlatEnd: [nfc] use a C99 bool instead of boolean
Matthew Fernandez [Sat, 18 Dec 2021 16:38:05 +0000 (08:38 -0800)]
makeFlatEnd: [nfc] use a C99 bool instead of boolean

3 years agopoly_gencode: [nfc] use a C99 bool instead of boolean
Matthew Fernandez [Sat, 18 Dec 2021 16:36:52 +0000 (08:36 -0800)]
poly_gencode: [nfc] use a C99 bool instead of boolean

3 years agogenerateNonoverlapConstraints: [nfc] use a C99 bool instead of boolean
Matthew Fernandez [Sat, 18 Dec 2021 16:34:29 +0000 (08:34 -0800)]
generateNonoverlapConstraints: [nfc] use a C99 bool instead of boolean

3 years agoIMDS_given_dim: [nfc] use a C99 bool instead of boolean
Matthew Fernandez [Sat, 18 Dec 2021 16:33:47 +0000 (08:33 -0800)]
IMDS_given_dim: [nfc] use a C99 bool instead of boolean

3 years agoconstrained_majorization_vpsc: [nfc] use a C99 bool instead of boolean
Matthew Fernandez [Sat, 18 Dec 2021 16:32:30 +0000 (08:32 -0800)]
constrained_majorization_vpsc: [nfc] use a C99 bool instead of boolean

3 years agostress_majorization_with_hierarchy: [nfc] use a C99 bool instead of boolean
Matthew Fernandez [Sat, 18 Dec 2021 16:30:40 +0000 (08:30 -0800)]
stress_majorization_with_hierarchy: [nfc] use a C99 bool instead of boolean

3 years agoptest_nodesize: remove unused 'flip' parameter
Matthew Fernandez [Sat, 18 Dec 2021 16:26:39 +0000 (08:26 -0800)]
ptest_nodesize: remove unused 'flip' parameter

3 years agoMerge branch 'smattr/7ba222c3-1fe4-414e-a130-26d504d46cef' into 'main'
Matthew Fernandez [Sun, 19 Dec 2021 07:32:58 +0000 (07:32 +0000)]
Merge branch 'smattr/7ba222c3-1fe4-414e-a130-26d504d46cef' into 'main'

remove dead code

See merge request graphviz/graphviz!2346

3 years agoremove unused 'glCompSelectionBox'
Matthew Fernandez [Sat, 18 Dec 2021 05:31:29 +0000 (21:31 -0800)]
remove unused 'glCompSelectionBox'

3 years agoremove unused 'GetFixedOGLPoslocal'
Matthew Fernandez [Sat, 18 Dec 2021 05:27:05 +0000 (21:27 -0800)]
remove unused 'GetFixedOGLPoslocal'

3 years agoremove unused 'GetFixedOGLPos'
Matthew Fernandez [Sat, 18 Dec 2021 05:23:29 +0000 (21:23 -0800)]
remove unused 'GetFixedOGLPos'

3 years agoremove unused 'seedMode'
Matthew Fernandez [Sat, 18 Dec 2021 05:19:44 +0000 (21:19 -0800)]
remove unused 'seedMode'

3 years agoremove unused 'nodeset' abstraction
Matthew Fernandez [Sat, 18 Dec 2021 05:08:59 +0000 (21:08 -0800)]
remove unused 'nodeset' abstraction

3 years agoremove unused 'size_edgelist'
Matthew Fernandez [Sat, 18 Dec 2021 05:02:29 +0000 (21:02 -0800)]
remove unused 'size_edgelist'

3 years agoremove prototype of unimplemented 'cmpNodeDegree'
Matthew Fernandez [Sat, 18 Dec 2021 04:59:46 +0000 (20:59 -0800)]
remove prototype of unimplemented 'cmpNodeDegree'

3 years agoremove prototypes of unimplemented ag callback functions
Matthew Fernandez [Sat, 18 Dec 2021 04:57:29 +0000 (20:57 -0800)]
remove prototypes of unimplemented ag callback functions

3 years agoremove prototypes of unimplemented object set management functions
Matthew Fernandez [Sat, 18 Dec 2021 04:54:48 +0000 (20:54 -0800)]
remove prototypes of unimplemented object set management functions

3 years agoremove declaration of undefined 'AgAttrdisc'
Matthew Fernandez [Sat, 18 Dec 2021 04:53:16 +0000 (20:53 -0800)]
remove declaration of undefined 'AgAttrdisc'

3 years agoremove unused 'NIL macros
Matthew Fernandez [Sat, 18 Dec 2021 04:50:41 +0000 (20:50 -0800)]
remove unused 'NIL macros

Note that copies of these still exist in the shipped cgraph.h.

3 years agoremove C++ guards on hashkey.h
Matthew Fernandez [Sat, 18 Dec 2021 22:35:31 +0000 (14:35 -0800)]
remove C++ guards on hashkey.h

These are no longer necessary now that this header contains no function
prototypes.

3 years agoremove prototype for unimplemented 'strkey'
Matthew Fernandez [Sat, 18 Dec 2021 04:47:33 +0000 (20:47 -0800)]
remove prototype for unimplemented 'strkey'

3 years agoremove prototype for unimplemented 'html_inside'
Matthew Fernandez [Sat, 18 Dec 2021 04:39:35 +0000 (20:39 -0800)]
remove prototype for unimplemented 'html_inside'

3 years agoremove unused 'colorCvt'
Matthew Fernandez [Sat, 18 Dec 2021 04:31:54 +0000 (20:31 -0800)]
remove unused 'colorCvt'

3 years agoMerge branch 'smattr/2D1C5E3F-6FEC-4BF0-9291-DD8A9DBD3C12' into 'main'
Matthew Fernandez [Sat, 18 Dec 2021 16:23:43 +0000 (16:23 +0000)]
Merge branch 'smattr/2D1C5E3F-6FEC-4BF0-9291-DD8A9DBD3C12' into 'main'

more boolean → bool modernization

See merge request graphviz/graphviz!2344

3 years agoconstrained_majorization_new_with_gaps: [nfc] boolean → C99 bool
Matthew Fernandez [Wed, 15 Dec 2021 15:37:24 +0000 (07:37 -0800)]
constrained_majorization_new_with_gaps: [nfc] boolean → C99 bool

3 years agoconstrained_majorization_gradient_projection: [nfc] another boolean → C99 bool
Matthew Fernandez [Wed, 15 Dec 2021 15:36:33 +0000 (07:36 -0800)]
constrained_majorization_gradient_projection: [nfc] another boolean → C99 bool

3 years agoconstrained_majorization_gradient_projection: [nfc] boolean → C99 bool
Matthew Fernandez [Wed, 15 Dec 2021 15:35:05 +0000 (07:35 -0800)]
constrained_majorization_gradient_projection: [nfc] boolean → C99 bool

3 years agoconstrained_majorization_new: [nfc] use a C99 bool instead of a boolean
Matthew Fernandez [Wed, 15 Dec 2021 15:34:16 +0000 (07:34 -0800)]
constrained_majorization_new: [nfc] use a C99 bool instead of a boolean

3 years agopower_iteration/iterativePCA_1D: [nfc] return C99 bools instead of boolean
Matthew Fernandez [Wed, 15 Dec 2021 15:33:04 +0000 (07:33 -0800)]
power_iteration/iterativePCA_1D: [nfc] return C99 bools instead of boolean

3 years agostress_majorization_with_hierarchy: [nfc] replace a boolean with a C99 bool
Matthew Fernandez [Wed, 15 Dec 2021 15:17:18 +0000 (07:17 -0800)]
stress_majorization_with_hierarchy: [nfc] replace a boolean with a C99 bool

3 years agouser_spline: [nfc] use a C99 bool instead of boolean for 'warned'
Matthew Fernandez [Wed, 15 Dec 2021 15:14:49 +0000 (07:14 -0800)]
user_spline: [nfc] use a C99 bool instead of boolean for 'warned'

3 years agogvconfig_libdir: [nfc] use a C99 bool instead of boolean for 'dirShown'
Matthew Fernandez [Wed, 15 Dec 2021 15:12:59 +0000 (07:12 -0800)]
gvconfig_libdir: [nfc] use a C99 bool instead of boolean for 'dirShown'

3 years agogvpack: [nfc] use a C99 bool instead of boolean for 'doPack'
Matthew Fernandez [Wed, 15 Dec 2021 15:11:08 +0000 (07:11 -0800)]
gvpack: [nfc] use a C99 bool instead of boolean for 'doPack'

3 years agogvpack cloneGraph: [nfc] replace a boolean with a C99 bool
Matthew Fernandez [Wed, 15 Dec 2021 15:09:06 +0000 (07:09 -0800)]
gvpack cloneGraph: [nfc] replace a boolean with a C99 bool

3 years agobend: [nfc] remove unnecessary parens
Matthew Fernandez [Wed, 15 Dec 2021 05:49:31 +0000 (21:49 -0800)]
bend: [nfc] remove unnecessary parens

3 years agolimitBoxes: [nfc] abbreviation some accumulation
Matthew Fernandez [Wed, 15 Dec 2021 05:44:56 +0000 (21:44 -0800)]
limitBoxes: [nfc] abbreviation some accumulation

3 years agoMerge branch 'smattr/03D71147-1B60-4F43-83A3-9DD0DB36BFFC' into 'main'
Matthew Fernandez [Wed, 15 Dec 2021 03:31:38 +0000 (03:31 +0000)]
Merge branch 'smattr/03D71147-1B60-4F43-83A3-9DD0DB36BFFC' into 'main'

mingle: fix mismatched format string to 'agerr'

See merge request graphviz/graphviz!2330

3 years agomingle: fix mismatched format string to 'agerr'
Matthew Fernandez [Fri, 10 Dec 2021 01:05:22 +0000 (17:05 -0800)]
mingle: fix mismatched format string to 'agerr'

Based on line 395 of this same file, it is clear this is what this code was
intended to look like. It is unclear to me why this was not caught by the GNU
`printf` annotations on `agerr`.

3 years agoMerge branch 'smattr/271D49D3-BD64-4100-9DED-91D288393801' into 'main'
Matthew Fernandez [Tue, 14 Dec 2021 16:13:20 +0000 (16:13 +0000)]
Merge branch 'smattr/271D49D3-BD64-4100-9DED-91D288393801' into 'main'

makeStraightEdge: remove array allocation optimization

See merge request graphviz/graphviz!2342

3 years agomakeStraightEdge: remove array allocation optimization
Matthew Fernandez [Mon, 13 Dec 2021 02:07:24 +0000 (18:07 -0800)]
makeStraightEdge: remove array allocation optimization

This code had two alternative paths, one that used a heap-allocated array for
edge counts above 20 and one that used a stack-allocated array for edge counts
of 20 or less. The latter was an optimization to avoid heap allocation for
smaller graphs. Modern dynamic allocators are fast enough that this kind of
optimization is no longer relevant.

3 years agoMerge branch 'smattr/BCD82356-CBC7-4DAA-9AA9-4FE6D9B9A55F' into 'main'
Matthew Fernandez [Tue, 14 Dec 2021 02:15:25 +0000 (02:15 +0000)]
Merge branch 'smattr/BCD82356-CBC7-4DAA-9AA9-4FE6D9B9A55F' into 'main'

upgrade Pylint

See merge request graphviz/graphviz!2339

3 years agosimplify test_1855 call to 'dot'
Matthew Fernandez [Sun, 12 Dec 2021 23:48:59 +0000 (15:48 -0800)]
simplify test_1855 call to 'dot'

Using the wrapper added in 297ed0bc7b61b2a6616c335726334836c8ffcc10, we can
write this code more simply and concisely.

3 years agoupgrade Pylint
Matthew Fernandez [Sun, 14 Nov 2021 18:04:40 +0000 (10:04 -0800)]
upgrade Pylint

3 years agouse Python context manager idiom when reading and writing files
Matthew Fernandez [Sun, 14 Nov 2021 19:12:22 +0000 (11:12 -0800)]
use Python context manager idiom when reading and writing files

Newer versions of Pylint suggest this.

3 years agouse Python 'subprocess.Popen' as a context manager
Matthew Fernandez [Sun, 14 Nov 2021 19:11:48 +0000 (11:11 -0800)]
use Python 'subprocess.Popen' as a context manager

Newer versions of Pylint suggest this.

3 years agortest.py: remove use of 'f3' as a global
Matthew Fernandez [Sun, 14 Nov 2021 18:43:20 +0000 (10:43 -0800)]
rtest.py: remove use of 'f3' as a global

This allows us to convert the use of this file to a more idiomatic `with` block.

3 years agoremove an unnecessary Pylint 'global' statement
Matthew Fernandez [Sun, 14 Nov 2021 18:37:14 +0000 (10:37 -0800)]
remove an unnecessary Pylint 'global' statement

Newer versions of Pylint identify this.

3 years agospecify an explicit mode and UTF-8 encoding in Python open calls with text mode
Matthew Fernandez [Sun, 14 Nov 2021 18:36:15 +0000 (10:36 -0800)]
specify an explicit mode and UTF-8 encoding in Python open calls with text mode

Newer versions of Pylint warn about this.

3 years agoexplicitly specify latin-1 encoding when dealing with PS files in tests
Matthew Fernandez [Mon, 6 Dec 2021 04:18:31 +0000 (20:18 -0800)]
explicitly specify latin-1 encoding when dealing with PS files in tests

PostScript files are encoded in a character set called CCSID 1276.¹ This code
was working despite not specifying an encoding because the default encoding on
each platform coincidentally lines up with that used in their sample files. More
recent versions of Pylint warn that encoding should always be specified in
`open` calls, and attempting to use either ASCII or UTF-8 encoding fails. The
Linux sample files contain invalid ASCII bytes and the Windows sample files
contain invalid UTF-8 bytes. Using latin-1, which seems to be the closest
available encoding to CCSID 1276, works cross platform.

In future, this code should perhaps be adapted to do I/O in binary mode, thus
avoiding any encoding concerns.

¹ https://en.wikipedia.org/wiki/PostScript_Standard_Encoding

3 years agoconvert some legacy Python '.format' and string addition to f-strings
Matthew Fernandez [Sun, 14 Nov 2021 18:20:59 +0000 (10:20 -0800)]
convert some legacy Python '.format' and string addition to f-strings

Newer versions of Pylint warn about this.

3 years agouse 'run' instead of 'Popen' where more concise in test code
Matthew Fernandez [Sun, 12 Dec 2021 06:23:10 +0000 (22:23 -0800)]
use 'run' instead of 'Popen' where more concise in test code

Not only does this lead to more concise and efficient code, this avoids some
upcoming warnings in newer Pylint releases.

3 years agoMerge branch 'smattr/7042B009-FC97-470F-9196-E28ED6BEB967' into 'main'
Matthew Fernandez [Mon, 13 Dec 2021 16:47:41 +0000 (16:47 +0000)]
Merge branch 'smattr/7042B009-FC97-470F-9196-E28ED6BEB967' into 'main'

add Fedora 35 testing in CI

See merge request graphviz/graphviz!2340

3 years agoadd Fedora 35 testing in CI
Matthew Fernandez [Sun, 12 Dec 2021 18:57:52 +0000 (10:57 -0800)]
add Fedora 35 testing in CI

Related to #2163.

3 years agoremove Fedora 33 Docker file
Matthew Fernandez [Sun, 12 Dec 2021 18:55:52 +0000 (10:55 -0800)]
remove Fedora 33 Docker file

2a70afbdf049d5aa93470dcad5cf03c60841b6b3 removed used of this file and should
have removed the file itself as well.

3 years agoMerge branch 'remove-lab-gamut-def-file' into 'main'
Magnus Jacobsson [Mon, 13 Dec 2021 10:33:57 +0000 (10:33 +0000)]
Merge branch 'remove-lab-gamut-def-file' into 'main'

Remove lab_gamut.def file

See merge request graphviz/graphviz!2337

3 years agolib/edgepaint: remove obsolete lab_gamut.def file
Magnus Jacobsson [Sat, 31 Jul 2021 20:39:46 +0000 (22:39 +0200)]
lib/edgepaint: remove obsolete lab_gamut.def file

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

3 years agolib/edgepaint: add support for the dllexport storage-class attribute in lab_gamut.h
Magnus Jacobsson [Sat, 31 Jul 2021 21:51:00 +0000 (23:51 +0200)]
lib/edgepaint: add support for the dllexport storage-class attribute in lab_gamut.h

Also, storage-class attributes are now added only when the GVDLL
symbol is defined.

This removes the need to use a .def file.

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

3 years agolib/edgepaint: MSBuild: define GVDLL in edgepaintlib project file
Magnus Jacobsson [Sun, 12 Dec 2021 14:51:16 +0000 (15:51 +0100)]
lib/edgepaint: MSBuild: define GVDLL in edgepaintlib project file

An upcoming commit will change lab_gamut.h to use the GVDLL symbol to
enable storage-class attributes.

This change ensures that the lab_gamut symbols will continute to be
declared with the dllimport attribute.

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

3 years agolib/edgepaint: MSBuild: define GVDLL in lab_gamut project file
Magnus Jacobsson [Sun, 12 Dec 2021 14:51:52 +0000 (15:51 +0100)]
lib/edgepaint: MSBuild: define GVDLL in lab_gamut project file

An upcoming commit will change lab_gamut.h to use the GVDLL symbol to
enable storage-class attributes.

This change ensures that the lab_gamut symbols will be defined with
the dllexport attribute, which will eliminate the need for a .def
file.

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

3 years agoMerge MR !2331
Matthew Fernandez [Mon, 13 Dec 2021 05:10:25 +0000 (21:10 -0800)]
Merge MR !2331

3 years agoCMake: propagate include flag for harfbuzz on Windows
Nehal J Wani [Tue, 11 May 2021 00:19:04 +0000 (20:19 -0400)]
CMake: propagate include flag for harfbuzz on Windows

Pango >=1.44.1 changed the way harfbuzz is included
xref: https://github.com/GNOME/pango/commit/a7b17aa2

This is not required on *nix because the PkgConfig CMake module
already takes care of this. For example, on Ubuntu it adds:
-I/usr/include/harbuzz to PangoCairo_CFLAGS

3 years agoMerge branch 'smattr/A6C297DD-D456-46E0-99BD-E1043C7F5AB1' into 'main'
Matthew Fernandez [Sun, 12 Dec 2021 21:12:20 +0000 (21:12 +0000)]
Merge branch 'smattr/A6C297DD-D456-46E0-99BD-E1043C7F5AB1' into 'main'

ci: standardize shell scripts on the same e,u,x,o options

See merge request graphviz/graphviz!2336

3 years agoci: standardize shell scripts on the same e,u,x,o options
Matthew Fernandez [Sat, 11 Dec 2021 06:22:45 +0000 (22:22 -0800)]
ci: standardize shell scripts on the same e,u,x,o options

All these scripts have the same expectation, of failing on anything unexpected.
So setting the same options the same way everywhere leads to more consistency
and predictability.

3 years agoci: apply '${ID_LIKE:-}' pattern from build script to install
Matthew Fernandez [Sat, 11 Dec 2021 22:47:44 +0000 (14:47 -0800)]
ci: apply '${ID_LIKE:-}' pattern from build script to install

This allows in future enabling `set -u` in this script.