]> granicus.if.org Git - graphviz/log
graphviz
3 years agolefty SFfindFile: remove MSVC 'strncasecmp' fall back
Matthew Fernandez [Sun, 19 Sep 2021 18:26:07 +0000 (11:26 -0700)]
lefty SFfindFile: remove MSVC 'strncasecmp' fall back

Commit 69f8a328e1d41b1cd799c715a8398ab0f096a8f4 replaced `SFstrncmp` with
`strncasecmp` or `_strnicmp` depending on whether we were compiling with a
non-MSVC compiler or with MSVC, respectively. However, this code is part of the
X11 GUI support and hence never built with MSVC. This commit removes this
unnecessary fall back which was dead code.

3 years agoMerge branch 'smattr/4BB774CF-C72E-4136-B8F5-908D835C1A87' into 'main'
Matthew Fernandez [Sat, 25 Sep 2021 20:42:00 +0000 (20:42 +0000)]
Merge branch 'smattr/4BB774CF-C72E-4136-B8F5-908D835C1A87' into 'main'

abbreviate .clang-format to just pure LLVM style

See merge request graphviz/graphviz!2178

3 years agoabbreviate .clang-format to just pure LLVM style
Matthew Fernandez [Sun, 19 Sep 2021 21:39:54 +0000 (14:39 -0700)]
abbreviate .clang-format to just pure LLVM style

The clang-format style used in Graphviz is already pure LLVM style, but was
generated with clang-format-12. This means older versions of clang-format fail
because they do not understand some of the style options that were emitted by
clang-format-12. Reverting to using only `BasedOnStyle` makes it more obvious
that pure LLVM style is in use and permits older versions of clang-format to be
used. None of the newer options introduced by clang-format-12 are critical for
Graphviz formatting.

3 years agoMerge branch 'smattr/DCA87935-2488-470F-AE3F-983AC3FD6428' into 'main'
Matthew Fernandez [Sat, 25 Sep 2021 19:26:36 +0000 (19:26 +0000)]
Merge branch 'smattr/DCA87935-2488-470F-AE3F-983AC3FD6428' into 'main'

more -Wmissing-field-initializer squashing

See merge request graphviz/graphviz!2177

3 years agop_assembly: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Sun, 19 Sep 2021 18:10:31 +0000 (11:10 -0700)]
p_assembly: squash a -Wmissing-field-initializer warning

3 years agop_noverhang: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Sun, 19 Sep 2021 18:09:37 +0000 (11:09 -0700)]
p_noverhang: squash a -Wmissing-field-initializer warning

3 years agop_threepoverhang: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Sun, 19 Sep 2021 18:09:00 +0000 (11:09 -0700)]
p_threepoverhang: squash a -Wmissing-field-initializer warning

3 years agop_fivepoverhang: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Sun, 19 Sep 2021 18:08:16 +0000 (11:08 -0700)]
p_fivepoverhang: squash a -Wmissing-field-initializer warning

3 years agop_restrictionsite: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Sun, 19 Sep 2021 18:07:42 +0000 (11:07 -0700)]
p_restrictionsite: squash a -Wmissing-field-initializer warning

3 years agop_primersite: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Sun, 19 Sep 2021 18:07:03 +0000 (11:07 -0700)]
p_primersite: squash a -Wmissing-field-initializer warning

3 years agop_proteinstab: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Sun, 19 Sep 2021 18:06:23 +0000 (11:06 -0700)]
p_proteinstab: squash a -Wmissing-field-initializer warning

3 years agop_proteasesite: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Sun, 19 Sep 2021 18:05:15 +0000 (11:05 -0700)]
p_proteasesite: squash a -Wmissing-field-initializer warning

3 years agop_rnastab: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Sun, 19 Sep 2021 18:03:44 +0000 (11:03 -0700)]
p_rnastab: squash a -Wmissing-field-initializer warning

3 years agop_ribosite: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Sun, 19 Sep 2021 18:03:12 +0000 (11:03 -0700)]
p_ribosite: squash a -Wmissing-field-initializer warning

3 years agoMerge branch 'smattr/96b0799b-6f75-44f5-906f-3df53c73ddee' into 'main'
Matthew Fernandez [Sat, 25 Sep 2021 18:22:33 +0000 (18:22 +0000)]
Merge branch 'smattr/96b0799b-6f75-44f5-906f-3df53c73ddee' into 'main'

more warning squashing and clean up

See merge request graphviz/graphviz!2181

3 years agotclpathplan.c: rephrase open coded fmax/fmin
Matthew Fernandez [Sun, 19 Sep 2021 23:26:39 +0000 (16:26 -0700)]
tclpathplan.c: rephrase open coded fmax/fmin

3 years agotclpathplan.c: remove open coded NULL, excess bracketing and casts
Matthew Fernandez [Sun, 19 Sep 2021 23:04:10 +0000 (16:04 -0700)]
tclpathplan.c: remove open coded NULL, excess bracketing and casts

3 years agotclpathplan.c: remove 'strncmp' micro-optimizations
Matthew Fernandez [Sun, 19 Sep 2021 23:06:52 +0000 (16:06 -0700)]
tclpathplan.c: remove 'strncmp' micro-optimizations

There is no need for this on modern machines.

3 years agotclpathplan.c: remove commented out code
Matthew Fernandez [Sun, 19 Sep 2021 22:54:05 +0000 (15:54 -0700)]
tclpathplan.c: remove commented out code

3 years agotriangle_callback: mark as static
Matthew Fernandez [Sun, 19 Sep 2021 22:52:41 +0000 (15:52 -0700)]
triangle_callback: mark as static

This function is not called outside of its containing file.

3 years agotclpathplan between: rephrase to avoid -Wfloat-equal warnings
Matthew Fernandez [Sun, 19 Sep 2021 22:46:54 +0000 (15:46 -0700)]
tclpathplan between: rephrase to avoid -Wfloat-equal warnings

Similar to commit a420a1a449b23f4be4fb891e1025f20b21c81369. This is intended to
have the same semantics.

3 years agotclpathplan gt: rephrase into something more obvious
Matthew Fernandez [Sun, 19 Sep 2021 22:35:37 +0000 (15:35 -0700)]
tclpathplan gt: rephrase into something more obvious

Similar to commit 1cf8e0225a6a215c93437a9972497f1cae0ffc8c. This is intended to
preserve the same semantics. It not only avoids two -Wfloat-equal warnings, but
makes this code so close to the leading comment that the comment can simply be
removed now.

3 years agotclpathplan gt: rephrase to avoid having to cast pointers to this function
Matthew Fernandez [Sun, 19 Sep 2021 22:25:39 +0000 (15:25 -0700)]
tclpathplan gt: rephrase to avoid having to cast pointers to this function

Similar to commit fe231a8f6beae5dd8ac8cd8b9338cc815881a714.

3 years agofind_ints.c: remove some commented out code
Matthew Fernandez [Sun, 19 Sep 2021 22:22:49 +0000 (15:22 -0700)]
find_ints.c: remove some commented out code

3 years agomake_map_internal: flip order of 'bbm1' if-then-else ladder
Matthew Fernandez [Sun, 19 Sep 2021 22:17:48 +0000 (15:17 -0700)]
make_map_internal: flip order of 'bbm1' if-then-else ladder

Squashes a -Wfloat-equal warning.

3 years agomake_map_internal: flip order of 'bbm0' if-then-else ladder
Matthew Fernandez [Sun, 19 Sep 2021 22:09:31 +0000 (15:09 -0700)]
make_map_internal: flip order of 'bbm0' if-then-else ladder

Squashes a -Wfloat-equal warning.

3 years agomake_map_internal: flip the order of 'bounding_box_margin' if-then-else ladder
Matthew Fernandez [Sun, 19 Sep 2021 22:07:42 +0000 (15:07 -0700)]
make_map_internal: flip the order of 'bounding_box_margin' if-then-else ladder

Squashes a -Wfloat-equal warning.

3 years agosolve2: flip the order of an if-then-else ladder to squash -Wfloat-equal warning
Matthew Fernandez [Sun, 19 Sep 2021 21:47:28 +0000 (14:47 -0700)]
solve2: flip the order of an if-then-else ladder to squash -Wfloat-equal warning

3 years agoMerge branch 'smattr/D035A7A7-F419-4B11-9BA8-3C003CC0B4AC' into 'main'
Matthew Fernandez [Sat, 25 Sep 2021 17:16:42 +0000 (17:16 +0000)]
Merge branch 'smattr/D035A7A7-F419-4B11-9BA8-3C003CC0B4AC' into 'main'

smyrna: more dead code removal

See merge request graphviz/graphviz!2176

3 years agosmyrna: remove commented out prototypes
Matthew Fernandez [Sun, 19 Sep 2021 17:27:09 +0000 (10:27 -0700)]
smyrna: remove commented out prototypes

3 years agosmyrna: remove prototype of unimplemented 'drawRotatingTools'
Matthew Fernandez [Sun, 19 Sep 2021 17:26:53 +0000 (10:26 -0700)]
smyrna: remove prototype of unimplemented 'drawRotatingTools'

3 years agosmyrna: remove unused 'drawEllipse'
Matthew Fernandez [Sun, 19 Sep 2021 17:22:41 +0000 (10:22 -0700)]
smyrna: remove unused 'drawEllipse'

3 years agosmyrna: remove unused 'rasters' global
Matthew Fernandez [Sun, 19 Sep 2021 17:20:59 +0000 (10:20 -0700)]
smyrna: remove unused 'rasters' global

3 years agosmyrna: remove unused 'point_within_ellips_with_coords'
Matthew Fernandez [Sun, 19 Sep 2021 17:19:37 +0000 (10:19 -0700)]
smyrna: remove unused 'point_within_ellips_with_coords'

3 years agosmyrna: remove unused 'point_within_sphere_with_coords'
Matthew Fernandez [Sun, 19 Sep 2021 17:18:51 +0000 (10:18 -0700)]
smyrna: remove unused 'point_within_sphere_with_coords'

3 years agosmyrna: remove macOS Leopard hack
Matthew Fernandez [Sun, 19 Sep 2021 17:17:01 +0000 (10:17 -0700)]
smyrna: remove macOS Leopard hack

Leopard was macOS 10.5, released in 2007. Apparently this hack is no longer
required as Smyrna is built on macOS in CI without this.

3 years agosmyrna: remove unused 'texture' global
Matthew Fernandez [Sun, 19 Sep 2021 17:14:30 +0000 (10:14 -0700)]
smyrna: remove unused 'texture' global

3 years agosmyrna: remove some prototypes of unimplemented functions
Matthew Fernandez [Sun, 19 Sep 2021 17:11:50 +0000 (10:11 -0700)]
smyrna: remove some prototypes of unimplemented functions

3 years agosmyrna: remove SmyrnaVerbose
Matthew Fernandez [Sun, 19 Sep 2021 17:11:00 +0000 (10:11 -0700)]
smyrna: remove SmyrnaVerbose

Nothing uses this variable.

3 years agosmyrna: remove unused SmrynaVerbose declaration
Matthew Fernandez [Sun, 19 Sep 2021 17:09:57 +0000 (10:09 -0700)]
smyrna: remove unused SmrynaVerbose declaration

This variable name is typoed, but nothing uses it anyway.

3 years agoMerge branch 'smattr/AC34DC16-D8EF-4259-8FE4-5A5080DE6602' into 'main'
Matthew Fernandez [Thu, 23 Sep 2021 01:21:04 +0000 (01:21 +0000)]
Merge branch 'smattr/AC34DC16-D8EF-4259-8FE4-5A5080DE6602' into 'main'

Move back to 2.49 development series

See merge request graphviz/graphviz!2183

3 years agoMove back to 2.49 development series
Matthew Fernandez [Thu, 23 Sep 2021 00:06:21 +0000 (17:06 -0700)]
Move back to 2.49 development series

3 years agoMerge branch 'smattr/B37B1A9A-4D07-4914-AB34-4EF0B33EE330' into 'main' 2.49.1
Matthew Fernandez [Thu, 23 Sep 2021 00:04:13 +0000 (00:04 +0000)]
Merge branch 'smattr/B37B1A9A-4D07-4914-AB34-4EF0B33EE330' into 'main'

Stable Release 2.49.1

See merge request graphviz/graphviz!2167

3 years agoStable Release 2.49.1
Matthew Fernandez [Fri, 17 Sep 2021 00:17:28 +0000 (17:17 -0700)]
Stable Release 2.49.1

3 years agoMerge branch 'smattr/fa555883-42dd-4da0-9444-24d3ba18dad0' into 'main'
Matthew Fernandez [Tue, 21 Sep 2021 01:01:42 +0000 (01:01 +0000)]
Merge branch 'smattr/fa555883-42dd-4da0-9444-24d3ba18dad0' into 'main'

fix inability to include and use gvc.h from a parent CMake project

Closes #2109 and #1477

See merge request graphviz/graphviz!2164

3 years agofix inability to include and use gvc.h from a parent CMake project
Matthew Fernandez [Wed, 15 Sep 2021 00:46:30 +0000 (17:46 -0700)]
fix inability to include and use gvc.h from a parent CMake project

When attempting to declare a dependency on gvc when using Graphviz as a CMake
subproject, the include path necessary to compile gvc headers would not be
propagated to dependent targets. The result would be a compilation error when
the transitive includes of gvc.h could not be found.

To validate this change, create an empty directory and add the following
CMakeLists.txt:

  project(foo)
  add_subdirectory(graphviz)
  add_executable(bar main.c)
  target_link_libraries(bar gvc)

Add the following main.c:

  #include <gvc/gvc.h>
  int main(void) { return 0; }

Clone Graphviz into the subdirectory 'graphviz'. Then the standard CMake steps:

  mkdir build
  cd build
  cmake ..
  make

Note that Graphviz dependencies and then 'bar' are correctly built.

I am not a CMake expert; this was written based on my best guess of what
Graphviz should be doing according to the CMake docs. Assuming this is correct,
other Graphviz targets probably need similar fixes.

Fixes #1477, #2109.

3 years agoremove libast from gvc’s include path in CMake
Matthew Fernandez [Wed, 15 Sep 2021 00:40:32 +0000 (17:40 -0700)]
remove libast from gvc’s include path in CMake

This library does not seem to need libast in its include path to compile. This
is consistent with lib/gvc/Makefile.am.

3 years agoMerge branch 'smattr/650c059b-2ccb-4c4b-9a03-6ded54e32325' into 'main'
Matthew Fernandez [Mon, 20 Sep 2021 01:25:08 +0000 (01:25 +0000)]
Merge branch 'smattr/650c059b-2ccb-4c4b-9a03-6ded54e32325' into 'main'

more warning squashing

See merge request graphviz/graphviz!2168

3 years agofixLabelOrder: use a C99 bool for 'haveBackedge' local instead of an int
Matthew Fernandez [Fri, 17 Sep 2021 01:14:32 +0000 (18:14 -0700)]
fixLabelOrder: use a C99 bool for 'haveBackedge' local instead of an int

3 years agouse a C99 bool to pass around 'reverse' instead of an int
Matthew Fernandez [Fri, 17 Sep 2021 01:12:26 +0000 (18:12 -0700)]
use a C99 bool to pass around 'reverse' instead of an int

3 years agouse a C99 bool to pass around 'hasfixed' instead of a boolean
Matthew Fernandez [Fri, 17 Sep 2021 01:09:16 +0000 (18:09 -0700)]
use a C99 bool to pass around 'hasfixed' instead of a boolean

3 years agoreorder: convert local booleans to C99 bools
Matthew Fernandez [Fri, 17 Sep 2021 00:59:26 +0000 (17:59 -0700)]
reorder: convert local booleans to C99 bools

3 years agoReMincross: change from boolean to C99 bool
Matthew Fernandez [Fri, 17 Sep 2021 00:57:30 +0000 (17:57 -0700)]
ReMincross: change from boolean to C99 bool

3 years agolib/sparse: remove some unnecessary casts
Matthew Fernandez [Fri, 17 Sep 2021 00:55:49 +0000 (17:55 -0700)]
lib/sparse: remove some unnecessary casts

3 years agolib/sparse: replace header guards with more modern #pragma once
Matthew Fernandez [Fri, 17 Sep 2021 00:52:22 +0000 (17:52 -0700)]
lib/sparse: replace header guards with more modern #pragma once

3 years agoIntStack: remove unnecessary bracketing
Matthew Fernandez [Fri, 17 Sep 2021 00:47:53 +0000 (17:47 -0700)]
IntStack: remove unnecessary bracketing

3 years agoIntStack: track size and capacity as 'size_t' values
Matthew Fernandez [Fri, 17 Sep 2021 00:46:31 +0000 (17:46 -0700)]
IntStack: track size and capacity as 'size_t' values

Squashes two -Wsign-compare warnings and generally makes this code more
portable.

3 years agoIntStack_print: remove incorrect comment
Matthew Fernandez [Fri, 17 Sep 2021 00:33:52 +0000 (17:33 -0700)]
IntStack_print: remove incorrect comment

This seems to have been incorrectly copied from IntStack_pop.

3 years agoIntStack: remove commented out code
Matthew Fernandez [Fri, 17 Sep 2021 00:32:59 +0000 (17:32 -0700)]
IntStack: remove commented out code

3 years agoMerge branch 'smattr/df178dd0-42ca-429b-aa4b-c7927d2956ee' into 'main'
Matthew Fernandez [Mon, 20 Sep 2021 00:21:03 +0000 (00:21 +0000)]
Merge branch 'smattr/df178dd0-42ca-429b-aa4b-c7927d2956ee' into 'main'

cmd/ warning squashing

See merge request graphviz/graphviz!2169

3 years agogxl2gv gxl_to_gv: match XML_Parse, squashing a -Wconversion warning
Matthew Fernandez [Fri, 17 Sep 2021 04:32:37 +0000 (21:32 -0700)]
gxl2gv gxl_to_gv: match XML_Parse, squashing a -Wconversion warning

3 years agogxl2gv characterDataHandler: squash -Wsign-conversion warnings
Matthew Fernandez [Fri, 17 Sep 2021 04:22:08 +0000 (21:22 -0700)]
gxl2gv characterDataHandler: squash -Wsign-conversion warnings

3 years agogxl2gv endElementHandler: remove shadowing of 'name'
Matthew Fernandez [Fri, 17 Sep 2021 04:19:08 +0000 (21:19 -0700)]
gxl2gv endElementHandler: remove shadowing of 'name'

3 years agogxl2gv endElementHandler: use 'size_t' to track buffer size
Matthew Fernandez [Fri, 17 Sep 2021 04:17:18 +0000 (21:17 -0700)]
gxl2gv endElementHandler: use 'size_t' to track buffer size

Squashes -Wconversion warnings.

3 years agogxl2gv setGlobalEdgeAttr: remove unused 'ud' parameter
Matthew Fernandez [Fri, 17 Sep 2021 04:07:04 +0000 (21:07 -0700)]
gxl2gv setGlobalEdgeAttr: remove unused 'ud' parameter

3 years agogxl2gv setGlobalNodeAttr: remove unused 'ud' parameter
Matthew Fernandez [Fri, 17 Sep 2021 04:06:05 +0000 (21:06 -0700)]
gxl2gv setGlobalNodeAttr: remove unused 'ud' parameter

3 years agogxl2gv: squash -Wunused-parameter warnings
Matthew Fernandez [Fri, 17 Sep 2021 04:03:56 +0000 (21:03 -0700)]
gxl2gv: squash -Wunused-parameter warnings

3 years agogxl2gv pushString: use 'size_t' to track buffer size
Matthew Fernandez [Fri, 17 Sep 2021 04:02:31 +0000 (21:02 -0700)]
gxl2gv pushString: use 'size_t' to track buffer size

Squashes -Wconversion warnings.

3 years agogv2gxl initState: squash a -Wconversion warning
Matthew Fernandez [Fri, 17 Sep 2021 04:01:09 +0000 (21:01 -0700)]
gv2gxl initState: squash a -Wconversion warning

3 years agogv2gxl writeEdge: remove unused 'terminate' parameter
Matthew Fernandez [Fri, 17 Sep 2021 03:59:49 +0000 (20:59 -0700)]
gv2gxl writeEdge: remove unused 'terminate' parameter

3 years agogv2gxl writeHdr: use 'size_t' to track buffer size
Matthew Fernandez [Fri, 17 Sep 2021 03:58:20 +0000 (20:58 -0700)]
gv2gxl writeHdr: use 'size_t' to track buffer size

Squashes -Wconversion warnings.

3 years agogv2gxl createEdgeId: use 'size_t' to track buffer size
Matthew Fernandez [Fri, 17 Sep 2021 03:57:12 +0000 (20:57 -0700)]
gv2gxl createEdgeId: use 'size_t' to track buffer size

Squashes -Wconversion warnings.

3 years agogv2gxl _xml_string: use 'size_t' to track buffer size
Matthew Fernandez [Fri, 17 Sep 2021 03:47:04 +0000 (20:47 -0700)]
gv2gxl _xml_string: use 'size_t' to track buffer size

Squashes -Wconversion warnings.

3 years agogv2gxl: squash -Wunused-parameter warnings
Matthew Fernandez [Fri, 17 Sep 2021 03:45:20 +0000 (20:45 -0700)]
gv2gxl: squash -Wunused-parameter warnings

3 years agocvtgxl: squash a -Wswitch-default warning
Matthew Fernandez [Fri, 17 Sep 2021 03:43:43 +0000 (20:43 -0700)]
cvtgxl: squash a -Wswitch-default warning

3 years agocolxlate canoncolor: operate on 'char' instead of 'unsigned char'
Matthew Fernandez [Fri, 17 Sep 2021 03:35:44 +0000 (20:35 -0700)]
colxlate canoncolor: operate on 'char' instead of 'unsigned char'

It is unclear to me why this code was using unsigned char variables. This was
unnecessary, induced noisy casting and caused build warnings. This also changes
the `orig` parameter to a const pointer as the function does not modify the
pointed to data.

3 years agogvcolor: squash a -Wswitch-default warning
Matthew Fernandez [Fri, 17 Sep 2021 03:31:06 +0000 (20:31 -0700)]
gvcolor: squash a -Wswitch-default warning

3 years agogc wcp: remove shadowing of 'fname'
Matthew Fernandez [Fri, 17 Sep 2021 03:28:53 +0000 (20:28 -0700)]
gc wcp: remove shadowing of 'fname'

3 years agogc cntCluster: squash a -Wunused-parameter warning
Matthew Fernandez [Fri, 17 Sep 2021 03:27:30 +0000 (20:27 -0700)]
gc cntCluster: squash a -Wunused-parameter warning

3 years agogc: squash a -Wswitch-default warning
Matthew Fernandez [Fri, 17 Sep 2021 03:26:22 +0000 (20:26 -0700)]
gc: squash a -Wswitch-default warning

3 years agodot intr: squash a -Wunused-parameter warning
Matthew Fernandez [Fri, 17 Sep 2021 03:20:44 +0000 (20:20 -0700)]
dot intr: squash a -Wunused-parameter warning

3 years agoMerge branch 'smattr/10DCD620-10CF-4101-8025-7495C4DEE38C' into 'main'
Matthew Fernandez [Sun, 19 Sep 2021 22:57:20 +0000 (22:57 +0000)]
Merge branch 'smattr/10DCD620-10CF-4101-8025-7495C4DEE38C' into 'main'

lefty: remove cgraph include directory in MSBuild

See merge request graphviz/graphviz!2171

3 years agolefty: remove cgraph include directory in MSBuild
Matthew Fernandez [Sat, 18 Sep 2021 17:12:33 +0000 (10:12 -0700)]
lefty: remove cgraph include directory in MSBuild

Lefty does not appear to depend on cgraph.

3 years agoMerge branch 'some-autotools-cleanup' into 'main'
Magnus Jacobsson [Sun, 19 Sep 2021 21:57:01 +0000 (21:57 +0000)]
Merge branch 'some-autotools-cleanup' into 'main'

Some autotools linking cleanup

See merge request graphviz/graphviz!2175

3 years agocmd/edgepaint: autotools: link to the gvc lib instead of the static common lib
Magnus Jacobsson [Tue, 14 Sep 2021 10:31:44 +0000 (12:31 +0200)]
cmd/edgepaint: autotools: link to the gvc lib instead of the static common lib

The common lib is part of gvc and should not be linked to directly.

This will allow an upcoming MR to correct the storage class attributes
in lib/common/globals.h.

Wihout this commit, many errors like this would appear when linking
the edegpaint executable:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/edgepaint/.libs/libedgepaint_C.a(node_distinct_coloring.o): in function `node_distinct_coloring_internal2':
/home/magja/graphviz/lib/edgepaint/node_distinct_coloring.c:137: undefined reference to `__imp_Verbose'

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

3 years agocluster: autotools: link to the gvc lib instead of the static common lib
Magnus Jacobsson [Tue, 14 Sep 2021 10:31:44 +0000 (12:31 +0200)]
cluster: autotools: link to the gvc lib instead of the static common lib

The common lib is part of gvc and should not be linked to directly.

This will allow an upcoming MR to correct the storage class attributes
in lib/common/globals.h.

Wihout this commit, many errors like this would appear when linking
cluster:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/edgepaint/.libs/libedgepaint_C.a(node_distinct_coloring.o): in function `node_distinct_coloring_internal2':
/home/magja/graphviz/lib/edgepaint/node_distinct_coloring.c:137: undefined reference to `__imp_Verbose'

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

3 years agogvmap: autotools: link to the gvc lib instead of the static common lib
Magnus Jacobsson [Tue, 14 Sep 2021 10:31:44 +0000 (12:31 +0200)]
gvmap: autotools: link to the gvc lib instead of the static common lib

The common lib is part of gvc and should not be linked to directly.

This will allow an upcoming MR to correct the storage class attributes
in lib/common/globals.h.

Wihout this commit, many errors like this would appear when linking
gvmap:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/edgepaint/.libs/libedgepaint_C.a(node_distinct_coloring.o): in function `node_distinct_coloring_internal2':
/home/magja/graphviz/lib/edgepaint/node_distinct_coloring.c:137: undefined reference to `__imp_Verbose'

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

3 years agoplugin/pango: autotools: add linking to cgraph
Magnus Jacobsson [Sun, 12 Sep 2021 06:39:38 +0000 (08:39 +0200)]
plugin/pango: autotools: add linking to cgraph

E.g. plugin/pango/gvgetfontlist_pango.c uses agxbputc from
lib/cgraph/agxbuf.c.

Fixes errors like this with Cygwin:

/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: .libs/gvgetfontlist_pango.o: in function `agxbputc':
/cygdrive/c/GitLab-Runner/builds/magjac/graphviz/graphviz-2.49.1~dev.20210911.2106/plugin/pango/../../lib/cgraph/agxbuf.h:93: undefined reference to `agxbmore'

3 years agoplugin/visio: autotools: add linking to cgraph
Magnus Jacobsson [Fri, 10 Sep 2021 05:22:52 +0000 (07:22 +0200)]
plugin/visio: autotools: add linking to cgraph

E.g. VisioRender.cpp uses agroot from lib/cgraph/obj.c.

3 years agoplugin/core: autotools: add linking to xdot
Magnus Jacobsson [Thu, 9 Sep 2021 20:56:42 +0000 (22:56 +0200)]
plugin/core: autotools: add linking to xdot

E.g. plugin/core/gvrender_core_dot.c uses parseXDot from
lib/xdot/xdot.c.

Fixes these errors when building with Cygwin from the portable source
produced by the Ubuntu 18.03 runner in CI:

/cygdrive/c/GitLab-Runner/builds/magjac/graphviz/graphviz-2.49.1~dev.20210915.2014/plugin/core/gvrender_core_json.c:313: undefined reference to `parseXDot'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /cygdrive/c/GitLab-Runner/builds/magjac/graphviz/graphviz-2.49.1~dev.20210915.2014/plugin/core/gvrender_core_json.c:331: undefined reference to `freeXDot'

For some reason, this error did not show up when building using a
build system generated on Cygwin with autogen.sh.

3 years agolefty: autotools: don't try to build lefty when it's not possible
Magnus Jacobsson [Thu, 5 Aug 2021 16:08:13 +0000 (18:08 +0200)]
lefty: autotools: don't try to build lefty when it's not possible

Fixes this error with Cygwin:

In file included from garray.c:14:
../../../../cmd/lefty/g.h:20:10: fatal error: X11/Intrinsic.h: No such file or directory
   20 | #include <X11/Intrinsic.h>
      |          ^~~~~~~~~~~~~~~~~

3 years agoplugin/webp: autotools: add linking to gvc
Magnus Jacobsson [Sun, 22 Aug 2021 09:22:29 +0000 (11:22 +0200)]
plugin/webp: autotools: add linking to gvc

E.g. plugin/webp/gvloadimage_webp.c used gvusershape_file_access from
lib/gvc/gvusershape.c.

Fixes the following errors with Cygwin:

gvloadimage_webp.o: in function `webp_loadimage':
plugin/webp/gvloadimage_webp.c:139: undefined reference to `__imp_gvusershape_file_access'
plugin/webp/gvloadimage_webp.c:153: undefined reference to `__imp_gvusershape_file_release'
plugin/webp/gvloadimage_webp.c:153: undefined reference to `__imp_gvusershape_file_release'
gvdevice_webp.o: in function `writer':
plugin/webp/gvdevice_webp.c:43: undefined reference to `gvwrite'

3 years agoplugin/neato_layout: autotools: remove reference to nonexistent .def file
Magnus Jacobsson [Sat, 24 Jul 2021 12:03:09 +0000 (14:03 +0200)]
plugin/neato_layout: autotools: remove reference to nonexistent .def file

The gvplugin_neato_layout.def file has never existed in the git repo.

This reference was added in e74824c819a069dca2162c57deea96a7b3e5df1c,
but the .def file was never committed.

Fixes this error with MinGW:

libtool:   error: symbol file '../../plugin/neato_layout/gvplugin_neato_layout.def' does not exist

3 years agoMerge branch 'smattr/508C5931-2894-41DE-9B0F-C8B9CE32549B' into 'main'
Matthew Fernandez [Sun, 19 Sep 2021 18:59:55 +0000 (18:59 +0000)]
Merge branch 'smattr/508C5931-2894-41DE-9B0F-C8B9CE32549B' into 'main'

lefty clean up

See merge request graphviz/graphviz!2170

3 years agolefty SFclearList: abbreviate some float literals
Matthew Fernandez [Sat, 18 Sep 2021 01:59:12 +0000 (18:59 -0700)]
lefty SFclearList: abbreviate some float literals

3 years agolefty: remove no-op doLayout function
Matthew Fernandez [Sat, 18 Sep 2021 01:54:39 +0000 (18:54 -0700)]
lefty: remove no-op doLayout function

3 years agolefty: remove commented out code
Matthew Fernandez [Sat, 18 Sep 2021 01:53:55 +0000 (18:53 -0700)]
lefty: remove commented out code

3 years agolefty: remove some unnecessary casts
Matthew Fernandez [Sat, 18 Sep 2021 01:48:04 +0000 (18:48 -0700)]
lefty: remove some unnecessary casts

3 years agolefty SFstatAndCheck: use 'size_t' variables when dealing with buffer sizes
Matthew Fernandez [Sat, 18 Sep 2021 01:37:57 +0000 (18:37 -0700)]
lefty SFstatAndCheck: use 'size_t' variables when dealing with buffer sizes

Squashes two -Wconversion warnings and improves portability.

3 years agolefty SFgetDir: standardize 'qsort' usage
Matthew Fernandez [Sat, 18 Sep 2021 01:22:47 +0000 (18:22 -0700)]
lefty SFgetDir: standardize 'qsort' usage

The `qsort` function has been ISO standardized as far back as C89. There is no
need for workaround on any toolchain that correctly implements C99.