]> granicus.if.org Git - graphviz/log
graphviz
3 years agoswap some unnecessary prototypes for a #include
Matthew Fernandez [Sat, 14 Aug 2021 03:51:39 +0000 (20:51 -0700)]
swap some unnecessary prototypes for a #include

3 years agoutils.h: fix missing include
Matthew Fernandez [Sat, 14 Aug 2021 03:48:22 +0000 (20:48 -0700)]
utils.h: fix missing include

This header references agxbuf objects in function prototypes.

3 years agooverlap_bezier: use a C99 bool return type
Matthew Fernandez [Sat, 14 Aug 2021 03:36:57 +0000 (20:36 -0700)]
overlap_bezier: use a C99 bool return type

3 years agooverlap_arrow: use C99 bool return type to simplify
Matthew Fernandez [Sat, 14 Aug 2021 03:35:23 +0000 (20:35 -0700)]
overlap_arrow: use C99 bool return type to simplify

3 years agooverlap_arrow: remove unused 'flag' parameter
Matthew Fernandez [Sat, 14 Aug 2021 03:31:29 +0000 (20:31 -0700)]
overlap_arrow: remove unused 'flag' parameter

3 years agoarrow_bb: remove unused 'flag' parameter
Matthew Fernandez [Sat, 14 Aug 2021 03:30:04 +0000 (20:30 -0700)]
arrow_bb: remove unused 'flag' parameter

3 years agosquash warnings for unused parameters in Arrowtypes functions
Matthew Fernandez [Sat, 14 Aug 2021 03:24:16 +0000 (20:24 -0700)]
squash warnings for unused parameters in Arrowtypes functions

These all need to conform to a common prototype, so many have parameters that
they do not need to use.

3 years agosimplify iteration over Arrowtypes array
Matthew Fernandez [Sat, 14 Aug 2021 03:14:43 +0000 (20:14 -0700)]
simplify iteration over Arrowtypes array

The size of this array can be computed at compile-time, allowing the compiler to
unroll loops over its content.

3 years agomark Arrowtypes as const
Matthew Fernandez [Sat, 14 Aug 2021 03:05:28 +0000 (20:05 -0700)]
mark Arrowtypes as const

3 years agoarrows.c: remove commented out code
Matthew Fernandez [Sat, 14 Aug 2021 03:03:58 +0000 (20:03 -0700)]
arrows.c: remove commented out code

3 years agoremove 'tmp' member from 'Fmt_t'
Matthew Fernandez [Sat, 14 Aug 2021 02:57:43 +0000 (19:57 -0700)]
remove 'tmp' member from 'Fmt_t'

As of merge 9053aaba8f7791983b493c56b5443bf602cc529b and
f0adc7da80a22230174f4afcec12151e3ae28fad, this member is no longer used. Related
to #1998.

3 years agoMerge branch 'smattr/1408a71c-89e3-4b1a-8aa9-c088fe4f01bd' into 'main'
Matthew Fernandez [Sat, 14 Aug 2021 21:18:00 +0000 (21:18 +0000)]
Merge branch 'smattr/1408a71c-89e3-4b1a-8aa9-c088fe4f01bd' into 'main'

fix failed Exshort_t type discrimination

Closes #1799

See merge request graphviz/graphviz!2088

3 years agoremove unused ERROR_catalog
Matthew Fernandez [Sun, 8 Aug 2021 19:17:38 +0000 (12:17 -0700)]
remove unused ERROR_catalog

3 years agoremove Exshort_t type
Matthew Fernandez [Sun, 8 Aug 2021 18:50:30 +0000 (11:50 -0700)]
remove Exshort_t type

This type discrimination did not seem to make much sense (why select between int
and short based on the sizes of long and int?), but more problematically was not
working as intended. This header does not include limits.h, so both LONG_MAX and
INT_MAX were undefined and this expression defaulted to 0 regardless of the
sizes of these types.

Closes #1799.

3 years agoreplace use of Exshort_t type with int
Matthew Fernandez [Sun, 8 Aug 2021 18:49:32 +0000 (11:49 -0700)]
replace use of Exshort_t type with int

This squashes a number of -Wconversion warnings where int values are written
into these fields. Related to #1799.

3 years agoremove pad_1 member of Exnode_s
Matthew Fernandez [Sun, 8 Aug 2021 18:47:31 +0000 (11:47 -0700)]
remove pad_1 member of Exnode_s

This kind of compile assistance is unnecessary. Compilers can infer the
necessary padding by themselves. Related to #1799.

3 years agoremove pad_2 member of Exnode_s
Matthew Fernandez [Sun, 8 Aug 2021 18:42:09 +0000 (11:42 -0700)]
remove pad_2 member of Exnode_s

This padding seems unnecessary. Nothing relies on the size of this struct.
Related to #1799.

3 years agoremove %{JAVASCRIPT} build warning during rpmbuild on Fedora
Matthew Fernandez [Tue, 3 Aug 2021 03:50:24 +0000 (20:50 -0700)]
remove %{JAVASCRIPT} build warning during rpmbuild on Fedora

This code was commented out in 05f7c2f6f911c92fcaeafc0a02f6d19537386e0d.
rpmbuild does not like the presence of macros in comments:

  warning: Macro expanded in comment on line 100: %{JAVASCRIPT}

3 years agoMerge branch 'smattr/3ef81d11-6c0d-45af-8447-2824072f5f40' into 'main'
Matthew Fernandez [Sat, 14 Aug 2021 02:21:01 +0000 (02:21 +0000)]
Merge branch 'smattr/3ef81d11-6c0d-45af-8447-2824072f5f40' into 'main'

remove some use of sfputc, sfputr

See merge request graphviz/graphviz!2093

3 years agoexsub: remove use of sfio temporary buffer
Matthew Fernandez [Wed, 11 Aug 2021 01:10:26 +0000 (18:10 -0700)]
exsub: remove use of sfio temporary buffer

This removes yet another use of `ex->tmp` within exeval.c code. It is replaced
with a dynamically allocated buffer from vmalloc. This not only reduces reliance
on sfio, but is likely more efficient as data is written directly into a vmalloc
buffer rather than being written to an sfio buffer and then copied to a vmalloc
buffer. Related to #1998.

3 years agoreplace: explicitly brace conditionals
Matthew Fernandez [Wed, 11 Aug 2021 01:02:22 +0000 (18:02 -0700)]
replace: explicitly brace conditionals

Makes this function a little easier to read.

3 years agoreplace: re-indent body
Matthew Fernandez [Wed, 11 Aug 2021 01:00:25 +0000 (18:00 -0700)]
replace: re-indent body

Upcoming changes refactor parts of this function and its current chaotic indent
style make these changes very error prone to apply. It is hoped that this
reformatting makes the upcoming change safer.

3 years agostrgrpmatch: reflow some text
Matthew Fernandez [Wed, 11 Aug 2021 00:36:10 +0000 (17:36 -0700)]
strgrpmatch: reflow some text

3 years agoRevert "remove now-unused vmresize"
Matthew Fernandez [Wed, 11 Aug 2021 00:20:22 +0000 (17:20 -0700)]
Revert "remove now-unused vmresize"

This reverts commit ab322d219b7dae03fe5f7114dfd0e1d2fc7d3b5d. A `realloc`
analogue appears to be the simplest way of removing sfputr/sfputc usage in
exeval.c. Related to #1998.

3 years agoexsub: use a C99 bool for 'global' parameter to be clearer
Matthew Fernandez [Wed, 11 Aug 2021 00:19:18 +0000 (17:19 -0700)]
exsub: use a C99 bool for 'global' parameter to be clearer

3 years agogvprmain.c: remove unnecessary casts
Matthew Fernandez [Wed, 11 Aug 2021 00:12:17 +0000 (17:12 -0700)]
gvprmain.c: remove unnecessary casts

3 years agosfwrite: remove unnecessary casts
Matthew Fernandez [Wed, 11 Aug 2021 00:10:57 +0000 (17:10 -0700)]
sfwrite: remove unnecessary casts

3 years agoMerge branch 'smattr/a7c9e340-7b78-40cd-947b-40e8fc6a5e45' into 'main'
Matthew Fernandez [Sat, 14 Aug 2021 01:17:41 +0000 (01:17 +0000)]
Merge branch 'smattr/a7c9e340-7b78-40cd-947b-40e8fc6a5e45' into 'main'

more warning squashing and clean up

See merge request graphviz/graphviz!2094

3 years agopathcat: return a const char* instead of char*
Matthew Fernandez [Thu, 12 Aug 2021 02:18:53 +0000 (19:18 -0700)]
pathcat: return a const char* instead of char*

Squashes a -Wcast-qual warning, and is generally more honest.

3 years agopathcanon: remove some int-as-char type confusion
Matthew Fernandez [Thu, 12 Aug 2021 02:13:57 +0000 (19:13 -0700)]
pathcanon: remove some int-as-char type confusion

Removes a -Wconversion warning.

3 years agoremove PRESERVE_TRAILING_SLASH and DONT_PRESERVE_TRAILING_SLASH
Matthew Fernandez [Thu, 12 Aug 2021 02:09:28 +0000 (19:09 -0700)]
remove PRESERVE_TRAILING_SLASH and DONT_PRESERVE_TRAILING_SLASH

Neither of these are defined anywhere in the build system(s).

3 years agofmquote: squash -Wconversion warnings
Matthew Fernandez [Thu, 12 Aug 2021 02:07:32 +0000 (19:07 -0700)]
fmquote: squash -Wconversion warnings

These operations appear safe and deliberate to me.

3 years agofmtquote: remove reuse of an int variable
Matthew Fernandez [Thu, 12 Aug 2021 01:53:41 +0000 (18:53 -0700)]
fmtquote: remove reuse of an int variable

Squashes 6 -Wsign-conversion/-Wconversion warnings.

3 years agosfwrite: squash a -Wsign-conversion warning
Matthew Fernandez [Thu, 12 Aug 2021 01:42:25 +0000 (18:42 -0700)]
sfwrite: squash a -Wsign-conversion warning

The value of `r` here is known between `0` and `sizeof(buf)`.

3 years agosfwr: remove unnecessary cast of 'write' argument
Matthew Fernandez [Thu, 12 Aug 2021 01:38:07 +0000 (18:38 -0700)]
sfwr: remove unnecessary cast of 'write' argument

The `write` function takes a `const void*`, which `buf` already is.

3 years agosfoutput: squash a -Wsign-conversion warning
Matthew Fernandez [Thu, 12 Aug 2021 01:36:44 +0000 (18:36 -0700)]
sfoutput: squash a -Wsign-conversion warning

This value is guaranteed positive in this branch.

3 years agoremove disabled _lib_wctype-guarded code
Matthew Fernandez [Thu, 12 Aug 2021 01:34:48 +0000 (18:34 -0700)]
remove disabled _lib_wctype-guarded code

3 years agoremove _hdr_wchar-guarded code
Matthew Fernandez [Thu, 12 Aug 2021 01:34:03 +0000 (18:34 -0700)]
remove _hdr_wchar-guarded code

Nothing in the build system(s) define this.

3 years agoremove isxdigit shim
Matthew Fernandez [Thu, 12 Aug 2021 01:23:56 +0000 (18:23 -0700)]
remove isxdigit shim

This function is defined everywhere as far back as ISO C89.

3 years agoremove _lib_fnmatch-guarded code
Matthew Fernandez [Thu, 12 Aug 2021 01:21:27 +0000 (18:21 -0700)]
remove _lib_fnmatch-guarded code

Nothing in the build system(s) define this.

3 years agoMerge branch 'smattr/4aa37954-37b6-4d19-a3b0-c8554069c3d3' into 'main'
Matthew Fernandez [Fri, 13 Aug 2021 15:40:18 +0000 (15:40 +0000)]
Merge branch 'smattr/4aa37954-37b6-4d19-a3b0-c8554069c3d3' into 'main'

more const-ing of API char* arguments

See merge request graphviz/graphviz!2092

3 years agorec_apply: take 'preorder' parameter as a C99 bool for clarity
Matthew Fernandez [Tue, 10 Aug 2021 02:01:34 +0000 (19:01 -0700)]
rec_apply: take 'preorder' parameter as a C99 bool for clarity

3 years agoagapply: remove useless comment
Matthew Fernandez [Tue, 10 Aug 2021 01:58:38 +0000 (18:58 -0700)]
agapply: remove useless comment

This comment is indeed useless. It is clear it is *an* entry point by virtue of
being part of the public API.

3 years agoaginit: take a const char* instead of char* for record name
Matthew Fernandez [Tue, 10 Aug 2021 01:57:18 +0000 (18:57 -0700)]
aginit: take a const char* instead of char* for record name

This function does not modify its argument. No changelog entry because this is
already covered by the existing #634 one for the upcoming release.

3 years agoagdelrec: take a const char* instead of char* for record name
Matthew Fernandez [Tue, 10 Aug 2021 01:55:14 +0000 (18:55 -0700)]
agdelrec: take a const char* instead of char* for record name

This function does not modify its argument. No changelog entry because this is
already covered by the existing #634 one for the upcoming release.

3 years agoset_data: use a bool for 'mtf'
Matthew Fernandez [Tue, 10 Aug 2021 01:53:01 +0000 (18:53 -0700)]
set_data: use a bool for 'mtf'

The externally-facing functions that take a `move_to_front` parameter cannot
easily be updated to take C99 bools without breaking API. But at least the
internal functions can use C99 bools to be clearer.

3 years agoobjputrec: remove unused 'g' parameter
Matthew Fernandez [Tue, 10 Aug 2021 01:50:04 +0000 (18:50 -0700)]
objputrec: remove unused 'g' parameter

3 years agoremove unnecessary casts in rec.c
Matthew Fernandez [Tue, 10 Aug 2021 01:49:06 +0000 (18:49 -0700)]
remove unnecessary casts in rec.c

3 years agoremove unnecessary bracketing in rec.c
Matthew Fernandez [Tue, 10 Aug 2021 01:46:47 +0000 (18:46 -0700)]
remove unnecessary bracketing in rec.c

3 years agoagbindrec: realign parameter names in prototype with definition
Matthew Fernandez [Tue, 10 Aug 2021 01:43:47 +0000 (18:43 -0700)]
agbindrec: realign parameter names in prototype with definition

The C compiler does not care if these names mismatch, but it is less confusing
to be consistent. This change leaves the obj/arg_obj discrepancy alone under the
justification that "arg_obj" is not any more useful externally-facing and "obj"
internally would conflict with an already existing local.

3 years agoagbindrec: take a const char* instead of char* for record name
Matthew Fernandez [Tue, 10 Aug 2021 01:41:41 +0000 (18:41 -0700)]
agbindrec: take a const char* instead of char* for record name

This function does not modify its argument. No changelog entry because this is
already covered by the existing #634 one for the upcoming release.

3 years agoaggetrec: take a const char* instead of char* for record name
Matthew Fernandez [Tue, 10 Aug 2021 01:33:06 +0000 (18:33 -0700)]
aggetrec: take a const char* instead of char* for record name

This function does not modify its argument. No changelog entry because this is
already covered by the existing #634 one for the upcoming release.

3 years agoaggetrec: remove micro-optimization of string comparison
Matthew Fernandez [Tue, 10 Aug 2021 01:30:14 +0000 (18:30 -0700)]
aggetrec: remove micro-optimization of string comparison

This kind of trick is unnecessary on modern machines.

3 years agoMerge branch 'dont-wait-for-portable-source-for-cmake-jobs' into 'main'
Magnus Jacobsson [Thu, 12 Aug 2021 16:23:58 +0000 (16:23 +0000)]
Merge branch 'dont-wait-for-portable-source-for-cmake-jobs' into 'main'

Reduce latency in CI for CMake jobs + some related cleanup

See merge request graphviz/graphviz!2090

3 years agoMerge branch 'smattr/16235491-04e0-471e-a116-e92e994517ea' into 'main'
Matthew Fernandez [Thu, 12 Aug 2021 15:43:10 +0000 (15:43 +0000)]
Merge branch 'smattr/16235491-04e0-471e-a116-e92e994517ea' into 'main'

more steps towards removing sfio

See merge request graphviz/graphviz!2089

3 years agoremove the dependency on the portable-source job for autotools test jobs
Magnus Jacobsson [Mon, 9 Aug 2021 12:08:00 +0000 (14:08 +0200)]
remove the dependency on the portable-source job for autotools test jobs

This dependency is now obsolete and unnecessary although there is no
latency benefit by removing it.

3 years agoadd archiving of VERSION and COLLECTION to all build jobs
Magnus Jacobsson [Mon, 9 Aug 2021 12:03:40 +0000 (14:03 +0200)]
add archiving of VERSION and COLLECTION to all build jobs

An upcoming commit will remove the dependency to the portable-source
job for all test jobs, so it must be possible the retrieve these files
from the corresponding build job instead. Note that this is used only
for jobs using the portable source which have these files built into
them. Other jobs generate these files as needed.

3 years agoremove the dependency on the portable-source job for CMake test jobs
Magnus Jacobsson [Wed, 11 Aug 2021 18:21:39 +0000 (20:21 +0200)]
remove the dependency on the portable-source job for CMake test jobs

The dependency is unnecessary since both the VERSION and COLLECTION
files are now generated in the CMake test jobs. Note that there
probably is no latency benefit by removing it, since the
portable-source job normally is faster than the CMake builds jobs.

3 years agoadd generation of VERSION to all CMake test jobs
Magnus Jacobsson [Mon, 9 Aug 2021 12:03:40 +0000 (14:03 +0200)]
add generation of VERSION to all CMake test jobs

An upcoming commit will remove the dependency to the portable-source
job for all CMake test jobs, so this file instead needs to be
generated by these jobs. Note that the COLLECTION file is generated by
the CMake test jobs already before this commit.

3 years agoremove the dependency on the portable-source job for CMake build jobs
Magnus Jacobsson [Mon, 9 Aug 2021 11:05:58 +0000 (13:05 +0200)]
remove the dependency on the portable-source job for CMake build jobs

The dependency is now obsolete and this change reduces the latency for
the CMake jobs significantly by not having to wait for the
portable-source job.

3 years agodon't read the VERSION file for CMake builds in ci/build.sh
Magnus Jacobsson [Mon, 9 Aug 2021 11:26:32 +0000 (13:26 +0200)]
don't read the VERSION file for CMake builds in ci/build.sh

The CMake build system generates this file itself and nothing in this
script uses it for the CMake builds.

An upcoming commit will change the CI configuration to start the CMake
builds jobs directly without waiting for the portable-source job and
since that job produces the VERSION file, it will no longer be present
when the CMake builds jobs start.

3 years agoremove unnecessary casts of parameters to sfio extf functions
Matthew Fernandez [Sun, 8 Aug 2021 23:04:46 +0000 (16:04 -0700)]
remove unnecessary casts of parameters to sfio extf functions

These pointers implicitly coerce. Related to #1998.

3 years agoremove the first parameter of Sffmtext_f
Matthew Fernandez [Sun, 8 Aug 2021 22:58:25 +0000 (15:58 -0700)]
remove the first parameter of Sffmtext_f

Neither uses of the only field of this type, extf, were using this parameter.
Related to #1998.

3 years agorestructure "%.*s" handling to avoid sfio dynamic allocation in expr’s printf
Matthew Fernandez [Sun, 8 Aug 2021 22:36:27 +0000 (15:36 -0700)]
restructure "%.*s" handling to avoid sfio dynamic allocation in expr’s printf

Rather than using the temporary sfio buffer in this code, fmt->tmp, we can just
use the original string as-is as it does not need to be modified. Apart from
slightly accelerating this code, this makes yet more progress towards removing
fmt->tmp and sfio. Related to #1998.

3 years agoremove the use of an sfio temporary buffer in expr’s qualify
Matthew Fernandez [Sun, 8 Aug 2021 22:39:38 +0000 (15:39 -0700)]
remove the use of an sfio temporary buffer in expr’s qualify

We can simply use regular malloc for this short-lived allocation. Related to
#1998.

3 years agoremove fallback "%?%K" strftime format in expr’s printf
Matthew Fernandez [Sun, 8 Aug 2021 22:20:11 +0000 (15:20 -0700)]
remove fallback "%?%K" strftime format in expr’s printf

lib/expr’s printf implementation supports a "%t" format code to print a time. If
no format is provided for this, it would fallback to a default of "%?%K".

While working on #1998, one of my intermediate refactorings moved this string
literal into the actual call to strftime. At this point the compiler politely
interjected that neither "%?" nor "%K" are format strings understood by
strftime. So it seems this results in an invalid call to strftime.

To deal with this, we now throw an error when this function is called with no
format string instead of making an invalid strftime call.

3 years agoMerge branch 'add-svg-analyzer' into 'main'
Magnus Jacobsson [Thu, 12 Aug 2021 08:24:44 +0000 (08:24 +0000)]
Merge branch 'add-svg-analyzer' into 'main'

Add an SVG analyzer and use it in the C++ tests

See merge request graphviz/graphviz!2087

3 years agoadd a few first tests of the rendered SVG
Magnus Jacobsson [Thu, 8 Apr 2021 20:51:26 +0000 (22:51 +0200)]
add a few first tests of the rendered SVG

3 years agoadd a very basic SVG analyzer based on SVG++
Magnus Jacobsson [Thu, 8 Apr 2021 20:51:26 +0000 (22:51 +0200)]
add a very basic SVG analyzer based on SVG++

3 years agoadd the RapidXml library as a test dependency
Magnus Jacobsson [Mon, 9 Aug 2021 10:24:56 +0000 (12:24 +0200)]
add the RapidXml library as a test dependency

3 years agoadd the SVG++ library as a test dependency
Magnus Jacobsson [Mon, 5 Jul 2021 11:27:48 +0000 (13:27 +0200)]
add the SVG++ library as a test dependency

3 years agoadd the Boost library as a test dependency
Magnus Jacobsson [Mon, 9 Aug 2021 10:25:08 +0000 (12:25 +0200)]
add the Boost library as a test dependency

3 years agoMerge branch 'smattr/0d0a4b9b-fa49-4682-ba70-cfff5fb32a13' into 'main'
Matthew Fernandez [Tue, 10 Aug 2021 15:44:15 +0000 (15:44 +0000)]
Merge branch 'smattr/0d0a4b9b-fa49-4682-ba70-cfff5fb32a13' into 'main'

move pathexists.c

See merge request graphviz/graphviz!2085

3 years agoremove now-unused pathexists.c
Matthew Fernandez [Wed, 4 Aug 2021 04:23:13 +0000 (21:23 -0700)]
remove now-unused pathexists.c

The caching done by this function is no longer necessary. All usages of it have
been refactored to use standard library functionality which does caching at the
operating system level.

3 years agopathpath: replace PATH_REGULAR pathexists call with a stat.
Matthew Fernandez [Wed, 4 Aug 2021 04:15:51 +0000 (21:15 -0700)]
pathpath: replace PATH_REGULAR pathexists call with a stat.

This effectively inlines and simplifies the call to pathexists that previously
existed. The caching pathexists does is no longer relevant. An improved version
of this is provided by a modern operating system’s buffer cache.

3 years agopathpath: replace PATH_EXECUTE pathexists call with X_OK access call
Matthew Fernandez [Wed, 4 Aug 2021 04:09:34 +0000 (21:09 -0700)]
pathpath: replace PATH_EXECUTE pathexists call with X_OK access call

This is equivalent and relies solely on standard library functionality. This
effectively inlines and simplifies the call to pathexists that previously
existed. The caching pathexists does is no longer relevant. An improved version
of this is provided by a modern operating system’s buffer cache.

3 years agopathpath: remove 'a' parameter
Matthew Fernandez [Wed, 4 Aug 2021 04:00:42 +0000 (21:00 -0700)]
pathpath: remove 'a' parameter

This function is only ever called with a=="". There is probably more
simplification possible within pathpath, but the logic is convoluted. Better to
unwind this mess in a separate commit.

3 years agopathpath: remove mode parameter
Matthew Fernandez [Wed, 4 Aug 2021 03:54:14 +0000 (20:54 -0700)]
pathpath: remove mode parameter

This function is only ever called with PATH_REGULAR.

3 years agoMerge branch 'fix-ctest' into 'main'
Magnus Jacobsson [Tue, 10 Aug 2021 04:50:28 +0000 (04:50 +0000)]
Merge branch 'fix-ctest' into 'main'

fix a broken C++ test case and the reason that the failure was undetected in CI

See merge request graphviz/graphviz!2091

3 years agofix multiple layout test case using rvalue refs
Magnus Jacobsson [Mon, 9 Aug 2021 17:41:35 +0000 (19:41 +0200)]
fix multiple layout test case using rvalue refs

The first layout of a graph must be destroyed before a second layout
is created.

This failure went undetected in CI since no test programs ran, which
in turn was caused by not archiving the test programs or the
CTestTestfile.cmake files in the preceding build job.

The error message was:

-------------------------------------------------------------------------------
Multiple layouts of the same graph can use different contexts passed as rvalue
refs
-------------------------------------------------------------------------------
../tests/test_GVLayout_construction.cpp:139
...............................................................................

../tests/test_GVLayout_construction.cpp:139: FAILED:
due to unexpected exception with message:
  Previous layout not yet destroyed

3 years agofix CTestTestfile.cmake files not archived
Magnus Jacobsson [Mon, 9 Aug 2021 17:25:09 +0000 (19:25 +0200)]
fix CTestTestfile.cmake files not archived

No CTestTestfile.cmake files were archived in the build job that
created them, which had the effect that the suceeding test job
silently did not find any ctest tests.

3 years agofix C++ test programs not archived
Magnus Jacobsson [Mon, 9 Aug 2021 17:25:09 +0000 (19:25 +0200)]
fix C++ test programs not archived

No C++ test programs were archived in the build job that built them,
which had the effect that the suceeding test job silently did not run
any.

3 years agoMerge branch 'smattr/248235f2-06a2-400f-adad-66d935359f86' into 'main'
Matthew Fernandez [Sun, 8 Aug 2021 18:30:50 +0000 (18:30 +0000)]
Merge branch 'smattr/248235f2-06a2-400f-adad-66d935359f86' into 'main'

more compiler warning squashing

See merge request graphviz/graphviz!2084

3 years agopathgetlink: use a ssize_t locally, squashing -Wsign-conversion warnings
Matthew Fernandez [Wed, 4 Aug 2021 03:31:38 +0000 (20:31 -0700)]
pathgetlink: use a ssize_t locally, squashing -Wsign-conversion warnings

The type of the local used now matches the return type of readlink. This avoids
several compiler warnings. pathgetlink.c now builds warning-free on Linux.

3 years agopathgetlink: return a size_t and SIZE_MAX for an error value
Matthew Fernandez [Wed, 4 Aug 2021 03:23:45 +0000 (20:23 -0700)]
pathgetlink: return a size_t and SIZE_MAX for an error value

This will permit some upcoming changes to remove some compiler warnings.

3 years agopathcanon: avoid reusing `dots` variable for unrelated values
Matthew Fernandez [Wed, 4 Aug 2021 03:10:07 +0000 (20:10 -0700)]
pathcanon: avoid reusing `dots` variable for unrelated values

This branch reuses the `dots` variable, previously used for counting the number
of periods in the path, for storing the result of symlink resolution. This is
unnecessary (`dots` is immediately overwritten with the value 4 after this), and
is getting in the way of cleaning up some compiler warnings in this area.

3 years agopathgetlink: accept a size_t size to avoid -Wsign-conversion warnings
Matthew Fernandez [Wed, 4 Aug 2021 02:56:53 +0000 (19:56 -0700)]
pathgetlink: accept a size_t size to avoid -Wsign-conversion warnings

3 years agoremove unnecessary #include
Matthew Fernandez [Wed, 4 Aug 2021 02:56:18 +0000 (19:56 -0700)]
remove unnecessary #include

It is unnecessary to include stddef.h when stdlib.h is included.

3 years agosquash -Wmissing-prototypes warnings for pathgetlink
Matthew Fernandez [Wed, 4 Aug 2021 02:53:21 +0000 (19:53 -0700)]
squash -Wmissing-prototypes warnings for pathgetlink

3 years agoremove unnecessary ifdef sun guard
Matthew Fernandez [Wed, 4 Aug 2021 02:49:04 +0000 (19:49 -0700)]
remove unnecessary ifdef sun guard

Graphviz is compiled with C99, where string.h is always available and safe to
include.

3 years agoremove UNIV_MAX-guarded code
Matthew Fernandez [Wed, 4 Aug 2021 02:46:59 +0000 (19:46 -0700)]
remove UNIV_MAX-guarded code

Nothing in the build systems define this.

3 years agosquash -Wundef warnings for _DEBUG_MATCH
Matthew Fernandez [Wed, 4 Aug 2021 02:43:29 +0000 (19:43 -0700)]
squash -Wundef warnings for _DEBUG_MATCH

3 years agoMerge branch 'add-GVLayout-construction-overloads-using-rvalue-refs' into 'main'
Magnus Jacobsson [Sun, 8 Aug 2021 04:56:31 +0000 (04:56 +0000)]
Merge branch 'add-GVLayout-construction-overloads-using-rvalue-refs' into 'main'

Add GVLayout construction overloads to the C++ API

See merge request graphviz/graphviz!2086

3 years agoadd test of multiple GVLayout constructions of the same graph using different context...
Magnus Jacobsson [Wed, 7 Jul 2021 13:56:05 +0000 (15:56 +0200)]
add test of multiple GVLayout constructions of the same graph using different contexts passed as rvalue refs

3 years agoadd GVLayout construction overload, passing the context as an rvalue ref
Magnus Jacobsson [Wed, 7 Jul 2021 13:55:08 +0000 (15:55 +0200)]
add GVLayout construction overload, passing the context as an rvalue ref

3 years agoadd test of multiple GVLayout constructions of different graphs passed as rvalue...
Magnus Jacobsson [Wed, 7 Jul 2021 13:36:51 +0000 (15:36 +0200)]
add test of multiple GVLayout constructions of different graphs passed as rvalue refs using the same context

3 years agoadd GVLayout construction overload, passing the graph as an rvalue ref
Magnus Jacobsson [Wed, 7 Jul 2021 13:35:52 +0000 (15:35 +0200)]
add GVLayout construction overload, passing the graph as an rvalue ref

3 years agoadd test of GVLayout construction overload, passing the context and the graph as...
Magnus Jacobsson [Wed, 7 Jul 2021 12:17:43 +0000 (14:17 +0200)]
add test of GVLayout construction overload, passing the context and the graph as rvalue refs

3 years agoadd GVLayout constructor overload, passing the context and the graph as rvalue refs
Magnus Jacobsson [Wed, 7 Jul 2021 12:17:43 +0000 (14:17 +0200)]
add GVLayout constructor overload, passing the context and the graph as rvalue refs

3 years agoMerge branch 'add-cpp-api' into 'main'
Magnus Jacobsson [Sat, 7 Aug 2021 06:49:46 +0000 (06:49 +0000)]
Merge branch 'add-cpp-api' into 'main'

Add a very basic C++ API

Closes #2001

See merge request graphviz/graphviz!2058