]> granicus.if.org Git - graphviz/log
graphviz
3 years agoVML plugin: replace 'gvputs(… html_string(…))' with 'xml_escape' functionality
Matthew Fernandez [Sat, 23 Oct 2021 20:06:20 +0000 (13:06 -0700)]
VML plugin: replace 'gvputs(… html_string(…))' with 'xml_escape' functionality

This is further work towards unifying the XML escaping code (#1868). This change
has no functional impact but makes this processing slightly more efficient
(escaped text is emitted directly into the target file/stream instead of first
constructed in an intermediate buffer) and thread safe (a static buffer is no
longer used for escaping). The latter is not so significant as other factors
make it still unsafe to call into this plugin with multiple threads.

3 years agoadd a test for XML escaping
Matthew Fernandez [Sat, 23 Oct 2021 19:07:55 +0000 (12:07 -0700)]
add a test for XML escaping

This functionality was previously indirectly tested through some other graph
processing that uses escaping. However, this introduces some unit testing of
this function giving us an extra safe guard and an easier way to diagnose
problems with this functionality.

Related to #1868.

3 years agoxml_core: support a mode for escaping UTF-8 characters
Matthew Fernandez [Sat, 16 Oct 2021 05:24:34 +0000 (22:24 -0700)]
xml_core: support a mode for escaping UTF-8 characters

This is modeled after `html_string` in the VML plugin and intended to replace
that function in a future commit. It differs from `html_string` in the following
ways:

  * More limited unicode character detection. `html_string` has a very
    generalized notion of a valid character that extends to lengths beyond what
    UTF-8 allows. This new implementation in `xml_core` adheres more strictly to
    only valid UTF-8 character lengths.

  * Simpler character parsing. `html_string` is written in a style to (1) decode
    character byte length without branching and (2) use the outer loop to also
    loop over the UTF-8 character’s bytes. This new implementation in `xml_core`
    uses simpler, more obvious code for decoding the byte length and consumes
    more than one character of the input instead of reusing the outer loop. This
    code is not on a hot path and it is not necessary or helpful to
    micro-optimize the control flow.

  * Hex escapes instead of decimal escapes. `html_string` uses `&#[0-9]+;`
    escapes while this new implementation uses `&#x[0-9a-f]+;` escapes. For
    many characters, this results in a shorter sequence. A compiler that knows
    `snprintf` as a built-in (all recent GCC and Clang) should also be able to
    generate a hex escape without using any division operations.

Note that nothing yet uses this functionality; all existing calls that go
through this code have the `utf8` flag unset.

This code aborts on encountering an invalid UTF-8 character. This is not ideal,
but matches `html_string`’s error handling. Perhaps this can be improved in
future.

Related to #1868.

3 years agoxml_core: update input pointer to reflect how many characters were consumed
Matthew Fernandez [Sat, 16 Oct 2021 05:03:27 +0000 (22:03 -0700)]
xml_core: update input pointer to reflect how many characters were consumed

This has no immediate effect because the function only ever consumes a single
character. However, a future change will introduce more sophisticated escaping
that sometimes involves consuming more than one character from the input.

Related to #1868.

3 years agoMerge branch 'smattr/53697EE0-92BE-42AD-992E-0310A16FA68C' into 'main'
Matthew Fernandez [Sat, 30 Oct 2021 01:21:55 +0000 (01:21 +0000)]
Merge branch 'smattr/53697EE0-92BE-42AD-992E-0310A16FA68C' into 'main'

smyrna: more dead code removal

See merge request graphviz/graphviz!2244

3 years agosmyrna: remove unused 'anglexyz'
Matthew Fernandez [Sat, 23 Oct 2021 02:11:34 +0000 (19:11 -0700)]
smyrna: remove unused 'anglexyz'

3 years agosmyrna: remove unused 'anglexy'
Matthew Fernandez [Sat, 23 Oct 2021 02:11:16 +0000 (19:11 -0700)]
smyrna: remove unused 'anglexy'

3 years agosmyrna: remove unused 'anglez'
Matthew Fernandez [Sat, 23 Oct 2021 02:10:51 +0000 (19:10 -0700)]
smyrna: remove unused 'anglez'

3 years agosmyrna: remove unused 'angley'
Matthew Fernandez [Sat, 23 Oct 2021 02:10:28 +0000 (19:10 -0700)]
smyrna: remove unused 'angley'

3 years agosmyrna: remove unused 'anglex'
Matthew Fernandez [Sat, 23 Oct 2021 02:10:05 +0000 (19:10 -0700)]
smyrna: remove unused 'anglex'

3 years agosmyrna: remove unused 'camera_vectorz'
Matthew Fernandez [Sat, 23 Oct 2021 02:08:56 +0000 (19:08 -0700)]
smyrna: remove unused 'camera_vectorz'

3 years agosmyrna: remove 'camera_vectory'
Matthew Fernandez [Sat, 23 Oct 2021 02:08:28 +0000 (19:08 -0700)]
smyrna: remove 'camera_vectory'

3 years agosmyrna: remove 'camera_vectorx'
Matthew Fernandez [Sat, 23 Oct 2021 02:07:50 +0000 (19:07 -0700)]
smyrna: remove 'camera_vectorx'

3 years agosmyrna: remove unused 'temp_node_record'
Matthew Fernandez [Sat, 23 Oct 2021 02:06:17 +0000 (19:06 -0700)]
smyrna: remove unused 'temp_node_record'

3 years agosmyrna: remove unused 'TopviewData'
Matthew Fernandez [Sat, 23 Oct 2021 02:04:30 +0000 (19:04 -0700)]
smyrna: remove unused 'TopviewData'

3 years agosmyrna: remove unused 'gl3DNav'
Matthew Fernandez [Sat, 23 Oct 2021 02:03:21 +0000 (19:03 -0700)]
smyrna: remove unused 'gl3DNav'

3 years agosmyrna: remove unused 'rotation'
Matthew Fernandez [Sat, 23 Oct 2021 02:02:57 +0000 (19:02 -0700)]
smyrna: remove unused 'rotation'

3 years agosmyrna: remove unused 'gvprscript'
Matthew Fernandez [Sat, 23 Oct 2021 02:01:32 +0000 (19:01 -0700)]
smyrna: remove unused 'gvprscript'

3 years agosmyrna: remove unused 'MAX_BTN_CNT'
Matthew Fernandez [Sat, 23 Oct 2021 01:59:49 +0000 (18:59 -0700)]
smyrna: remove unused 'MAX_BTN_CNT'

3 years agosmyrna: remove unused 'clicked_mouse_button'
Matthew Fernandez [Sat, 23 Oct 2021 01:59:23 +0000 (18:59 -0700)]
smyrna: remove unused 'clicked_mouse_button'

3 years agosmyrna: remove unused 'mouse_rotate_axis'
Matthew Fernandez [Sat, 23 Oct 2021 01:58:39 +0000 (18:58 -0700)]
smyrna: remove unused 'mouse_rotate_axis'

3 years agosmyrna: remove unused 'image_data'
Matthew Fernandez [Sat, 23 Oct 2021 01:57:48 +0000 (18:57 -0700)]
smyrna: remove unused 'image_data'

3 years agosmyrna: remove unused anonymous enum
Matthew Fernandez [Sat, 23 Oct 2021 01:56:11 +0000 (18:56 -0700)]
smyrna: remove unused anonymous enum

3 years agosmyrna: remove unused 'unit'
Matthew Fernandez [Sat, 23 Oct 2021 01:55:33 +0000 (18:55 -0700)]
smyrna: remove unused 'unit'

3 years agosmyrna: remove unused 'clipZ*' fields
Matthew Fernandez [Sat, 23 Oct 2021 01:49:52 +0000 (18:49 -0700)]
smyrna: remove unused 'clipZ*' fields

3 years agodisable Cygwin CMake job
Matthew Fernandez [Sat, 30 Oct 2021 00:19:35 +0000 (17:19 -0700)]
disable Cygwin CMake job

This job seems to stall just after Flex discovery. Reason currently unknown, but
disabling it for now to unblock other work.

Gitlab #2145.

3 years agoMerge branch 'smattr/05940714-391D-4CCB-B123-D66833B684D6' into 'main'
Matthew Fernandez [Wed, 27 Oct 2021 06:12:49 +0000 (06:12 +0000)]
Merge branch 'smattr/05940714-391D-4CCB-B123-D66833B684D6' into 'main'

more header guard replacement

See merge request graphviz/graphviz!2241

3 years agolib/osage: replace header guards with more modern #pragma once
Matthew Fernandez [Thu, 21 Oct 2021 00:23:37 +0000 (17:23 -0700)]
lib/osage: replace header guards with more modern #pragma once

3 years agolib/patchwork: replace header guards with more modern #pragma once
Matthew Fernandez [Thu, 21 Oct 2021 00:23:20 +0000 (17:23 -0700)]
lib/patchwork: replace header guards with more modern #pragma once

3 years agolib/circogen: replace header guards with more modern #pragma once
Matthew Fernandez [Thu, 21 Oct 2021 00:22:53 +0000 (17:22 -0700)]
lib/circogen: replace header guards with more modern #pragma once

3 years agolib/pack: replace header guards with more modern #pragma once
Matthew Fernandez [Thu, 21 Oct 2021 00:13:48 +0000 (17:13 -0700)]
lib/pack: replace header guards with more modern #pragma once

3 years agolib/sfio: replace header guards with more modern #pragma once
Matthew Fernandez [Thu, 21 Oct 2021 00:12:44 +0000 (17:12 -0700)]
lib/sfio: replace header guards with more modern #pragma once

3 years agoMerge branch 'smattr/C09D7FA6-FBC0-46C6-B075-00B8D711B61D' into 'main'
Matthew Fernandez [Sat, 23 Oct 2021 01:30:30 +0000 (01:30 +0000)]
Merge branch 'smattr/C09D7FA6-FBC0-46C6-B075-00B8D711B61D' into 'main'

Move back to 2.49 development series

See merge request graphviz/graphviz!2243

3 years agoMove back to 2.49 development series
Matthew Fernandez [Sat, 23 Oct 2021 00:04:02 +0000 (17:04 -0700)]
Move back to 2.49 development series

3 years agoMerge branch 'smattr/62684DF4-6792-40B2-9F0A-284D37A20CA1' into 'main' 2.49.3
Matthew Fernandez [Sat, 23 Oct 2021 00:02:14 +0000 (00:02 +0000)]
Merge branch 'smattr/62684DF4-6792-40B2-9F0A-284D37A20CA1' into 'main'

Stable Release 2.49.3

See merge request graphviz/graphviz!2239

3 years agoStable Release 2.49.3
Matthew Fernandez [Wed, 20 Oct 2021 01:39:49 +0000 (18:39 -0700)]
Stable Release 2.49.3

This is a bit sooner since 2.49.2 than the usual release cadence. There was an
unintended regression committed after 2.49.1 that made it into 2.49.2 (fixed in
the commit series merged in c5ee41f65cc02c9d96f8f27a9fb5e6314424a4d9). In order
to minimize the time the latest Graphviz version contains a known regression,
this commit is making a new release sooner than otherwise would be done.

3 years agoMerge branch 'smattr/DFB31939-0643-445A-9E1E-77D6C7E20D53' into 'main'
Matthew Fernandez [Fri, 22 Oct 2021 01:05:41 +0000 (01:05 +0000)]
Merge branch 'smattr/DFB31939-0643-445A-9E1E-77D6C7E20D53' into 'main'

smyrna: more dead code removal

See merge request graphviz/graphviz!2242

3 years agosmyrna: remove unused 'bdzBottom'
Matthew Fernandez [Thu, 21 Oct 2021 01:58:56 +0000 (18:58 -0700)]
smyrna: remove unused 'bdzBottom'

3 years agosmyrna: remove unused 'bdzTop'
Matthew Fernandez [Thu, 21 Oct 2021 01:57:57 +0000 (18:57 -0700)]
smyrna: remove unused 'bdzTop'

3 years agosmyrna: remove unused 'rndNodeColor'
Matthew Fernandez [Thu, 21 Oct 2021 01:56:40 +0000 (18:56 -0700)]
smyrna: remove unused 'rndNodeColor'

3 years agosmyrna: remove unused 'rndEdgeColor'
Matthew Fernandez [Thu, 21 Oct 2021 01:56:22 +0000 (18:56 -0700)]
smyrna: remove unused 'rndEdgeColor'

3 years agosmyrna: remove unused 'texture'
Matthew Fernandez [Thu, 21 Oct 2021 01:54:22 +0000 (18:54 -0700)]
smyrna: remove unused 'texture'

3 years agosmyrna: remove unused 'GLDepth'
Matthew Fernandez [Thu, 21 Oct 2021 01:53:46 +0000 (18:53 -0700)]
smyrna: remove unused 'GLDepth'

3 years agosmyrna: remove unused 'selected_camera'
Matthew Fernandez [Thu, 21 Oct 2021 01:53:07 +0000 (18:53 -0700)]
smyrna: remove unused 'selected_camera'

3 years agosmyrna: remove unused 'node_data_attribute*'
Matthew Fernandez [Thu, 21 Oct 2021 01:50:26 +0000 (18:50 -0700)]
smyrna: remove unused 'node_data_attribute*'

3 years agosmyrna: remove unused 'SignalBlock'
Matthew Fernandez [Thu, 21 Oct 2021 01:49:31 +0000 (18:49 -0700)]
smyrna: remove unused 'SignalBlock'

3 years agosmyrna: remove unused 'dfltViewType'
Matthew Fernandez [Thu, 21 Oct 2021 01:47:07 +0000 (18:47 -0700)]
smyrna: remove unused 'dfltViewType'

3 years agoMerge branch 'add-ubuntu21.10-to-ci' into 'main'
Magnus Jacobsson [Thu, 21 Oct 2021 23:03:06 +0000 (23:03 +0000)]
Merge branch 'add-ubuntu21.10-to-ci' into 'main'

Add Ubuntu 21.10 build and test jobs to CI

Closes #2141

See merge request graphviz/graphviz!2238

3 years agoCI: change lint_pylint job to run on Ubuntu 21.10
Magnus Jacobsson [Mon, 18 Oct 2021 16:07:43 +0000 (18:07 +0200)]
CI: change lint_pylint job to run on Ubuntu 21.10

3 years agoCI: change out-of-source-build job to run on Ubuntu 21.10
Magnus Jacobsson [Mon, 18 Oct 2021 16:07:24 +0000 (18:07 +0200)]
CI: change out-of-source-build job to run on Ubuntu 21.10

3 years agoCI: add ubuntu21.10-cmake-ASan-test-including-ctest job
Magnus Jacobsson [Mon, 18 Oct 2021 12:43:33 +0000 (14:43 +0200)]
CI: add ubuntu21.10-cmake-ASan-test-including-ctest job

3 years agoCI: add ubuntu21-10-cmake-test job
Magnus Jacobsson [Mon, 18 Oct 2021 12:43:15 +0000 (14:43 +0200)]
CI: add ubuntu21-10-cmake-test job

3 years agoCI: add ubuntu21-10-test job
Magnus Jacobsson [Mon, 18 Oct 2021 12:43:01 +0000 (14:43 +0200)]
CI: add ubuntu21-10-test job

3 years agoCI: add ubuntu21-10-cmake-ASan-build-for-ctest job
Magnus Jacobsson [Mon, 18 Oct 2021 12:42:43 +0000 (14:42 +0200)]
CI: add ubuntu21-10-cmake-ASan-build-for-ctest job

3 years agoCI: add ubuntu21-10-cmake-minimal-build job
Magnus Jacobsson [Mon, 18 Oct 2021 12:42:19 +0000 (14:42 +0200)]
CI: add ubuntu21-10-cmake-minimal-build job

3 years agoCI: add ubuntu21-10-cmake-build job
Magnus Jacobsson [Mon, 18 Oct 2021 12:41:40 +0000 (14:41 +0200)]
CI: add ubuntu21-10-cmake-build job

3 years agoCI: add ubuntu21-10-static-build job
Magnus Jacobsson [Mon, 18 Oct 2021 12:41:14 +0000 (14:41 +0200)]
CI: add ubuntu21-10-static-build job

3 years agoCI: add ubuntu21-10-build job
Magnus Jacobsson [Mon, 18 Oct 2021 12:40:25 +0000 (14:40 +0200)]
CI: add ubuntu21-10-build job

3 years agoCI: docker_push_ubuntu-21.10 job
Magnus Jacobsson [Mon, 18 Oct 2021 16:06:39 +0000 (18:06 +0200)]
CI: docker_push_ubuntu-21.10 job

3 years agoCI: docker_build_ubuntu-21.10 job
Magnus Jacobsson [Mon, 18 Oct 2021 16:06:11 +0000 (18:06 +0200)]
CI: docker_build_ubuntu-21.10 job

3 years agoadd Ubuntu 21.10 Dockerfile
Magnus Jacobsson [Mon, 18 Oct 2021 12:34:58 +0000 (14:34 +0200)]
add Ubuntu 21.10 Dockerfile

3 years agosfio: correct misleading indentation in SFnputc macro definition
Magnus Jacobsson [Tue, 19 Oct 2021 05:15:02 +0000 (07:15 +0200)]
sfio: correct misleading indentation in SFnputc macro definition

Fixes errors like this when building with CMake (which uses -Wall,
-Wextra and -Werror) on Ubuntu 21.10 with gcc 11.2.0.

../lib/sfio/sfvprintf.c:76:13: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
   76 |             if(n != w) goto done; n = 0;\
      |             ^~
../lib/sfio/sfvprintf.c:511:25: note: in expansion of macro ‘SFnputc’
  511 |                         SFnputc(f, '0', n);
      |                         ^~~~~~~
../lib/sfio/sfvprintf.c:511:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  511 |                         SFnputc(f, '0', n);
      |                                         ^
../lib/sfio/sfvprintf.c:76:35: note: in definition of macro ‘SFnputc’
   76 |             if(n != w) goto done; n = 0;\
      |                                   ^

3 years agosfio: correct misleading indentation in REINIT macro definition
Magnus Jacobsson [Tue, 19 Oct 2021 05:15:02 +0000 (07:15 +0200)]
sfio: correct misleading indentation in REINIT macro definition

Fixes errors like this when building with CMake (which uses -Wall,
-Wextra and -Werror) on Ubuntu 21.10 with gcc 11.2.0.

../lib/sfio/sfdisc.c:114:25: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
  114 |                 {       for(d = f->disc; d && !d->iof; d = d->disc) ; \
      |                         ^~~
../lib/sfio/sfdisc.c:119:9: note: in expansion of macro ‘REINIT’
  119 |         REINIT(oreadf, readf, Sfread_f);
      |         ^~~~~~
../lib/sfio/sfdisc.c:115:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  115 |                         if(DISCF(d,iof,type) != oiof) \
      |                         ^~
../lib/sfio/sfdisc.c:119:9: note: in expansion of macro ‘REINIT’
  119 |         REINIT(oreadf, readf, Sfread_f);
      |         ^~~~~~

3 years agosfio: correct misleading indentation in GETDISCF macro definition
Magnus Jacobsson [Tue, 19 Oct 2021 05:15:02 +0000 (07:15 +0200)]
sfio: correct misleading indentation in GETDISCF macro definition

Fixes errors like this when building with CMake (which uses -Wall,
-Wextra and -Werror) on Ubuntu 21.10 with gcc 11.2.0.

../lib/sfio/sfdisc.c:68:11: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
   68 |         { for(d = f->disc; d && !d->iof; d = d->disc) ; \
      |           ^~~
../lib/sfio/sfdisc.c:71:5: note: in expansion of macro ‘GETDISCF’
   71 |     GETDISCF(oreadf, readf, Sfread_f);
      |     ^~~~~~~~
../lib/sfio/sfdisc.c:71:14: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
   71 |     GETDISCF(oreadf, readf, Sfread_f);
      |              ^~~~~~
../lib/sfio/sfdisc.c:69:11: note: in definition of macro ‘GETDISCF’
   69 |           func = d ? d->iof : NULL; \
      |           ^~~~

3 years agoMerge branch 'smattr/F9A1F77A-337F-4D1D-ACB4-5C84B7B84517' into 'main'
Matthew Fernandez [Thu, 21 Oct 2021 02:42:47 +0000 (02:42 +0000)]
Merge branch 'smattr/F9A1F77A-337F-4D1D-ACB4-5C84B7B84517' into 'main'

more header preprocessor clean up

See merge request graphviz/graphviz!2240

3 years agotools: remove some extern "C" marks
Matthew Fernandez [Wed, 20 Oct 2021 04:22:34 +0000 (21:22 -0700)]
tools: remove some extern "C" marks

These headers are only imported by C code, hence do not need this portability.

3 years agotools: replace header guards with more modern #pragma once
Matthew Fernandez [Wed, 20 Oct 2021 04:21:07 +0000 (21:21 -0700)]
tools: replace header guards with more modern #pragma once

3 years agogvmap: replace header guards with more modern #pragma once
Matthew Fernandez [Wed, 20 Oct 2021 04:16:56 +0000 (21:16 -0700)]
gvmap: replace header guards with more modern #pragma once

3 years agoMerge branch 'smattr/C26626B6-F4E6-4462-9B6E-F8C633E21A15' into 'main'
Matthew Fernandez [Thu, 21 Oct 2021 01:02:26 +0000 (01:02 +0000)]
Merge branch 'smattr/C26626B6-F4E6-4462-9B6E-F8C633E21A15' into 'main'

smyrna: more dead code removal

See merge request graphviz/graphviz!2223

3 years agosmyrna: remove unused 'frame_length' field
Matthew Fernandez [Thu, 14 Oct 2021 03:03:09 +0000 (20:03 -0700)]
smyrna: remove unused 'frame_length' field

3 years agosmyrna: remove unused 'dfltEngine' field
Matthew Fernandez [Thu, 14 Oct 2021 02:58:36 +0000 (19:58 -0700)]
smyrna: remove unused 'dfltEngine' field

3 years agosmyrna: remove unused 'consoleText' field
Matthew Fernandez [Thu, 14 Oct 2021 02:58:01 +0000 (19:58 -0700)]
smyrna: remove unused 'consoleText' field

3 years agosmyrna: remove unused 'FontSizeConst' field
Matthew Fernandez [Thu, 14 Oct 2021 02:57:35 +0000 (19:57 -0700)]
smyrna: remove unused 'FontSizeConst' field

3 years agosmyrna: remove unused 'visiblenodecount' field
Matthew Fernandez [Thu, 14 Oct 2021 02:55:48 +0000 (19:55 -0700)]
smyrna: remove unused 'visiblenodecount' field

3 years agosmyrna: remove unused 'glade_file' field
Matthew Fernandez [Thu, 14 Oct 2021 02:54:34 +0000 (19:54 -0700)]
smyrna: remove unused 'glade_file' field

3 years agosmyrna: remove unused 'attr_file' field
Matthew Fernandez [Thu, 14 Oct 2021 02:53:28 +0000 (19:53 -0700)]
smyrna: remove unused 'attr_file' field

3 years agosmyrna: remove unused 'flush' field
Matthew Fernandez [Thu, 14 Oct 2021 02:52:40 +0000 (19:52 -0700)]
smyrna: remove unused 'flush' field

3 years agosmyrna: remove unused 'scripts' array field
Matthew Fernandez [Thu, 14 Oct 2021 02:52:00 +0000 (19:52 -0700)]
smyrna: remove unused 'scripts' array field

3 years agosmyrna: remove unused 'nodeshape' field and 'node_shape' type
Matthew Fernandez [Thu, 14 Oct 2021 02:49:15 +0000 (19:49 -0700)]
smyrna: remove unused 'nodeshape' field and 'node_shape' type

The member `nodshapedot` also seems to have been misspelled, but never used
anyway, so oh well.

3 years agosmyrna: remove unused 'nodesizewithdegree' field
Matthew Fernandez [Thu, 14 Oct 2021 02:48:41 +0000 (19:48 -0700)]
smyrna: remove unused 'nodesizewithdegree' field

3 years agoMerge branch 'smattr/2F81BBCF-85DE-4DC9-B683-3F4784A7DD77' into 'main'
Matthew Fernandez [Wed, 20 Oct 2021 15:15:48 +0000 (15:15 +0000)]
Merge branch 'smattr/2F81BBCF-85DE-4DC9-B683-3F4784A7DD77' into 'main'

lib/cgraph: replace header guards with more modern #pragma once

See merge request graphviz/graphviz!2235

3 years agolib/cgraph: replace header guards with more modern #pragma once
Matthew Fernandez [Sun, 17 Oct 2021 18:55:59 +0000 (11:55 -0700)]
lib/cgraph: replace header guards with more modern #pragma once

3 years agoMerge branch 'smattr/A172EA51-A44B-4BCE-9390-72176966B563' into 'main'
Matthew Fernandez [Wed, 20 Oct 2021 02:37:57 +0000 (02:37 +0000)]
Merge branch 'smattr/A172EA51-A44B-4BCE-9390-72176966B563' into 'main'

more header guard replacement with #pragma once

See merge request graphviz/graphviz!2232

3 years agolib/glcomp: replace header guards with more modern #pragma once
Matthew Fernandez [Sun, 17 Oct 2021 01:28:38 +0000 (18:28 -0700)]
lib/glcomp: replace header guards with more modern #pragma once

Amusingly it looks like some time in the past (prior to version control) someone
got a little trigger happy find-and-replacing “CompText” with “CompFont”.

3 years agolib/xdot: replace header guards with more modern #pragma once
Matthew Fernandez [Sun, 17 Oct 2021 01:16:17 +0000 (18:16 -0700)]
lib/xdot: replace header guards with more modern #pragma once

3 years agolib/twopigen: replace header guards with more modern #pragma once
Matthew Fernandez [Sun, 17 Oct 2021 01:15:24 +0000 (18:15 -0700)]
lib/twopigen: replace header guards with more modern #pragma once

3 years agoMerge branch 'smattr/E696CB4B-4EC4-479D-8073-C970EEF14ECC' into 'main'
Matthew Fernandez [Wed, 20 Oct 2021 01:03:00 +0000 (01:03 +0000)]
Merge branch 'smattr/E696CB4B-4EC4-479D-8073-C970EEF14ECC' into 'main'

CMake: only pass 'YY_NO_UNISTD_H' to Flex when unistd.h is not found

See merge request graphviz/graphviz!2229

3 years agoCMake: only pass 'YY_NO_UNISTD_H' to Flex when unistd.h is not found
Matthew Fernandez [Sat, 16 Oct 2021 21:19:41 +0000 (14:19 -0700)]
CMake: only pass 'YY_NO_UNISTD_H' to Flex when unistd.h is not found

This macro tells Flex that #including unistd.h should be avoided. There is no
need for this on almost any platform except Windows, hence why `YY_NO_UNISTD_H`
is only mentioned elsewhere in the MS Build build system, not in the Autotools
build system. In the CMake build system which is meant to be used across Windows
and non-Windows platforms, we can do something more nuanced and depend on the
existence check of unistd.h itself.

3 years agoMerge branch 'smattr/1737da18-1462-4672-ae09-c19621653f51' into 'main'
Matthew Fernandez [Tue, 19 Oct 2021 15:48:24 +0000 (15:48 +0000)]
Merge branch 'smattr/1737da18-1462-4672-ae09-c19621653f51' into 'main'

fix GVPR splitting and tokenization bug

Closes #2138

See merge request graphviz/graphviz!2228

3 years agoextokens: fix missing NUL terminator append in GVPR tokenization
Matthew Fernandez [Sat, 16 Oct 2021 20:52:57 +0000 (13:52 -0700)]
extokens: fix missing NUL terminator append in GVPR tokenization

This is the second half of a bug fix following the prior commit.

Commit 971293551421455a0d939b9f8cea17356b7968f8 refactored this code to avoid
the use of an SFIO buffer, inadvertently introducing a bug. The change did not
account for the source buffer not being NUL terminated. This fix wicks closer to
the original code, not assuming a NUL terminator and copying a known number of
bytes into the destination.

Fixes #2138.

3 years agoexsplit: fix missing NUL terminator append in GVPR splitting
Matthew Fernandez [Sat, 16 Oct 2021 20:49:40 +0000 (13:49 -0700)]
exsplit: fix missing NUL terminator append in GVPR splitting

Commit 7ef9d53e2e6dc53c44939ace7a9cad57c3aa00bf refactored this code to avoid
the use of an SFIO buffer, inadvertently introducing a bug. The change did not
account for the source buffer not being NUL terminated. This fix wicks closer to
the original code, not assuming a NUL terminator and copying a known number of
bytes into the destination.

Related to #2138.

3 years agoadd a test case for a GVPR bug
Matthew Fernandez [Sat, 16 Oct 2021 20:23:31 +0000 (13:23 -0700)]
add a test case for a GVPR bug

Related to #2138.

3 years agoMerge branch 'Warray-param' into 'main'
Matthew Fernandez [Sun, 17 Oct 2021 18:32:52 +0000 (18:32 +0000)]
Merge branch 'Warray-param' into 'main'

Match function signature in definition with declaration

See merge request graphviz/graphviz!2233

3 years agoMatch function signature in definition with declaration
Nehal J Wani [Sun, 17 Oct 2021 03:10:30 +0000 (23:10 -0400)]
Match function signature in definition with declaration

GCC11 throws the following warning:
graphviz/lib/pathplan/shortest.c:93:47: warning: argument 2 of type ‘Ppoint_t *’ {aka ‘struct Pxy_t *’} declared as a pointer [-Warray-parameter=]
   93 | int Pshortestpath(Ppoly_t * polyp, Ppoint_t * eps, Ppolyline_t * output)
      |                                    ~~~~~~~~~~~^~~
In file included from graphviz/lib/pathplan/pathutil.h:15,
                 from graphviz/lib/pathplan/shortest.c:16:
graphviz/lib/pathplan/pathplan.h:22:59: note: previously declared as an array ‘Ppoint_t[2]’ {aka ‘struct Pxy_t[2]’}
   22 |     extern int Pshortestpath(Ppoly_t * boundary, Ppoint_t endpoints[2],
      |                                                  ~~~~~~~~~^~~~~~~~~~~~
[2/20] Building C object lib/pathplan/CMakeFiles/pathplan.dir/route.c.o
graphviz/lib/pathplan/route.c:76:29: warning: argument 4 of type ‘Ppoint_t *’ {aka ‘struct Pxy_t *’} declared as a pointer [-Warray-parameter=]
   76 |                  Ppoint_t * evs, Ppolyline_t * output)
      |                  ~~~~~~~~~~~^~~
In file included from graphviz/lib/pathplan/pathutil.h:15,
                 from graphviz/lib/pathplan/route.c:17:
graphviz/lib/pathplan/pathplan.h:28:39: note: previously declared as an array ‘Pvector_t[2]’ {aka ‘struct Pxy_t[2]’}
   28 |                             Pvector_t endpoint_slopes[2],
      |                             ~~~~~~~~~~^~~~~~~~~~~~~~~~~~

3 years agoMerge branch 'mingw64_cleanup_ifdef_gts' into 'main'
Matthew Fernandez [Sat, 16 Oct 2021 23:38:40 +0000 (23:38 +0000)]
Merge branch 'mingw64_cleanup_ifdef_gts' into 'main'

Unify usage of preprocessor constant HAVE_GTS.

See merge request graphviz/graphviz!2219

3 years agorealign a 'HAVE_GTS' check with 'ifdef' style
Matthew Fernandez [Sat, 16 Oct 2021 22:56:27 +0000 (15:56 -0700)]
realign a 'HAVE_GTS' check with 'ifdef' style

3 years agoUnify usage of preprocessor constant HAVE_GTS.
Primhill Computers [Mon, 11 Oct 2021 20:51:52 +0000 (21:51 +0100)]
Unify usage of preprocessor constant HAVE_GTS.

3 years agoMerge branch 'smattr/264284AF-9FAA-4FDC-9985-6158D1454C97' into 'main'
Matthew Fernandez [Sat, 16 Oct 2021 21:54:42 +0000 (21:54 +0000)]
Merge branch 'smattr/264284AF-9FAA-4FDC-9985-6158D1454C97' into 'main'

plugin/: replace header guards with more modern #pragma once

See merge request graphviz/graphviz!2225

3 years agoplugin/: replace header guards with more modern #pragma once
Matthew Fernandez [Fri, 15 Oct 2021 00:07:38 +0000 (17:07 -0700)]
plugin/: replace header guards with more modern #pragma once

3 years agoMerge branch 'smattr/652F0EAF-FDBE-4189-83D8-EE850C97868C' into 'main'
Matthew Fernandez [Sat, 16 Oct 2021 19:18:25 +0000 (19:18 +0000)]
Merge branch 'smattr/652F0EAF-FDBE-4189-83D8-EE850C97868C' into 'main'

lib/neatogen/delaunay.c: some clean up

See merge request graphviz/graphviz!2226