]>
granicus.if.org Git - graphviz/log
Matthew Fernandez [Sat, 15 Jan 2022 21:11:09 +0000 (13:11 -0800)]
agglomerative_bundling.c: move into C++
This completes moving all of lib/mingle into C++. Closes #2154.
Matthew Fernandez [Sat, 15 Jan 2022 21:12:31 +0000 (13:12 -0800)]
agglomerative_bundling.c: explicitly cast the results of 'realloc'
This has no effect in C, but an upcoming change will move this code to C++ where
this is required.
Gitlab: #2154
Matthew Fernandez [Sat, 15 Jan 2022 21:09:07 +0000 (13:09 -0800)]
agglomerative_bundling.c: explicitly cast the results of 'malloc'
This has no effect in C, but an upcoming change will move this code to C++ where
this is required.
Gitlab: #2154
Matthew Fernandez [Sun, 16 Jan 2022 18:46:18 +0000 (18:46 +0000)]
Merge branch 'smattr/
4d675265 -10af-4846-b248-
df57d7ea3ae2 ' into 'main'
more boolean → bool modernization
See merge request graphviz/graphviz!2406
Matthew Fernandez [Sun, 16 Jan 2022 00:43:17 +0000 (16:43 -0800)]
API BREAK: remove now-unused 'boolean' type
Matthew Fernandez [Sun, 16 Jan 2022 00:37:40 +0000 (16:37 -0800)]
API BREAK: use C99 bools for booleans in 'GVC_common_s'
Matthew Fernandez [Sun, 16 Jan 2022 00:31:42 +0000 (16:31 -0800)]
API BREAK: return a C99 bool from 'gvusershape_file_access'
Matthew Fernandez [Sun, 16 Jan 2022 00:29:57 +0000 (16:29 -0800)]
API BREAK: use a C99 bool for 'pccomps' output parameter
Matthew Fernandez [Sun, 16 Jan 2022 00:27:42 +0000 (16:27 -0800)]
API BREAK: use a C99 bool array for 'pack_info.fixed'
Matthew Fernandez [Sun, 16 Jan 2022 00:16:40 +0000 (16:16 -0800)]
API BREAK: return a C99 bool from 'gvtextlayout_engine_t.textlayout'
Matthew Fernandez [Sun, 16 Jan 2022 00:08:12 +0000 (16:08 -0800)]
API BREAK: take a C99 bool in 'gvloadimage_engine_t.loadimage'
Matthew Fernandez [Sat, 15 Jan 2022 23:58:15 +0000 (15:58 -0800)]
API BREAK: use a C99 bool for other 'GVJ_t' boolean fields
Matthew Fernandez [Sat, 15 Jan 2022 23:45:31 +0000 (15:45 -0800)]
API BREAK: use a C99 bool for 'GVJ_t.external_context'
Matthew Fernandez [Sat, 15 Jan 2022 23:42:33 +0000 (15:42 -0800)]
API BREAK: use a C99 bool for 'GVJ_t.device_sets_dpi'
Matthew Fernandez [Sat, 15 Jan 2022 23:39:39 +0000 (15:39 -0800)]
API BREAK: use a C99 bool for 'usershape_t.nocache'
Matthew Fernandez [Sat, 15 Jan 2022 23:38:07 +0000 (15:38 -0800)]
API BREAK: use a C99 bool for 'usershape_t.must_inline'
Matthew Fernandez [Sat, 15 Jan 2022 23:34:23 +0000 (15:34 -0800)]
API BREAK: use unsigned types for 1-bit fields of 'obj_state_s'
This has little impact (the bit encoding of these fields is identical), but it
suppresses numerous -Wconversion warnings from the compiler, worried that an
implicit conversion from `1` to `-1` was unintended.
Matthew Fernandez [Sat, 15 Jan 2022 23:27:51 +0000 (15:27 -0800)]
API BREAK: use a C99 bool for 'Agedgeinfo_t.conc_opp_flag'
Matthew Fernandez [Sat, 15 Jan 2022 23:26:06 +0000 (15:26 -0800)]
API BREAK: use a C99 bool for 'Agnodeinfo_t.has_port'
Matthew Fernandez [Sat, 15 Jan 2022 23:24:22 +0000 (15:24 -0800)]
API BREAK: use a C99 bool for 'Agnodeinfo_t.clustnode'
Matthew Fernandez [Sun, 16 Jan 2022 02:00:55 +0000 (02:00 +0000)]
Merge branch 'smattr/
F84CFD8E -734D-47B0-A614-
AD649741668A ' into 'main'
add test case for #1879
See merge request graphviz/graphviz!2404
Matthew Fernandez [Sun, 18 Apr 2021 21:40:11 +0000 (14:40 -0700)]
add test case for #1879
Unfortunately we cannot xfail this test with `strict=True` because this test
passes or fails across various different platforms with no discernible pattern
to me. Results from the current commit:
* pass: CentOS 7, CentOS 7 CMake, Fedora 35, macOS, macOS CMake, Ubuntu 20.04,
MinGW 32 CMake, MinGW 64 CMake
* fail: Fedora 34, Ubuntu 18.04, Ubuntu 18.04 CMake, Ubuntu 21.04,
Ubuntu 21.04 CMake, Ubuntu 21.10, Ubuntu 21.10 CMake,
Windows all debug builds
Matthew Fernandez [Sun, 16 Jan 2022 00:09:51 +0000 (00:09 +0000)]
Merge branch 'smattr/
af7ac83f -22ac-4fff-b0d2-
b7136bfc5813 ' into 'main'
more boolean → bool modernization
See merge request graphviz/graphviz!2403
Matthew Fernandez [Sat, 15 Jan 2022 19:00:32 +0000 (11:00 -0800)]
API BREAK: use a C99 bool for 'Agraphinfo.exact_ranksep'
Matthew Fernandez [Sat, 15 Jan 2022 18:59:15 +0000 (10:59 -0800)]
API BREAK: use a C99 bool for 'Agraphinfo.expanded'
Matthew Fernandez [Sat, 15 Jan 2022 18:57:58 +0000 (10:57 -0800)]
API BREAK: use a C99 bool for 'Agraphinfo.has_sinkrank'
Matthew Fernandez [Sat, 15 Jan 2022 18:56:42 +0000 (10:56 -0800)]
API BREAK: use a C99 bool for 'Agraphinfo.has_sourcerank'
Matthew Fernandez [Sat, 15 Jan 2022 18:55:26 +0000 (10:55 -0800)]
API BREAK: use a C99 bool for 'Agraphinfo.has_flat_edges'
Matthew Fernandez [Sat, 15 Jan 2022 18:53:15 +0000 (10:53 -0800)]
API BREAK: use a C99 bool for 'Agraphinfo_t.has_images'
Matthew Fernandez [Sat, 15 Jan 2022 18:50:01 +0000 (10:50 -0800)]
API BREAK: use C99 bools for 'layout_t' boolean fields
Matthew Fernandez [Sat, 15 Jan 2022 18:41:34 +0000 (10:41 -0800)]
API BREAK: use C99 bools for 'rank_t' boolean fields
Matthew Fernandez [Sat, 15 Jan 2022 18:34:08 +0000 (10:34 -0800)]
API BREAK: use a C99 bool for 'shape_desc.usershape' instead of a boolean
Matthew Fernandez [Sat, 15 Jan 2022 18:31:55 +0000 (10:31 -0800)]
API BREAK: use C99 bools for 'textlabel_t' fields instead of booleans
Matthew Fernandez [Sat, 15 Jan 2022 18:16:51 +0000 (10:16 -0800)]
make_label: remove unnecessary casts
Matthew Fernandez [Sat, 15 Jan 2022 18:16:27 +0000 (10:16 -0800)]
lefty: use a C99 bool instead of int for 'htmlflag' in 'writeattr'
Matthew Fernandez [Sat, 15 Jan 2022 18:16:01 +0000 (10:16 -0800)]
lefty: use a C99 bool instead of int for 'innetscape'
Matthew Fernandez [Sat, 15 Jan 2022 18:13:09 +0000 (10:13 -0800)]
lefty: return a C99 bool from 'boolop' instead of an int
Matthew Fernandez [Sat, 15 Jan 2022 18:11:03 +0000 (10:11 -0800)]
lefty AIX I/O: return a C99 bool from 'boolop' instead of an int
Matthew Fernandez [Sat, 15 Jan 2022 18:07:56 +0000 (10:07 -0800)]
left: take a C99 bool in 'buildpath' instead of an int
Matthew Fernandez [Sat, 15 Jan 2022 17:51:44 +0000 (09:51 -0800)]
API BREAK: use C99 bools for 'port' fields instead of booleans
Matthew Fernandez [Sat, 15 Jan 2022 17:38:05 +0000 (09:38 -0800)]
API BREAK: use a C99 bool for 'isOrtho' instead of a boolean
Matthew Fernandez [Sat, 15 Jan 2022 17:33:10 +0000 (09:33 -0800)]
API BREAK: use a C99 bool for 'ignoreSwap' instead of a boolean
Matthew Fernandez [Sat, 15 Jan 2022 17:27:39 +0000 (09:27 -0800)]
API BREAK: return a C99 bool from 'swapEnds instead of a boolean
Matthew Fernandez [Sat, 15 Jan 2022 17:19:21 +0000 (09:19 -0800)]
API BREAK: return a C99 bool from 'splineMerge' instead of a boolean
Matthew Fernandez [Sat, 15 Jan 2022 17:10:03 +0000 (09:10 -0800)]
API BREAK: return a C99 bool from 'insidefn' instead of a boolean
Matthew Fernandez [Sat, 15 Jan 2022 22:27:19 +0000 (22:27 +0000)]
Merge branch 'smattr/
449D4938 -41BE-4359-B1B0-
6C19D1570E24 ' into 'main'
some Python tweaks to test code
See merge request graphviz/graphviz!2398
Matthew Fernandez [Tue, 11 Jan 2022 01:23:49 +0000 (17:23 -0800)]
shell-quote commands echoed during testing
It is not typical that testing paths will contain things like spaces and other
characters that require quoting. But this change goes the extra mile to make
sure these echoed commands are always copy-pastable to re-execute them.
Matthew Fernandez [Sat, 15 Jan 2022 20:59:54 +0000 (12:59 -0800)]
run_c: [nfc] factor out an array addition
This will make an upcoming commit clearer and more concise.
Matthew Fernandez [Tue, 11 Jan 2022 01:05:58 +0000 (17:05 -0800)]
run_c: check return code of compiled program before returning
Every call to `run_c` was immediately checking that the compiled program
succeeded. So by moving the check inside `run_c` itself we can write more
concise test cases.
Matthew Fernandez [Sat, 15 Jan 2022 18:13:38 +0000 (18:13 +0000)]
Merge branch 'smattr/
5dbb61ed -6813-47f4-918d-
6a6047f05fa9 ' into 'main'
simplification and reduction of macros
See merge request graphviz/graphviz!2402
Matthew Fernandez [Fri, 14 Jan 2022 02:05:26 +0000 (18:05 -0800)]
remove no-op 'agattrrec' casts
Matthew Fernandez [Fri, 14 Jan 2022 02:05:10 +0000 (18:05 -0800)]
remove no-op 'agdatadict' casts
Matthew Fernandez [Fri, 14 Jan 2022 01:58:05 +0000 (17:58 -0800)]
API BREAK: remove 'NIL' macros
Matthew Fernandez [Fri, 14 Jan 2022 01:50:17 +0000 (17:50 -0800)]
remove use of 'NIL'
Matthew Fernandez [Fri, 14 Jan 2022 01:46:02 +0000 (17:46 -0800)]
use C99 initialization to simplify 'Dtdisc_t' definitions
Matthew Fernandez [Fri, 14 Jan 2022 01:08:48 +0000 (17:08 -0800)]
API BREAK: remove 'NOT' macro
Matthew Fernandez [Sat, 15 Jan 2022 17:12:50 +0000 (17:12 +0000)]
Merge branch 'smattr/
7e470f6a -2599-44f5-92e8-
0d1f12a223ff ' into 'main'
move lib/mingle/edge_bundling.c to C++
See merge request graphviz/graphviz!2401
Matthew Fernandez [Thu, 13 Jan 2022 04:38:44 +0000 (20:38 -0800)]
edge_compatibility_full: use a C++ bool for 'flipped'
Gitlab: #2154
Matthew Fernandez [Thu, 13 Jan 2022 04:37:48 +0000 (20:37 -0800)]
edge_compatibility: use a C++ bool for 'flipped'
Gitlab: #2154
Matthew Fernandez [Thu, 13 Jan 2022 04:34:33 +0000 (20:34 -0800)]
remove unused 'pedge_export_mma'
Matthew Fernandez [Thu, 13 Jan 2022 04:33:42 +0000 (20:33 -0800)]
remove unused 'pedge_realloc'
Matthew Fernandez [Thu, 13 Jan 2022 04:32:01 +0000 (20:32 -0800)]
force_directed_edge_bundling: remove useless '1*'
Matthew Fernandez [Thu, 13 Jan 2022 04:30:49 +0000 (20:30 -0800)]
force_directed_edge_bundling: remove manual memory management of 'force_a'
Gitlab: #2154
Matthew Fernandez [Thu, 13 Jan 2022 04:28:03 +0000 (20:28 -0800)]
force_directed_edge_bundling: remove manual memory management of 'force_t'
Gitlab: #2154
Matthew Fernandez [Thu, 13 Jan 2022 04:22:11 +0000 (20:22 -0800)]
remove unused 'pedge_flip'
Matthew Fernandez [Thu, 13 Jan 2022 04:18:21 +0000 (20:18 -0800)]
lib/mingle/edge_bundling.cpp: replace 'MIN' with 'std::min'
Gitlab: #2154
Matthew Fernandez [Thu, 13 Jan 2022 04:17:31 +0000 (20:17 -0800)]
lib/mingle/edge_bundling.cpp: replace 'MAX' with 'std::max'
Gitlab: #2154
Matthew Fernandez [Thu, 13 Jan 2022 04:03:44 +0000 (20:03 -0800)]
lib/mingle: move 'edge_bundling.c' into C++
This is a straight rename. No C++-specific changes yet.
Github: #2154
Matthew Fernandez [Thu, 13 Jan 2022 04:07:34 +0000 (20:07 -0800)]
force_directed_edge_bundling: suppress -Wunused-parameter warning
Matthew Fernandez [Thu, 13 Jan 2022 04:06:36 +0000 (20:06 -0800)]
lib/mingle/edge_bundling.c: explicitly cast the results of 'realloc'
This has no effect in C, but this is pre-emptively squashing some warnings that
appear when moving this file to C++.
Gitlab: #2154
Matthew Fernandez [Thu, 13 Jan 2022 03:54:02 +0000 (19:54 -0800)]
lib/mingle/edge_bundling.c: explicitly cast the results of 'malloc'
This has no effect in C, but this is pre-emptively squashing some warnings that
appear when moving this file to C++.
Gitlab: #2154
Matthew Fernandez [Sat, 15 Jan 2022 16:13:47 +0000 (16:13 +0000)]
Merge branch 'smattr/
36cf258d -8d34-4eb5-a1f1-
601aab72970e ' into 'main'
more boolean → C99 bool modernization, and a bitarray optimization
See merge request graphviz/graphviz!2399
Matthew Fernandez [Wed, 12 Jan 2022 03:57:23 +0000 (19:57 -0800)]
standardize on C99 bool literals for calling 'agbindrec'
Matthew Fernandez [Wed, 12 Jan 2022 03:35:08 +0000 (19:35 -0800)]
gvrender_core_pic.c: use a C99 bool for global 'onetime'
Matthew Fernandez [Wed, 12 Jan 2022 03:34:39 +0000 (19:34 -0800)]
use C99 bool literals to set 'polygon_t.regular'
Matthew Fernandez [Wed, 12 Jan 2022 03:30:26 +0000 (19:30 -0800)]
init_nop: use a C99 bool for local 'didShift'
Matthew Fernandez [Wed, 12 Jan 2022 04:59:58 +0000 (20:59 -0800)]
implement Small String Optimization in the bitarray API
Following the prior commit, this further reduces memory usage. On e.g. x86-64,
arrays of ≤ 64 bits can be managed fully on the stack.
Matthew Fernandez [Wed, 12 Jan 2022 04:35:16 +0000 (20:35 -0800)]
simplify bitarray API to assume arrays are only resized at construction time
The bit array API was written to allow arbitrary growing or shrinking of an
array after its construction, while maintaining its content. After fully rolling
it out, it turns out Graphviz only ever creates such arrays once at a fixed size
and then uses them until free. Carrying a more generic API than was necessary
had a number of negative consequences:
1. `bitarray_resize` was more complicated than it needed to be, in order to
cope with an arbitrary initial size of the input array.
2. `bitarray_resize` used `realloc;memset` instead of the more efficient
`calloc` because it was assuming the caller needed to maintain the original
content.
3. `bitarray_resize` performed a “loose” allocation with the capacity of the
backing buffer larger than the size of the array itself, assuming that
amortizing allocation costs across repeated resizes was a relevant concern.
Dropping this and making the allocation “tight” not only reduces heap
pressure, but allows dropping the `.capacity` member.
4. `bitarray_array_resize_or_exit` had a more awkward calling convention than
necessary, as exemplified by how it is streamlined in this commit.
As such, this change not only simplifies the code but also reduces memory usage.
Matthew Fernandez [Wed, 12 Jan 2022 03:28:26 +0000 (19:28 -0800)]
cluster_map: replace boolean array 'assigned' with a bit array
This is more memory efficient.
Matthew Fernandez [Wed, 12 Jan 2022 03:21:47 +0000 (19:21 -0800)]
dijkstra_bounded: replace boolean array 'node_in_neighborhood' with a bit array
This is more memory efficient. This also undoes the retention and reuse of this
array making its live range more obvious to the compiler.
Magnus Jacobsson [Wed, 12 Jan 2022 08:47:58 +0000 (08:47 +0000)]
Merge branch 'add-mingw-static-autotools-build-jobs' into 'main'
Unfify the last storage class attribute declarations and add MinGW static autotools builds
Closes #2173
See merge request graphviz/graphviz!2397
Magnus Jacobsson [Tue, 11 Jan 2022 17:16:56 +0000 (18:16 +0100)]
ci: add MinGW32 static autotools build jobs
Magnus Jacobsson [Sun, 2 Jan 2022 16:57:40 +0000 (17:57 +0100)]
ci: add MinGW64 static autotools build jobs
Magnus Jacobsson [Mon, 3 Jan 2022 09:55:59 +0000 (10:55 +0100)]
ci/build.sh: autotools: add support building using autogen in static builds
Magnus Jacobsson [Sun, 2 Jan 2022 16:55:30 +0000 (17:55 +0100)]
ci: add support for configure options in out-of-source-configure.sh
Magnus Jacobsson [Mon, 3 Jan 2022 08:32:48 +0000 (09:32 +0100)]
gvpack: use GVDLL instead of _WIN32 to enable dllimport storage-class attribute in gvpack.c
Fixes these errors when building statically with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gvpack_static-gvpack.o: in function `main':
C:\Users\magja\graphviz\cmd\tools/gvpack.c:857: undefined reference to `__imp_gvplugin_neato_layout_LTX_library'
collect2.exe: error: ld returned 1 exit status
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gvpack-gvpack.o: in function `main':
C:\Users\magja\graphviz\cmd\tools/gvpack.c:857: undefined reference to `__imp_gvplugin_neato_layout_LTX_library'
Fixes https://gitlab.com/graphviz/graphviz/-/issues/2173.
Magnus Jacobsson [Sun, 2 Jan 2022 18:35:05 +0000 (19:35 +0100)]
gdtclft: use only GVDLL to enable dllexport storage-class attribute for Gdtclft_SafeInit
Instead of using __CYGWIN__ and __WIN32__, rely on that GVDLL is
correctly set for all platforms.
Towards https://gitlab.com/graphviz/graphviz/-/issues/2173.
Magnus Jacobsson [Sun, 2 Jan 2022 18:35:05 +0000 (19:35 +0100)]
gdtclft: use only GVDLL to enable dllexport storage-class attribute for Gdtclft_Init
Instead of using __CYGWIN__ and __WIN32__, rely on that GVDLL is
correctly set for all platforms.
Towards https://gitlab.com/graphviz/graphviz/-/issues/2173.
Matthew Fernandez [Wed, 12 Jan 2022 02:16:38 +0000 (02:16 +0000)]
Merge branch 'smattr/
c144f079 -34fb-4177-84dd-
821809ad0a39 ' into 'main'
more boolean → bool modernization
See merge request graphviz/graphviz!2396
Matthew Fernandez [Tue, 11 Jan 2022 04:59:36 +0000 (20:59 -0800)]
gvprintnum: use C99 bools for locals 'showzeros', 'negative'
Matthew Fernandez [Tue, 11 Jan 2022 04:58:06 +0000 (20:58 -0800)]
gvdevice_finalize: use a C99 bool for local 'finalized_p'
Matthew Fernandez [Tue, 11 Jan 2022 04:56:57 +0000 (20:56 -0800)]
setbounds: use C99 bools for locals 'onleft', 'onright'
Matthew Fernandez [Tue, 11 Jan 2022 04:55:19 +0000 (20:55 -0800)]
addLabelBB: use a C99 bool for parameter 'flipxy'
Matthew Fernandez [Tue, 11 Jan 2022 04:51:13 +0000 (20:51 -0800)]
safefile: use a C99 bool for local 'onetime'
Matthew Fernandez [Tue, 11 Jan 2022 04:50:18 +0000 (20:50 -0800)]
shape_clip: use a C99 bool for local 'left_inside'
Matthew Fernandez [Tue, 11 Jan 2022 04:48:46 +0000 (20:48 -0800)]
point_gencode: use a C99 bool for local 'filled'
Matthew Fernandez [Tue, 11 Jan 2022 04:47:04 +0000 (20:47 -0800)]
poly_gencode: use a C99 bool for local 'pfilled'
Matthew Fernandez [Tue, 11 Jan 2022 04:46:10 +0000 (20:46 -0800)]
compassPort: use a C99 bool for local 'defined'
Matthew Fernandez [Tue, 11 Jan 2022 04:44:11 +0000 (20:44 -0800)]
compassPort: use a C99 bool for local 'clip'
Matthew Fernandez [Tue, 11 Jan 2022 04:40:37 +0000 (20:40 -0800)]
compassPort: use a C99 bool for local 'dyna'