]> granicus.if.org Git - graphviz/log
graphviz
3 years agoMerge branch 'remove-gvio-h-symbols-from-gvc-def-file' into 'main'
Magnus Jacobsson [Mon, 27 Dec 2021 19:24:55 +0000 (19:24 +0000)]
Merge branch 'remove-gvio-h-symbols-from-gvc-def-file' into 'main'

Remove gvio.h symbols from gvc.def

See merge request graphviz/graphviz!2368

3 years agogvc: remove now obsolete exporting of gvio.h symbols from gvc.def
Magnus Jacobsson [Wed, 15 Dec 2021 05:19:15 +0000 (06:19 +0100)]
gvc: remove now obsolete exporting of gvio.h symbols from gvc.def

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

3 years agogvc: correct storage-class attribute declarations in gvio.h
Magnus Jacobsson [Mon, 26 Jul 2021 14:57:20 +0000 (16:57 +0200)]
gvc: correct storage-class attribute declarations in gvio.h

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

3 years agoMerge branch 'remove-gvplugin_loadimage-h-symbols-from-gvc-def-file' into 'main'
Magnus Jacobsson [Sun, 26 Dec 2021 20:18:58 +0000 (20:18 +0000)]
Merge branch 'remove-gvplugin_loadimage-h-symbols-from-gvc-def-file' into 'main'

Remove gvplugin_loadimage.h symbols from gvc.def

See merge request graphviz/graphviz!2367

3 years agogvc: remove now obsolete exporting of gvplugin_loadimage.h symbols from gvc.def
Magnus Jacobsson [Tue, 14 Dec 2021 20:25:58 +0000 (21:25 +0100)]
gvc: remove now obsolete exporting of gvplugin_loadimage.h symbols from gvc.def

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

3 years agogvc: correct storage-class attribute declarations in gvplugin_loadimage.h
Magnus Jacobsson [Mon, 26 Jul 2021 14:55:15 +0000 (16:55 +0200)]
gvc: correct storage-class attribute declarations in gvplugin_loadimage.h

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

3 years agoMerge branch 'remove-timing.h' into 'main'
Magnus Jacobsson [Sun, 26 Dec 2021 08:22:06 +0000 (08:22 +0000)]
Merge branch 'remove-timing.h' into 'main'

Remove timing.h

See merge request graphviz/graphviz!2363

3 years agocommon: remove now unused timing.h
Magnus Jacobsson [Wed, 4 Aug 2021 09:05:30 +0000 (11:05 +0200)]
common: remove now unused timing.h

3 years agocommon: autotools: remove now unused timing.h
Magnus Jacobsson [Wed, 4 Aug 2021 09:05:30 +0000 (11:05 +0200)]
common: autotools: remove now unused timing.h

3 years agotred: include common/utils.h instead of duplicate defs from common/timing.h
Magnus Jacobsson [Wed, 4 Aug 2021 09:04:58 +0000 (11:04 +0200)]
tred: include common/utils.h instead of duplicate defs from common/timing.h

3 years agotred: rename DIST macro to avoid shadowing
Magnus Jacobsson [Sun, 12 Dec 2021 09:24:35 +0000 (10:24 +0100)]
tred: rename DIST macro to avoid shadowing

The next commit in this series will include types.h which transitively
includes geom.h which has another DIST macro defined.

Without this change, this error would occur:

FAILED: cmd/tools/CMakeFiles/tred.dir/tred.c.obj
C:\tools\msys64\mingw64\bin\ccache.exe  gcc -DDEMAND_LOADING=0 -DDIGCOLA -DENABLE_LTDL -DGVDLL -DORTHO -DSFDP -IC:/Users/magja/graphviz/build -IC:/Users/magja/graphviz/lib -IC:/Users/magja/graphviz/cmd/tools -IC:/Users/magja/graphviz/build/cmd/tools -IC:/Users/magja/graphviz/lib/cdt -IC:/Users/magja/graphviz/lib/cgraph -IC:/Users/magja/graphviz/lib/common -IC:/Users/magja/graphviz/lib/gvc -IC:/Users/magja/graphviz/lib/pack -IC:/Users/magja/graphviz/lib/pathplan -Werror -Wall -std=gnu99 -MD -MT cmd/tools/CMakeFiles/tred.dir/tred.c.obj -MF cmd\tools\CMakeFiles\tred.dir\tred.c.obj.d -o cmd/tools/CMakeFiles/tred.dir/tred.c.obj -c C:/Users/magja/graphviz/cmd/tools/tred.c
C:/Users/magja/graphviz/cmd/tools/tred.c:38: error: "DIST" redefined [-Werror]
   38 | #define DIST(ninfo,n) (ninfo[AGSEQ(n)].dist)
      |
In file included from C:/Users/magja/graphviz/lib/common/types.h:31,
                 from C:/Users/magja/graphviz/cmd/tools/tred.c:24:
C:/Users/magja/graphviz/lib/common/geom.h:53: note: this is the location of the previous definition
   53 | #define DIST(p,q)  (sqrt(DIST2((p),(q))))
      |

3 years agotred: MSBuild: add pathplan include directory
Magnus Jacobsson [Wed, 4 Aug 2021 13:55:57 +0000 (15:55 +0200)]
tred: MSBuild: add pathplan include directory

An upcoming commit that changes tred.c to include utils.h instead of
timing.h would otherwise cause this error:

C:\Users\magja\graphviz\lib\common\types.h(33,10): fatal error C1083: Cannot open include file: 'pathgeom.h': No such file or directory

3 years agotred: MSBuild: add gvc include directory
Magnus Jacobsson [Wed, 4 Aug 2021 13:32:28 +0000 (15:32 +0200)]
tred: MSBuild: add gvc include directory

An upcoming commit that changes tred.c to include utils.h instead of
timing.h would otherwise cause this error:

C:\Users\magja\graphviz\lib\common\types.h(32,10): fatal error C1083: Cannot open include file: 'gvcext.h': No such file or directory

3 years agotred: autotools: link to the shared gvc lib instead of the static common lib
Magnus Jacobsson [Wed, 4 Aug 2021 09:04:58 +0000 (11:04 +0200)]
tred: autotools: link to the shared gvc lib instead of the static common lib

The common lib is built into the gvc lib.

An upcoming commit that changes tred.c to include utils.h instead of
timing.h would otherwise cause these errors:

/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: tred.o: in function `process':
/cygdrive/c/GitLab-Runner/builds/magjac/graphviz/cmd/tools/tred.c:296: undefined reference to `__imp_start_timer'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /cygdrive/c/GitLab-Runner/builds/magjac/graphviz/cmd/tools/tred.c:299: undefined reference to `__imp_elapsed_sec'

3 years agotred: CMake: link to the gvc lib instead of the common lib
Magnus Jacobsson [Wed, 4 Aug 2021 09:04:58 +0000 (11:04 +0200)]
tred: CMake: link to the gvc lib instead of the common lib

The common lib is a static lib which is built into the shared gvc lib.

An upcoming commit that changes tred.c to include utils.h instead of
timing.h would otherwise cause these errors:

C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cmd/tools/CMakeFiles/tred.dir/tred.c.obj:tred.c:(.text+0xb47): undefined reference to `__imp_start_timer'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cmd/tools/CMakeFiles/tred.dir/tred.c.obj:tred.c:(.text+0xb7a): undefined reference to `__imp_elapsed_sec'

3 years agoMerge branch 'remove-pointset-h-symbols-from-gvc-def-file' into 'main'
Magnus Jacobsson [Sun, 26 Dec 2021 06:54:13 +0000 (06:54 +0000)]
Merge branch 'remove-pointset-h-symbols-from-gvc-def-file' into 'main'

Remove pointset.h symbols from gvc.def

See merge request graphviz/graphviz!2365

3 years agocommon: remove now obsolete exporting of pointset.h symbols from gvc.def
Magnus Jacobsson [Tue, 14 Dec 2021 20:20:06 +0000 (21:20 +0100)]
common: remove now obsolete exporting of pointset.h symbols from gvc.def

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

3 years agocommon: correct storage-class attribute declarations in pointset.h
Magnus Jacobsson [Mon, 26 Jul 2021 14:53:22 +0000 (16:53 +0200)]
common: correct storage-class attribute declarations in pointset.h

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

3 years agoMerge branch 'remove-pack-h-symbols-from-gvc-def' into 'main'
Magnus Jacobsson [Sat, 25 Dec 2021 23:09:12 +0000 (23:09 +0000)]
Merge branch 'remove-pack-h-symbols-from-gvc-def' into 'main'

Remove pack.h symbols from gvc.def

See merge request graphviz/graphviz!2364

3 years agopack: remove now obsolete exporting of pack.h symbols from gvc.def
Magnus Jacobsson [Tue, 14 Dec 2021 20:13:19 +0000 (21:13 +0100)]
pack: remove now obsolete exporting of pack.h symbols from gvc.def

Note that the packRects and shiftGraphs functions in pack.h was not
exported from gvc.def.

3 years agopack: correct storage-class attribute declarations in pack.h
Magnus Jacobsson [Mon, 26 Jul 2021 13:36:34 +0000 (15:36 +0200)]
pack: correct storage-class attribute declarations in pack.h

3 years agoMerge branch 'remove-utils-h-symbols-from-gvc-def-file' into 'main'
Magnus Jacobsson [Sat, 25 Dec 2021 22:00:50 +0000 (22:00 +0000)]
Merge branch 'remove-utils-h-symbols-from-gvc-def-file' into 'main'

Remove utils.h symbols from gvc.def file

See merge request graphviz/graphviz!2361

3 years agocommon: remove now obsolete exporting of utils.h symbols from gvc.def
Magnus Jacobsson [Sat, 18 Dec 2021 14:53:52 +0000 (15:53 +0100)]
common: remove now obsolete exporting of utils.h symbols from gvc.def

3 years agocommon: correct storage-class attribute declarations in utils.h
Magnus Jacobsson [Mon, 26 Jul 2021 13:33:57 +0000 (15:33 +0200)]
common: correct storage-class attribute declarations in utils.h

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

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

3 years agocommon: include utils.h and types.h in timing.c also for _WIN32
Magnus Jacobsson [Sat, 25 Dec 2021 14:50:26 +0000 (15:50 +0100)]
common: include utils.h and types.h in timing.c also for _WIN32

This ensures that the timing functions are declared with the
storage-class attributes from utils.h.

An upcoming commit that corrects the storage-class attribute
declarations in utils.h would otherwise cause these errors:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/dotgen/.libs/libdotgen_C.a(mincross.o): in function `init_mincross':
/home/magja/graphviz/lib/dotgen/mincross.c:1163: undefined reference to `__imp_start_timer'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/dotgen/.libs/libdotgen_C.a(mincross.o): in function `cleanup2':
/home/magja/graphviz/lib/dotgen/mincross.c:996: undefined reference to `__imp_elapsed_sec'

The reason for also including types.h is that utils.h depends on it
without including it itself for unclear reasons.

Note that these functions are also redundantly declared in
timing.h. This file will be removed in an upcoming commit series.

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

3 years agocommon: include types.h instead of render.h in timing.c
Magnus Jacobsson [Sat, 25 Dec 2021 14:46:02 +0000 (15:46 +0100)]
common: include types.h instead of render.h in timing.c

This file does not explicitly need either of thoses files, but it
includes utils.h that needs types.h. It is better to include this file
directly rather transitively through render.h.

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

3 years agoMerge branch 'smattr/ce9e6cdc-f5de-4342-959e-4e83691b2521' into 'main'
Matthew Fernandez [Sat, 25 Dec 2021 20:40:50 +0000 (20:40 +0000)]
Merge branch 'smattr/ce9e6cdc-f5de-4342-959e-4e83691b2521' into 'main'

some warning squashing

See merge request graphviz/graphviz!2358

3 years agotranslate_drawing: [nfc] use a bool for 'shift' for clearer intent
Matthew Fernandez [Fri, 24 Dec 2021 16:53:03 +0000 (08:53 -0800)]
translate_drawing: [nfc] use a bool for 'shift' for clearer intent

3 years agopostproc.c: [nfc] remove excess parens and fix spacing
Matthew Fernandez [Fri, 24 Dec 2021 16:49:51 +0000 (08:49 -0800)]
postproc.c: [nfc] remove excess parens and fix spacing

3 years agogv_postprocess: squash a -Wswitch-default warning
Matthew Fernandez [Fri, 24 Dec 2021 16:35:18 +0000 (08:35 -0800)]
gv_postprocess: squash a -Wswitch-default warning

3 years agomkIntItem: [nfc] remove unnecessary cast
Matthew Fernandez [Fri, 24 Dec 2021 16:33:44 +0000 (08:33 -0800)]
mkIntItem: [nfc] remove unnecessary cast

3 years agointset.c: [nfc] squash unused parameter warnings
Matthew Fernandez [Fri, 24 Dec 2021 16:32:36 +0000 (08:32 -0800)]
intset.c: [nfc] squash unused parameter warnings

3 years agoMerge branch 'smattr/5b62a26e-782a-40b2-a9a7-ac1eea617c8b' into 'main'
Matthew Fernandez [Sat, 25 Dec 2021 19:38:01 +0000 (19:38 +0000)]
Merge branch 'smattr/5b62a26e-782a-40b2-a9a7-ac1eea617c8b' into 'main'

more boolean → bool modernization

See merge request graphviz/graphviz!2353

3 years agomakeObstacle: [nfc] take a C99 bool parameter instead of a boolean
Matthew Fernandez [Mon, 20 Dec 2021 04:10:56 +0000 (20:10 -0800)]
makeObstacle: [nfc] take a C99 bool parameter instead of a boolean

3 years agoremove prototype for unimplemented 'init_port'
Matthew Fernandez [Mon, 20 Dec 2021 04:08:50 +0000 (20:08 -0800)]
remove prototype for unimplemented 'init_port'

3 years agogvrender_usershape: [nfc] take a C99 bool parameter instead of a boolean
Matthew Fernandez [Mon, 20 Dec 2021 04:03:48 +0000 (20:03 -0800)]
gvrender_usershape: [nfc] take a C99 bool parameter instead of a boolean

3 years agogvloadimage: [nfc] take a C99 bool parameter instead of a boolean
Matthew Fernandez [Mon, 20 Dec 2021 04:01:22 +0000 (20:01 -0800)]
gvloadimage: [nfc] take a C99 bool parameter instead of a boolean

3 years agogvtextlayout: [nfc] return a C99 bool instead of a boolean
Matthew Fernandez [Mon, 20 Dec 2021 03:58:56 +0000 (19:58 -0800)]
gvtextlayout: [nfc] return a C99 bool instead of a boolean

3 years agogvconfig: [nfc] take a C99 bool parameter instead of a boolean
Matthew Fernandez [Mon, 20 Dec 2021 03:55:50 +0000 (19:55 -0800)]
gvconfig: [nfc] take a C99 bool parameter instead of a boolean

3 years agogv_nodesize: [nfc] take a C99 bool instead of a boolean
Matthew Fernandez [Mon, 20 Dec 2021 03:45:27 +0000 (19:45 -0800)]
gv_nodesize: [nfc] take a C99 bool instead of a boolean

3 years agopoly_init: rephrase some open coded 'fmax'
Matthew Fernandez [Mon, 20 Dec 2021 03:41:40 +0000 (19:41 -0800)]
poly_init: rephrase some open coded 'fmax'

3 years agoplace_portlabel: [nfc] take a C99 bool parameter instead of a boolean
Matthew Fernandez [Mon, 20 Dec 2021 03:36:24 +0000 (19:36 -0800)]
place_portlabel: [nfc] take a C99 bool parameter instead of a boolean

3 years agoshapes.c: [nfc] remove unnecessary parens
Matthew Fernandez [Mon, 20 Dec 2021 03:25:53 +0000 (19:25 -0800)]
shapes.c: [nfc] remove unnecessary parens

3 years agoisPolygon: [nfc] use a C99 bool return type instead of boolean
Matthew Fernandez [Mon, 20 Dec 2021 03:01:35 +0000 (19:01 -0800)]
isPolygon: [nfc] use a C99 bool return type instead of boolean

3 years agoMerge branch 'smattr/56143E8A-A8C1-4923-83EE-78FA1AA7FE44' into 'main'
Matthew Fernandez [Thu, 23 Dec 2021 02:00:00 +0000 (02:00 +0000)]
Merge branch 'smattr/56143E8A-A8C1-4923-83EE-78FA1AA7FE44' into 'main'

make 'solve1' and 'solve2' static functions

See merge request graphviz/graphviz!2351

3 years agomake 'solve1' and 'solve2' static functions
Matthew Fernandez [Sun, 19 Dec 2021 21:46:44 +0000 (13:46 -0800)]
make 'solve1' and 'solve2' static functions

As of 9550d5dae1a487617a8910b1b496ffd12c78a546, these functions are no longer
exported or needed outside of solvers.c. `solve3` has occasionally been a
hotspot for performance-constrained Graphviz use cases. So making it more
obvious to the compiler that it can inline and/or specialize `solve1` and
`solve2` may provide some speed up.

3 years agoMerge branch 'remove-gvc-h-symbols-from-gvc-def-file' into 'main'
Magnus Jacobsson [Wed, 22 Dec 2021 06:01:31 +0000 (06:01 +0000)]
Merge branch 'remove-gvc-h-symbols-from-gvc-def-file' into 'main'

Remove gvc.h symbols from gvc.def file

See merge request graphviz/graphviz!2355

3 years agoortho: MSBuild: define GVC_EXPORTS to ensure correct storage-class attributes
Magnus Jacobsson [Sun, 1 Aug 2021 16:01:01 +0000 (18:01 +0200)]
ortho: MSBuild: define GVC_EXPORTS to ensure correct storage-class attributes

The ortho lib is a static library which is linked into the
dynamic-link gvc lib and both use GVC_EXPORTS to control the
storage-class.

Removes many warnings like:

LINK : warning LNK4286: symbol '_gcalloc' defined in 'memory.obj' is imported by 'gvortho.lib(ortho.obj)' [C:\Users\magja\graphviz\lib\gvc.vcxproj]
LINK : warning LNK4217: symbol '_gcalloc' defined in 'memory.obj' is imported by 'gvortho.lib(trapezoid.obj)' in function '_construct_trapezoids' [C:\Users\magja\graphviz\lib\gvc.vcxproj]
C:\Users\magja\graphviz\lib\ortho\ortho.c(1250,1): warning C4273: 'orthoEdges': inconsistent dll linkage [C:\Users\magja\graphviz\lib\ortho\gvortho.vcxproj]

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

3 years agogvc: remove now obsolete exporting of gvc.h symbols from gvc.def
Magnus Jacobsson [Mon, 13 Dec 2021 21:30:24 +0000 (22:30 +0100)]
gvc: remove now obsolete exporting of gvc.h symbols from gvc.def

Note that the findStopColor function in gvc.h was missing in gvc.def.

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

3 years agogvc: unify diverged storage-class attributes in gvc.h
Magnus Jacobsson [Mon, 26 Jul 2021 12:44:47 +0000 (14:44 +0200)]
gvc: unify diverged storage-class attributes in gvc.h

More specifically, add support for the dllexport storage-class
attribute for all build systems under Windows, MinGW and Cygwin.

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

This change makes the gvc.h file conform to
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 symbol is set. An export declaration is used if the
GVC_EXPORT symbol is defined and an import declaration otherwise.

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

3 years agogvc: add storage-class attribute declaration of gvLayoutDone in gvc.h
Magnus Jacobsson [Thu, 12 Aug 2021 09:23:06 +0000 (11:23 +0200)]
gvc: add storage-class attribute declaration of gvLayoutDone in gvc.h

This function was introduced in
6f46c2c224180dc238851d2fb88d1fb909548376 which was part of a branch
which initially originated before the storage-class attributes for the
other functions in this file were introduced. This was not noted when
this branch was rebased before merge.

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

3 years agoMerge branch 'smattr/5b8a0597-32a7-4c76-be6a-e874c07336b4' into 'main'
Matthew Fernandez [Wed, 22 Dec 2021 04:23:18 +0000 (04:23 +0000)]
Merge branch 'smattr/5b8a0597-32a7-4c76-be6a-e874c07336b4' into 'main'

introduce an abstraction for compacted boolean arrays

See merge request graphviz/graphviz!2345

3 years agograph_sgd: convert 'pinned' bool array to a bit array
Matthew Fernandez [Sat, 18 Dec 2021 22:51:17 +0000 (14:51 -0800)]
graph_sgd: convert 'pinned' bool array to a bit array

3 years agograph_sgd: track number of nodes as a 'size_t' instead of 'int'
Matthew Fernandez [Sun, 19 Dec 2021 21:16:00 +0000 (13:16 -0800)]
graph_sgd: track number of nodes as a 'size_t' instead of 'int'

This squashes a number of compiler warnings and allows this struct to deal with
> 2³² - 1 nodes in future. Dealing with this number of nodes now is still not
possible due to locations where conversion back to `int` is necessary. In
future the source and target index arrays in this struct should probably be
converted to `size_t` too, but that was not done in this commit as it involves
more invasive changes.

3 years agointroduce an abstraction for compacted boolean arrays
Matthew Fernandez [Thu, 16 Dec 2021 01:46:16 +0000 (17:46 -0800)]
introduce an abstraction for compacted boolean arrays

3 years agoMerge branch 'smattr/F1948FD5-8F64-4412-8925-3321F5EAC143' into 'main'
Matthew Fernandez [Tue, 21 Dec 2021 03:36:51 +0000 (03:36 +0000)]
Merge branch 'smattr/F1948FD5-8F64-4412-8925-3321F5EAC143' into 'main'

misc gvplugin.c clean up

See merge request graphviz/graphviz!2343

3 years agogvplugin.c: remove unnecessary parens
Matthew Fernandez [Thu, 4 Nov 2021 15:16:16 +0000 (08:16 -0700)]
gvplugin.c: remove unnecessary parens

3 years agogvplugin.c: fix comment typos
Matthew Fernandez [Thu, 4 Nov 2021 15:10:56 +0000 (08:10 -0700)]
gvplugin.c: fix comment typos

3 years agoMerge branch 'fix-neatogen-lib-warnings' into 'main'
Magnus Jacobsson [Mon, 20 Dec 2021 12:05:52 +0000 (12:05 +0000)]
Merge branch 'fix-neatogen-lib-warnings' into 'main'

Fix storage-class related warnings i the neatogen lib

See merge request graphviz/graphviz!2352

3 years agoset NEATOGEN_EXPORTS in sfdp.vcxproj
Magnus Jacobsson [Sun, 1 Aug 2021 17:17:34 +0000 (19:17 +0200)]
set NEATOGEN_EXPORTS in sfdp.vcxproj

Removes 6 warnings like the one below:

LINK : warning LNK4217: symbol '_neato_init_node' defined in 'neatogen.lib(neatoinit.obj)' is imported by 'sfdp.lib(sfdpinit.obj)' in function '_sfdp_layout' [C:\Users\magja\graphviz\plugin\neato_layout\gvplugin_neato_layout.vcxproj]

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

3 years agoset NEATOGEN_EXPORTS in gvtwopigen.vcxproj
Magnus Jacobsson [Sun, 1 Aug 2021 17:08:47 +0000 (19:08 +0200)]
set NEATOGEN_EXPORTS in gvtwopigen.vcxproj

Removes 4 warnings like the one below:

LINK : warning LNK4217: symbol '_neato_init_node' defined in 'neatogen.lib(neatoinit.obj)' is imported by 'twopigen.lib(twopiinit.obj)' in function '_twopi_init_graph' [C:\Users\magja\graphviz\plugin\neato_layout\gvplugin_neato_layout.vcxproj]

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

3 years agoset NEATOGEN_EXPORTS in gvfdpgen.vcxproj
Magnus Jacobsson [Sun, 1 Aug 2021 16:29:13 +0000 (18:29 +0200)]
set NEATOGEN_EXPORTS in gvfdpgen.vcxproj

Removes 18 warnings like the one below:

LINK : warning LNK4217: symbol '_spline_edges1' defined in 'neatogen.lib(neatosplines.obj)' is imported by 'fdpgen.lib(layout.obj)' in function '_fdp_layout' [C:\Users\magja\graphviz\plugin\neato_layout\gvplugin_neato_layout.vcxproj]

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

3 years agoset NEATOGEN_EXPORTS in gvcircogen.vcxproj
Magnus Jacobsson [Sun, 1 Aug 2021 16:25:37 +0000 (18:25 +0200)]
set NEATOGEN_EXPORTS in gvcircogen.vcxproj

Removes 4 warnings like the one below:

LINK : warning LNK4217: symbol '_neato_init_node' defined in 'neatogen.lib(neatoinit.obj)' is imported by 'circogen.lib(circularinit.obj)' in function '_circo_init_graph' [C:\Users\magja\graphviz\plugin\neato_layout\gvplugin_neato_layout.vcxproj]

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

3 years agoset NEATOGEN_EXPORTS in osage.vcxproj
Magnus Jacobsson [Sun, 1 Aug 2021 16:22:19 +0000 (18:22 +0200)]
set NEATOGEN_EXPORTS in osage.vcxproj

Removes 6 warnings like the one below:

LINK : warning LNK4217: symbol '_neato_init_node' defined in 'neatogen.lib(neatoinit.obj)' is imported by 'osage.lib(osageinit.obj)' in function '_layout' [C:\Users\magja\graphviz\plugin\neato_layout\gvplugin_neato_layout.vcxproj]

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

3 years agoMerge branch 'remove-useless-exporting-of-symbols-in-gvc-def-file' into 'main'
Magnus Jacobsson [Mon, 20 Dec 2021 09:16:51 +0000 (09:16 +0000)]
Merge branch 'remove-useless-exporting-of-symbols-in-gvc-def-file' into 'main'

Remove useless exporting of symbols in gvc.def file

See merge request graphviz/graphviz!2348

3 years agoMerge branch 'smattr/9e8bb9bf-1a04-485d-ae0f-4920031a6a55' into 'main'
Matthew Fernandez [Mon, 20 Dec 2021 02:50:18 +0000 (02:50 +0000)]
Merge branch 'smattr/9e8bb9bf-1a04-485d-ae0f-4920031a6a55' into 'main'

more boolean → bool modernization

See merge request graphviz/graphviz!2350

3 years agoendpath: [nfc] take a C99 bool parameter instead of a boolean
Matthew Fernandez [Sun, 19 Dec 2021 20:42:56 +0000 (12:42 -0800)]
endpath: [nfc] take a C99 bool parameter instead of a boolean

3 years agoremove lib/pack/ptest.c
Matthew Fernandez [Sun, 19 Dec 2021 20:36:42 +0000 (12:36 -0800)]
remove lib/pack/ptest.c

This code has clearly bitrotted some time ago. E.g. it calls `graph_init` with
one parameter, but this function takes two parameters.

3 years agograph_init: [nfc] take a C99 bool parameter instead of a boolean
Matthew Fernandez [Sun, 19 Dec 2021 20:34:37 +0000 (12:34 -0800)]
graph_init: [nfc] take a C99 bool parameter instead of a boolean

3 years agoshape_clip0: [nfc] take a C99 bool parameter instead of a boolean
Matthew Fernandez [Sun, 19 Dec 2021 20:28:48 +0000 (12:28 -0800)]
shape_clip0: [nfc] take a C99 bool parameter instead of a boolean

3 years agobezier_clip: [nfc] take a C99 bool parameter instead of a boolean
Matthew Fernandez [Sun, 19 Dec 2021 20:26:36 +0000 (12:26 -0800)]
bezier_clip: [nfc] take a C99 bool parameter instead of a boolean

3 years agobeginpath: [nfc] use a C99 bool for a parameter instead of a boolean
Matthew Fernandez [Sun, 19 Dec 2021 20:20:58 +0000 (12:20 -0800)]
beginpath: [nfc] use a C99 bool for a parameter instead of a boolean

3 years agopostproc.c: [nfc] use a C99 bool for 'Flip' instead of a boolean
Matthew Fernandez [Sun, 19 Dec 2021 20:13:18 +0000 (12:13 -0800)]
postproc.c: [nfc] use a C99 bool for 'Flip' instead of a boolean

3 years agoinput.c: [nfc] remove unnecessary parens
Matthew Fernandez [Sun, 19 Dec 2021 20:12:27 +0000 (12:12 -0800)]
input.c: [nfc] remove unnecessary parens

3 years agohtmlmap_data_t: [nfc] use a C99 bool instead of a boolean
Matthew Fernandez [Sun, 19 Dec 2021 20:06:22 +0000 (12:06 -0800)]
htmlmap_data_t: [nfc] use a C99 bool instead of a boolean

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 agogvc: remove obsolete exporting of globals.h symbols from gvc.def
Magnus Jacobsson [Wed, 15 Dec 2021 21:30:23 +0000 (22:30 +0100)]
gvc: remove obsolete exporting of globals.h symbols from gvc.def

The symbols in common/globals.h have correct storage-class attributes
since commit e01f4a96848807ed07a00cee5351ec8b4d4dde49.

Note that the following symbols in globals.h were missing in the
gvc.def file:

Gvimagepath
G_gradientangl
N_margin
N_imagepos
N_gradientangle
E_fillcolor

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

3 years agogvmap: MSBuild: define GVDLL to ensure correct storage-class attributes
Magnus Jacobsson [Sun, 12 Dec 2021 12:35:32 +0000 (13:35 +0100)]
gvmap: MSBuild: define GVDLL to ensure correct storage-class attributes

An upcoming commit that removes the common/globals.h symbols from the
gvc.def file would otherwise cause errors like this:

gvmap.obj : error LNK2001: unresolved external symbol _Verbose [C:\Users\magja\graphviz\cmd\gvmap\gvmap.vcxproj]

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

3 years agomingle: MSBuild: define GVDLL to ensure correct storage-class attributes
Magnus Jacobsson [Thu, 16 Dec 2021 20:49:07 +0000 (21:49 +0100)]
mingle: MSBuild: define GVDLL to ensure correct storage-class attributes

An upcoming commit that removes the common/globals.h symbols from the
gvc.def file would otherwise cause errors like this:

minglemain.obj : error LNK2001: unresolved external symbol _Files [C:\Users\magja\graphviz\cmd\mingle\mingle.vcxproj]

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

3 years agolib/mingle: MSBuild: define GVDLL to ensure correct storage-class attributes
Magnus Jacobsson [Sun, 12 Dec 2021 12:36:25 +0000 (13:36 +0100)]
lib/mingle: MSBuild: define GVDLL to ensure correct storage-class attributes

An upcoming commit that removes the common/globals.h symbols from the
gvc.def file would otherwise cause errors like this:

minglelib.lib(edge_bundling.obj) : error LNK2001: unresolved external symbol _Verbose [C:\Users\magja\graphviz\cmd\mingle\mingle.vcxproj]

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

3 years agosparse: MSBuild: define GVDLL to ensure correct storage-class attributes
Magnus Jacobsson [Sat, 11 Dec 2021 14:29:24 +0000 (15:29 +0100)]
sparse: MSBuild: define GVDLL to ensure correct storage-class attributes

An upcoming commit that removes the common/globals.h symbols from the
gvc.def file would otherwise cause errors like this:

sparse.lib(DotIO.obj) : error LNK2001: unresolved external symbol _Verbose

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

3 years agosparse: correct storage-class declaration of Verbose when STANDALONE
Magnus Jacobsson [Sat, 18 Dec 2021 07:25:59 +0000 (08:25 +0100)]
sparse: correct storage-class declaration of Verbose when STANDALONE

An upcoming commit that removes the common/globals.h symbols from the
gvc.def file would otherwise cause errors like this:

sparse.lib(mq.obj) : error LNK2001: unresolved external symbol _Verbose [C:\Users\magja\graphviz\cmd\gvmap\gvmap.vcxproj]

This is for the STANDALONE case when Verbose is defined by the
application that uses lib/sparse rather than using the definition in
lib/common/globals.h. In this case, Verbose is not exported from any
library.

From lib/sparse/general.h:

/* Applications that do not use the common library can define STANDALONE
 * to get definitions/definitions that are normally provided there.
 * In particular, note that Verbose is declared but undefined.
 */

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

3 years agogvc: remove obsolete exporting of memory.h symbols from gvc.def
Magnus Jacobsson [Thu, 16 Dec 2021 06:53:15 +0000 (07:53 +0100)]
gvc: remove obsolete exporting of memory.h symbols from gvc.def

The symbols in common/memory.h have correct storage-class attributes
since commit a07297906fc7c90c3ca45d292412ddbd29b7f5bc.

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

3 years agogvc: MSBuild: define GVDLL to ensure correct storage-class attributes
Magnus Jacobsson [Tue, 14 Dec 2021 19:57:29 +0000 (20:57 +0100)]
gvc: MSBuild: define GVDLL to ensure correct storage-class attributes

An upcoming commit that removes the common/memory.h symbols from the
gvc.def file would otherwise cause errors like this:

matrix_market.obj : error LNK2019: unresolved external symbol _gmalloc referenced in function _SparseMatrix_import_matrix_market

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

3 years agogvc: remove useless exporting of intset.h symbol openIntSet from gvc.def
Magnus Jacobsson [Thu, 16 Dec 2021 06:58:54 +0000 (07:58 +0100)]
gvc: remove useless exporting of intset.h symbol openIntSet from gvc.def

The openIntSet function in common/intset.h is only used in the common
and ortho libraries which are both static libraries that are built
into the gvc dynamic-link library.

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

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.