find_ints does not currently return negative values. It returns only 0 or 1.
However, we would like to unravel a use of longjmp within it, so returning a
negative value to indicate an error is convenient. This is preparation for
upcoming changes. Related to #1801.
If a test compiles and/or runs C code and that test fails, included in the test
suite output will now be the commands themselves that were run, echoed in the
style of Bash’s set -x.
support receiving C compiler flags in the test suite from the environment
The environment variables CFLAGS and LDFLAGS now also effect the flags used with
the C compiler in the test suite, in addition to the build system. Related to
#1881.
visio plugin: manage _chars member of Text as a value instead of a pointer
This member is never set to NULL and the Char class is not involved in any
inheritance hierarchy. So there is no need to heap-allocate it or pass it around
by pointer.
visio plugin: manage _para member of Text as a value instead of a pointer
This member is never set to NULL and the Para class is not involved in any
inheritance hierarchy. So there is no need to heap-allocate it or pass it around
by pointer.
visio plugin: manage _line member of Graphic as a value instead of pointer
This member is never set to NULL and the Line class is not involved in any
inheritance hierarchy. So there is no need to heap-allocate it or pass it around
by pointer.
Across the range of platforms Graphviz runs on, this is not a reasonable
default. E.g. Windows will have none of these paths and this is not even how one
separates paths in Windows $PATH. This is mostly a latent issue, as it is very
rare for $PATH to be unset.
This fixes some -Wsign-conversion warnings at the expense of introducing some
-Wsign-compare warnings. The latter should be removed as we migrate the cell
count in mazes to size_t.
This fixes one -Wsign-conversion warning, though introduces a -Wconversion
warning. We should be able to remove the latter as we continue cleaning up the
use of int for sizes.
The LASI plugin was using two global variables, making it impossible to process
multiple graphs with it at the same time. This change refactors it to use the
jobs context as other rendering plugins do.
This was added in the initial commit of VPSC, 03c20a55c921ac07599be2ae19ae34209ec0d02e. The comment was incorrect. This does
*not* limit iteration because the variable type is unsigned. That is, it is
always >= 0. This was caught by enabling CXXFLAGS+=-Wtype-limits.
The macOS tasks were, by default, blocking on the portable source generation.
However these tasks do not use the portable source or any prior stage’s
artifacts. Now that we have moved to shared macOS runners without caching, the
macOS CI tasks are the limiting factor on CI runtime. Cutting this dependency
should meaningfully impact this.
fix: propagate VERSION from macOS build tasks to macOS CI test tasks
The macOS test tasks in CI were picking up the VERSION from the portable source
task, despite their build tasks using a different process to derive VERSION.
This change ensures they get the VERSION file their build task created.
fix computation of minimum graph rank on large graphs
This code was using MAXSHORT as the maximum (unrealistically large) rank. That
is, start out with this value and assume all nodes will rank below this so we
can progressively step down. This was likely correct when the code was first
written. However, 97cb5fffdcaa97eadb76a9b82a026d084a6a94d9 altered the type used
for storing ranks from short to int to support larger graphs. That is, nodes in
a graph are now anticipated to have ranks in excess of 32767 (on e.g. x86). This
change did not update these algorithms to compensate.
The effect of this is that any graph whose nodes were all ranked >32767 would be
incorrectly judged to have a minimum rank of 32767. The present change fixes
this by realigning this to the limit of the new ranking type.
Note that this removes the last use MAXSHORT in the code base. Unfortunately we
cannot easily remove its definition without breaking API because the containing
header lib/common/arith.h is shipped.
use range-based for loops to clean up some manual iteration
Note that in once instance this modifies a loop that was skipping the first
element to not skip it. But this is a no-op the compiler should see through.
store Graphics as managed pointers in Visio::Render instead of raw pointers
This lets us clean up some manual handling of these and stop worrying about
memory management. Note that Visio::Render::ClearGraphicsAndTexts touched in
this commit is effectively a hand written destructor for this class. Presumably
it was implemented in a time before destructors were standardized. We can likely
move the other collections affected here to using smart pointers too and remove
this function entirely eventually.