]> granicus.if.org Git - graphviz/log
graphviz
22 months agoMerge branch 'smattr/gitlab-1311' into 'main'
Matthew Fernandez [Sun, 29 Jan 2023 16:18:46 +0000 (16:18 +0000)]
Merge branch 'smattr/gitlab-1311' into 'main'

fix: exit when erroring during HTML lexing

Closes #1311

See merge request graphviz/graphviz!3072

22 months agofix: exit when erroring during HTML lexing
Matthew Fernandez [Sat, 28 Jan 2023 19:10:08 +0000 (11:10 -0800)]
fix: exit when erroring during HTML lexing

Labels can be either plain text or HTML-like labels (`<`, `>` delimited). When
parsing an HTML-like label, the lexer would return the same result for a warning
or an error. This meant the caller would attempt to fallback to a plain text
label in either case. But when the HTML lexer has errored, the input has been
determined unparseable. Falling back to parsing a plain text label is unlikely
to work, and even if it does it produces something that is certainly not what
the user intended. In most scenarios, this fallback behavior would go onto to
crash messily, now that labels were populated with garbage data.

This change simply teaches the calling code to notice the error and exit instead
of falling back. Exiting from within library code like this is not particularly
clean or desirable, but there is no easy elegant error path from this code.

Gitlab: fixes #1311
Reported-by: Google Autofuzz project
22 months agoMerge branch 'smattr/gitlab-510' into 'main'
Matthew Fernandez [Sun, 29 Jan 2023 15:29:30 +0000 (15:29 +0000)]
Merge branch 'smattr/gitlab-510' into 'main'

support an alpha channel when parsing HSV colors

Closes #510

See merge request graphviz/graphviz!3073

22 months agocommon colorxlate: replace a long lived buffer with an agxbuf
Matthew Fernandez [Sun, 29 Jan 2023 01:39:17 +0000 (17:39 -0800)]
common colorxlate: replace a long lived buffer with an agxbuf

This is not performance sensitive code. Using an agxbuf makes this logic clearer
and less error prone.

22 months agogvpr colorxlate: use a char for 'c'
Matthew Fernandez [Sun, 29 Jan 2023 01:39:17 +0000 (17:39 -0800)]
gvpr colorxlate: use a char for 'c'

Similar to the previous commit, this allows dropping some casts.

22 months agogvpr colorxlate: use a char pointer for 'p'
Matthew Fernandez [Sun, 29 Jan 2023 01:39:17 +0000 (17:39 -0800)]
gvpr colorxlate: use a char pointer for 'p'

It is not clear why this was an `unsigned char*`. Nothing in this function
relies on unsigned semantics. Making it a `const char*` allows dropping various
casts.

22 months agogvpr colorxlate: replace a long lived buffer with an agxbuf
Matthew Fernandez [Sun, 29 Jan 2023 01:39:17 +0000 (17:39 -0800)]
gvpr colorxlate: replace a long lived buffer with an agxbuf

This is not performance sensitive code. Using an agxbuf makes this logic clearer
and less error prone.

22 months agogvpr: remove unnecessary 'agxbinit' calls
Matthew Fernandez [Sun, 29 Jan 2023 01:29:46 +0000 (17:29 -0800)]
gvpr: remove unnecessary 'agxbinit' calls

Zero-initialization already does this work.

22 months agosupport an alpha channel when parsing HSV colors
Matthew Fernandez [Sun, 29 Jan 2023 01:26:44 +0000 (17:26 -0800)]
support an alpha channel when parsing HSV colors

Mysteriously c4205c6e132efe64f23211fe885ff37209bc6ac0 implemented this, but only
for GVPR programs. As a result, full HSVA colors could be used in GVPR programs
but specifying an HSVA color in DOT required manually translating the color to
RGBA.

This change aligns DOT color parsing with how GVPR color parsing works.

Gitlab: closes #510
Reported-by: Ryan Schmidt <gitlab@ryandesign.com>
22 months agoadd a test case for HSV with an alpha channel
Matthew Fernandez [Sun, 29 Jan 2023 01:18:51 +0000 (17:18 -0800)]
add a test case for HSV with an alpha channel

Gitlab: #510

22 months agoMerge remote-tracking branch 'refs/remotes/origin/main'
Stephen C North [Sat, 28 Jan 2023 21:40:14 +0000 (16:40 -0500)]
Merge remote-tracking branch 'refs/remotes/origin/main'

22 months agoEdit comments on support.
Stephen C North [Sat, 28 Jan 2023 21:34:51 +0000 (16:34 -0500)]
Edit comments on support.

22 months agoMerge branch 'smattr/879a891d-9d2b-4d71-921b-e53151dd180d' into 'main'
Matthew Fernandez [Sat, 28 Jan 2023 07:39:15 +0000 (07:39 +0000)]
Merge branch 'smattr/879a891d-9d2b-4d71-921b-e53151dd180d' into 'main'

graphml2gv, gv2gxl: 'sprintf' replacement and bug fixing

See merge request graphviz/graphviz!3066

22 months agogv2gxl createNodeId: replace char buffer with an agxbuf
Matthew Fernandez [Sun, 22 Jan 2023 18:57:40 +0000 (10:57 -0800)]
gv2gxl createNodeId: replace char buffer with an agxbuf

This removes an assumption that `SMALLBUF` is large enough to fit the printed
string. Performance should be unaffected as agxbuf can store a string of the
length printed here inline.

Gitlab: related to #1950

22 months agogv2gxl createGraphId: replace char buffer with an agxbuf
Matthew Fernandez [Sun, 22 Jan 2023 18:57:40 +0000 (10:57 -0800)]
gv2gxl createGraphId: replace char buffer with an agxbuf

This removes an assumption that `SMALLBUF` is large enough to fit the printed
string. Performance should be unaffected as agxbuf can store a string of the
length printed here inline.

Gitlab: related to #1950

22 months agogv2gxl: abbreviate some open coded 'startswith'
Matthew Fernandez [Sun, 22 Jan 2023 18:52:51 +0000 (10:52 -0800)]
gv2gxl: abbreviate some open coded 'startswith'

22 months agogv2gxl: remove unused 'GXL_ATTR_LEN'
Matthew Fernandez [Sun, 22 Jan 2023 18:50:50 +0000 (10:50 -0800)]
gv2gxl: remove unused 'GXL_ATTR_LEN'

This has never been used.

22 months agogv2gxl writeHdr: fix memory leak
Matthew Fernandez [Sun, 22 Jan 2023 18:48:50 +0000 (10:48 -0800)]
gv2gxl writeHdr: fix memory leak

Gitlab: #1950

22 months agogv2gxl writeHdr: fix use after free
Matthew Fernandez [Sun, 22 Jan 2023 18:43:41 +0000 (10:43 -0800)]
gv2gxl writeHdr: fix use after free

This call to `free` looked like it was deallocating the earlier allocation
within this function. But at this point `bp` points to the return value of a
call to `addid`. This return value is a `name` member of an item stored in the
`idList` dictionary that is still in use.

The original allocated memory of `bp` was and still is leaked.

22 months agogv2gxl createEdgeId: use an agxbuf to avoid 'sprintf'
Matthew Fernandez [Sun, 22 Jan 2023 18:34:31 +0000 (10:34 -0800)]
gv2gxl createEdgeId: use an agxbuf to avoid 'sprintf'

This leads to clearer and less error prone code.

Gitlab: #1950

22 months agographml2gv nameOf: use an agxbuf instead of raw char buffer for names
Matthew Fernandez [Sun, 15 Jan 2023 22:13:19 +0000 (14:13 -0800)]
graphml2gv nameOf: use an agxbuf instead of raw char buffer for names

This leads to slightly simpler code and fewer things to worry about. Tihs is the
equivalent of cd2f8dfd34d4a4ddae1bb94b72098c05d73cfd4e.

Gitlab: #1950

22 months agoMerge branch 'gts_link_libs' into 'main'
Matthew Fernandez [Fri, 27 Jan 2023 01:04:18 +0000 (01:04 +0000)]
Merge branch 'gts_link_libs' into 'main'

GTS Support: s/GTS_LIBRARIES/GTS_LINK_LIBRARIES/g

See merge request graphviz/graphviz!3067

22 months agoGTS Support: s/GTS_LIBRARIES/GTS_LINK_LIBRARIES/g
Nehal J Wani [Sun, 22 Jan 2023 13:00:34 +0000 (13:00 +0000)]
GTS Support: s/GTS_LIBRARIES/GTS_LINK_LIBRARIES/g

The argument to target_link_libraries() in lib/neatogen/CMakeLists.txt
uses GTS_LINK_LIBRARIES, not GTS_LIBRARIES

The FindGTS module was added in commit cef299eb
The issue was found while building Graphviz on Windows with GTS

22 months agoMerge branch 'smattr/540f82d6-7f1c-4304-82d9-7a4f002c85e7' into 'main'
Matthew Fernandez [Thu, 26 Jan 2023 04:09:23 +0000 (04:09 +0000)]
Merge branch 'smattr/540f82d6-7f1c-4304-82d9-7a4f002c85e7' into 'main'

remove legacy Dotty, Lefty, Lneato files

See merge request graphviz/graphviz!3065

22 months agoremove dead links to Dotty, Lefty, Lneato man page PDFs
Matthew Fernandez [Sun, 22 Jan 2023 00:56:34 +0000 (16:56 -0800)]
remove dead links to Dotty, Lefty, Lneato man page PDFs

The code that generates these files was removed in
b2f287ca315dd5bf689d9ce2ca71dbfe63fb8a61.

22 months agoremove man page references to Dotty
Matthew Fernandez [Sun, 22 Jan 2023 00:41:42 +0000 (16:41 -0800)]
remove man page references to Dotty

Dotty was removed in b2f287ca315dd5bf689d9ce2ca71dbfe63fb8a61.

22 months agoremove lefty-grace contrib tool
Matthew Fernandez [Sun, 22 Jan 2023 00:41:42 +0000 (16:41 -0800)]
remove lefty-grace contrib tool

This tool was an enhancement to Lefty that was removed in
b2f287ca315dd5bf689d9ce2ca71dbfe63fb8a61.

22 months agoremove legacy Dotty docs
Matthew Fernandez [Sun, 22 Jan 2023 00:41:42 +0000 (16:41 -0800)]
remove legacy Dotty docs

Dotty was removed in b2f287ca315dd5bf689d9ce2ca71dbfe63fb8a61.

22 months agoremove legacy Lneato Windows files
Matthew Fernandez [Sun, 22 Jan 2023 00:41:42 +0000 (16:41 -0800)]
remove legacy Lneato Windows files

Lneato was removed in b2f287ca315dd5bf689d9ce2ca71dbfe63fb8a61.

22 months agoremove legacy Dotty Windows files
Matthew Fernandez [Sun, 22 Jan 2023 00:41:42 +0000 (16:41 -0800)]
remove legacy Dotty Windows files

Dotty was removed in b2f287ca315dd5bf689d9ce2ca71dbfe63fb8a61.

22 months agoremove legacy Lefty Windows files
Matthew Fernandez [Sun, 22 Jan 2023 00:41:42 +0000 (16:41 -0800)]
remove legacy Lefty Windows files

Lefty was removed in b2f287ca315dd5bf689d9ce2ca71dbfe63fb8a61.

22 months agoremove legacy Lefty docs
Matthew Fernandez [Sun, 22 Jan 2023 00:41:42 +0000 (16:41 -0800)]
remove legacy Lefty docs

Lefty was removed in b2f287ca315dd5bf689d9ce2ca71dbfe63fb8a61.

22 months agoMerge branch 'smattr/gitlab-799' into 'main'
Matthew Fernandez [Thu, 26 Jan 2023 02:37:23 +0000 (02:37 +0000)]
Merge branch 'smattr/gitlab-799' into 'main'

remove VML output renderer

Closes #799

See merge request graphviz/graphviz!3064

22 months agoremove VML output renderer
Matthew Fernandez [Sun, 22 Jan 2023 01:04:06 +0000 (17:04 -0800)]
remove VML output renderer

Gitlab: closes #799

23 months agoMerge branch 'libgd_cmake' into 'main'
Matthew Fernandez [Mon, 23 Jan 2023 17:07:14 +0000 (17:07 +0000)]
Merge branch 'libgd_cmake' into 'main'

CMake: Similar to 3fcf0968, use gdlib.pc if available

See merge request graphviz/graphviz!3044

23 months agoCMake: Similar to 3fcf0968, use gdlib.pc if available
Nehal J Wani [Mon, 2 Jan 2023 14:04:33 +0000 (14:04 +0000)]
CMake: Similar to 3fcf0968, use gdlib.pc if available

The gdlib-config program is no longer installed with the newer versions
of the library as it is deprecated. The CMake build on CI for Fedora
prints the following, which is no longer the case with this patch:

   CMake Warning at cmake/FindGD.cmake:63 (message):
     gdlib-config not found; skipping feature checks
   Call Stack (most recent call first):
     contrib/diffimg/CMakeLists.txt:1 (find_package)

xref: https://github.com/libgd/libgd/issues/376#issuecomment-276138975

Edits from Matthew Fernandez:
 - Wrap CMake line
 - Adjust #1786 work arounds

Gitlab: #1786

23 months agoCI: suppress leak checks for libfontconfig
Nehal J Wani [Sun, 15 Jan 2023 01:52:03 +0000 (01:52 +0000)]
CI: suppress leak checks for libfontconfig

For posterity, the reported leak is:
  =================================================================
  ==14034==ERROR: LeakSanitizer: detected memory leaks

  Direct leak of 256 byte(s) in 1 object(s) allocated from:
      #0 0x7ff0354c190f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
      #1 0x7ff03523e61f in FcPatternObjectInsertElt /root/fontconfig/src/fcpat.c:525
      #2 0x7ff035240846 in FcPatternObjectAddWithBinding /root/fontconfig/src/fcpat.c:711
      #3 0x7ff035245970 in FcPatternAppend /root/fontconfig/src/fcpat.c:1262
      #4 0x7ff035270c77 in FcParsePattern /root/fontconfig/src/fcxml.c:3110
      #5 0x7ff035271292 in FcEndElement /root/fontconfig/src/fcxml.c:3236
      #6 0x7ff02b099354  (/lib/x86_64-linux-gnu/libxml2.so.2+0x17d354)

  Indirect leak of 32 byte(s) in 1 object(s) allocated from:
      #0 0x7ff0354c12d7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
      #1 0x7ff035239d8b in FcValueListCreate /root/fontconfig/src/fcpat.c:136
      #2 0x7ff035240433 in FcPatternObjectAddWithBinding /root/fontconfig/src/fcpat.c:687
      #3 0x7ff035245970 in FcPatternAppend /root/fontconfig/src/fcpat.c:1262
      #4 0x7ff035270c77 in FcParsePattern /root/fontconfig/src/fcxml.c:3110
      #5 0x7ff035271292 in FcEndElement /root/fontconfig/src/fcxml.c:3236
      #6 0x7ff02b099354  (/lib/x86_64-linux-gnu/libxml2.so.2+0x17d354)

  SUMMARY: AddressSanitizer: 288 byte(s) leaked in 2 allocation(s).

xref: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/295#note_1033797

23 months agoMerge branch 'smattr/gitlab-2344' into 'main'
Matthew Fernandez [Sun, 22 Jan 2023 03:29:31 +0000 (03:29 +0000)]
Merge branch 'smattr/gitlab-2344' into 'main'

gv2gxl, gxl2gv: fix mode detection on Windows

Closes #2344

See merge request graphviz/graphviz!3058

23 months agogv2gxl, gxl2gv: fix mode detection on Windows
Matthew Fernandez [Wed, 18 Jan 2023 04:24:56 +0000 (20:24 -0800)]
gv2gxl, gxl2gv: fix mode detection on Windows

Gitlab: fixes #2344

23 months agouse 'which' when accessing gv2gxl, gxl2gv in the test suite
Matthew Fernandez [Mon, 16 Jan 2023 03:24:30 +0000 (19:24 -0800)]
use 'which' when accessing gv2gxl, gxl2gv in the test suite

When running the Graphviz test suite on an installation that was built without
some optional components, calls to these missing components can incorrectly
resolve to those from a prior Graphviz installation that happens to be in your
`$PATH`. This issue was partly addressed in
515c86a923601db5cb704da93046800df7da030a. This change takes things further,
ensuring that invocations of `gv2gxl` and `gxl2gv` also land on the right
version under test.

This requires temporarily xfailing the test due to an unrelated issue with these
tools.

Gitlab: #2201, #2344

23 months agoMerge branch 'smattr/a1b8e698-f7ad-4b30-a48b-c30ea6f334e0' into 'main'
Matthew Fernandez [Sun, 22 Jan 2023 02:18:25 +0000 (02:18 +0000)]
Merge branch 'smattr/a1b8e698-f7ad-4b30-a48b-c30ea6f334e0' into 'main'

some extended guidance on testing

See merge request graphviz/graphviz!3057

23 months agofix typo in test assertion message
Matthew Fernandez [Mon, 16 Jan 2023 03:15:54 +0000 (19:15 -0800)]
fix typo in test assertion message

This looks to have been a mistake in 74238e979cecadf64e67c6f5bb822eae88278de0.

23 months agoextend documentation on Graphviz testing
Matthew Fernandez [Mon, 16 Jan 2023 03:08:12 +0000 (19:08 -0800)]
extend documentation on Graphviz testing

23 months agoglcomp: remove 'DEFAULT_GLUT_FONT'
Matthew Fernandez [Mon, 16 Jan 2023 00:50:44 +0000 (16:50 -0800)]
glcomp: remove 'DEFAULT_GLUT_FONT'

The last use of this was removed in 46d9ed13a72f626a8c59ca119868e8755210d2e7.

23 months agoMerge branch 'smattr/5821b3b1-1f91-487f-85cf-2fcdffdfc033' into 'main'
Matthew Fernandez [Sun, 22 Jan 2023 01:21:38 +0000 (01:21 +0000)]
Merge branch 'smattr/5821b3b1-1f91-487f-85cf-2fcdffdfc033' into 'main'

mingle, neatogen compiler warning squashing

See merge request graphviz/graphviz!3059

23 months agoneatogen: make 'overlap_scaling' static
Matthew Fernandez [Wed, 18 Jan 2023 16:38:39 +0000 (08:38 -0800)]
neatogen: make 'overlap_scaling' static

This function is unused outside of its containing file.

23 months agoneatogen overlap.c: squash some -Wunused-parameter warnings
Matthew Fernandez [Wed, 18 Jan 2023 16:34:52 +0000 (08:34 -0800)]
neatogen overlap.c: squash some -Wunused-parameter warnings

These functions are used as callbacks, so cannot easily have their parameters
removed.

23 months agoneatogen: squash a -Wundef warning for 'DEBUG'
Matthew Fernandez [Wed, 18 Jan 2023 16:33:01 +0000 (08:33 -0800)]
neatogen: squash a -Wundef warning for 'DEBUG'

23 months agoneatogen compute_new_weights: remove redundant zeroing
Matthew Fernandez [Wed, 18 Jan 2023 16:30:16 +0000 (08:30 -0800)]
neatogen compute_new_weights: remove redundant zeroing

The `gv_calloc` allocation does this for us.

23 months agoneatogen common_neighbors: fix comment typo
Matthew Fernandez [Wed, 18 Jan 2023 16:30:02 +0000 (08:30 -0800)]
neatogen common_neighbors: fix comment typo

23 months agoneatogen common_neighbors: remove unused 'v' parameter
Matthew Fernandez [Wed, 18 Jan 2023 16:29:46 +0000 (08:29 -0800)]
neatogen common_neighbors: remove unused 'v' parameter

23 months agomingle nearest_neighbor_graph: squash warnings when building without libANN
Matthew Fernandez [Wed, 18 Jan 2023 16:24:45 +0000 (08:24 -0800)]
mingle nearest_neighbor_graph: squash warnings when building without libANN

23 months agomingle nearest_neighbor_graph: fix typo in parameter name
Matthew Fernandez [Wed, 18 Jan 2023 16:24:14 +0000 (08:24 -0800)]
mingle nearest_neighbor_graph: fix typo in parameter name

23 months agomingle edge_bundling: squash compilation warnings when building without libANN
Matthew Fernandez [Wed, 18 Jan 2023 16:22:35 +0000 (08:22 -0800)]
mingle edge_bundling: squash compilation warnings when building without libANN

23 months agoMerge branch 'smattr/gitlab-2338' into 'main'
Matthew Fernandez [Sun, 22 Jan 2023 00:16:51 +0000 (00:16 +0000)]
Merge branch 'smattr/gitlab-2338' into 'main'

sfio: make 'Sfio_t' definition entirely internal

Closes #2338

See merge request graphviz/graphviz!3060

23 months agosfio: make 'Sfio_t' definition entirely internal
Matthew Fernandez [Thu, 19 Jan 2023 16:24:02 +0000 (08:24 -0800)]
sfio: make 'Sfio_t' definition entirely internal

The definition of `Sfio_t` was structured to give it a public part and a private
part:

  struct _sfio_s {
    … public members …

    _SFIO_PRIVATE; // ← only visible if sfio_t.h is included
  };

This works only as long as no user ever allocates a `Sfio_t` themselves. If they
do, they will allocate too few bytes, based on their view of the size of
`Sfio_t` missing its private members.

A side effect of link-time optimization is that the compiler can see through
this trickery and witness both with-private and without-private definitions at
once. Creating objects of this type or pointers to objects of this type is a
violation of C’s strict aliasing rule and the compiler can now see this. This
can cause the compiler to make unsafe optimizations, like concluding any code
involving `Sfio_t*` variables must be unreachable.

The safer way to do a public/private class like this is with two structs, the
private one containing the public one as a member:

  struct foo_public {
    … public members …
  };

  struct foo_private {
    struct foo_public *public;

    … private members …
  };

Public API functions then accept `struct foo_public*` parameters and internally
convert them to `struct foo_private*` variables in order to access the
internals:

  int foo_do_something(struct foo_public *foo) {
    // use something like the Linux kernel’s container_of
    struct foo_private *f = container_of(foo, public);
    …
  }

But instead of this, we can observe that the definition of `Sfio_t` does not
need to have any public members at all, and we can make the entire type private.
We need an exception for libexpr which reaches into sfio internals.

Gitlab: fixes #2338

23 months agosfio: remove macro implementations of character functions
Matthew Fernandez [Thu, 19 Jan 2023 16:17:29 +0000 (08:17 -0800)]
sfio: remove macro implementations of character functions

These were implemented as an optimization to allow inlining. This is no longer
necessary on contemporary compilers with link-time optimization. Removing them
will unblock fixing some strict aliasing problems with the `Sfio_t` type.

Gitlab: #2338

23 months agosfio: fix missing SFIO components
Matthew Fernandez [Thu, 19 Jan 2023 16:13:22 +0000 (08:13 -0800)]
sfio: fix missing SFIO components

These are present in the Autotools build system as a separate library, libsfiof,
linked into libsfio. They are also present in the MS Build build system inlined
into libsfio itself. This change copies the MS Build approach.

This did not cause problems because these sources only exist as fallback
implementations for functions that are also implemented as macros. All current
usages see the macro definitions so never call these functions.

Fixing this will allow removing the macro versions in an upcoming change.

23 months agosfio: remove some open coded nulls
Matthew Fernandez [Thu, 19 Jan 2023 15:59:51 +0000 (07:59 -0800)]
sfio: remove some open coded nulls

23 months agoMerge branch 'smattr/9a877cda-3948-40d1-8ddf-64d09bc05660' into 'main'
Matthew Fernandez [Sat, 21 Jan 2023 22:34:15 +0000 (22:34 +0000)]
Merge branch 'smattr/9a877cda-3948-40d1-8ddf-64d09bc05660' into 'main'

smyrna, gvmap warning squashing

See merge request graphviz/graphviz!3061

23 months agogvmap plot_dot_polygons: use a 'size_t' for 'maxlen'
Matthew Fernandez [Fri, 20 Jan 2023 16:25:15 +0000 (08:25 -0800)]
gvmap plot_dot_polygons: use a 'size_t' for 'maxlen'

Squashes some -Wsign-conversion warnings.

23 months agogvmap make_map_internal: remove shadowing of 'nz' local
Matthew Fernandez [Fri, 20 Jan 2023 16:10:23 +0000 (08:10 -0800)]
gvmap make_map_internal: remove shadowing of 'nz' local

23 months agogvmap make_map_internal: operate directly on 'xcombined' instead of 'xtemp'
Matthew Fernandez [Fri, 20 Jan 2023 16:05:58 +0000 (08:05 -0800)]
gvmap make_map_internal: operate directly on 'xcombined' instead of 'xtemp'

Nothing appears to alias `xcombined` within this block. So we can save an
intermediate allocation and the cost of data movement by simply writing results
into their final destination.

23 months agogvmap get_polygon_solids: remove unused 'x_poly' parameter
Matthew Fernandez [Fri, 20 Jan 2023 15:59:32 +0000 (07:59 -0800)]
gvmap get_polygon_solids: remove unused 'x_poly' parameter

23 months agosmyrna on_txtAttr_changed: squash -Wunused-parameter warning
Matthew Fernandez [Fri, 20 Jan 2023 15:55:00 +0000 (07:55 -0800)]
smyrna on_txtAttr_changed: squash -Wunused-parameter warning

This function is used as a callback, so the parameter cannot easily be removed.

23 months agoMerge branch 'smattr/48b6e6c6-75e1-4359-a9d7-eed440bfcf03' into 'main'
Matthew Fernandez [Sat, 21 Jan 2023 21:42:38 +0000 (21:42 +0000)]
Merge branch 'smattr/48b6e6c6-75e1-4359-a9d7-eed440bfcf03' into 'main'

gvrender_core_pic.c: Distinguish between PIC and troff comments

Closes #2341

See merge request graphviz/graphviz!3063

23 months agoadd a changelog entry for the prior fix
Matthew Fernandez [Sat, 21 Jan 2023 19:30:41 +0000 (11:30 -0800)]
add a changelog entry for the prior fix

Gitlab: fixes #2341
Reported-by: Philip Kaludercic <philipk@posteo.net>
23 months agogvrender_core_pic.c: Distinguish between PIC and troff comments
Philip Kaludercic [Tue, 10 Jan 2023 23:31:13 +0000 (00:31 +0100)]
gvrender_core_pic.c: Distinguish between PIC and troff comments

23 months agoadd a test case for #2341
Matthew Fernandez [Sat, 21 Jan 2023 19:23:40 +0000 (11:23 -0800)]
add a test case for #2341

23 months agoMerge branch 'smattr/f05e3fc0-e087-4e7c-b988-577ed0336677' into 'main'
Matthew Fernandez [Sat, 21 Jan 2023 20:49:02 +0000 (20:49 +0000)]
Merge branch 'smattr/f05e3fc0-e087-4e7c-b988-577ed0336677' into 'main'

Start 7.1.1 development

See merge request graphviz/graphviz!3062

23 months agoStart 7.1.1 development
Matthew Fernandez [Sat, 21 Jan 2023 19:58:26 +0000 (11:58 -0800)]
Start 7.1.1 development

23 months agoMerge branch 'smattr/68782f21-a0fd-4857-b70a-1ce1504a5446' into 'main'
Matthew Fernandez [Sat, 21 Jan 2023 19:56:31 +0000 (19:56 +0000)]
Merge branch 'smattr/68782f21-a0fd-4857-b70a-1ce1504a5446' into 'main'

Stable release 7.1.0

See merge request graphviz/graphviz!3055

23 months agoStable Release 7.1.0
Matthew Fernandez [Sun, 15 Jan 2023 22:49:28 +0000 (14:49 -0800)]
Stable Release 7.1.0

23 months agobump minor version number for the addition of '--help', '--version'
Matthew Fernandez [Sun, 15 Jan 2023 22:47:50 +0000 (14:47 -0800)]
bump minor version number for the addition of '--help', '--version'

23 months agoMerge branch 're-enable-cygwin' into 'main'
Magnus Jacobsson [Sat, 21 Jan 2023 15:29:43 +0000 (15:29 +0000)]
Merge branch 're-enable-cygwin' into 'main'

Revert "CI: disable Cygwin jobs"

Closes #2329

See merge request graphviz/graphviz!3054

23 months agoRevert "CI: disable Cygwin jobs"
Magnus Jacobsson [Sun, 15 Jan 2023 11:37:14 +0000 (12:37 +0100)]
Revert "CI: disable Cygwin jobs"

This reverts commit 709acef44e13332a3c961bed3a2478c002f7b25f.

23 months agoMerge branch 'smattr/dc382b2a-6441-4f7b-a3a0-a66d40319ea8' into 'main'
Matthew Fernandez [Sat, 21 Jan 2023 05:39:14 +0000 (05:39 +0000)]
Merge branch 'smattr/dc382b2a-6441-4f7b-a3a0-a66d40319ea8' into 'main'

compiler warning squashing, fix a memory leak, remove some 'sprintf'

See merge request graphviz/graphviz!3056

23 months agocommon graph_init: fix memory leak
Matthew Fernandez [Sun, 15 Jan 2023 22:20:06 +0000 (14:20 -0800)]
common graph_init: fix memory leak

Gitlab: #1950

23 months agogvcolor nameOf: use an agxbuf instead of raw char buffer for names
Matthew Fernandez [Sun, 15 Jan 2023 22:13:19 +0000 (14:13 -0800)]
gvcolor nameOf: use an agxbuf instead of raw char buffer for names

This leads to slightly simpler code and fewer things to worry about.

Gitlab: #1950

23 months agogvcolor: remove assumption that color values fit in 64 characters
Matthew Fernandez [Sun, 15 Jan 2023 21:58:56 +0000 (13:58 -0800)]
gvcolor: remove assumption that color values fit in 64 characters

This code is still pretty challenging to follow, but at least we remove one
more thing the reader had to worry about.

Gitlab: #1950

23 months agogvcolor: remove unused 'Agnodeinfo_t' name
Matthew Fernandez [Sun, 15 Jan 2023 21:40:22 +0000 (13:40 -0800)]
gvcolor: remove unused 'Agnodeinfo_t' name

23 months agogvcolor: remove unused 'hsbcolor_t' name
Matthew Fernandez [Sun, 15 Jan 2023 21:39:40 +0000 (13:39 -0800)]
gvcolor: remove unused 'hsbcolor_t' name

23 months agogvcolor: squash -Wmissing-prototypes warning
Matthew Fernandez [Sun, 15 Jan 2023 21:38:55 +0000 (13:38 -0800)]
gvcolor: squash -Wmissing-prototypes warning

23 months agogvcolor colorxlate: remove unused return value
Matthew Fernandez [Sun, 15 Jan 2023 21:29:38 +0000 (13:29 -0800)]
gvcolor colorxlate: remove unused return value

23 months agogvcolor: remove 'NOCOLORNAMES' code path
Matthew Fernandez [Sun, 15 Jan 2023 21:28:12 +0000 (13:28 -0800)]
gvcolor: remove 'NOCOLORNAMES' code path

Nothing in the build systems define this. Furthermore, this code does not work.
It reads uninitialized memory from `buf`.

23 months agoMerge branch 'smattr/c0d7ef68-360e-47ba-96a8-fa27138de3b9' into 'main'
Matthew Fernandez [Sun, 15 Jan 2023 23:07:22 +0000 (23:07 +0000)]
Merge branch 'smattr/c0d7ef68-360e-47ba-96a8-fa27138de3b9' into 'main'

GD plugin gd_alternate_fontlist: fix unchecked allocation

See merge request graphviz/graphviz!3051

23 months agoGD plugin gd_alternate_fontlist: fix unchecked allocation
Matthew Fernandez [Sun, 15 Jan 2023 03:18:53 +0000 (19:18 -0800)]
GD plugin gd_alternate_fontlist: fix unchecked allocation

This function was calling `realloc` and not checking the return value. To fix
this, we rephrase it into using string views and then a final checked
allocation. This removes the long lived static allocation here, now requiring
the caller to free the returned value. This function is not on a hot path, so
removing this optimization is fine.

23 months agoMerge branch 'smattr/50a7856c-303a-4293-ad75-d1c983ace0f7' into 'main'
Matthew Fernandez [Sun, 15 Jan 2023 22:01:51 +0000 (22:01 +0000)]
Merge branch 'smattr/50a7856c-303a-4293-ad75-d1c983ace0f7' into 'main'

tclpkg buildBindings: fix incorrect allocation calculations and unchecked allocations

See merge request graphviz/graphviz!3052

23 months agotclpkg buildBindings: mark 's2' parameter as const
Matthew Fernandez [Sun, 15 Jan 2023 04:22:10 +0000 (20:22 -0800)]
tclpkg buildBindings: mark 's2' parameter as const

23 months agotclpkg buildBindings: fix remaining unchecked allocations
Matthew Fernandez [Sun, 15 Jan 2023 04:19:04 +0000 (20:19 -0800)]
tclpkg buildBindings: fix remaining unchecked allocations

23 months agotclpkg buildBindings: swap unchecked allocation for agxbuf
Matthew Fernandez [Sun, 15 Jan 2023 04:15:30 +0000 (20:15 -0800)]
tclpkg buildBindings: swap unchecked allocation for agxbuf

Apart from fixing an unchecked allocation, this is shorter with fewer things to
worry about.

23 months agotclpkg buildBindings: fix incorrect allocation calculations
Matthew Fernandez [Sun, 15 Jan 2023 04:11:12 +0000 (20:11 -0800)]
tclpkg buildBindings: fix incorrect allocation calculations

From context, these appear to be attempting to account for the trailing '\0'.
But they allocate one too many bytes.

23 months agoMerge branch 'smattr/e1a77fd6-85ed-4678-9fbe-bb6276c7e71b' into 'main'
Matthew Fernandez [Sun, 15 Jan 2023 18:41:39 +0000 (18:41 +0000)]
Merge branch 'smattr/e1a77fd6-85ed-4678-9fbe-bb6276c7e71b' into 'main'

sprintf migration and compiler waring squashing

See merge request graphviz/graphviz!3050

23 months agographml2gv main: remove shadowing of 'G'
Matthew Fernandez [Sun, 15 Jan 2023 00:09:41 +0000 (16:09 -0800)]
graphml2gv main: remove shadowing of 'G'

23 months agographml2gv initargs: squash -Wswitch-default warning
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
graphml2gv initargs: squash -Wswitch-default warning

The default case is unreachable due to the preceding `getopt` call.

23 months agographml2gv graphml_to_gv: remove shadowing of 'gname'
Matthew Fernandez [Sun, 15 Jan 2023 00:07:13 +0000 (16:07 -0800)]
graphml2gv graphml_to_gv: remove shadowing of 'gname'

23 months agogv2gml initargs: squash -Wswitch-default warning
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
gv2gml initargs: squash -Wswitch-default warning

The default case is unreachable due to the preceding `getopt` call.

23 months agodijkstra init: squash -Wswitch-default warning
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
dijkstra init: squash -Wswitch-default warning

The default case is unreachable due to the preceding `getopt` call.

23 months agounflatten scanargs: squash -Wswitch-default warning
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
unflatten scanargs: squash -Wswitch-default warning

The default case is unreachable due to the preceding `getopt` call.

23 months agotred init: squash -Wswitch-default warning
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
tred init: squash -Wswitch-default warning

The default case is unreachable due to the preceding `getopt` call.