]>
granicus.if.org Git - graphviz/log
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.
Matthew Fernandez [Sun, 2 May 2021 01:25:23 +0000 (18:25 -0700)]
disable Pylint warning about too many local variables
This is not a significant issue in Graphviz scripts.
Matthew Fernandez [Sun, 2 May 2021 01:23:58 +0000 (18:23 -0700)]
port generate_configuration_table to argparse
Removes a Pylint warning about using the deprecated optparse library.
Matthew Fernandez [Sun, 2 May 2021 01:14:15 +0000 (18:14 -0700)]
remove unused --verbose argument to configuration summarizer
Matthew Fernandez [Sun, 2 May 2021 01:08:52 +0000 (18:08 -0700)]
disable invalid-name Pylint warning
Pylint has a very narrow idea of acceptable names. Things it does not like, such
as single letter variable names, are not really a problem in the Graphviz
scripts.
Matthew Fernandez [Sun, 2 May 2021 01:07:15 +0000 (18:07 -0700)]
rename generate-configuration-table.py to be importable
Silences a Pylint warning.
Matthew Fernandez [Sun, 2 May 2021 01:05:01 +0000 (18:05 -0700)]
disable Pylint warning for subprocess.run without check argument
Graphviz generally have a good use case for calling subprocess.run without
passing check.
Matthew Fernandez [Sun, 2 May 2021 01:01:14 +0000 (18:01 -0700)]
disable f-string in logging messages Pylint warning
This is generally considered error prone because you can include non-pure
operations in logging functions that your code accidentally depends on. However
the Graphviz scripts are simple enough that this is not a significant issue. The
use of f-strings pervasively makes for more consistent and readable scripts.
Matthew Fernandez [Sat, 8 May 2021 00:37:16 +0000 (00:37 +0000)]
Merge branch 'stdio-standard-macros' into 'main'
sfio: remove singular reference to `_BLD_stdio`
See merge request graphviz/graphviz!1943
Saleem Abdulrasool [Sun, 25 Apr 2021 03:11:10 +0000 (03:11 +0000)]
sfio: remove singular reference to `_BLD_stdio`
Remove the singular reference to `_BLD_stdio`. This is part of a series
to remove unused build macros to unify on the CMake standard `*_EXPORTS`
macros.
Matthew Fernandez [Thu, 6 May 2021 13:27:09 +0000 (13:27 +0000)]
Merge branch 'smattr/
39EB89E6 -4BE4-4737-AE77-
5C2B31922DBB ' into 'main'
remove unused tmsize10.clo
Closes #2061
See merge request graphviz/graphviz!1937
Matthew Fernandez [Fri, 30 Apr 2021 02:34:36 +0000 (19:34 -0700)]
remove unused tmsize10.clo
Fixes #2061.
Matthew Fernandez [Wed, 5 May 2021 15:39:05 +0000 (15:39 +0000)]
Merge branch 'smattr/
ac55eb33 -3e00-4d16-8daf-
b70d0fec6825 ' into 'main'
remove unused md5 implementation in Smyrna
Closes #2050
See merge request graphviz/graphviz!1936
Matthew Fernandez [Thu, 29 Apr 2021 02:50:28 +0000 (19:50 -0700)]
remove now-unused md5 implementation in Smyrna
Closes #2050.
Matthew Fernandez [Thu, 29 Apr 2021 02:46:06 +0000 (19:46 -0700)]
remove unused get_md5_key
Related to #2050.
Matthew Fernandez [Thu, 29 Apr 2021 02:40:03 +0000 (19:40 -0700)]
remove unused fill_key function
Related to #2050.
Matthew Fernandez [Thu, 29 Apr 2021 02:39:08 +0000 (19:39 -0700)]
remove now-unused orig_key field in Smyrna’s Viewinfo struct
Related to #2050.
Matthew Fernandez [Thu, 29 Apr 2021 02:35:16 +0000 (19:35 -0700)]
remove dead stores to orig_key field in Smyrna
This field is never read from. Related to #2050.
Matthew Fernandez [Thu, 29 Apr 2021 02:29:33 +0000 (19:29 -0700)]
remove unused final_key field from Smyrna’s Viewinfo struct
Related to #2050.
Matthew Fernandez [Wed, 5 May 2021 05:29:50 +0000 (05:29 +0000)]
Merge branch 'smattr/
2bfe1f77 -53cc-4eda-bc00-
454cd8893455 ' into 'main'
remove use of unsigned ints for interacting with getopt
See merge request graphviz/graphviz!1935
Matthew Fernandez [Thu, 29 Apr 2021 02:12:28 +0000 (19:12 -0700)]
gc: fix type of variable used for interacting with getopt
Similar to the prior commits. Squashes a -Wsign-compare warning and a
-Wsign-conversion warning.
Matthew Fernandez [Thu, 29 Apr 2021 02:10:28 +0000 (19:10 -0700)]
gvmap: fix type of variables used for interacting with getopt
Similar to the prior commit. Squashes two -Wsign-compare warnings and two
-Wsign-conversion warnings.
Matthew Fernandez [Thu, 29 Apr 2021 02:08:52 +0000 (19:08 -0700)]
edgepaint: fix type of variable for interacting with getopt
Similar to
49fd8f62d8103d6e40a33922d2492a5ec3e3e76e , this location was using an
unsigned int for some reason. This change squashes a -Wsign-compare and a
-Wsign-conversion warning.
Matthew Fernandez [Wed, 5 May 2021 01:37:27 +0000 (01:37 +0000)]
Merge branch 'smattr/
BB1ACA26 -949E-46F0-AD76-
06C877563ABC ' into 'main'
some cleanup of cmd/tools/dijkstra.c
See merge request graphviz/graphviz!1934
Matthew Fernandez [Wed, 28 Apr 2021 04:31:42 +0000 (21:31 -0700)]
remove some unnecessary bracketing
Matthew Fernandez [Wed, 28 Apr 2021 04:13:51 +0000 (21:13 -0700)]
remove unused struct name