]> granicus.if.org Git - graphviz/log
graphviz
3 years agoremove unused lvertex_2_t type
Matthew Fernandez [Sun, 30 May 2021 16:57:28 +0000 (09:57 -0700)]
remove unused lvertex_2_t type

3 years agoremove cbrt alternative implementation
Matthew Fernandez [Sun, 30 May 2021 16:55:14 +0000 (09:55 -0700)]
remove cbrt alternative implementation

The cbrt function is guaranteed to be provided in C99, with which Graphviz is
now compiled.

3 years agouse C99 bools in shortest.c instead of internal constants
Matthew Fernandez [Sun, 30 May 2021 16:50:51 +0000 (09:50 -0700)]
use C99 bools in shortest.c instead of internal constants

3 years agoremove duplicate #include <stdlib.h>
Matthew Fernandez [Sun, 30 May 2021 16:47:00 +0000 (09:47 -0700)]
remove duplicate #include <stdlib.h>

3 years agoremove unused elist_t type
Matthew Fernandez [Sun, 30 May 2021 16:42:56 +0000 (09:42 -0700)]
remove unused elist_t type

3 years agoremove unused p2e_t type
Matthew Fernandez [Sun, 30 May 2021 16:42:29 +0000 (09:42 -0700)]
remove unused p2e_t type

3 years agoremove unused macros LT and GT
Matthew Fernandez [Sun, 30 May 2021 16:41:55 +0000 (09:41 -0700)]
remove unused macros LT and GT

3 years agoMerge branch 'smattr/cc687d3f-f2c0-4bfd-b2a5-3efb2f3b6cf7' into 'main'
Matthew Fernandez [Sat, 5 Jun 2021 17:50:21 +0000 (17:50 +0000)]
Merge branch 'smattr/cc687d3f-f2c0-4bfd-b2a5-3efb2f3b6cf7' into 'main'

more clean up in lib/glcomp

See merge request graphviz/graphviz!1984

3 years agoremove commented out code in glCompLabelNew
Matthew Fernandez [Wed, 2 Jun 2021 03:16:24 +0000 (20:16 -0700)]
remove commented out code in glCompLabelNew

3 years agoremove unused glCompLabelSetFontName
Matthew Fernandez [Wed, 2 Jun 2021 03:15:49 +0000 (20:15 -0700)]
remove unused glCompLabelSetFontName

3 years agoremove unused glCompLabelSetFontSize
Matthew Fernandez [Wed, 2 Jun 2021 03:14:50 +0000 (20:14 -0700)]
remove unused glCompLabelSetFontSize

3 years agoremove unused glCompLabelSetText
Matthew Fernandez [Wed, 2 Jun 2021 03:14:24 +0000 (20:14 -0700)]
remove unused glCompLabelSetText

3 years agoremove unused glCompLabelMouseUp
Matthew Fernandez [Wed, 2 Jun 2021 03:13:53 +0000 (20:13 -0700)]
remove unused glCompLabelMouseUp

3 years agoremove unused glCompLabelMouseOver
Matthew Fernandez [Wed, 2 Jun 2021 03:13:26 +0000 (20:13 -0700)]
remove unused glCompLabelMouseOver

3 years agoremove unused glCompLabelMouseOut
Matthew Fernandez [Wed, 2 Jun 2021 03:12:49 +0000 (20:12 -0700)]
remove unused glCompLabelMouseOut

3 years agoremove unused glCompLabelMouseIn
Matthew Fernandez [Wed, 2 Jun 2021 03:12:18 +0000 (20:12 -0700)]
remove unused glCompLabelMouseIn

3 years agoremove unused glCompLabelMouseDown
Matthew Fernandez [Wed, 2 Jun 2021 03:11:39 +0000 (20:11 -0700)]
remove unused glCompLabelMouseDown

3 years agoremove unused glCompLabelDoubleClick
Matthew Fernandez [Wed, 2 Jun 2021 03:11:09 +0000 (20:11 -0700)]
remove unused glCompLabelDoubleClick

3 years agoremove unused glCompLabelClick
Matthew Fernandez [Wed, 2 Jun 2021 03:10:39 +0000 (20:10 -0700)]
remove unused glCompLabelClick

3 years agoremove glCompSetRemoveLabel prototype
Matthew Fernandez [Wed, 2 Jun 2021 03:08:36 +0000 (20:08 -0700)]
remove glCompSetRemoveLabel prototype

This function was removed in 9a9cfd4e90775aa14a11a0db6745783f3a59ef56 but its
prototype was not.

3 years agoremove glCompSetAddLabel prototype
Matthew Fernandez [Wed, 2 Jun 2021 03:07:37 +0000 (20:07 -0700)]
remove glCompSetAddLabel prototype

This function was removed in 9a9cfd4e90775aa14a11a0db6745783f3a59ef56 but its
prototype was not.

3 years agoMerge branch 'smattr/7a64fbc3-20d4-440c-9030-47fa929ae962' into 'main'
Matthew Fernandez [Sat, 5 Jun 2021 17:01:50 +0000 (17:01 +0000)]
Merge branch 'smattr/7a64fbc3-20d4-440c-9030-47fa929ae962' into 'main'

fix incorrect return value in inside_polygon

Closes #2082

See merge request graphviz/graphviz!1988

3 years agofix incorrect return value in inside_polygon
Matthew Fernandez [Sat, 5 Jun 2021 01:18:06 +0000 (18:18 -0700)]
fix incorrect return value in inside_polygon

A refactor in 7731b18f403b545ea6eca99f429dd9b63e0659d6 incorrectly flipped the
polarity of one of the return sites in inside_polygon. The effect of this was
confusing assertion failures. Fixes #2082.

3 years agoadd a test case for #2082
Matthew Fernandez [Sat, 5 Jun 2021 01:10:17 +0000 (18:10 -0700)]
add a test case for #2082

3 years agoMerge branch 'smattr/604a7505-2c95-4af0-9355-93f51e2c5dbf' into 'main'
Matthew Fernandez [Sat, 5 Jun 2021 03:39:51 +0000 (03:39 +0000)]
Merge branch 'smattr/604a7505-2c95-4af0-9355-93f51e2c5dbf' into 'main'

fix: do not fclose(NULL) in gvmap

See merge request graphviz/graphviz!1981

3 years agofix: do not fclose(NULL) in gvmap
Matthew Fernandez [Sat, 29 May 2021 22:29:03 +0000 (15:29 -0700)]
fix: do not fclose(NULL) in gvmap

gvmap opens a debugging file to write timing information to if verbosity is
enabled. It tried to unconditionally close this file, regardless of whether
verbosity was enabled. The result was that, without verbosity enabled, it would
call fclose(NULL). The effect of this seems to vary across operating systems but
can result in a crash. This fix only tries to close the file if it was
previously opened. Related to #1822.

Unfortunately we cannot un-xfail test_gvmap_fclose because it fails for another
reason on some platforms.

3 years agoadd a test case for gvmap crash
Matthew Fernandez [Sat, 29 May 2021 22:42:19 +0000 (15:42 -0700)]
add a test case for gvmap crash

As discussed on #1822, gvmap currently crashes sometimes. It seems this is not
input dependent, but rather platform dependent. A fix will arrive in an upcoming
commit.

3 years agoremove some unused imports in test_regression.py
Matthew Fernandez [Sat, 29 May 2021 22:46:25 +0000 (15:46 -0700)]
remove some unused imports in test_regression.py

3 years agofix prior merge mistake
Matthew Fernandez [Sat, 5 Jun 2021 02:50:00 +0000 (19:50 -0700)]
fix prior merge mistake

3 years agoMerge branch 'smattr/8c949bd7-1fa9-4b34-bcb5-d838d72f676f' into 'main'
Matthew Fernandez [Sat, 5 Jun 2021 02:44:59 +0000 (02:44 +0000)]
Merge branch 'smattr/8c949bd7-1fa9-4b34-bcb5-d838d72f676f' into 'main'

test case for #2078 and gvplugin bug fixing

See merge request graphviz/graphviz!1980

3 years agosquash some -Wsign-conversion warnings in gvplugin_library_load
Matthew Fernandez [Sat, 29 May 2021 21:08:32 +0000 (14:08 -0700)]
squash some -Wsign-conversion warnings in gvplugin_library_load

3 years agoremove unused return value of gvplugin_activate
Matthew Fernandez [Sat, 29 May 2021 21:07:00 +0000 (14:07 -0700)]
remove unused return value of gvplugin_activate

3 years agomark name and plugin_path to gvplugin_activate as const
Matthew Fernandez [Sat, 29 May 2021 21:05:33 +0000 (14:05 -0700)]
mark name and plugin_path to gvplugin_activate as const

Neither of these are modified by the function.

3 years agoremove shadowing of path in gvplugin_activate
Matthew Fernandez [Sat, 29 May 2021 21:04:40 +0000 (14:04 -0700)]
remove shadowing of path in gvplugin_activate

This squashes a -Wshadow compiler warning.

3 years agosquash a -Wsign-compare warning in a gvplugin.c loop
Matthew Fernandez [Sat, 29 May 2021 21:02:42 +0000 (14:02 -0700)]
squash a -Wsign-compare warning in a gvplugin.c loop

3 years agoremove temporary buffer for the name of registered GVC plugins
Matthew Fernandez [Sat, 29 May 2021 20:59:31 +0000 (13:59 -0700)]
remove temporary buffer for the name of registered GVC plugins

Similar to the previous commit, this removes a temporary buffer that was only
being used for splitting a name on a ':' separator. Using the same strategy of
maintaining start and end as pointers into the original string, we can remove
the need for the temporary buffer and remove the limitation on ≤63 character
names.

3 years agoremove temporary buffer for name of the GVC plugin being loaded
Matthew Fernandez [Sat, 29 May 2021 20:47:55 +0000 (13:47 -0700)]
remove temporary buffer for name of the GVC plugin being loaded

The GVC plugin loading machinery copied the first 63 characters of the plugin
name to a temporary buffer in order to mutate it. However the mutation is simply
chopping up the plugin name based on a ':' separator. By tracking the start and
end of each component as pointers into the original sting, we can remove the
need for this temporary buffer.

Though this saves some stack memory, the primary motivation for this change is
to remove the truncation-to-63-characters behavior. There is no need to limit
plugin names to 63 characters. Note that the names of registered plugins are
still limited to 63 characters, so this does not fully remove the restriction.

3 years agofix out of bounds read when examining a registered plugin with a long name
Matthew Fernandez [Sat, 29 May 2021 20:15:54 +0000 (13:15 -0700)]
fix out of bounds read when examining a registered plugin with a long name

Similar to the previous commit, the GVC plugin loading code copies the names of
registered plugins to a temporary buffer as it iterates through them to allow
mutating the name. And just like the code for mutating the name of the plugin
begin loaded, it would fail to NUL-terminate this temporary buffer, causing a
following strchr to over-read.

The fix again is to simply zero-initialize the temporary buffer, so the
copied-in string is always NUL-terminated.

3 years agofix out of bounds read when loading a plugin with a long name
Matthew Fernandez [Sat, 29 May 2021 20:08:16 +0000 (13:08 -0700)]
fix out of bounds read when loading a plugin with a long name

The GVC plugin loading code copies the first 63 characters of the name of a
plugin to a temporary buffer in order to do various string manipulation on it.
However, this buffer was not initialized and never manually terminated. As a
result, a plugin name of 63 characters or more would result in the buffer
containing a non-terminated string. Subsequent strchr on this buffer would
over-read if it never saw a ':', resulting in unpredictable behavior.

This fix simply zero-initializes the buffer to begin with, so the copied-in
string is always NUL-terminated.

3 years agoadd a test case for #2078
Matthew Fernandez [Sat, 29 May 2021 19:52:59 +0000 (12:52 -0700)]
add a test case for #2078

3 years agoMerge branch 'smattr/A8D77CFB-89C5-4EC3-B3BB-5E95B152E225' into 'main'
Matthew Fernandez [Sat, 5 Jun 2021 01:32:15 +0000 (01:32 +0000)]
Merge branch 'smattr/A8D77CFB-89C5-4EC3-B3BB-5E95B152E225' into 'main'

some clean up in nop and lib/ingraphs

See merge request graphviz/graphviz!1979

3 years agomark nop’s command line parameter variables static
Matthew Fernandez [Sat, 29 May 2021 18:06:50 +0000 (11:06 -0700)]
mark nop’s command line parameter variables static

These are not used outside of their containing file.

3 years agouse a C99 bool for nop’s chkOnly flag
Matthew Fernandez [Sat, 29 May 2021 18:05:00 +0000 (11:05 -0700)]
use a C99 bool for nop’s chkOnly flag

The semantics of this flag were already a boolean value, so we can use the type
system to more obviously indicate this.

3 years agoremove an unnecessary cast
Matthew Fernandez [Sat, 29 May 2021 18:04:05 +0000 (11:04 -0700)]
remove an unnecessary cast

This pointer implicitly coerces.

3 years agouse a C99 bool for ingraph’s heap flag
Matthew Fernandez [Sat, 29 May 2021 18:03:13 +0000 (11:03 -0700)]
use a C99 bool for ingraph’s heap flag

The semantics of this flag were already a boolean value, so we can use the type
system to more obviously indicate this.

3 years agouse an unsigned value for ingraphs error count
Matthew Fernandez [Sat, 29 May 2021 18:00:32 +0000 (11:00 -0700)]
use an unsigned value for ingraphs error count

Obviously the number of errors that has occurred can never be negative. An
unsigned type more accurately indicates this. The only client of ingraphs that
actually checks the error count is nop, so this change has very little effect.

3 years agomore portable exit status from nop
Matthew Fernandez [Sat, 29 May 2021 17:56:34 +0000 (10:56 -0700)]
more portable exit status from nop

The exit status of nop was a bitwise-OR of two error counts. I do not see how
the actual value of this could ever be useful, except for being non-zero.
However, a non-zero exit status is not always an error. E.g. on VMS there are
some non-zero exit statuses that still indicate success.

This change causes nop to more reliably and portably exit with EXIT_FAILURE when
encountering errors.

3 years agomake nop usage string a constant array
Matthew Fernandez [Sat, 29 May 2021 17:48:35 +0000 (10:48 -0700)]
make nop usage string a constant array

The compiler could probably determine this already, but this makes it a little
more obvious that it can be inlined and the useString symbol can be the start of
the data rather than a pointer to the start of the data.

3 years agoremove an unnecessary open coded NULL
Matthew Fernandez [Sat, 29 May 2021 17:47:48 +0000 (10:47 -0700)]
remove an unnecessary open coded NULL

3 years agohandle unexpected getopt errors in nop
Matthew Fernandez [Sat, 29 May 2021 17:45:32 +0000 (10:45 -0700)]
handle unexpected getopt errors in nop

This case is never expected to be reachable. However, having a default case
helps catch when new options are introduced in the getopt call but not handled
in the switch. In a sense, this is a defensive coding measure. This also
squashes a -Wswitch-default compiler warning.

3 years agoreplace ingraphs header guard with more modern #pragma once
Matthew Fernandez [Sat, 29 May 2021 17:34:57 +0000 (10:34 -0700)]
replace ingraphs header guard with more modern #pragma once

3 years agoremove unused FREE_STATE
Matthew Fernandez [Sat, 29 May 2021 17:33:33 +0000 (10:33 -0700)]
remove unused FREE_STATE

This has been unused since the initial revision of this file. It is unclear what
purpose it was intended to serve.

3 years agoremove useless #include of config.h
Matthew Fernandez [Sat, 29 May 2021 17:31:52 +0000 (10:31 -0700)]
remove useless #include of config.h

The generated config.h only contains a number of #defines, so its inclusion at
the end of a file has no effect. All code following this line was removed in
7cc812f5c1b64832a0324a293cc8968ba044e0a4 which should have also removed this
line but did not.

3 years agoMerge branch 'smattr/1bbce952-8b1a-4e2b-bc72-3a4a5a53616a' into 'main'
Matthew Fernandez [Fri, 4 Jun 2021 05:55:09 +0000 (05:55 +0000)]
Merge branch 'smattr/1bbce952-8b1a-4e2b-bc72-3a4a5a53616a' into 'main'

clean up in lib/common

See merge request graphviz/graphviz!1978

3 years agoremove commented out code in mincross.c
Matthew Fernandez [Sat, 29 May 2021 03:06:20 +0000 (20:06 -0700)]
remove commented out code in mincross.c

3 years agoremove commented out code in shapes.c
Matthew Fernandez [Sat, 29 May 2021 03:06:05 +0000 (20:06 -0700)]
remove commented out code in shapes.c

3 years agoremove NOTDEF-guarded code
Matthew Fernandez [Sat, 29 May 2021 03:00:15 +0000 (20:00 -0700)]
remove NOTDEF-guarded code

This is not defined anywhere in the build.

3 years agoremove unused findAttrColor
Matthew Fernandez [Sat, 29 May 2021 02:57:03 +0000 (19:57 -0700)]
remove unused findAttrColor

3 years agoremove write_canonical_dot prototype for function that does not exist
Matthew Fernandez [Sat, 29 May 2021 02:54:54 +0000 (19:54 -0700)]
remove write_canonical_dot prototype for function that does not exist

This function was removed in d3760b95bd696ab130c26dd36927ed498f7aae37 but its
prototype was not.

3 years agoremove write_attributed_dot prototype for function that does not exist
Matthew Fernandez [Sat, 29 May 2021 02:53:37 +0000 (19:53 -0700)]
remove write_attributed_dot prototype for function that does not exist

This function was removed in d3760b95bd696ab130c26dd36927ed498f7aae37 but its
prototype was not.

3 years agoremove setup_graph prototype for function that does not exist
Matthew Fernandez [Sat, 29 May 2021 02:50:05 +0000 (19:50 -0700)]
remove setup_graph prototype for function that does not exist

This function was removed in ac9772156cea7cff4d8f1be7fd9396bdb6027505 but its
prototype was not.

3 years agoremove emit_jobs_eof prototype for function that does not exist
Matthew Fernandez [Sat, 29 May 2021 02:43:04 +0000 (19:43 -0700)]
remove emit_jobs_eof prototype for function that does not exist

This function was removed in 574e183b6caed4954702929a952c06c59a141a9e but its
prototype was not.

3 years agomark pps parameter to limitBoxes as const
Matthew Fernandez [Sat, 29 May 2021 01:01:18 +0000 (18:01 -0700)]
mark pps parameter to limitBoxes as const

To more obviously indicate this parameter is not modified.

3 years agoMerge branch 'smattr/839387A5-BAE4-43F2-88C1-C6818F406667'
Matthew Fernandez [Wed, 2 Jun 2021 01:26:04 +0000 (18:26 -0700)]
Merge branch 'smattr/839387A5-BAE4-43F2-88C1-C6818F406667'

3 years agoAdd --tag=CC when compiling quartz plugin
Ryan Schmidt [Sat, 8 May 2021 14:11:01 +0000 (14:11 +0000)]
Add --tag=CC when compiling quartz plugin

Edit by Matthew Fernandez: When compiling libraries, libtool infers a so called
“tag” indicating the language model it should use when creating objects.
The libtool docs¹ claim `CC` is inferred when no tag is explicitly given, but
empirically this does not seem to be true. On macOS, some versions of libtool
give up when seeing a .m file with the error:

  libtool: compile: unable to infer tagged configuration
  libtool:   error: specify a tag with '--tag'

To fix this, we now explicitly set the `CC` tag. Note that this is not guarded
to be macOS-only because this action needs to be taken in all environments with
Objective-C support that are building the Quartz plugin (if this is in fact
possible on anything other than macOS).

This commit also fixes a further problem where AM_LIBTOOLFLAGS was misspelled
as AM_LIBTOOLSFLAGS. It looks like 79aa7d77ef433d66c0142168d2817b4c7014d263
previously tried to fix this same problem but (1) the WITH_DARWIN9 guard is
insufficient for recent macOS versions and (2) the typo made this whole change
a no-op.

This issue was reported by downstream Macports users.

Fixes #2065.

¹ https://www.gnu.org/software/libtool/manual/html_node/Tags.html

3 years agoMerge branch 'smattr/E9ACDB7A-3EE0-4BF7-B2A8-14EB2AC31B99' into 'main'
Matthew Fernandez [Tue, 1 Jun 2021 15:01:32 +0000 (15:01 +0000)]
Merge branch 'smattr/E9ACDB7A-3EE0-4BF7-B2A8-14EB2AC31B99' into 'main'

some clean up in lib/expr

See merge request graphviz/graphviz!1976

3 years agoremove unused exrewind()
Matthew Fernandez [Wed, 26 May 2021 01:45:59 +0000 (18:45 -0700)]
remove unused exrewind()

3 years agoremove commented out Makefile directives
Matthew Fernandez [Wed, 26 May 2021 01:42:50 +0000 (18:42 -0700)]
remove commented out Makefile directives

The comments about libast’s usage of environ are legacy. This declaration was
removed in 3af3980dff0b6a8ca134ea0620b4ffb484906707.

3 years agoremove unused exstatement()
Matthew Fernandez [Wed, 26 May 2021 01:40:05 +0000 (18:40 -0700)]
remove unused exstatement()

3 years agoremove unused excc()
Matthew Fernandez [Wed, 26 May 2021 01:34:26 +0000 (18:34 -0700)]
remove unused excc()

3 years agoMerge branch 'smattr/10DDFB58-0439-439A-8BCD-0F5A630C9561' into 'main'
Matthew Fernandez [Mon, 31 May 2021 17:18:24 +0000 (17:18 +0000)]
Merge branch 'smattr/10DDFB58-0439-439A-8BCD-0F5A630C9561' into 'main'

a couple of minor clean ups

See merge request graphviz/graphviz!1974

3 years agoabbreviate a manual strdup
Matthew Fernandez [Tue, 25 May 2021 14:53:55 +0000 (07:53 -0700)]
abbreviate a manual strdup

3 years agoabbreviate a Smyrna path
Matthew Fernandez [Tue, 25 May 2021 14:53:04 +0000 (07:53 -0700)]
abbreviate a Smyrna path

SMYRNA is defined to the same string, so this makes no functional difference.
However, it makes the preceding allocation clearer in what it is doing.

3 years agoMerge branch 'fix-odr-violation-in-mm2gv' into 'main'
Magnus Jacobsson [Sun, 30 May 2021 15:53:46 +0000 (15:53 +0000)]
Merge branch 'fix-odr-violation-in-mm2gv' into 'main'

Fix ASan odr_violation in mm2gv

See merge request graphviz/graphviz!1975

3 years agoRevert "Disable detection of ODR violations in Ubuntu 21.04 ASan test"
Magnus Jacobsson [Tue, 25 May 2021 20:14:57 +0000 (22:14 +0200)]
Revert "Disable detection of ODR violations in Ubuntu 21.04 ASan test"

This reverts commit 5f6a0df735ea110e874df2f527cd73fa0a3d37a0.

3 years agoFix ASan odr_violation in mm2gv by not linking to libcommon
Magnus Jacobsson [Tue, 25 May 2021 19:43:32 +0000 (21:43 +0200)]
Fix ASan odr_violation in mm2gv by not linking to libcommon

libcommon is a static lib, but is already part of the dynamic libgvc.

The error message was:

==73343==ERROR: AddressSanitizer: odr-violation (0x555555789760):
  [1] size=8 'fdp_parms' /home/magjac/graphviz/lib/common/globals.c:30:20
  [2] size=8 'fdp_parms' /home/magjac/graphviz/lib/common/globals.c:30:20
These globals were registered at these points:
  [1]:
    #0 0x7ffff760d938 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
    #1 0x555555693361 in _sub_I_00099_1 (/home/magjac/build-graphviz-Desktop-Debug/cmd/tools/mm2gv+0x13f361)
    #2 0x55555569376c in __libc_csu_init (/home/magjac/build-graphviz-Desktop-Debug/cmd/tools/mm2gv+0x13f76c)

  [2]:
    #0 0x7ffff760d938 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
    #1 0x7ffff6f7de38 in _sub_I_00099_1 (/home/magjac/build-graphviz-Desktop-Debug/lib/gvc/libgvc.so.6+0x420e38)
    #2 0x7ffff7fda96d  (/lib64/ld-linux-x86-64.so.2+0x1196d)

==73343==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'fdp_parms' at /home/magjac/graphviz/lib/common/globals.c:30:20
==73343==ABORTING

3 years agoPrint output when test_tools fails
Magnus Jacobsson [Tue, 25 May 2021 19:57:17 +0000 (21:57 +0200)]
Print output when test_tools fails

3 years agoMerge branch 'smattr/4069e280-7a22-40cb-9dbc-cfc846561c66' into 'main'
Matthew Fernandez [Sat, 29 May 2021 03:58:38 +0000 (03:58 +0000)]
Merge branch 'smattr/4069e280-7a22-40cb-9dbc-cfc846561c66' into 'main'

remove build dependency on Perl

Closes #2067

See merge request graphviz/graphviz!1973

3 years agoremove commented out code in Autotools Perl detection
Matthew Fernandez [Tue, 25 May 2021 02:07:28 +0000 (19:07 -0700)]
remove commented out code in Autotools Perl detection

3 years agoremove Windows CI configuration of Perl
Matthew Fernandez [Sun, 23 May 2021 01:02:17 +0000 (18:02 -0700)]
remove Windows CI configuration of Perl

As of the previous commit, Perl is no longer necessary for CI on Windows.
Related to #2067.

3 years agoremove check for Perl in the CMake build
Matthew Fernandez [Sun, 23 May 2021 01:29:26 +0000 (18:29 -0700)]
remove check for Perl in the CMake build

Perl is no longer required for the CMake build. Related to #2067.

3 years agocommit generated ps_font_equiv.h and remove generator for this
Matthew Fernandez [Sat, 22 May 2021 23:37:41 +0000 (16:37 -0700)]
commit generated ps_font_equiv.h and remove generator for this

The header ps_font_equiv.h was generated from 3 files, fontmap.cfg,
ps_font_equiv.txt, and ps_fontmap.txt. The generator itself was the Perl file,
mksvgfonts.pl.

The generation process is deterministic and not dependent on the end user’s
system. In fact, ps_font_equiv.h is generated during CI and included in the
portable source tarball. Furthermore the main driving source for this,
ps_font_equiv.txt is no clearer or more commented than the generated header.
Finally, a copy of the generated header was actually already committed to the
repository under windows/include/ for the MSBuild work flow that does not want
to call Perl.

For these reasons, having this as a generated file was no advantage. In fact,
this was a net negative in the build process as it is the only thing in the
build that requires Perl. As of this commit, Perl is no longer required to
build Graphviz. Perl is still necessary for building some optional components
like the Graphviz bindings for Perl.

Closes #2067.

3 years agoMerge branch 'smattr/bc790f2b-e001-4add-8124-a94127742066' into 'main'
Matthew Fernandez [Sat, 29 May 2021 02:37:47 +0000 (02:37 +0000)]
Merge branch 'smattr/bc790f2b-e001-4add-8124-a94127742066' into 'main'

clean up in lib/glcomp

See merge request graphviz/graphviz!1967

3 years agostandardize on float literals for glColor4f and glVertex3f parameters
Matthew Fernandez [Wed, 19 May 2021 03:24:17 +0000 (20:24 -0700)]
standardize on float literals for glColor4f and glVertex3f parameters

Shorter and more readable than GLFloat casts.

3 years agoconsistently use float literals in glCompCalcWidget
Matthew Fernandez [Wed, 19 May 2021 03:17:38 +0000 (20:17 -0700)]
consistently use float literals in glCompCalcWidget

This is more reliable and predictable than the mixture of floats and implicit
conversion from ints that was happening previously.

3 years agoremove unused fs parameter from glCompSetAddNewTexture
Matthew Fernandez [Wed, 19 May 2021 03:09:11 +0000 (20:09 -0700)]
remove unused fs parameter from glCompSetAddNewTexture

3 years agoremove an open coded NULL
Matthew Fernandez [Wed, 19 May 2021 03:08:09 +0000 (20:08 -0700)]
remove an open coded NULL

3 years agoremove commented out code in glcomptexture.c
Matthew Fernandez [Wed, 19 May 2021 03:07:56 +0000 (20:07 -0700)]
remove commented out code in glcomptexture.c

3 years agoremove unused glCompSetClear
Matthew Fernandez [Wed, 19 May 2021 03:04:57 +0000 (20:04 -0700)]
remove unused glCompSetClear

3 years agoremove commented out code in glcompset.c
Matthew Fernandez [Wed, 19 May 2021 03:04:17 +0000 (20:04 -0700)]
remove commented out code in glcompset.c

3 years agoremove commented out change_fonts
Matthew Fernandez [Wed, 19 May 2021 03:02:26 +0000 (20:02 -0700)]
remove commented out change_fonts

3 years agoremove unused glCompSetText
Matthew Fernandez [Wed, 19 May 2021 03:00:14 +0000 (20:00 -0700)]
remove unused glCompSetText

3 years agoremove commented out code in glcompbutton.c
Matthew Fernandez [Wed, 19 May 2021 02:59:44 +0000 (19:59 -0700)]
remove commented out code in glcompbutton.c

3 years agoMerge branch 'smattr/791B36C7-46BD-41BA-A88F-DFC58E2C490A' into 'main'
Matthew Fernandez [Sat, 29 May 2021 01:45:09 +0000 (01:45 +0000)]
Merge branch 'smattr/791B36C7-46BD-41BA-A88F-DFC58E2C490A' into 'main'

squash all -Wfloat-conversion warnings in trackball.c

See merge request graphviz/graphviz!1965

3 years agoconsistently use float arithmetic in build_rotmatrix
Matthew Fernandez [Mon, 17 May 2021 02:39:19 +0000 (19:39 -0700)]
consistently use float arithmetic in build_rotmatrix

By avoiding mixing doubles and floats, we avoid ever down-converting from a
float to a double and losing precision. Squashes some -Wfloat-conversion
warnings.

3 years agoconsistently use float arithmetic in tb_project_to_sphere
Matthew Fernandez [Mon, 17 May 2021 02:37:25 +0000 (19:37 -0700)]
consistently use float arithmetic in tb_project_to_sphere

By avoiding mixing doubles and floats, we avoid ever down-converting from a
float to a double and losing precision. Squashes a -Wfloat-conversion warning.

3 years agorephrase some magic numbers in Smyrna into their originating computation
Matthew Fernandez [Wed, 26 May 2021 15:12:03 +0000 (08:12 -0700)]
rephrase some magic numbers in Smyrna into their originating computation

This removes the use of some double literals with implicit conversion to floats,
squashing some -Wfloat-conversion compiler warnings. It also makes the resulting
code clearer. The compiler constant-folds these at -O1 and above, so there is no
loss of performance. The resulting expressions are slightly different to the
original, but if anything they are a more accurate representation of the intent
here.

3 years agoconsistently use float arithmetic in axis_to_quat
Matthew Fernandez [Mon, 17 May 2021 02:33:11 +0000 (19:33 -0700)]
consistently use float arithmetic in axis_to_quat

By avoiding mixing doubles and floats, we avoid ever down-converting from a
float to a double and losing precision. Squashes some -Wfloat-conversion
warnings.

3 years agousing floats consistently in vscale
Matthew Fernandez [Mon, 17 May 2021 02:31:21 +0000 (19:31 -0700)]
using floats consistently in vscale

By avoiding mixing doubles and floats, we avoid ever down-converting from a
float to a double and losing precision. Squashes a -Wfloat-conversion warning.

3 years agouse more appropriate square root function in vlength
Matthew Fernandez [Mon, 17 May 2021 02:30:00 +0000 (19:30 -0700)]
use more appropriate square root function in vlength

The square root functions sqrt and sqrtf compute on doubles and floats
respectively. Using the float version here avoids a lossy conversion from double
to float when returning from this function.