]> granicus.if.org Git - graphviz/log
graphviz
3 years agoMerge branch 'smattr/B81C2CF2-04BB-446A-8473-6CC49CC21B5A' into 'main'
Matthew Fernandez [Thu, 30 Sep 2021 01:37:35 +0000 (01:37 +0000)]
Merge branch 'smattr/B81C2CF2-04BB-446A-8473-6CC49CC21B5A' into 'main'

smyrna: yet more dead code removal

See merge request graphviz/graphviz!2184

3 years agosmyrna: remove unused object init functions
Matthew Fernandez [Fri, 24 Sep 2021 00:31:19 +0000 (17:31 -0700)]
smyrna: remove unused object init functions

3 years agosmyrna: remove now-unused cbSelectGraph
Matthew Fernandez [Fri, 24 Sep 2021 00:27:19 +0000 (17:27 -0700)]
smyrna: remove now-unused cbSelectGraph

3 years agosmyrna: remove unused get_SelectGraph
Matthew Fernandez [Fri, 24 Sep 2021 00:27:07 +0000 (17:27 -0700)]
smyrna: remove unused get_SelectGraph

3 years agosmyrna: remove unused frmObjectg
Matthew Fernandez [Fri, 24 Sep 2021 00:24:28 +0000 (17:24 -0700)]
smyrna: remove unused frmObjectg

3 years agosmyrna: remove unused frmObjectTypeIndex
Matthew Fernandez [Fri, 24 Sep 2021 00:23:12 +0000 (17:23 -0700)]
smyrna: remove unused frmObjectTypeIndex

3 years agosmyrna: mark filter_attributes as static
Matthew Fernandez [Fri, 24 Sep 2021 00:16:49 +0000 (17:16 -0700)]
smyrna: mark filter_attributes as static

This is not used outside of its containing file.

3 years agosmyrna: remove unnecessary binarySearch prototype
Matthew Fernandez [Fri, 24 Sep 2021 00:14:19 +0000 (17:14 -0700)]
smyrna: remove unnecessary binarySearch prototype

3 years agosmyrna: remove unused topviewdefs.h
Matthew Fernandez [Fri, 24 Sep 2021 00:12:17 +0000 (17:12 -0700)]
smyrna: remove unused topviewdefs.h

3 years agosmyrna: remove commented out code
Matthew Fernandez [Fri, 24 Sep 2021 00:01:43 +0000 (17:01 -0700)]
smyrna: remove commented out code

3 years agosmyrna: remove duplicate _BB definitions
Matthew Fernandez [Fri, 24 Sep 2021 00:01:30 +0000 (17:01 -0700)]
smyrna: remove duplicate _BB definitions

There was the option to remove the first duplicate or the second in this file. I
checked that none of the intervening includes depended on a `_BB` definition. It
seemed clearer to remove the first and indicate that only Smyrna itself is using
`_BB`.

3 years agoMerge branch 'smattr/916A53CB-2137-4E39-802A-72DCD4716DD5' into 'main'
Matthew Fernandez [Wed, 29 Sep 2021 16:15:54 +0000 (16:15 +0000)]
Merge branch 'smattr/916A53CB-2137-4E39-802A-72DCD4716DD5' into 'main'

toggle Lefty to disabled by default in the Autotools build system

See merge request graphviz/graphviz!2194

3 years agodebian/rules: remove commented out lines
Matthew Fernandez [Tue, 28 Sep 2021 14:35:16 +0000 (07:35 -0700)]
debian/rules: remove commented out lines

3 years agoremove some commented out RHEL build lines
Matthew Fernandez [Tue, 28 Sep 2021 04:14:37 +0000 (21:14 -0700)]
remove some commented out RHEL build lines

3 years agotoggle Lefty to disabled by default in the Autotools build system
Matthew Fernandez [Sat, 25 Sep 2021 21:53:49 +0000 (14:53 -0700)]
toggle Lefty to disabled by default in the Autotools build system

Based on a discussion that Lefty should be deprecated,¹ this takes the first
step towards removing it. It is hoped that by disabling it by default, this will
expose any downstream consumers who are relying on it being built by default.

If there are no complaints within three months, I think we can then remove build
system support entirely. If another three months pass without noise, I think we
can then remove Lefty sources from Graphviz.

In case the linked discussion is inaccessible when reading this commit message,
the summary from Stephen was:

  Lefty was an early interpreter for graphics programming. It’s from about 1990
  or 91, and we used it as the basis for a scriptable graphviz viewer, dotty.
  It was student code written by Lefteris Koutsofios. I thought there was some
  C code for parsing graphs but I could be wrong.

  Even libast came into the picture much later, but I suppose that was done to
  clean up some of its OS dependencies or to make it more portable or robust in
  some way.

  I’m ok with retiring it.

¹ https://forum.graphviz.org/t/lefty-not-a-graphviz-application/835

3 years agoexplicitly enable Lefty compilation in Autotools CI
Matthew Fernandez [Sat, 25 Sep 2021 20:57:52 +0000 (13:57 -0700)]
explicitly enable Lefty compilation in Autotools CI

Lefty is enabled by default currently, but an upcoming change will toggle this
to default-disabled.

3 years agoMerge branch 'add-cygwin-autotools-build-to-ci' into 'main'
Magnus Jacobsson [Tue, 28 Sep 2021 17:18:01 +0000 (17:18 +0000)]
Merge branch 'add-cygwin-autotools-build-to-ci' into 'main'

Add Cygwin autotools build jobs to CI

See merge request graphviz/graphviz!2193

3 years agoCI: add windows-cygwin-build-using-autogen job
Magnus Jacobsson [Thu, 9 Sep 2021 16:43:25 +0000 (18:43 +0200)]
CI: add windows-cygwin-build-using-autogen job

3 years agoci/build.sh: autotools: add support building for Cygwin using autogen
Magnus Jacobsson [Thu, 9 Sep 2021 16:42:30 +0000 (18:42 +0200)]
ci/build.sh: autotools: add support building for Cygwin using autogen

3 years agoci/cygwin-build.sh: add installation of autoconf2.5 & automake
Magnus Jacobsson [Thu, 9 Sep 2021 17:23:28 +0000 (19:23 +0200)]
ci/cygwin-build.sh: add installation of autoconf2.5 & automake

3 years agoCI: add autotools windows-cygwin-build
Magnus Jacobsson [Sun, 22 Aug 2021 09:58:23 +0000 (11:58 +0200)]
CI: add autotools windows-cygwin-build

3 years agoci/build.sh: add support for Cygwin autotools builds
Magnus Jacobsson [Thu, 5 Aug 2021 11:25:12 +0000 (13:25 +0200)]
ci/build.sh: add support for Cygwin autotools builds

3 years agocommon: unify diverged storage-class attributes in globals.h
Magnus Jacobsson [Tue, 14 Sep 2021 14:27:04 +0000 (16:27 +0200)]
common: unify diverged storage-class attributes in globals.h

The immediate reason for this commit is to fix a bug when using the
autools build system with Cygwin, described below, but it is also a
step towards
https://gitlab.com/graphviz/graphviz/-/issues/2058#note_678679545.

This file had one set of Windows-specific storage-class attribute
declarations intended for use with the autotools build system and one
set intended for use with Visual Studio, with slightly different
control mechanisms.

It's unclear what effect changes made to these control mechanisms over
the years has had on the many operating systems that are not tested in
CI. The current state is that they partly overlap and are very hard to
understand.

This commit cleans this up by applying such declarations only if the
GVDLL or the WIN32_DLL symbol is set. An export declaration is used if
either the GVC_EXPORT or the _BLD_GVC symbol is defined and an import
declaration otherwise.

Using both GVDLL and WIN32_DLL for the same purpose is a temporary
measure and will be replaced by only one symbol in an upcoming commit
series towards
https://gitlab.com/graphviz/graphviz/-/issues/2058#note_678679545.

Since https://gitlab.com/graphviz/graphviz/-/merge_requests/2182,
setting GVDLL is the preferred single mechanism to enable those
attributes, rather than using _WIN32 and __CYGWIN__ plus some other
symbol to distinguish between static and dynamic-link/shared
libraries.

Likewise is the use of both GVC_EXPORT and _BLD_gvc for the same
purpose a temporary measure, which will be replaced by only one symbol
in an upcoming commit series towards
https://gitlab.com/graphviz/graphviz/-/issues/2058#note_678679545.

This fixes a segmentation fault when running 'dot -c' during 'make install' on Cygwin.

Debugging with gdb showed that this happened on line 99 in dot.c:
    GvExitOnUsage = 1;

3 years agocmd/edgepaint: MSBuild: define GVDLL in the project file
Magnus Jacobsson [Tue, 14 Sep 2021 18:06:19 +0000 (20:06 +0200)]
cmd/edgepaint: MSBuild: define GVDLL in the project file

Without this change, an upcoming commit in this series that unites the
storage class attributes in lib/common/globals.h that have diverged
for different build systems, would cause edgepaint to generate a
segmentation fault (error code 3221225477 = 0xC0000005: access
violation) when started on native Windows.

Also towards
https://gitlab.com/graphviz/graphviz/-/issues/2058#note_678679545.

3 years agogvc: autotools: work around cygwin linking problem with .def file
Magnus Jacobsson [Mon, 13 Sep 2021 15:11:21 +0000 (17:11 +0200)]
gvc: autotools: work around cygwin linking problem with .def file

This workaround is just a temporary measure until an upcoming commit
series towards https://gitlab.com/graphviz/graphviz/-/issues/2058 will
remove the .def file.

Fixes this error with Cygwin when running 'dot -c' during installation.

C:/Users/magja/graphviz/build/bin/dot.exe: error while loading shared libraries: gvc.dll: cannot open shared object file: No such file or directory

Before this commit, the following results were obtained:

ldd build/bin/dot.exe =>
        ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffca85c0000)
        KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ffca69d0000)
        KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll (0x7ffca6170000)
        cygcgraph-6.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cygcgraph-6.dll (0x487030000)
        cygcdt-5.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cygcdt-5.dll (0x552550000)
        cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
        gvc.dll => not found

objdump -s lib/gvc/.libs/libgvc.dll.a | grep -i dll =>
In archive lib/gvc/.libs/libgvc.dll.a:
 0000 6776632e 646c6c00                    gvc.dll.

After this commit, the following results are obtained:

ldd build/bin/dot.exe =>
        ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffca85c0000)
        KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ffca69d0000)
        KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll (0x7ffca6170000)
        cyggvc-6.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cyggvc-6.dll (0x5941e0000)
        cygcgraph-6.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cygcgraph-6.dll (0x487030000)
        cygcdt-5.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cygcdt-5.dll (0x552550000)
        cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
        cygwin1.dll => /usr/bin/cygwin1.dll (0xe60000)
        cygpathplan-4.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cygpathplan-4.dll (0x461410000)
        cygz.dll => /usr/bin/cygz.dll (0x3ff080000)
        cygexpat-1.dll => /usr/bin/cygexpat-1.dll (0x3fe370000)
        cygltdl-7.dll => /usr/bin/cygltdl-7.dll (0x3feba0000)

objdump -s lib/gvc/.libs/libgvc.dll.a | grep -i dll =>
In archive lib/gvc/.libs/libgvc.dll.a:
 0000 63796767 76632d36 2e646c6c 00000000  cyggvc-6.dll....

3 years agoautotools: add WITH_CYGWIN to AM_CONDITIONAL
Magnus Jacobsson [Mon, 13 Sep 2021 15:10:31 +0000 (17:10 +0200)]
autotools: add WITH_CYGWIN to AM_CONDITIONAL

This will allow an upcoming commit in this series to introduce
Cygwin-specific functionality in the autotools build system.

3 years agocmd/dot: autotools: cd to bin dir before running dot -c
Magnus Jacobsson [Sat, 11 Sep 2021 10:30:06 +0000 (12:30 +0200)]
cmd/dot: autotools: cd to bin dir before running dot -c

Fixes this error with Cygwin:

C:/GitLab-Runner/builds/magjac/graphviz/build/bin/dot.exe: error while loading shared libraries: cygcgraph-6.dll: cannot open shared object file: No such file or directory

3 years agoortho: autotools: set also GVC_EXPORTS
Magnus Jacobsson [Sun, 22 Aug 2021 06:40:28 +0000 (08:40 +0200)]
ortho: autotools: set also GVC_EXPORTS

The immediate reason for this change is to correct the
Microsoft-specfic storage-class attributes in autotools builds with
Cygwin.

The object modules from the static ortho lib is statically linked into
the gvc shared lib which means that its symbols should be exported
from gvc instead of imported.

This is the second and final step in fixing these errors in autotools
builds with Cygwin:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/dotgen/.libs/libdotgen_C.a(dotsplines.o): in function `_dot_splines':
/home/magja/graphviz/lib/dotgen/dotsplines.c:334: undefined reference to `__imp_orthoEdges'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: /home/magja/graphviz/lib/dotgen/dotsplines.c:337: undefined reference to `__imp_orthoEdges'

The _BLD_gvc symbol is used for basically the same purpose as
GVC_EXPORTS. Using both is a temporary measure until an upcoming
commit series towards
https://gitlab.com/graphviz/graphviz/-/issues/2058#note_678679545
cleans up the control of the Windows specific storage-class attributes

3 years agoortho: use GVDLL instead of _WIN32 to enable storage-class attributes
Magnus Jacobsson [Sun, 22 Aug 2021 08:45:11 +0000 (10:45 +0200)]
ortho: use GVDLL instead of _WIN32 to enable storage-class attributes

The immediate reason for this change is to enable Windows-specific
storage-class attributes for autotools builds with Cygwin. The _WIN32
symbol is not defined when using Cygwin.

Since https://gitlab.com/graphviz/graphviz/-/merge_requests/2182,
setting GVDLL is the preferred single mechanism to enable those
attributes, rather than using _WIN32 and __CYGWIN__ plus some other
symbol to distinguish between static and dynamic-link/shared
libraries.

This is the first step of two in fixing these errors in autotools
builds with Cygwin:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/dotgen/.libs/libdotgen_C.a(dotsplines.o): in function `_dot_splines':
/home/magja/graphviz/lib/dotgen/dotsplines.c:334: undefined reference to `orthoEdges'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: /home/magja/graphviz/lib/dotgen/dotsplines.c:337: undefined reference to `orthoEdges'

The Windows-specific storage-class attributes are however still not
correct for Cygwin autotools builds, since GVC_EXPORT is currently not
set in the autotools builds. The error is now instead:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/dotgen/.libs/libdotgen_C.a(dotsplines.o): in function `_dot_splines':
/home/magja/graphviz/lib/dotgen/dotsplines.c:334: undefined reference to `__imp_orthoEdges'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: /home/magja/graphviz/lib/dotgen/dotsplines.c:337: undefined reference to `__imp_orthoEdges'

The next commit in this series will fix this.

Also towards
https://gitlab.com/graphviz/graphviz/-/issues/2058#note_678679545

3 years agoortho: MSBuild: define GVDLL
Magnus Jacobsson [Sun, 1 Aug 2021 16:01:01 +0000 (18:01 +0200)]
ortho: MSBuild: define GVDLL

Without this change, an upcoming commit in this series that will use
GVDLL instead of _WIN32 to enable Microsoft-specific storage-class
attributes would cause this error:

neatogen.lib(neatosplines.obj) : error LNK2019: unresolved external symbol _orthoEdges referenced in function __spline_edges [C:\GitLab-Runner\builds\magjac\graphviz\plugin\neato_layout\gvplugin_neato_layout.vcxproj]

Since https://gitlab.com/graphviz/graphviz/-/merge_requests/2182,
setting GVDLL is the preferred single mechanism to enable
Microsoft-specific storage-class attributes.

Also towards
https://gitlab.com/graphviz/graphviz/-/issues/2058#note_678679545

3 years agoplugin/core: autotools: make awk crlf agnostic when generating ps.h
Magnus Jacobsson [Sun, 22 Aug 2021 06:25:01 +0000 (08:25 +0200)]
plugin/core: autotools: make awk crlf agnostic when generating ps.h

Fixes errors like this with Cygwin in a crlf environment even with
SHELLOPTS=igncr:

ps.h:2:1: error: missing terminating " character
    2 | "%%BeginProlog ",
      | ^~~~~~~~~~~~~~

Although not shown in the error message, this line actually contained
a carriage return after %%BeginProlog:

"%%BeginProlog\r",

3 years agoedgepaint: autotools: add -no-undefined to LDFLAGS
Magnus Jacobsson [Sat, 24 Jul 2021 13:25:32 +0000 (15:25 +0200)]
edgepaint: autotools: add -no-undefined to LDFLAGS

Fixes this error with Cygwin:

libtool:   error: can't build x86_64-pc-cygwin shared library unless -no-undefined is specified

3 years agocommon: autotools: make awk crlf agnostic when generating svgcolor_lib
Magnus Jacobsson [Sun, 22 Aug 2021 06:10:21 +0000 (08:10 +0200)]
common: autotools: make awk crlf agnostic when generating svgcolor_lib

Fixes errors like this with Cygwin in a crlf environment with
SHELLOPTS=igncr:

../../lib/common/colortbl.h:1524:2: error: missing terminating " character
 1524 | {"/svg/ ",0,255,255,255,0,0,0},
      |  ^~~~~~

Although not shown in the error message, this line actually contained
a carriage return after /svg/:

{"/svg/^M",0,255,255,255,0,0,0},

3 years agoMerge branch 'smattr/B932BD99-362C-483F-B10D-B09620EC522E' into 'main'
Matthew Fernandez [Tue, 28 Sep 2021 03:21:10 +0000 (03:21 +0000)]
Merge branch 'smattr/B932BD99-362C-483F-B10D-B09620EC522E' into 'main'

smyrna: more cleanup

See merge request graphviz/graphviz!2191

3 years agosmyrma: push the scope of 'package_*' variables inwards
Matthew Fernandez [Sun, 26 Sep 2021 00:15:50 +0000 (17:15 -0700)]
smyrma: push the scope of 'package_*' variables inwards

These do not need to be exposed beyond main.c or even need to be globals. They
are not used outside of a single function.

3 years agosmyrna: remove 'glade_set_atk_action_description' prototype
Matthew Fernandez [Sun, 26 Sep 2021 00:12:14 +0000 (17:12 -0700)]
smyrna: remove 'glade_set_atk_action_description' prototype

This function was removed in 514a0056e9dfaa90d2bef63bb2150b6bd86152c9.

3 years agosmyrna support.h: remove commented out code
Matthew Fernandez [Sun, 26 Sep 2021 00:11:36 +0000 (17:11 -0700)]
smyrna support.h: remove commented out code

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

This function was removed in 514a0056e9dfaa90d2bef63bb2150b6bd86152c9.

3 years agosmyrna: remove 'lookup_widget' prototype
Matthew Fernandez [Sun, 26 Sep 2021 00:09:34 +0000 (17:09 -0700)]
smyrna: remove 'lookup_widget' prototype

This function was removed in 514a0056e9dfaa90d2bef63bb2150b6bd86152c9.

3 years agosmyrna: remove prototype of 'freeFocus'
Matthew Fernandez [Sun, 26 Sep 2021 00:05:16 +0000 (17:05 -0700)]
smyrna: remove prototype of 'freeFocus'

This function was removed in af92d6ce857bfa235d6fe771088074a9979b7172.

3 years agosmyrna set_color_theme_color: remove 'smooth' parameter
Matthew Fernandez [Sun, 26 Sep 2021 00:04:00 +0000 (17:04 -0700)]
smyrna set_color_theme_color: remove 'smooth' parameter

This function is only ever called with `1` as this value.

3 years agosmyrna: remove unused 'respond' global
Matthew Fernandez [Sat, 25 Sep 2021 23:59:48 +0000 (16:59 -0700)]
smyrna: remove unused 'respond' global

3 years agosmyrma: remove unused 'redraw'
Matthew Fernandez [Sat, 25 Sep 2021 23:53:46 +0000 (16:53 -0700)]
smyrma: remove unused 'redraw'

3 years agosmyrna: remove some commented out code
Matthew Fernandez [Sat, 25 Sep 2021 23:50:21 +0000 (16:50 -0700)]
smyrna: remove some commented out code

3 years agosmyrna: remove unused 'width' and 'height' globals
Matthew Fernandez [Sat, 25 Sep 2021 23:42:14 +0000 (16:42 -0700)]
smyrna: remove unused 'width' and 'height' globals

3 years agoMerge branch 'smattr/C34D084E-BE41-42C0-9742-E887E6D06631' into 'main'
Matthew Fernandez [Tue, 28 Sep 2021 02:13:31 +0000 (02:13 +0000)]
Merge branch 'smattr/C34D084E-BE41-42C0-9742-E887E6D06631' into 'main'

smyrna: even more dead code removal

See merge request graphviz/graphviz!2185

3 years agosmyrna: remove unused save_graph_clicked
Matthew Fernandez [Fri, 24 Sep 2021 00:59:06 +0000 (17:59 -0700)]
smyrna: remove unused save_graph_clicked

3 years agosmyrna: remove unused open_graph_clicked
Matthew Fernandez [Fri, 24 Sep 2021 00:58:17 +0000 (17:58 -0700)]
smyrna: remove unused open_graph_clicked

3 years agosmyrna: remove unused new_graph_clicked
Matthew Fernandez [Fri, 24 Sep 2021 00:57:18 +0000 (17:57 -0700)]
smyrna: remove unused new_graph_clicked

3 years agosmyrna: remove unused btnTVFilterApply_clicked_cb
Matthew Fernandez [Fri, 24 Sep 2021 00:52:35 +0000 (17:52 -0700)]
smyrna: remove unused btnTVFilterApply_clicked_cb

3 years agosmyrna: remove unused btnTVReverse_clicked_cb
Matthew Fernandez [Fri, 24 Sep 2021 00:49:47 +0000 (17:49 -0700)]
smyrna: remove unused btnTVReverse_clicked_cb

3 years agosmyrna: remove unused btnTVCancel_clicked_cb
Matthew Fernandez [Fri, 24 Sep 2021 00:47:36 +0000 (17:47 -0700)]
smyrna: remove unused btnTVCancel_clicked_cb

3 years agosmyrna: remove unused btnTVEdit_clicked_cb
Matthew Fernandez [Fri, 24 Sep 2021 00:46:39 +0000 (17:46 -0700)]
smyrna: remove unused btnTVEdit_clicked_cb

3 years agosmyrna: remove unused mAttributesSlot
Matthew Fernandez [Fri, 24 Sep 2021 00:43:40 +0000 (17:43 -0700)]
smyrna: remove unused mAttributesSlot

3 years agosmyrna: remove unused buf
Matthew Fernandez [Fri, 24 Sep 2021 00:43:02 +0000 (17:43 -0700)]
smyrna: remove unused buf

3 years agosmyrna: remove unused write_to_console
Matthew Fernandez [Fri, 24 Sep 2021 00:41:52 +0000 (17:41 -0700)]
smyrna: remove unused write_to_console

3 years agoMerge branch 'smattr/9475BC85-3C8A-4113-A179-ACF4D166E17E' into 'main'
Matthew Fernandez [Tue, 28 Sep 2021 01:03:01 +0000 (01:03 +0000)]
Merge branch 'smattr/9475BC85-3C8A-4113-A179-ACF4D166E17E' into 'main'

more -Wmissing-field-initializer warning squashing

See merge request graphviz/graphviz!2190

3 years agocommon Shapes: squash -Wmissing-field-initializer warnings
Matthew Fernandez [Sat, 25 Sep 2021 20:27:07 +0000 (13:27 -0700)]
common Shapes: squash -Wmissing-field-initializer warnings

3 years agop_lpromoter: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 25 Sep 2021 20:17:03 +0000 (13:17 -0700)]
p_lpromoter: squash -Wmissing-field-initializer warning

3 years agop_larrow: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 25 Sep 2021 20:16:16 +0000 (13:16 -0700)]
p_larrow: squash -Wmissing-field-initializer warning

3 years agop_rarrow: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 25 Sep 2021 20:15:31 +0000 (13:15 -0700)]
p_rarrow: squash -Wmissing-field-initializer warning

3 years agop_promoter: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 25 Sep 2021 20:14:05 +0000 (13:14 -0700)]
p_promoter: squash -Wmissing-field-initializer warning

3 years agop_signature: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 25 Sep 2021 20:13:17 +0000 (13:13 -0700)]
p_signature: squash -Wmissing-field-initializer warning

3 years agoMerge branch 'smattr/C64DD787-8A55-438E-9B8D-01EFBEB8718E' into 'main'
Matthew Fernandez [Mon, 27 Sep 2021 15:46:32 +0000 (15:46 +0000)]
Merge branch 'smattr/C64DD787-8A55-438E-9B8D-01EFBEB8718E' into 'main'

lefty clean up

See merge request graphviz/graphviz!2187

3 years agolefty: abbreviate some boolean returns in 'orderop'
Matthew Fernandez [Sat, 25 Sep 2021 02:30:37 +0000 (19:30 -0700)]
lefty: abbreviate some boolean returns in 'orderop'

3 years agolefty: remove unused 'Eshowcalls'
Matthew Fernandez [Sat, 25 Sep 2021 02:27:37 +0000 (19:27 -0700)]
lefty: remove unused 'Eshowcalls'

3 years agolefty: remove unused 'Eoktorun'
Matthew Fernandez [Sat, 25 Sep 2021 02:26:11 +0000 (19:26 -0700)]
lefty: remove unused 'Eoktorun'

3 years agolefty: remove unnecessary casts of char* members
Matthew Fernandez [Sat, 25 Sep 2021 02:14:20 +0000 (19:14 -0700)]
lefty: remove unnecessary casts of char* members

3 years agolefty: consistently treat 'CBUFINCR' as a 'long'
Matthew Fernandez [Sat, 25 Sep 2021 02:09:58 +0000 (19:09 -0700)]
lefty: consistently treat 'CBUFINCR' as a 'long'

3 years agolefty: consistently treat 'MARKINCR' as a 'long'
Matthew Fernandez [Sat, 25 Sep 2021 02:04:49 +0000 (19:04 -0700)]
lefty: consistently treat 'MARKINCR' as a 'long'

3 years agolefty: consistently treat 'OTINCR' as a 'long'
Matthew Fernandez [Sat, 25 Sep 2021 02:02:56 +0000 (19:02 -0700)]
lefty: consistently treat 'OTINCR' as a 'long'

3 years agolefty: remove C++ guards
Matthew Fernandez [Sat, 25 Sep 2021 01:58:05 +0000 (18:58 -0700)]
lefty: remove C++ guards

This program is entirely C, so does not need these explicit linkage specs.

3 years agolefty: replace header guards with more modern #pragma once
Matthew Fernandez [Sat, 25 Sep 2021 01:52:00 +0000 (18:52 -0700)]
lefty: replace header guards with more modern #pragma once

This omits the `_COMMON_H` guards as these are used in multiple files and may
have some other interaction.

3 years agolefty: mark 'GFXbuttoncb' static
Matthew Fernandez [Sat, 25 Sep 2021 00:51:39 +0000 (17:51 -0700)]
lefty: mark 'GFXbuttoncb' static

This function is not used outside of its containing file.

3 years agolefty: mark 'GFXtextcb' static
Matthew Fernandez [Sat, 25 Sep 2021 00:50:27 +0000 (17:50 -0700)]
lefty: mark 'GFXtextcb' static

This function is not used outside of its containing file.

3 years agolefty: remove 'Gerrno'
Matthew Fernandez [Sat, 25 Sep 2021 00:38:03 +0000 (17:38 -0700)]
lefty: remove 'Gerrno'

Nothing ever reads this variable.

3 years agoMerge branch 'smattr/6AF46EA6-D097-41D0-A29B-E5F270074178' into 'main'
Matthew Fernandez [Mon, 27 Sep 2021 00:48:37 +0000 (00:48 +0000)]
Merge branch 'smattr/6AF46EA6-D097-41D0-A29B-E5F270074178' into 'main'

CMake: fix: build gv2gml instead of symlinking gml2gv

Closes #2131

See merge request graphviz/graphviz!2192

3 years agoCMake: fix: build gv2gml instead of symlinking gml2gv
Matthew Fernandez [Sun, 26 Sep 2021 06:40:24 +0000 (23:40 -0700)]
CMake: fix: build gv2gml instead of symlinking gml2gv

Fixes #2131.

3 years agoadd a test case provoking gv2gml/gml2gv confusion
Matthew Fernandez [Sun, 26 Sep 2021 05:43:53 +0000 (22:43 -0700)]
add a test case provoking gv2gml/gml2gv confusion

Related to #2131.

3 years agoMerge branch 'fix-bom-in-collection-file-in-mingw-build-jobs' into 'main'
Magnus Jacobsson [Sun, 26 Sep 2021 09:52:39 +0000 (09:52 +0000)]
Merge branch 'fix-bom-in-collection-file-in-mingw-build-jobs' into 'main'

CI: avoid BOM in COLLECTION file in MinGW build jobs

Closes #2130

See merge request graphviz/graphviz!2188

3 years agoCI: avoid BOM in COLLECTION file in MinGW build jobs
Magnus Jacobsson [Sat, 25 Sep 2021 10:40:57 +0000 (12:40 +0200)]
CI: avoid BOM in COLLECTION file in MinGW build jobs

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

3 years agoMerge branch 'define-GVDLL-in-CMake-builds' into 'main'
Magnus Jacobsson [Sun, 26 Sep 2021 07:36:38 +0000 (07:36 +0000)]
Merge branch 'define-GVDLL-in-CMake-builds' into 'main'

Define GVDLL also in CMake builds for Windows

See merge request graphviz/graphviz!2182

3 years agoCMake: set GVDLL for WIN32
Magnus Jacobsson [Thu, 12 Aug 2021 20:08:19 +0000 (22:08 +0200)]
CMake: set GVDLL for WIN32

The GVDLL symbol has for a long time been used by the autotools build
system to control whether to apply the Microsoft storage-class
attributes, __declspec(dllexport) and __declspec(dllimport), that are
needed when building dynamic-link libraries (DLLs) on Windows, also
when using MinGW. The autotools build system does not define GVDLL
when static linking is requested.

Since the introduction of the CMake build system, this functionality
has gradually become more and more broken for both dynamic-link
libraries with MinGW and for static libraries in general under
Windows.

Upcoming commit series will try to restore this functionality. Rather
than having a plethora of different symbols controlling the
storage-class attributes in different ways for different build
systems, they will settle on something like this across all build
systems:

This means that in order to continue to support dynamic-link libraries
with CMake, the GVDLL symbol must be set.

The CMake build system does not currently support building static
libraries, so the GVDLL symbol can be unconditionally set for WIN32
until such support is introduced.

This is also a very small step towards
https://gitlab.com/graphviz/graphviz/-/issues/2058.

3 years agocommon: don't use dllexport when GVDLL and _BLD_gvc are set
Magnus Jacobsson [Sat, 25 Sep 2021 11:42:05 +0000 (13:42 +0200)]
common: don't use dllexport when GVDLL and _BLD_gvc are set

This is a temporary measure until an upcoming commit series cleans up
the control of the Windows storage-class attributes.

Without this change, an upcoming commit that defines GVDLL would cause
many warnings like this:

globals.obj : warning LNK4197: export 'Version' specified multiple times; using first specification [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]

The reason for this is that the symbols are already defined in the
gvc.def file. For more, see
https://support.microsoft.com/en-us/topic/you-receive-an-lnk4197-error-in-the-64-bit-version-of-the-visual-c-compiler-f002b07e-4ba6-46d4-eed4-0c82412b4ac6.

3 years agolib/gvpr: CMake: define EXPORT_GVPR
Magnus Jacobsson [Thu, 23 Sep 2021 21:51:41 +0000 (23:51 +0200)]
lib/gvpr: CMake: define EXPORT_GVPR

Without this change, an upcoming commit that defines GVDLL would cause
a warning like this:

C:\Users\magja\graphviz\lib\gvpr\gvpr.c(931,1): warning C4273: 'gvpr': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\gvpr\gvpr.vcxproj]

3 years agogvc: avoid macro redefinition warning when GVDLL is defined
Magnus Jacobsson [Thu, 23 Sep 2021 21:44:09 +0000 (23:44 +0200)]
gvc: avoid macro redefinition warning when GVDLL is defined

Without this change, an upcoming commit that defines GVDLL would cause
warnings like this:

C:\Users\magja\graphviz\lib\gvc/gvplugin_loadimage.h(29,1): warning C4005: 'GVPLUGIN_LOADIMAGE_API': macro redefinition [C:\Users\magja\graphviz\build\plugin\gdiplus\gvplugin_gdiplus.vcxproj]

3 years agopack: CMake: set also _BLD_gvc
Magnus Jacobsson [Sun, 22 Aug 2021 11:14:44 +0000 (13:14 +0200)]
pack: CMake: set also _BLD_gvc

This is a temporary measure until an upcoming commit series cleans up
the control of the Windows storage-class attributes.

Without this change, an upcoming commit that defines GVDLL also for
CMake builds, would cause many errors like this with minGW:

pack/CMakeFiles/pack_obj.dir/ccomps.c.obj:ccomps.c:(.text+0x1c95): undefined reference to `__imp_Verbose'

3 years agogvc: remove multiple declarations of two functions from gvcproc.h
Magnus Jacobsson [Mon, 26 Jul 2021 12:19:05 +0000 (14:19 +0200)]
gvc: remove multiple declarations of two functions from gvcproc.h

These are already declared in gvc.h with Windows storage-class
attributes.

Without this change, an upcoming commit that defines GVDLL also for
CMake builds, would cause the following errors with native Windows:

C:\Users\magja\graphviz\lib\gvc/gvc.h(67,13): error C2375: 'gvLayoutJobs': redefinition; different linkage [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]
C:\Users\magja\graphviz\lib\gvc/gvcproc.h(117): message : see declaration of 'gvLayoutJobs' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]
C:\Users\magja\graphviz\lib\gvc/gvc.h(91,13): error C2375: 'gvFreeLayout': redefinition; different linkage [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]
C:\Users\magja\graphviz\lib\gvc/gvcproc.h(116): message : see declaration of 'gvFreeLayout' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]

3 years agocommon: remove multiple declaration of attach_attrs from utils.h
Magnus Jacobsson [Mon, 26 Jul 2021 12:45:15 +0000 (14:45 +0200)]
common: remove multiple declaration of attach_attrs from utils.h

This function is already declared in the public gvc.h.

Without this change, an upcoming commit that defines GVDLL also for
CMake builds, would cause the following error with native Windows:

C:\Users\magja\graphviz\lib\gvc/gvc.h(75,14): error C2375: 'attach_attrs': redefinition; different linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\utils.h(39): message : see declaration of 'attach_attrs' [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]

3 years agoplugin/core: include gvc/gvc.h in gvrender_core_dot.c
Magnus Jacobsson [Tue, 21 Sep 2021 09:18:26 +0000 (11:18 +0200)]
plugin/core: include gvc/gvc.h in gvrender_core_dot.c

E.g. attach_attrs used in gvrender_core_dot.c is declared in
lib/gvc/gvc.h.

Removes this warning (from using CMake with MinGW):

C:/Users/magja/graphviz/plugin/core/gvrender_core_dot.c:469:6: warning: implicit declaration of function 'attach_attrs' [-Wimplicit-function-declaration]

3 years agopack: include gvc/gvc.h in ptest.c
Magnus Jacobsson [Tue, 21 Sep 2021 09:18:26 +0000 (11:18 +0200)]
pack: include gvc/gvc.h in ptest.c

E.g. attach_attrs used in ptest.c is declared in lib/gvc/gvc.h.

This change is not strictly necessary since gvc/gvc.h is indirectly
included through common/render.h anyway, but a direct inclusion is
clearer and will avoid confusion when an upcoming commit removes a
duplicated declaration of attach_attrs from utils.h.

3 years agocommon: include gvc/gvc.h in output.c
Magnus Jacobsson [Tue, 21 Sep 2021 09:18:26 +0000 (11:18 +0200)]
common: include gvc/gvc.h in output.c

E.g. attach_attrs used in output.c is declared in lib/gvc/gvc.h.

This change is not strictly necessary since gvc/gvc.h is indirectly
included through common/render.h anyway, but a direct inclusion is
clearer and will avoid confusion when an upcoming commit removes a
duplicated declaration of attach_attrs from utils.h.

3 years agoMerge branch 'smattr/F874E210-6DEB-4514-B871-F4072917198C' into 'main'
Matthew Fernandez [Sat, 25 Sep 2021 22:59:00 +0000 (22:59 +0000)]
Merge branch 'smattr/F874E210-6DEB-4514-B871-F4072917198C' into 'main'

remove legacy expr NMake makefile and Makefile.orig

See merge request graphviz/graphviz!2180

3 years agoremove legacy expr NMake makefile and Makefile.orig
Matthew Fernandez [Sun, 19 Sep 2021 22:42:14 +0000 (15:42 -0700)]
remove legacy expr NMake makefile and Makefile.orig

Maintaining three build systems is already more work than is manageable.
Maintaining four does not seem desirable.

3 years agoMerge branch 'smattr/5598559D-FB4F-41C0-A52A-E3FBC862B5CD' into 'main'
Matthew Fernandez [Sat, 25 Sep 2021 21:43:16 +0000 (21:43 +0000)]
Merge branch 'smattr/5598559D-FB4F-41C0-A52A-E3FBC862B5CD' into 'main'

lefty: a few things missed in recent clean up

See merge request graphviz/graphviz!2179

3 years agolefty SFcompareEntries: remove MSVC 'strcascmp' fall back
Matthew Fernandez [Sun, 19 Sep 2021 21:25:06 +0000 (14:25 -0700)]
lefty SFcompareEntries: remove MSVC 'strcascmp' fall back

Commit 1c2c986ebb2d16e491c68656217f5352b3d809c8 replaced `SFCompareEntries`
implementation with `strcasecmp` or `_stricmp` 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 agolefty Dir.c: remove unnecessary include of ctype.h
Matthew Fernandez [Sun, 19 Sep 2021 21:23:44 +0000 (14:23 -0700)]
lefty Dir.c: remove unnecessary include of ctype.h

Commit 1c2c986ebb2d16e491c68656217f5352b3d809c8 removed the only use of
`islower` and `toupper` in this file, which was why this header was included.

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.