]>
granicus.if.org Git - graphviz/log
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.
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.
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
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
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
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.
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.
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
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.
Matthew Fernandez [Sat, 8 May 2021 03:27:05 +0000 (20:27 -0700)]
use range-based for loops to abbreviate some code in constraintGraphIsCyclic
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.
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
Matthew Fernandez [Sat, 8 May 2021 03:13:41 +0000 (20:13 -0700)]
use a range-based for loop for iterating over VPSC::inactive
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.
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
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
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.
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
Matthew Fernandez [Sat, 24 Apr 2021 04:36:20 +0000 (21:36 -0700)]
replace has_position 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
Matthew Fernandez [Sat, 24 Apr 2021 04:34:41 +0000 (21:34 -0700)]
replace noclusterinfo boolean 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
Matthew Fernandez [Sat, 24 Apr 2021 04:31:59 +0000 (21:31 -0700)]
replace boolean first with a C99 bool
Matthew Fernandez [Sat, 24 Apr 2021 04:30:16 +0000 (21:30 -0700)]
use itos to remove an intermediate buffer
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.
Matthew Fernandez [Sat, 24 Apr 2021 04:20:27 +0000 (21:20 -0700)]
abbreviate construction of label_string
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.
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.
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.
Matthew Fernandez [Sat, 24 Apr 2021 04:09:50 +0000 (21:09 -0700)]
remove commented out code
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.
Matthew Fernandez [Sat, 24 Apr 2021 04:03:30 +0000 (21:03 -0700)]
remove unused cat_string
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.
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.
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.
Matthew Fernandez [Sat, 24 Apr 2021 03:41:42 +0000 (20:41 -0700)]
squash a -Wimplicit-fallthrough warning
Matthew Fernandez [Sat, 24 Apr 2021 03:38:18 +0000 (20:38 -0700)]
remove unused SparseMatrix_to_complex
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.
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.
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.
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.
Matthew Fernandez [Sat, 24 Apr 2021 03:06:51 +0000 (20:06 -0700)]
anticipate failure from decide_point
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 03:05:36 +0000 (20:05 -0700)]
change calling convention of decide_point
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 03:02:44 +0000 (20:02 -0700)]
anticipate failure from addPEdges
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 03:01:47 +0000 (20:01 -0700)]
add a return value to addPEdges
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 03:01:04 +0000 (20:01 -0700)]
anticipate failure from add_p_edges
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 03:00:15 +0000 (20:00 -0700)]
add a return vaule to add_p_edges
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 02:58:51 +0000 (19:58 -0700)]
anticipate failure from add_edges_in_G
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 02:57:20 +0000 (19:57 -0700)]
add a return value to add_edges_in_G
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 02:56:31 +0000 (19:56 -0700)]
anticipate failure from add_np_edges
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 02:55:12 +0000 (19:55 -0700)]
add a return value to add_np_edges
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 02:54:29 +0000 (19:54 -0700)]
anticipate failure from assignTracks
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 02:53:05 +0000 (19:53 -0700)]
add a return value to assignTracks
Related to #1801.
Matthew Fernandez [Sat, 24 Apr 2021 02:48:16 +0000 (19:48 -0700)]
squash two -Wsign-compare warnings
The iterations modified here are iterating over a collection whose size is
tracked using int fields, ngcells and ncells. Both these should really be size_t
but this is complicated to change at this point. As long as they are int, using
int loop counters provides greater consistency.
Matthew Fernandez [Sat, 24 Apr 2021 02:43:21 +0000 (19:43 -0700)]
squash a -Wsign-conversion warning
The npts variable is used to store an allocation quantity, so should have been
using the size_t scalar type.
Magnus Jacobsson [Thu, 13 May 2021 16:41:08 +0000 (16:41 +0000)]
Merge branch 'add-clang-format-file' into 'main'
add .clang-format file
See merge request graphviz/graphviz!1948
Magnus Jacobsson [Thu, 6 May 2021 21:59:28 +0000 (23:59 +0200)]
add .clang-format file
Generated with clang-format-12 --style=llvm --dump-config >.clang-format
Matthew Fernandez [Wed, 12 May 2021 19:25:03 +0000 (19:25 +0000)]
Merge branch 'smattr/
668B61F4 -EDF3-4468-A872-
715B28A34C37 ' into 'main'
output source data for Linux downloads on the website during deployment
See merge request graphviz/graphviz!1947
Matthew Fernandez [Thu, 6 May 2021 02:59:30 +0000 (19:59 -0700)]
output source data for Linux downloads on the website during deployment
Commit
1b218752f5b6a1e661e158337fc1b976424fc6a0 of the website repository¹
changed how Linux downloads appear on the website to be driven by a JSON data
file. This commit updates the deployment script to produce this file for a
release as a CI job artifact. Related to #1979.
¹ https://gitlab.com/graphviz/graphviz.gitlab.io
Matthew Fernandez [Wed, 12 May 2021 02:31:48 +0000 (02:31 +0000)]
Merge branch 'smattr/
747bd6bd -fdc6-4847-b646-
226c03399987 ' into 'main'
replace some hypotenuse calculations with calls to hypot
See merge request graphviz/graphviz!1945
Matthew Fernandez [Wed, 5 May 2021 03:49:45 +0000 (20:49 -0700)]
replace hypotenuse calculations in bend with calls to hypot
The function hypot is available in C99 and has the potential to compute the same
operation more efficiently and with greater precision.
Matthew Fernandez [Wed, 5 May 2021 03:45:22 +0000 (20:45 -0700)]
replace hypotenuse calculation in computeoffset_qr with a call to hypot
The function hypot is available in C99 and has the potential to compute the same
operation more efficiently and with greater precision.
Matthew Fernandez [Wed, 5 May 2021 03:43:45 +0000 (20:43 -0700)]
replace hypotenuse calculation in estimateError with a call to hypot
The function hypot is available in C99 and has the potential to compute the same
operation more efficiently and with greater precision.
Matthew Fernandez [Wed, 5 May 2021 03:42:17 +0000 (20:42 -0700)]
replace hypotenuse calculation in arrow_gen with a call to hypot
The function hypot is available in C99 and has the potential to compute the same
operation more efficiently and with greater precision.
Matthew Fernandez [Wed, 5 May 2021 03:40:51 +0000 (20:40 -0700)]
replace hypotenuse calculation with a call to hypot
The function hypot is available in C99 and has the potential to compute the same
operation more efficiently and with greater precision.
Matthew Fernandez [Wed, 5 May 2021 03:39:43 +0000 (20:39 -0700)]
replace hypotenuse calculation arrow_type_dot with a call to hypot
The function hypot is available in C99 and has the potential to compute the same
operation more efficiently and with greater precision.
Matthew Fernandez [Wed, 5 May 2021 03:37:18 +0000 (20:37 -0700)]
replace hypotenuse calculation in tb_project_to_sphere with a call to hypotf
The function hypotf is available in C99 and has the potential to compute the
same operation more efficiently and with greater precision.
Matthew Fernandez [Wed, 5 May 2021 03:08:29 +0000 (20:08 -0700)]
remove no-op adjustclip function in gcanvas.c
Matthew Fernandez [Wed, 5 May 2021 03:07:33 +0000 (20:07 -0700)]
remove commented out code in gcanvas
Matthew Fernandez [Wed, 5 May 2021 03:05:07 +0000 (20:05 -0700)]
replace hypotenuse calculation with call to hypot in various copies of GCarrow
The function hypot is available in C99 and has the potential to compute the same
operation more efficiently and with greater precision.
Matthew Fernandez [Wed, 12 May 2021 01:07:41 +0000 (01:07 +0000)]
Merge branch 'smattr/
6bbb5115 -1afc-4274-8d42-
3204eb974dc8 ' into 'main'
int-to-string function
See merge request graphviz/graphviz!1946
Matthew Fernandez [Wed, 5 May 2021 04:41:39 +0000 (21:41 -0700)]
replace int-to-string operation in attached_clustering with new itos
This commit serves to demonstrate how to use the function added in the prior
commit.
Matthew Fernandez [Wed, 5 May 2021 04:23:07 +0000 (21:23 -0700)]
add utility function for turning integers into strings
This is common operation within Graphviz. It is also a common source of bugs.
There have been numerous instances of ints being stringized into fixed sized
buffers that were not large enough to hold them. The result has been pernicious
memory safety issues that have been difficult to reproduce and root cause.¹
The hope is that this wrapper can provide a safe, efficient, and tested
alternative. Going forwards, the intent is to replace as many compatible
operations as possible with calls to this function.
¹ A user would report a crash that relied on their objects having large IDs or
their platform having a large int width. The example would run fine in a
different environment and mystify the maintainers.
Matthew Fernandez [Wed, 5 May 2021 04:21:24 +0000 (21:21 -0700)]
fix missing sprint.h in CMakeLists.txt
This has no effect on the build, but some IDEs are only able to see and scan
headers referenced in CMakeLists.txt, so this fixes browsability for those IDEs.
Magnus Jacobsson [Mon, 10 May 2021 18:37:47 +0000 (18:37 +0000)]
Merge branch 'add-ubuntu-21.04-to_ci' into 'main'
Add Ubuntu 21.04 jobs to CI
Closes #2053
See merge request graphviz/graphviz!1940
Magnus Jacobsson [Sun, 2 May 2021 13:02:48 +0000 (15:02 +0200)]
Disable detection of ODR violations in Ubuntu 21.04 ASan test
The mm2gv tools currently fails otherwise.
Magnus Jacobsson [Thu, 29 Apr 2021 21:45:31 +0000 (23:45 +0200)]
Add ubuntu21-04-cmake-ASan-test job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:44:27 +0000 (23:44 +0200)]
Add ubuntu21-04-cmake-ASan-build job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:45:12 +0000 (23:45 +0200)]
Add ubuntu21-04-cmake-test job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:44:04 +0000 (23:44 +0200)]
Add ubuntu21-04-test job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:43:47 +0000 (23:43 +0200)]
Add ubuntu21-04-cmake-build job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:42:56 +0000 (23:42 +0200)]
Add ubuntu21-04-build job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:46:06 +0000 (23:46 +0200)]
Add docker_push_ubuntu-21.04 job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:45:46 +0000 (23:45 +0200)]
Add docker_build_ubuntu-21.04 job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:38:12 +0000 (23:38 +0200)]
Add Ubuntu 21.04 Dockerfile
Matthew Fernandez [Sun, 9 May 2021 02:05:47 +0000 (02:05 +0000)]
Merge branch 'uwin' into 'main'
clean up references to `__IMPORT__` and `__EXPORT__`
See merge request graphviz/graphviz!1944
Saleem Abdulrasool [Mon, 3 May 2021 00:36:29 +0000 (17:36 -0700)]
clean up references to `__IMPORT__` and `__EXPORT__`
This removes any reference to the custom `__IMPORT__` and `__EXPORT__`
macros. These are remnants from supporting uwin. However, the need for
uwin is greatly diminished by proper native Windows support for the
library.
Furthermore, the functionality that this enables will be restored
imminently by means of decoration of public interfaces.
The uwin system used `_BLD_STATIC` to indicate a static build and
`__DYNAMIC__` to indicate a shared build. Furthermore, it used
`_BLD_DLL` to indicate a dynamic library on Windows, that is a DLL.
This augmented the check of `_DLL` which is the Microsoft specified
define that indicates a shared library build. Based upon the state of
these four flags (why four flags for 2 states?) it then defined
`__IMPORT__` and `__EXPORT__` to `__declspec(dllimport)` and
`__declspec(dllexport)` respectively.
To further complicate things, UWIN was built up during Windows 3.1,
which meant that it predated the linker support for DLL storage.
Instead, this is required work by the user, and it has special macros
for declaring the (now) synthetic import symbol as well as defining it.
This is now no longer required due to improved support in the compiler
and linker which will perform the necessary work.
On Unix, this synthetic symbol declaration and definition is not
required as the linker has always supported this for shared libraries -
it is responsible for creating the PLT which is roughly equivalent to
the IAT (technically, the IAT is both the PLT and the GOT). This is now
also automated on Windows, at least for the past ~25 years.
This clean up is meant to simplify the migration to `[module]_EXPORTS`
as the "standard" macro which is defined by CMake (and is generally used
elsewhere now as well) to indicate that the symbols for the module
should be exported. `_DLL` provides the necessary information whether a
DLL is being built or not.
With that history, it is clear that this is a regression for GraphViz on
uwin, the temporary breakage seems reasonable to simplify the migration.
Matthew Fernandez [Sat, 8 May 2021 21:42:02 +0000 (21:42 +0000)]
Merge branch 'smattr/
EFD56267 -3C28-4C03-9610-
03639D89FCA3 ' into 'main'
remove redefining bool to int in Smyrna
See merge request graphviz/graphviz!1942
Matthew Fernandez [Sun, 2 May 2021 20:08:37 +0000 (13:08 -0700)]
replace Smyrna header guards with more modern #pragma once
Matthew Fernandez [Sun, 2 May 2021 20:03:32 +0000 (13:03 -0700)]
remove unused filterscallbacks.h
Matthew Fernandez [Sun, 2 May 2021 19:56:47 +0000 (12:56 -0700)]
remove redefining bool to int in Smyrna
This appears to have no effect, as C99 bools are not used anywhere in Smyrna or
in the headers included by viewport.h. However this is a trap waiting to cause
problems if/when C99 bools are used in these files.
Matthew Fernandez [Sat, 8 May 2021 19:13:22 +0000 (19:13 +0000)]
Merge branch 'smattr/
610A0333 -73CC-4DE3-9188-
DAC1B96D3F2B ' into 'main'
port windows/bin/build.ps1 to Python
See merge request graphviz/graphviz!1941
Matthew Fernandez [Sun, 2 May 2021 17:07:55 +0000 (10:07 -0700)]
remove now-unused build.ps1
Matthew Fernandez [Sun, 2 May 2021 16:51:56 +0000 (09:51 -0700)]
remove now-unused setup-and-build.ps1
Matthew Fernandez [Sun, 2 May 2021 16:50:59 +0000 (09:50 -0700)]
call Python script for Windows CI compilation instead of PowerShell
Following the previous commit, ci/build_windows.py provides a drop in
replacement for the PowerShell script previously used for compilation.
Matthew Fernandez [Sun, 2 May 2021 16:45:44 +0000 (09:45 -0700)]
port windows/bin/build.ps1 to Python
This is a first step to moving away from PowerShell for CI scripts. PowerShell
has too many error prone characteristics and there is not enough knowledge about
it amongst the Graphviz maintainers.
Matthew Fernandez [Sat, 8 May 2021 04:38:18 +0000 (04:38 +0000)]
Merge branch 'smattr/
8B3F2F18 -8D38-4668-AAD4-
F7EAEFDDB151 ' into 'main'
Pylint warning squashing
See merge request graphviz/graphviz!1938
Matthew Fernandez [Sun, 2 May 2021 01:29:01 +0000 (18:29 -0700)]
remove duplicate shutil import
Matthew Fernandez [Sun, 2 May 2021 01:28:32 +0000 (18:28 -0700)]
squash a wrong-import-position Pylint warning
Matthew Fernandez [Sun, 2 May 2021 01:26:41 +0000 (18:26 -0700)]
disable Pylint warning about use of the global statement
While this may be considered a code smell in larger Python code bases, the use
of global in the Graphviz scripts is reasonably well motivated.