]> granicus.if.org Git - graphviz/log
graphviz
3 years agoMerge branch 'smattr/0F3EB13A-FB8F-4B18-BA3B-2C77172988E0' into 'main' 2.47.2
Matthew Fernandez [Thu, 27 May 2021 00:53:31 +0000 (00:53 +0000)]
Merge branch 'smattr/0F3EB13A-FB8F-4B18-BA3B-2C77172988E0' into 'main'

Stable Release 2.47.2

See merge request graphviz/graphviz!1963

3 years agoStable Release 2.47.2
Matthew Fernandez [Sun, 16 May 2021 17:36:11 +0000 (10:36 -0700)]
Stable Release 2.47.2

3 years agoMerge branch 'dll-data' into 'main'
Matthew Fernandez [Fri, 21 May 2021 00:36:24 +0000 (00:36 +0000)]
Merge branch 'dll-data' into 'main'

sfio: remove uwin specific handling

See merge request graphviz/graphviz!1959

3 years agosfio: remove uwin specific handling
Saleem Abdulrasool [Fri, 14 May 2021 22:40:58 +0000 (15:40 -0700)]
sfio: remove uwin specific handling

The indirection of the data through the IAT is implicitly handled by
modern linkers and compilers when the data symbol is annotated with
`__declspec(dll{import,export})`.  This removes the support for the
older toolchains as part of the work to properly annotate symbols for
improvements to the Windows port.

3 years agoMerge branch 'smattr/7B3F1422-4C87-4B72-8CBB-F395FF5AAB87' into 'main'
Matthew Fernandez [Thu, 20 May 2021 03:42:57 +0000 (03:42 +0000)]
Merge branch 'smattr/7B3F1422-4C87-4B72-8CBB-F395FF5AAB87' into 'main'

optimize 0 case in xdot_fmt_num

See merge request graphviz/graphviz!1958

3 years agooptimize 0 case in xdot_fmt_num
Matthew Fernandez [Fri, 14 May 2021 00:07:53 +0000 (17:07 -0700)]
optimize 0 case in xdot_fmt_num

Commit 894e94c66340187ff6f8ea97c9336ea048a3d6ad applied a performance
optimization to gvprintdouble that was contributing to a performance issue in a
user’s graph. The code touched in this commit has the same pattern as that in
gvprintdouble, and the same corresponding (latent) performance issue. While it
is not known to cause any problems currently, we may as well proactively apply
the same optimization here.

This preserves the same functionality, but simply takes an early exit from the
function when we already know precisely how to print the resulting string.

3 years agoMerge branch 'fix-msvc-linkage-errors' into 'main'
Magnus Jacobsson [Wed, 19 May 2021 19:29:24 +0000 (19:29 +0000)]
Merge branch 'fix-msvc-linkage-errors' into 'main'

Remove MSVC linkage warnings

See merge request graphviz/graphviz!1931

3 years agoRemove duplicated declarations in smyrna topviewfuncs.h
Magnus Jacobsson [Fri, 23 Apr 2021 05:44:50 +0000 (07:44 +0200)]
Remove duplicated declarations in smyrna topviewfuncs.h

3 years agoCorrect MSVC storage-class in gvpr.h. Removes one warning
Magnus Jacobsson [Mon, 19 Apr 2021 20:35:42 +0000 (22:35 +0200)]
Correct MSVC storage-class in gvpr.h. Removes one warning

Only set __declspec(dllexport) or __declspec(dllimport) when the gvpr
library is dynamically linked. This is defined by GVDLL which is set
in the Windows MSBuild builds which use dynamic linking, but unset in
the Windows CMake builds which use static linking.

Removes the following warning from the Windows CMake builds:

C:\GitLab-Runner\builds\graphviz\graphviz\lib\gvpr\gvpr.c(931,1): warning C4273: 'gvpr': inconsistent dll linkage [C:\GitLab-Runner\builds\graphviz\graphviz\build\lib\gvpr\gvpr.vcxproj]

3 years agoAdd missing GVDLL define in lib/gvpr Windows MSBuild Debug build
Magnus Jacobsson [Mon, 26 Apr 2021 11:36:13 +0000 (13:36 +0200)]
Add missing GVDLL define in lib/gvpr Windows MSBuild Debug build

GVDLL is used by the autotools and MSBuild build systems to specify
dynamic linking on Windows.

3 years agoCorrect MSVC storage-class in geomprocs.h. Removes 19 warnings
Magnus Jacobsson [Mon, 19 Apr 2021 19:21:55 +0000 (21:21 +0200)]
Correct MSVC storage-class in geomprocs.h. Removes 19 warnings

Avoid setting __declspec(dllimport) when gvc is being exported.

Removes the following warnings from the Windows CMake builds:

C:\Users\magja\graphviz\lib\common\geom.c(20,1): warning C4273: 'mkbox': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(41,1): warning C4273: 'mkboxf': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(84,1): warning C4273: 'lineToBox': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(194,1): warning C4273: 'rect2poly': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(229,1): warning C4273: 'cwrotatep': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(257,1): warning C4273: 'cwrotatepf': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(285,1): warning C4273: 'ccwrotatep': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(313,1): warning C4273: 'ccwrotatepf': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(341,1): warning C4273: 'flip_rec_box': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(357,1): warning C4273: 'flip_rec_boxf': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(378,1): warning C4273: 'ptToLine2': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
C:\Users\magja\graphviz\lib\common\geom.c(395,1): warning C4273: 'line_intersect': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj]
LINK : warning LNK4217: symbol 'ptToLine2' defined in 'geom.obj' is imported by 'emit.obj' in function 'check_control_points' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]
LINK : warning LNK4217: symbol 'rect2poly' defined in 'geom.obj' is imported by 'emit.obj' in function 'emit_map_rect' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]
LINK : warning LNK4217: symbol 'ccwrotatepf' defined in 'geom.obj' is imported by 'postproc.obj' in function 'gv_postprocess' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]
LINK : warning LNK4286: symbol 'ccwrotatepf' defined in 'geom.obj' is imported by 'shapes.obj' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]
LINK : warning LNK4217: symbol 'flip_rec_boxf' defined in 'geom.obj' is imported by 'shapes.obj' in function 'record_path' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]
LINK : warning LNK4217: symbol 'cwrotatepf' defined in 'geom.obj' is imported by 'shapes.obj' in function 'compassPoint' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]
LINK : warning LNK4217: symbol 'lineToBox' defined in 'geom.obj' is imported by 'utils.obj' in function 'overlap_bezier' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj]

3 years agoMerge branch 'smattr/5EE54780-9173-406B-8B95-DC903AD46E4F' into 'main'
Matthew Fernandez [Wed, 19 May 2021 15:27:14 +0000 (15:27 +0000)]
Merge branch 'smattr/5EE54780-9173-406B-8B95-DC903AD46E4F' into 'main'

remove diff and grep as Windows build and test dependencies

Closes #2069

See merge request graphviz/graphviz!1957

3 years agoremove Windows CI check for diff
Matthew Fernandez [Thu, 13 May 2021 02:44:13 +0000 (19:44 -0700)]
remove Windows CI check for diff

Following the prior changes, diff is no longer a test suite dependency on
Windows. Closes #2069.

3 years agoreplace use of diff in rtest with filecmp
Matthew Fernandez [Thu, 13 May 2021 02:42:11 +0000 (19:42 -0700)]
replace use of diff in rtest with filecmp

This is a step towards removing diff as a test dependency, so Windows users do
not need to install it. Related to #2069.

3 years agoreplace use of diff in test_reference with difflib
Matthew Fernandez [Thu, 13 May 2021 02:28:30 +0000 (19:28 -0700)]
replace use of diff in test_reference with difflib

This is a step towards removing diff as a test dependency, so Windows users do
not need to install it. Related to #2069.

3 years agoremove Windows CI check for grep
Matthew Fernandez [Thu, 13 May 2021 02:10:54 +0000 (19:10 -0700)]
remove Windows CI check for grep

Following the prior changes, grep is no longer a build dependency on Windows.
Related to #2069.

3 years agoreplace use of grep in Windows CI task with Select-String
Matthew Fernandez [Thu, 13 May 2021 01:49:25 +0000 (18:49 -0700)]
replace use of grep in Windows CI task with Select-String

This warning counting can be achieved without the use of grep. This is a step
towards removing grep as a Windows build dependency. Related to #2069.

3 years agoreplace use of grep in Windows build utility setup with Select-String
Matthew Fernandez [Thu, 13 May 2021 01:14:17 +0000 (18:14 -0700)]
replace use of grep in Windows build utility setup with Select-String

This is a built-in function in PowerShell with equivalent functionality for this
purpose. This change is a step towards removing grep as a build dependency on
Windows. Related to #2069.

3 years agoMerge branch 'smattr/4B36E297-A6E1-4C9A-A3AE-9D765264D73C' into 'main'
Matthew Fernandez [Wed, 19 May 2021 03:27:15 +0000 (03:27 +0000)]
Merge branch 'smattr/4B36E297-A6E1-4C9A-A3AE-9D765264D73C' into 'main'

some clean up in cmd/gvedit

See merge request graphviz/graphviz!1956

3 years agoreplace header guards in gvedit with more modern #pragma once
Matthew Fernandez [Thu, 13 May 2021 00:08:48 +0000 (17:08 -0700)]
replace header guards in gvedit with more modern #pragma once

3 years agoremove commented out code in gvedit
Matthew Fernandez [Thu, 13 May 2021 00:08:40 +0000 (17:08 -0700)]
remove commented out code in gvedit

3 years agouse isEmpty in preference to checking length against 0 in gvedit
Matthew Fernandez [Thu, 13 May 2021 00:08:31 +0000 (17:08 -0700)]
use isEmpty in preference to checking length against 0 in gvedit

Qt QStrings have two methods, isEmpty and length, analogous to empty and length
on std::string, respectively. Checking isEmpty is equivalent to checking length
against 0, is clearer, and has the potential to be more performant.

3 years agoMerge branch 'smattr/A7790D85-5D41-49CD-A9BC-38AE5FA3B570' into 'main'
Matthew Fernandez [Tue, 18 May 2021 04:19:41 +0000 (04:19 +0000)]
Merge branch 'smattr/A7790D85-5D41-49CD-A9BC-38AE5FA3B570' into 'main'

remove work around for stateful macOS CI runners

See merge request graphviz/graphviz!1955

3 years agoremove work around for stateful macOS CI runners
Matthew Fernandez [Wed, 12 May 2021 01:49:18 +0000 (18:49 -0700)]
remove work around for stateful macOS CI runners

Graphviz was part of a closed beta program for Gitlab macOS CI runners.¹ During
the beta period, Graphviz had access to a single macOS VM environment that was
stateful. That is, the effects of any macOS CI task would persist to the next
macOS CI task. To work around this, logic was introduced to manually remove the
Graphviz installed in the macOS CI environment by the prior run.

The Gitlab program will transition into open beta on 2021-05-22, however the
Graphviz configuration was already migrated to the open beta model on
2021-04-07.² This means the macOS runner are no longer stateful:

  To recap, for the closed beta, we provisioned a static macOS virtual machine
  for each project. This meant that we executed any pipeline job in your
  associated repository on the same virtual machine each time. Since the VM was
  dedicated to your project, this also meant that your pipeline job did not have
  to wait in a queue before running.

  For the open-beta, each job that requires a macOS build environment will run
  in its own ephemeral virtual machine provisioned on demand by the GitLab
  Runner macOS autoscaler. This means that you can’t rely on persistent storage
  anymore.

This change removes the work around that is no longer needed. This reverts
62165551efb389ea14a6709ffd89b2b5ed79e35c.

  ¹ https://gitlab.com/gitlab-com/macos-buildcloud-runners-beta/-/issues/3
  ² https://gitlab.com/gitlab-com/macos-buildcloud-runners-beta/-/issues/3#note_536852935

3 years agoMerge branch 'smattr/dc82b281-8d6d-492b-b2df-62c89447711e' into 'main'
Matthew Fernandez [Sun, 16 May 2021 17:28:17 +0000 (17:28 +0000)]
Merge branch 'smattr/dc82b281-8d6d-492b-b2df-62c89447711e' into 'main'

more warning squashing

See merge request graphviz/graphviz!1939

3 years agosquash some -Wfloat-conversion warnings
Matthew Fernandez [Sun, 2 May 2021 03:38:36 +0000 (20:38 -0700)]
squash some -Wfloat-conversion warnings

If we need -0.1 and -0.2 as floats (or the closest representation), we should
just say so. This improves the compiler’s ability to understand the intent of
this code.

3 years agouse float square root function withing getEdgeLength
Matthew Fernandez [Sun, 2 May 2021 03:36:35 +0000 (20:36 -0700)]
use float square root function withing getEdgeLength

Like prior commits in this series, this avoids using the double function with
float arguments.

3 years agomore explicit float computation in hsv2rgb
Matthew Fernandez [Sun, 2 May 2021 03:24:25 +0000 (20:24 -0700)]
more explicit float computation in hsv2rgb

Instead of being vague with ints, doubles, and floats, this commit standardizes
on float literals in hsv2rgb. This squashes a number of -Wfloat-conversion
compiler warnings.

3 years agouse hypotf to squash a -Wfloat-conversion warning
Matthew Fernandez [Sun, 2 May 2021 03:17:30 +0000 (20:17 -0700)]
use hypotf to squash a -Wfloat-conversion warning

For the same reason as the previous commit, this fixes an intermingling of
doubles and floats, and also abbreviates code.

3 years agouse floating point math functions to squash a -Wfloat-conversion warning
Matthew Fernandez [Sun, 2 May 2021 03:15:30 +0000 (20:15 -0700)]
use floating point math functions to squash a -Wfloat-conversion warning

The function sqrt operates on doubles, which was triggering a -Wfloat-conversion
compiler warning. The float version of this function is sqrtf, but we can
further abbreviate this operation by observing it is computing the hypotenuse of
a right-angled triangle and use the library function for that instead.

3 years agouse a float literal to squash a -Wfloat-conversion warning
Matthew Fernandez [Sun, 2 May 2021 03:14:37 +0000 (20:14 -0700)]
use a float literal to squash a -Wfloat-conversion warning

3 years agoavoid using double literals with a float variable
Matthew Fernandez [Sun, 2 May 2021 03:13:10 +0000 (20:13 -0700)]
avoid using double literals with a float variable

With -Wfloat-conversion, the compiler warns that going via double literals like
this resulted in an imprecise float. To squash this warning and be more precise,
we can use float literals instead.

3 years agoremove use of double literals with ydelta in make_flat_labeled_edge
Matthew Fernandez [Sun, 2 May 2021 03:03:51 +0000 (20:03 -0700)]
remove use of double literals with ydelta in make_flat_labeled_edge

Commit ebe7517ae4eb86ee4bf34e1af31a174f1f0a4049 altered these lines to use
double literals instead of integer literals for `5` and `6`. It is not clear why
it did this as ydelta is an integer variable. The effect of that change was to
ask the compiler to perform the computation itself using doubles and then reduce
it to an integer result. This commit reverts that part of the diff to simply use
integer computation throughout. This change was motivated by the compiler
diagnosing this issue with -Wfloat-conversion.

3 years agoremove some commented out code
Matthew Fernandez [Sun, 2 May 2021 02:57:20 +0000 (19:57 -0700)]
remove some commented out code

3 years agosquash a -Wfloat-conversion due to sqrt in distBetweenPts
Matthew Fernandez [Sun, 2 May 2021 02:52:43 +0000 (19:52 -0700)]
squash a -Wfloat-conversion due to sqrt in distBetweenPts

There is a dedicated libc function for doing square root of floats, but this
code was incorrectly calling the version for doubles instead. This updated code
is more appropriate and could even be more efficient.

3 years agosquash some -Wfloat-conversion warnings in lib/glcomp
Matthew Fernandez [Sun, 2 May 2021 02:50:50 +0000 (19:50 -0700)]
squash some -Wfloat-conversion warnings in lib/glcomp

These literals were doubles, but being implicitly converted to floats. This
resulted in precision loss. E.g. the compiler diagnoses:

  conversion from ‘double’ to ‘GLfloat’ {aka ‘float’} changes value from
  ‘-1.0e-3’ to ‘-1.00000005e-3’

By writing these as float literals to begin with, we can get a more precise
value.

3 years agomark interpol function as static
Matthew Fernandez [Sun, 2 May 2021 02:35:13 +0000 (19:35 -0700)]
mark interpol function as static

This is not used outside of its containing file.

3 years agoremove unused interpol field in Smyrna
Matthew Fernandez [Sun, 2 May 2021 02:34:56 +0000 (19:34 -0700)]
remove unused interpol field in Smyrna

3 years agomark various v* functions in Smyrna as static
Matthew Fernandez [Sun, 2 May 2021 02:34:09 +0000 (19:34 -0700)]
mark various v* functions in Smyrna as static

These are not used outside of their containing file.

3 years agoremove unused frmObject_set_scroll function
Matthew Fernandez [Sun, 2 May 2021 02:31:37 +0000 (19:31 -0700)]
remove unused frmObject_set_scroll function

3 years agomark GFXarrayresizecb as static
Matthew Fernandez [Sun, 2 May 2021 02:29:12 +0000 (19:29 -0700)]
mark GFXarrayresizecb as static

This function is not used outside of its containing file.

3 years agoremove unused mm_read_mtx_crd function
Matthew Fernandez [Sun, 2 May 2021 02:28:06 +0000 (19:28 -0700)]
remove unused mm_read_mtx_crd function

3 years agomark compBB as static
Matthew Fernandez [Sun, 2 May 2021 02:27:11 +0000 (19:27 -0700)]
mark compBB as static

This function is not used outside of its containing file.

3 years agoremove some commented out code
Matthew Fernandez [Sun, 2 May 2021 02:26:31 +0000 (19:26 -0700)]
remove some commented out code

3 years agomark attr_value_edited_cb functions as static
Matthew Fernandez [Sun, 2 May 2021 02:25:12 +0000 (19:25 -0700)]
mark attr_value_edited_cb functions as static

Both copies of this function are only used within their containing file.

3 years agoremove unused Operator_uniform_stress_matmul_delete function
Matthew Fernandez [Sun, 2 May 2021 02:22:51 +0000 (19:22 -0700)]
remove unused Operator_uniform_stress_matmul_delete function

3 years agoremove unused get_level function
Matthew Fernandez [Sun, 2 May 2021 02:20:06 +0000 (19:20 -0700)]
remove unused get_level function

3 years agoremove unused colorType function
Matthew Fernandez [Sun, 2 May 2021 02:17:40 +0000 (19:17 -0700)]
remove unused colorType function

3 years agoremove unused exlexname
Matthew Fernandez [Sun, 2 May 2021 02:15:24 +0000 (19:15 -0700)]
remove unused exlexname

This function is uncalled and not exposed to users.

3 years agoremove unused Pobsbarriers function
Matthew Fernandez [Sun, 2 May 2021 02:09:46 +0000 (19:09 -0700)]
remove unused Pobsbarriers function

3 years agoMerge branch 'smattr/318A4F88-562E-4495-B0EE-41385C9F66AE' into 'main'
Matthew Fernandez [Sat, 15 May 2021 19:47:06 +0000 (19:47 +0000)]
Merge branch 'smattr/318A4F88-562E-4495-B0EE-41385C9F66AE' into 'main'

tidy up gen_version.py and squash Pylint warnings

See merge request graphviz/graphviz!1954

3 years agosquash missing-module-docstring Pylint warning in gen_version
Matthew Fernandez [Sun, 9 May 2021 18:06:50 +0000 (11:06 -0700)]
squash missing-module-docstring Pylint warning in gen_version

3 years agosquash Pylint import warnings in gen_version
Matthew Fernandez [Sun, 9 May 2021 18:06:05 +0000 (11:06 -0700)]
squash Pylint import warnings in gen_version

3 years agoMerge branch 'smattr/8012B430-752A-41A9-9F70-01AC86CA1FB3' into 'main'
Matthew Fernandez [Sat, 15 May 2021 01:41:11 +0000 (01:41 +0000)]
Merge branch 'smattr/8012B430-752A-41A9-9F70-01AC86CA1FB3' into 'main'

clean up of edgeType()

See merge request graphviz/graphviz!1952

3 years agomore precisely indicate the argument to edgeType is not modified
Matthew Fernandez [Sat, 8 May 2021 17:47:31 +0000 (10:47 -0700)]
more precisely indicate the argument to edgeType is not modified

3 years agomake edgeType() static
Matthew Fernandez [Sat, 8 May 2021 17:46:42 +0000 (10:46 -0700)]
make edgeType() static

This function is not used outside of lib/common/utils.c and utils.h is not a
shipped header.

3 years agosimplify edgeType()
Matthew Fernandez [Sat, 8 May 2021 17:36:06 +0000 (10:36 -0700)]
simplify edgeType()

This change avoids some micro-optimizations that were unnecessary and making
this function harder to read. The function’s behavior is intended to be
identical after this change.

3 years agoMerge branch 'smattr/C44CD3B6-6BBA-4D56-BB6F-5BACB7265AD4' into 'main'
Matthew Fernandez [Sat, 15 May 2021 00:51:45 +0000 (00:51 +0000)]
Merge branch 'smattr/C44CD3B6-6BBA-4D56-BB6F-5BACB7265AD4' into 'main'

fix: remove dangling reference to textfont.* in Autotools file

See merge request graphviz/graphviz!1953

3 years agofix: remove dangling reference to textfont.* in Autotools file
Matthew Fernandez [Sat, 8 May 2021 20:38:48 +0000 (13:38 -0700)]
fix: remove dangling reference to textfont.* in Autotools file

The file textfont.c was renamed to textspan.c in
65f337664d177b588c5c2418fe12bac7eef62c2a but this rule was incorrectly not
updated. Rather than relying on manual dependencies which the Autotools docs
suggest can be problematic,¹ we just remove this rule. This removes the ability
to `make textspan.o`, but clearly no one was relying on this anyway as it has
been broken since 2013.

¹ https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html

3 years agoMerge branch 'smattr/7cf525be-5d5f-4ed7-9982-44399733c868' into 'main'
Matthew Fernandez [Fri, 14 May 2021 16:13:36 +0000 (16:13 +0000)]
Merge branch 'smattr/7cf525be-5d5f-4ed7-9982-44399733c868' into 'main'

more lib/vpsc clean up and modernization

See merge request graphviz/graphviz!1950

3 years agomanage graph collection in VPSC::blockGraphIsCyclic with smart pointers
Matthew Fernandez [Sat, 8 May 2021 03:58:16 +0000 (20:58 -0700)]
manage graph collection in VPSC::blockGraphIsCyclic with smart pointers

This avoids some manual memory management.

3 years agoremove redundant conditional clause
Matthew Fernandez [Sat, 8 May 2021 03:45:21 +0000 (20:45 -0700)]
remove redundant conditional clause

This is always known-true due to the condition on the containing loop.

3 years agouse a range-based for loop to abbreviate some code in VPSC::blockGraphIsCyclic
Matthew Fernandez [Sat, 8 May 2021 03:43:50 +0000 (20:43 -0700)]
use a range-based for loop to abbreviate some code in VPSC::blockGraphIsCyclic

3 years agomanage graph collection in VPSC::constraintGraphIsCyclic with smart pointers
Matthew Fernandez [Sat, 8 May 2021 03:42:36 +0000 (20:42 -0700)]
manage graph collection in VPSC::constraintGraphIsCyclic with smart pointers

Removes some manual memory management.

3 years agouse range-based for loops to abbreviate some code in constraintGraphIsCyclic
Matthew Fernandez [Sat, 8 May 2021 03:27:05 +0000 (20:27 -0700)]
use range-based for loops to abbreviate some code in constraintGraphIsCyclic

3 years agoremove dead conditional clause
Matthew Fernandez [Sat, 8 May 2021 03:22:12 +0000 (20:22 -0700)]
remove dead conditional clause

This code is only reachable when this condition is already known-true, due to
the containing loop.

3 years agouse a range-based for loop for iterating over block total order collection
Matthew Fernandez [Sat, 8 May 2021 03:15:07 +0000 (20:15 -0700)]
use a range-based for loop for iterating over block total order collection

3 years agouse a range-based for loop for iterating over VPSC::inactive
Matthew Fernandez [Sat, 8 May 2021 03:13:41 +0000 (20:13 -0700)]
use a range-based for loop for iterating over VPSC::inactive

3 years agomanage VPSC::bs as a value instead of pointer
Matthew Fernandez [Sat, 8 May 2021 03:11:43 +0000 (20:11 -0700)]
manage VPSC::bs as a value instead of pointer

This leads to simpler code and less manual memory management.

3 years agouse range-based for loops to abbreviate some iteration over block collections
Matthew Fernandez [Sat, 8 May 2021 03:01:20 +0000 (20:01 -0700)]
use range-based for loops to abbreviate some iteration over block collections

3 years agoMerge branch 'smattr/FD618CD5-B7F3-40D0-96D9-1F9ED031AA1F' into 'main'
Matthew Fernandez [Fri, 14 May 2021 15:24:45 +0000 (15:24 +0000)]
Merge branch 'smattr/FD618CD5-B7F3-40D0-96D9-1F9ED031AA1F' into 'main'

narrow dependencies of Docker-push tasks

See merge request graphviz/graphviz!1949

3 years agonarrow dependencies of Docker-push tasks
Matthew Fernandez [Sat, 8 May 2021 04:13:25 +0000 (21:13 -0700)]
narrow dependencies of Docker-push tasks

The Docker push jobs were depending on all prior jobs which was overly
restrictive. Each push job only needs the image it itself needs to push. Closes
#1988.

3 years agoMerge branch 'smattr/C36AA7A4-42E6-44FE-B678-7949BA77BD24' into 'main'
Matthew Fernandez [Fri, 14 May 2021 00:50:48 +0000 (00:50 +0000)]
Merge branch 'smattr/C36AA7A4-42E6-44FE-B678-7949BA77BD24' into 'main'

more warning squashing and clean up in lib/ortho and lib/sparse

See merge request graphviz/graphviz!1917

3 years agoreplace has_position boolean with a C99 bool
Matthew Fernandez [Sat, 24 Apr 2021 04:36:20 +0000 (21:36 -0700)]
replace has_position boolean with a C99 bool

3 years agoreplace first boolean with a C99 bool
Matthew Fernandez [Sat, 24 Apr 2021 04:35:25 +0000 (21:35 -0700)]
replace first boolean with a C99 bool

3 years agoreplace noclusterinfo boolean with a C99 bool
Matthew Fernandez [Sat, 24 Apr 2021 04:34:41 +0000 (21:34 -0700)]
replace noclusterinfo boolean with a C99 bool

3 years agoreplace boolean has_positions with a C99 bool
Matthew Fernandez [Sat, 24 Apr 2021 04:33:18 +0000 (21:33 -0700)]
replace boolean has_positions with a C99 bool

3 years agoreplace boolean first with a C99 bool
Matthew Fernandez [Sat, 24 Apr 2021 04:31:59 +0000 (21:31 -0700)]
replace boolean first with a C99 bool

3 years agouse itos to remove an intermediate buffer
Matthew Fernandez [Sat, 24 Apr 2021 04:30:16 +0000 (21:30 -0700)]
use itos to remove an intermediate buffer

3 years agoremove dead writes to buf
Matthew Fernandez [Sat, 24 Apr 2021 04:27:15 +0000 (21:27 -0700)]
remove dead writes to buf

It's unclear what the intention of this code was. It writes data to buf that is
then never read.

3 years agoabbreviate construction of label_string
Matthew Fernandez [Sat, 24 Apr 2021 04:20:27 +0000 (21:20 -0700)]
abbreviate construction of label_string

3 years agostack-allocate a statically sized buffer
Matthew Fernandez [Sat, 24 Apr 2021 04:16:27 +0000 (21:16 -0700)]
stack-allocate a statically sized buffer

1000 bytes is not a lot to allocate on the stack on a modern platform.

3 years agoremove useless snprintf
Matthew Fernandez [Sat, 24 Apr 2021 04:14:54 +0000 (21:14 -0700)]
remove useless snprintf

Unclear what the purpose of this was when the content of buf is overwritten
later before being read.

3 years agoabbreviate some manual strdup code
Matthew Fernandez [Sat, 24 Apr 2021 04:11:23 +0000 (21:11 -0700)]
abbreviate some manual strdup code

These locations were doing the exact functionality of strdup, but using manual
malloc. It is more readable to just call the library function for this.

3 years agoremove commented out code
Matthew Fernandez [Sat, 24 Apr 2021 04:09:50 +0000 (21:09 -0700)]
remove commented out code

3 years agosquash -Wshadow warning in Import_coord_clusters_from_dot
Matthew Fernandez [Sat, 24 Apr 2021 04:05:37 +0000 (21:05 -0700)]
squash -Wshadow warning in Import_coord_clusters_from_dot

Similar to a prior change, there was a nested variable also called sz. By
removing this sz, we not only squash a compiler warning but make the code more
readable.

3 years agoremove unused cat_string
Matthew Fernandez [Sat, 24 Apr 2021 04:03:30 +0000 (21:03 -0700)]
remove unused cat_string

3 years agosquash a -Wshadow warning in SparseMatrix_import_dot
Matthew Fernandez [Sat, 24 Apr 2021 04:00:24 +0000 (21:00 -0700)]
squash a -Wshadow warning in SparseMatrix_import_dot

By moving sz closer to its use location it is moved passed a nested declaration
of a different variable also called sz.

3 years agoabbreviate an increment
Matthew Fernandez [Sat, 24 Apr 2021 03:49:29 +0000 (20:49 -0700)]
abbreviate an increment

This leads to more readable and less error prone code.

3 years agosquash a -Wfloat-conversion
Matthew Fernandez [Sat, 24 Apr 2021 03:45:46 +0000 (20:45 -0700)]
squash a -Wfloat-conversion

This was an odd way to write division by 5.

3 years agosquash a -Wimplicit-fallthrough warning
Matthew Fernandez [Sat, 24 Apr 2021 03:41:42 +0000 (20:41 -0700)]
squash a -Wimplicit-fallthrough warning

3 years agoremove unused SparseMatrix_to_complex
Matthew Fernandez [Sat, 24 Apr 2021 03:38:18 +0000 (20:38 -0700)]
remove unused SparseMatrix_to_complex

3 years agosquash a number of -Wconversion warnings
Matthew Fernandez [Sat, 24 Apr 2021 03:32:49 +0000 (20:32 -0700)]
squash a number of -Wconversion warnings

The fread function returns a size_t, so Graphviz should be using a size_t
variable to store its result.

3 years agosquash a -Wmaybe-uninitiailzed warning
Matthew Fernandez [Sat, 24 Apr 2021 03:18:30 +0000 (20:18 -0700)]
squash a -Wmaybe-uninitiailzed warning

This was a false positive because all use of the variable is guarded by the
Concentrate flag, but it is still worth pacifying the compiler here.

3 years agofix: return -2 on error in seg_cmp and remove now unused longjmp path
Matthew Fernandez [Sat, 24 Apr 2021 03:10:42 +0000 (20:10 -0700)]
fix: return -2 on error in seg_cmp and remove now unused longjmp path

Related to #1801. This removes two (accurate) warnings about possible clobbered
variables in orthoEdges.

3 years agoanticipate a -2 return from seg_cmp indicating an error
Matthew Fernandez [Sat, 24 Apr 2021 03:09:28 +0000 (20:09 -0700)]
anticipate a -2 return from seg_cmp indicating an error

Related to #1801.

3 years agoanticipate failure from decide_point
Matthew Fernandez [Sat, 24 Apr 2021 03:06:51 +0000 (20:06 -0700)]
anticipate failure from decide_point

Related to #1801.

3 years agochange calling convention of decide_point
Matthew Fernandez [Sat, 24 Apr 2021 03:05:36 +0000 (20:05 -0700)]
change calling convention of decide_point

Related to #1801.

3 years agoanticipate failure from addPEdges
Matthew Fernandez [Sat, 24 Apr 2021 03:02:44 +0000 (20:02 -0700)]
anticipate failure from addPEdges

Related to #1801.

3 years agoadd a return value to addPEdges
Matthew Fernandez [Sat, 24 Apr 2021 03:01:47 +0000 (20:01 -0700)]
add a return value to addPEdges

Related to #1801.