Windows: remove usage of 'sed' in setup-build-utilities script
This results in `$PATH` potentially having duplicated trailing entries, but this
causes no harm and preventing it does not seem worth a `sed` dependency.
Costa Shulyupin [Tue, 22 Feb 2022 18:58:05 +0000 (20:58 +0200)]
lib/cgraph: use return value of 'fread' in aglasterr
fix warning:
agerror.c: In function ‘aglasterr’:
agerror.c:49:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
49 | fread(buf, sizeof(char), len, agerrout);
This code was attempting to avoid dynamic string construction with low numbered
IDs. This is unnecessary when using a modern compiler that understands functions
like `snprintf` as built-ins and can achieve better optimization without this
trick.
Apart from de-duplicating code, this has the effect of making this code thread
safe where it was not before.
Magnus Jacobsson [Sun, 20 Feb 2022 10:10:04 +0000 (11:10 +0100)]
gvc++: include "AGraph.h" instead of <AGraph.h> in GVLayout.h
This makes it possible to use GVLayout.h from the install directory
without the need to specify both "include" and "include/graphviz" as
include directories to the compiler.
Magnus Jacobsson [Sun, 20 Feb 2022 10:08:52 +0000 (11:08 +0100)]
gvc++: include "gvc.h" instead of <gvc.h> in GVContext.h
This makes it possible to use GVContext.h from the install directory
without the need to specify both "include" and "include/graphviz" as
include directories to the compiler.
Towards https://gitlab.com/graphviz/graphviz/-/issues/2196.
Magnus Jacobsson [Sun, 20 Feb 2022 10:03:43 +0000 (11:03 +0100)]
cgraph++: include "cgraph.h" instead of <cgraph.h> in AGraph.h
This makes it possible to use AGraph.h from the install directory
without the need to specify both "include" and "include/graphviz" as
include directories to the compiler.
Towards https://gitlab.com/graphviz/graphviz/-/issues/2196.
Commit 83eea6075b8f4746d632a792b1d1b97c19797acb altered the calling convention
of `errorv`, but failed to take into account that the local variable `s` was
being used for something else prior to its use as the first unpacked parameter.
Following this commit, the first parameter was being discarded as `s` was
overwritten with `error_info.id` or `id`.
tclpkg vgpanecmd: remove acceptance of ambiguous abbreviated commands
`vgpanecmd` accepted abbreviations of commands, e.g. `li` for list. However
these abbreviations were accepted as first match with no disambiguation. So `r`
would always be interpreted as `rotate`, not `remove`. This behavior appears to
be an unintentional side effect of commands being incrementally introduced over
time without this kind of prefix-matching overlap being taken into account,
though this is mostly a guess as all this code was implemented prior to the
first Git commit.
This commit alters the CI tests to now pull OS information from /etc/os-release
instead of from an ad hoc environment variable. This makes test case execution
independent from which/whether environment variables have been exported. The
intent with this is to reduce the likelihood of an issue like that fixed in 50db0c5e8da293d816d8b5c4620f2fa2d311d37a being reintroduced.
Nothing in the build systems define this, but it is also unclear how to use this
debugging support as the psdbg.c support functions seem to be something internal
that was never committed to the repository.
Rob Hart [Tue, 8 Dec 2020 13:01:24 +0000 (05:01 -0800)]
Move maxiter check after the feasible_tree() call.
Edit from Matt: changelog entry and un-xfailed the test case.
Quoting the description of MR !1688 if it ever ends up lost to the sands of
time:
If `nslimit1` is zero, then `rank2` is called with `maxiter=0`. It is likely
the intent here is to at least compute and return an initial feasible solution
(though not running any network simplex iterations).
Gitlab: fixes #1902
Co-authored-by: Matthew Fernandez <matthew.fernandez@gmail.com>
Rob Hart [Tue, 8 Dec 2020 16:29:53 +0000 (08:29 -0800)]
Regression test for issue 1902
Edit from Matt: Added `xfail` marker as I have reordered the commits to put this
test case introduction before its fix, as well as aligning with current Pylint
requirements.
Gitlab: #1902
Co-authored-by: Matthew Fernandez <matthew.fernandez@gmail.com>
As of fe3f9411d2c59b463ab1b64eecfd19f2db55d2fc, Graphviz requires a C99
compiler. C99 guarantees `sqrtf` so even if the “bug” discussed in the original
commit still exists, generating a `sqrtf` call is fine on a C99 toolchain.
work around a bug in GCC: It generates a call to "sqrtf" for "(float)sqrt(d)"
but sqrtf doesn't exist in libm.a.
reported by: Aaron Digulla <digulla@hepe.com>
As of fe3f9411d2c59b463ab1b64eecfd19f2db55d2fc, Graphviz requires a C99
compiler. C99 guarantees `sqrtf` so even if this “bug” still exists, generating
a `sqrtf` call is fine on a C99 toolchain.
CMake: detect and enable extra optional GD features with gdlib-config
This replicates some logic from the Autotools build system, enabling output
formats like `png:gd`. Note that this only enables `png:gd` on CentOS because
other packaging ecosystems do not seem to include `gdlib-config`.
In retrospect, this test case does not make sense in the regular test suite. It
is validating a particular plugin feature is enabled. It is perfectly valid to
build a version of Graphviz without png:gd support, yet it will fail this test
case.
neatogen: replace 'MAXFLOAT' in clamping logic with 'FLT_MAX'
This seems a more accurate definition of what overflow would mean under C99.
Though as far as I can tell, it is not possible to reach this code with negative
values in the array, so the `< 0` check is always false. The `>= FLT_MAX` is
true for both `FLT_MAX` itself as well as positive infinity.