Matthew Fernandez [Sun, 18 Apr 2021 23:46:35 +0000 (16:46 -0700)]
remove shadowing of view in glexpose_main
Matthew Fernandez [Sun, 18 Apr 2021 23:45:57 +0000 (16:45 -0700)]
remove shadowing of view in glexpose_drawgraph
Matthew Fernandez [Sun, 18 Apr 2021 23:45:11 +0000 (16:45 -0700)]
remove shadowing of view in glexpose_grid
Matthew Fernandez [Sun, 18 Apr 2021 23:44:21 +0000 (16:44 -0700)]
remove shadowing of view in glupdatecamera
Matthew Fernandez [Sun, 18 Apr 2021 23:41:01 +0000 (16:41 -0700)]
remove shadowing of view in drawBorders
Matthew Fernandez [Sat, 24 Apr 2021 21:55:22 +0000 (21:55 +0000)]
Merge branch 'smattr/
41d547b2-c0af-430e-a0f6-
df23eaa36b37' into 'main'
remove more manual memory management in lib/vpsc
See merge request graphviz/graphviz!1909
Matthew Fernandez [Sun, 18 Apr 2021 20:17:00 +0000 (13:17 -0700)]
replace vpsc uses of NULL with more modern nullptr
Matthew Fernandez [Sun, 18 Apr 2021 20:08:31 +0000 (13:08 -0700)]
use range-based for loops to abbreviate some manual iteration
Matthew Fernandez [Sun, 18 Apr 2021 20:03:36 +0000 (13:03 -0700)]
manage NodeSets by value instead of pointer
There is no need to manually allocate memory for these sets. We can simply let
the compiler take care of this. Note that this is also unlikely to affect the
performance characteristics of getLeftNeighbours and getRightNeighbours because
Named Return Value Optimization (NRVO) is applicable to these functions.
Matthew Fernandez [Sun, 18 Apr 2021 19:55:08 +0000 (12:55 -0700)]
mark getRightNeighbours static
This is not used outside of its containing file.
Matthew Fernandez [Sun, 18 Apr 2021 19:54:50 +0000 (12:54 -0700)]
make getLeftNeighbours static
This is not used outside of its containing file.
Matthew Fernandez [Sat, 24 Apr 2021 21:11:55 +0000 (21:11 +0000)]
Merge branch 'smattr/
4984C046-2548-442C-9D61-
CC86DF57501E' into 'main'
clean up and warning squashing in lib/neatogen
See merge request graphviz/graphviz!1908
Matthew Fernandez [Sun, 18 Apr 2021 05:59:18 +0000 (22:59 -0700)]
remove unused parameter to mds_model
Matthew Fernandez [Sun, 18 Apr 2021 05:58:19 +0000 (22:58 -0700)]
remove unused parameter from majorization
Matthew Fernandez [Sun, 18 Apr 2021 05:54:29 +0000 (22:54 -0700)]
remove shadowing of i in majorization
Matthew Fernandez [Sun, 18 Apr 2021 05:41:18 +0000 (22:41 -0700)]
abbreviate an increment
Matthew Fernandez [Sun, 18 Apr 2021 05:23:48 +0000 (22:23 -0700)]
remove some commented out code
Matthew Fernandez [Sun, 18 Apr 2021 05:17:46 +0000 (22:17 -0700)]
remove function pointer noise
When calling through a function pointer in C, you do not need to explicitly
dereference it. The compiler understands how to deal with these addressing
complications.
Matthew Fernandez [Sun, 18 Apr 2021 05:13:53 +0000 (22:13 -0700)]
reflow some text
Matthew Fernandez [Sun, 18 Apr 2021 05:07:57 +0000 (22:07 -0700)]
use a stronger return type for PQempty
Matthew Fernandez [Sun, 18 Apr 2021 05:05:02 +0000 (22:05 -0700)]
abbreviate an increment
Matthew Fernandez [Sun, 18 Apr 2021 05:04:46 +0000 (22:04 -0700)]
abbreviate an increment
Matthew Fernandez [Sun, 18 Apr 2021 05:04:34 +0000 (22:04 -0700)]
abbreviate a decrement
Matthew Fernandez [Sun, 18 Apr 2021 05:04:23 +0000 (22:04 -0700)]
abbreviate an increment
Matthew Fernandez [Sun, 18 Apr 2021 05:02:20 +0000 (22:02 -0700)]
remove unnecessary bracketing
Matthew Fernandez [Sun, 18 Apr 2021 05:00:17 +0000 (22:00 -0700)]
remove some no-op casts
These pointers implicitly coerce.
Matthew Fernandez [Sun, 18 Apr 2021 04:56:43 +0000 (21:56 -0700)]
squash two -Wfloat-conversion warnings
Matthew Fernandez [Sun, 18 Apr 2021 04:49:56 +0000 (21:49 -0700)]
remove unnecessary dynamic allocation
Using the heap for a statically-known array of two pointers is inefficient. This
can just be stack-allocated, improving the compiler’s visibility and ability to
optimize. Removes a -Wsign-conversion compiler warning.
Matthew Fernandez [Sun, 18 Apr 2021 04:42:57 +0000 (21:42 -0700)]
treat SEPFACT as a float
This constant is only ever used as a float, but triggers warnings because 0.8
cannot be precisely expressed as a 32-bit IEEE float. If we want to use the
closest 32-bit float to 0.8 let's just say so. This change squashes 3
-Wfloat-conversion warnings.
Matthew Fernandez [Sun, 18 Apr 2021 04:34:32 +0000 (21:34 -0700)]
remove -Wshadow warning related to margin
Matthew Fernandez [Sun, 18 Apr 2021 04:28:40 +0000 (21:28 -0700)]
remove unused parameter from updateGraph
Matthew Fernandez [Sun, 18 Apr 2021 04:24:07 +0000 (21:24 -0700)]
remove now-unused local variable in sAdjust
Matthew Fernandez [Sun, 18 Apr 2021 04:23:46 +0000 (21:23 -0700)]
remove unused dim parameter to makeMatrix
Matthew Fernandez [Sun, 18 Apr 2021 04:13:06 +0000 (21:13 -0700)]
remove some unnecessary bracketing
Matthew Fernandez [Sun, 18 Apr 2021 03:59:59 +0000 (20:59 -0700)]
remove useless cast
fabs already returns a double, and type promotion results in a double result
from the division.
Matthew Fernandez [Sun, 18 Apr 2021 03:55:26 +0000 (20:55 -0700)]
remove noise in nextOne
Matthew Fernandez [Sun, 18 Apr 2021 03:53:21 +0000 (20:53 -0700)]
remove unused parameter from rePos
Matthew Fernandez [Sun, 18 Apr 2021 03:40:37 +0000 (20:40 -0700)]
push declarations in chkBoundBox closer to their use
Matthew Fernandez [Sun, 18 Apr 2021 03:38:31 +0000 (20:38 -0700)]
remove commented out code
Matthew Fernandez [Sun, 18 Apr 2021 03:36:07 +0000 (20:36 -0700)]
remove shadowing of ymax
Matthew Fernandez [Sun, 18 Apr 2021 03:35:29 +0000 (20:35 -0700)]
remove shadowing of ymin
Matthew Fernandez [Sun, 18 Apr 2021 03:34:32 +0000 (20:34 -0700)]
remove shadowing of xmax
Matthew Fernandez [Sun, 18 Apr 2021 03:31:25 +0000 (20:31 -0700)]
remove shadowing of xmin
Matthew Fernandez [Sat, 24 Apr 2021 16:27:23 +0000 (16:27 +0000)]
Merge branch 'smattr/
6B336651-C5E7-4BD2-A2D0-
BAEDFBB4C765' into 'main'
fix multiple definitions of CDT variables under MinGW on Windows
Closes #1940
See merge request graphviz/graphviz!1760
Matthew Fernandez [Sat, 20 Feb 2021 01:59:14 +0000 (17:59 -0800)]
fix multiple definitions of globals
Similar to preceding commits, this fixes an issue where MinGW was seeing
__declspec alternatives but implementing GCC semantics and hence treating
declarations as definitions.
Matthew Fernandez [Sat, 20 Feb 2021 01:18:33 +0000 (17:18 -0800)]
remove unused globals
Matthew Fernandez [Fri, 19 Feb 2021 15:58:57 +0000 (07:58 -0800)]
fix multiple definitions of gvrender variables
Similar to preceding commits, this fixes an issue where MinGW was seeing
__declspec alternatives but implementing GCC semantics and hence treating
declarations as definitions.
Matthew Fernandez [Fri, 19 Feb 2021 15:57:05 +0000 (07:57 -0800)]
fix multiple definition of SFIO variables
Similar to preceding commits, this fixes an issue where MinGW was seeing
__declspec alternatives but implementing GCC semantics and hence treating
declarations as definitions.
Matthew Fernandez [Fri, 19 Feb 2021 15:52:13 +0000 (07:52 -0800)]
fix multiple definitions of MemTest and GvExitOnUsage
Similar to preceding commits, this fixes an issue where MinGW was seeing
__declspec alternatives but implementing GCC semantics and hence treating
declarations as definitions.
Matthew Fernandez [Fri, 19 Feb 2021 15:49:53 +0000 (07:49 -0800)]
fix multiple definitions of lab_gamut variables
Similar to preceding commits, this fixes an issue where MinGW was seeing
__declspec alternatives but implementing GCC semantics and hence treating
declarations as definitions.
Matthew Fernandez [Fri, 19 Feb 2021 15:42:04 +0000 (07:42 -0800)]
fix multiple definitions of gvplugin_neato_layout_LTX_library
Similar to preceding commits, this fixes an issue where MinGW was seeing
__declspec alternatives but implementing GCC semantics and hence treating
declarations as definitions.
Matthew Fernandez [Fri, 19 Feb 2021 15:41:38 +0000 (07:41 -0800)]
fix multiple definitions of dot_builtins variables
Similar to preceding commits, this fixes an issue where MinGW was seeing
__declspec alternatives but implementing GCC semantics and hence treating
declarations as definitions.
Matthew Fernandez [Fri, 19 Feb 2021 15:38:08 +0000 (07:38 -0800)]
fix multiple definitions of tcldot_builtins variables
Similar to preceding commits, this fixes an issue where MinGW was seeing
__declspec alternatives but implementing GCC semantics and hence treating
declarations as definitions.
Matthew Fernandez [Fri, 19 Feb 2021 15:36:47 +0000 (07:36 -0800)]
fix multiple definitions of lt_preloaded_symbols under MinGW
Similar to preceding commits, this fixes an issue where MinGW was seeing
__declspec alternatives but implementing GCC semantics and hence treating
declarations as definitions.
Matthew Fernandez [Fri, 19 Feb 2021 15:33:49 +0000 (07:33 -0800)]
remove commented out code
Matthew Fernandez [Wed, 17 Feb 2021 03:27:12 +0000 (19:27 -0800)]
fix multiple definitions of cgraph variables
Similarly to the previous commit, this was causing problems on MinGW where the
compiler would see the __declspec alternatives for CGRAPH_API, but then
implement GCC semantics where a non-extern marked declaration is a definition.
Related to #1940. Thanks to @swaldhoer for guiding me to a patch here.
Matthew Fernandez [Mon, 15 Feb 2021 18:14:52 +0000 (10:14 -0800)]
fix multiple definitions of CDT variables under MinGW on Windows
Building with MinGW on Windows resulted in lots of build errors of the form:
…/x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\cdt.dir/objects.a(dtdisc.c.obj):
dtdisc.c:(.bss+0x0): multiple definition of `Dtset';
CMakeFiles\cdt.dir/objects.a(dtclose.c.obj):dtclose.c:(.bss+0x0): first
defined here
The problem is that this environment defines _WIN32, so it sees the __declspec
alternatives for CDT_API in cdt.h. This is fine as GCC understands __declspec,
but it results in variable declarations in this header then missing the extern
qualifier. GCC’s semantics, in contrast to MSVC, interpret this as a definition
rather than a declaration.
The solution here is to *always* apply extern to these declarations, as MSVC is
happy with this as well. This is only addressing the immediate cause, and not
the longer term issue that __declspec(dllexport) and __declspec(dllimport) in a
Windows build should really be mapped to __attribute__((visibility("default")))
and __attribute__((visibility("hidden"))) in a non-Windows build, not to extern.
Thanks to @Synoecium and @swaldhoer for guidance on this fix.
Matthew Fernandez [Sat, 24 Apr 2021 05:30:45 +0000 (05:30 +0000)]
Merge branch 'smattr/
892B65E2-F263-411D-819B-
504029B701A1' into 'main'
move towards standardizing Python style
See merge request graphviz/graphviz!1907
Matthew Fernandez [Sun, 18 Apr 2021 02:26:37 +0000 (19:26 -0700)]
port generate-configuration-table.py to more modern Python style
Matthew Fernandez [Sun, 18 Apr 2021 02:12:19 +0000 (19:12 -0700)]
remove legacy encoding tag on a Python file
These stanzas are no longer required in modern Python that is assumed to be
UTF-8.
Matthew Fernandez [Sun, 18 Apr 2021 02:09:34 +0000 (19:09 -0700)]
standardize on two spaces for indentation in Python
The existing code was a mixture of two spaces and four spaces. Aligning on two
spaces allows writing more concise code and more closely matches the LLVM C
style we aspire to for new C code in the code base.
Removes 379 Pylint warnings.
Matthew Fernandez [Sun, 18 Apr 2021 01:34:10 +0000 (18:34 -0700)]
standardize on double quotes for string delimiters in Python
Python supports using either single quotes or double quotes for strings. Given
Graphviz is predominantly a C application, it is expected developers working
within the code base will be most familiar with C. So using double quotes is
more intuitive for such programmers.
Matthew Fernandez [Sat, 24 Apr 2021 03:54:04 +0000 (03:54 +0000)]
Merge branch 'smattr/
d684a3df-0af7-4025-a1af-
59f66b995e54' into 'main'
gdiplus plugin: some clean up and modernization
See merge request graphviz/graphviz!1906
Matthew Fernandez [Sun, 18 Apr 2021 00:41:54 +0000 (17:41 -0700)]
remove some excess white space
Matthew Fernandez [Sun, 18 Apr 2021 00:41:36 +0000 (17:41 -0700)]
gdiplus plugin: replace use of NULL with more modern nullptr
Matthew Fernandez [Sun, 18 Apr 2021 00:37:47 +0000 (17:37 -0700)]
gdiplus plugin: swap a C-style cast for less powerful const_cast
This allows the compiler to warn if, e.g., us->name ever changes type to
something other than a char pointer.
Matthew Fernandez [Sun, 18 Apr 2021 00:35:33 +0000 (17:35 -0700)]
gdiplus plugin: remove the use of C-style casts to convert void pointers
In C++, C-style casts are a heavy hammer that is generally too powerful for your
needs. It effectively says to the compiler, “shut up, I know what I’m doing” and
impedes its ability to give you useful diagnostics. By using less powerful
reinterpret_casts, we preserve the compiler’s ability to warn about, e.g.,
implicitly converting a const pointer to non-const.
Matthew Fernandez [Sun, 18 Apr 2021 00:33:09 +0000 (17:33 -0700)]
gdiplus plugin: remove some unnecessary casts
Typed pointers implicitly coerce to void* in C++.
Matthew Fernandez [Sun, 18 Apr 2021 00:11:33 +0000 (17:11 -0700)]
gdiplus plugin: remove manual memory management of font pointers
Matthew Fernandez [Sat, 24 Apr 2021 02:15:28 +0000 (02:15 +0000)]
Merge branch 'smattr/
74956806-d2f0-4864-b125-
77374faa7de5' into 'main'
more clean up and modernization in lib/ortho
See merge request graphviz/graphviz!1905
Matthew Fernandez [Sat, 17 Apr 2021 23:41:19 +0000 (16:41 -0700)]
use a stronger return type for is_parallel
Matthew Fernandez [Sat, 17 Apr 2021 23:39:02 +0000 (16:39 -0700)]
use a stronger return type for rectIntersect
Matthew Fernandez [Sat, 17 Apr 2021 23:37:32 +0000 (16:37 -0700)]
remove unused return type from get_vertex_positions
Matthew Fernandez [Sat, 17 Apr 2021 23:36:38 +0000 (16:36 -0700)]
use a stronger return type for inside_polygon
Matthew Fernandez [Sat, 17 Apr 2021 23:36:12 +0000 (16:36 -0700)]
use C99 bools in _greater_than
Matthew Fernandez [Sat, 17 Apr 2021 23:33:04 +0000 (16:33 -0700)]
use a stronger return type for edge_exists
Matthew Fernandez [Sat, 17 Apr 2021 23:29:57 +0000 (16:29 -0700)]
use a C99 bool for segment_t.is_inserted
Now that we compile with C99, there is no need to use an ambiguous type like int
or the hand rolled boolean values for something like this.
Matthew Fernandez [Sat, 17 Apr 2021 23:22:26 +0000 (16:22 -0700)]
use a C99 bool return type for init_query_structure
Now that we compile with C99, there's no need to use the internal boolean type
for things like this.
Matthew Fernandez [Sat, 17 Apr 2021 23:21:18 +0000 (16:21 -0700)]
use stronger types for comparators in lib/ortho/trapezoid.c
This leads to more readable and obvious code.
Matthew Fernandez [Sat, 17 Apr 2021 23:20:19 +0000 (16:20 -0700)]
remove unused return value from _min
Matthew Fernandez [Sat, 17 Apr 2021 23:19:52 +0000 (16:19 -0700)]
remove unused return value from _max
Matthew Fernandez [Sat, 17 Apr 2021 23:19:08 +0000 (16:19 -0700)]
remove some commented out code
Matthew Fernandez [Sat, 17 Apr 2021 23:18:50 +0000 (16:18 -0700)]
replace header guards in lib/ortho with more modern #pragma once
Matthew Fernandez [Sat, 17 Apr 2021 23:12:44 +0000 (16:12 -0700)]
reflow some code in lib/ortho
Matthew Fernandez [Sat, 17 Apr 2021 23:06:27 +0000 (16:06 -0700)]
remove some unnecessary bracketing in lib/ortho
Matthew Fernandez [Sat, 17 Apr 2021 22:40:17 +0000 (15:40 -0700)]
replace some open coded max/min with fmax/fmin
Matthew Fernandez [Sat, 17 Apr 2021 22:15:40 +0000 (15:15 -0700)]
remove redundant __USE_ISOC99
The build system sets -std=c99 these days, which already achieves this.
Magnus Jacobsson [Thu, 22 Apr 2021 16:07:31 +0000 (16:07 +0000)]
Merge branch 'add-ubuntu20-10-cmake-ASan-build-job-to-ci' into 'main'
Add Ubuntu 20.10 CMake ASan build and test jobs to CI
Closes #1881
See merge request graphviz/graphviz!1899
Magnus Jacobsson [Mon, 12 Apr 2021 07:59:25 +0000 (09:59 +0200)]
Add ubuntu20-10-cmake-ASan-test job to CI
Magnus Jacobsson [Mon, 12 Apr 2021 05:23:05 +0000 (07:23 +0200)]
Add ubuntu20-10-cmake-ASan-build job to CI
Magnus Jacobsson [Sat, 3 Apr 2021 21:12:12 +0000 (23:12 +0200)]
Add use_santizers option to CMake build
Matthew Fernandez [Wed, 25 Nov 2020 02:05:45 +0000 (18:05 -0800)]
ensure ID_LIKE is always set on Debian in CI
When running on the native Linux host in Gitlab CI instead of within a Docker
container, ID_LIKE is not set in /etc/os-release. So we set it based on ID if
that is available. Related to #1881.
Matthew Fernandez [Tue, 20 Apr 2021 16:00:10 +0000 (16:00 +0000)]
Merge branch 'smattr/
409a27e8-3d56-43a8-96aa-
8763cae871c5' into 'main'
clean up and warning squashing in plugin/core
See merge request graphviz/graphviz!1902
Matthew Fernandez [Wed, 14 Apr 2021 04:27:21 +0000 (21:27 -0700)]
remove 3 -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 04:23:25 +0000 (21:23 -0700)]
squash a -Wsign-converion warning
Matthew Fernandez [Wed, 14 Apr 2021 04:22:03 +0000 (21:22 -0700)]
remove vasprintf alternative in pov rendering
When we need to maintain a fallback option anyway, having a vasprintf
implementation does not gain us much. Moreover, nothing in the build system was
checking for the existence of vasprintf, so this code was never being used
anyway.
Matthew Fernandez [Wed, 14 Apr 2021 04:18:57 +0000 (21:18 -0700)]
fix reuse of va_list in pov rendering
While this often works out on certain architectures, it is technically not
allowed to use a va_list twice. This change fixes the el function for platforms
where reusing va_lists is not possible.
Matthew Fernandez [Wed, 14 Apr 2021 04:15:18 +0000 (21:15 -0700)]
remove short buffer path in pov rendering el
C99 vsnprintf semantics let you call the function with a NULL pointer to
discover the required number of bytes to print the given string. With this
ability, there is no longer any advantage to having two paths through this
function.
Matthew Fernandez [Wed, 14 Apr 2021 04:08:22 +0000 (21:08 -0700)]
remove unused variable assignment
Matthew Fernandez [Wed, 14 Apr 2021 04:06:57 +0000 (21:06 -0700)]
mark pov rendering function el as static
This function is not used outside this file. Squashes a -Wmissing-prototype
warning.