]> granicus.if.org Git - graphviz/log
graphviz
3 years agoremove unused parameter from plot_dot_map
Matthew Fernandez [Wed, 17 Mar 2021 00:47:48 +0000 (17:47 -0700)]
remove unused parameter from plot_dot_map

3 years agoremove unused processing_one_poly
Matthew Fernandez [Wed, 17 Mar 2021 00:41:06 +0000 (17:41 -0700)]
remove unused processing_one_poly

3 years agoMerge branch 'smattr/0788fe56-dd32-4e9a-b8bf-3371c58ee5d4' into 'main'
Matthew Fernandez [Mon, 29 Mar 2021 01:13:27 +0000 (01:13 +0000)]
Merge branch 'smattr/0788fe56-dd32-4e9a-b8bf-3371c58ee5d4' into 'main'

Fix for TBbalance attribute code

Closes #1980 and #1339

See merge request graphviz/graphviz!1846

3 years agoFix for TBbalance attribute code
Steve Roush [Thu, 18 Mar 2021 01:51:10 +0000 (18:51 -0700)]
Fix for TBbalance attribute code

As described in #1339 TBbalance is an undocumented graph attribute that is
supposed to cause nodes to "rise" or "fall" to the minimum or maximum rank
possible.  The attached code snippet seems to repair the bug in this code.

Comment from Matthew Fernandez: I committed this, but I don’t understand enough
about the context to judge its correctness. The above is Steve’s description of
the situation.

Fixes #1339 and #1980.

3 years agoMerge branch 'smattr/59FA12C9-C832-4AC4-ACB6-D82DDDDD6148' into 'main'
Matthew Fernandez [Mon, 29 Mar 2021 00:36:26 +0000 (00:36 +0000)]
Merge branch 'smattr/59FA12C9-C832-4AC4-ACB6-D82DDDDD6148' into 'main'

fix incorrect reference counting of interned HTML strings

See merge request graphviz/graphviz!1857

3 years agomove HTML_BIT and CNT_BIT initialization to their definition
Matthew Fernandez [Sat, 20 Mar 2021 18:29:51 +0000 (11:29 -0700)]
move HTML_BIT and CNT_BIT initialization to their definition

The compiler can constant-fold these at compile time, allowing it to then
propagate these values through their uses and completely eliminate them.

3 years agofix incorrect reference counting of interned HTML strings
Matthew Fernandez [Sat, 20 Mar 2021 19:31:43 +0000 (12:31 -0700)]
fix incorrect reference counting of interned HTML strings

This typo meant that, instead of masking the reference counting bits, this check
was also including the HTML bit (bit 31). As a result, interned HTML strings
would never be freed. This was found by an introduced -Wlogical-op warning when
building an upcoming change with GCC 8.3.0.

3 years agoMerge branch 'smattr/DAA0EC73-A782-4820-A059-EF0529EB2934' into 'main'
Matthew Fernandez [Sun, 28 Mar 2021 23:58:44 +0000 (23:58 +0000)]
Merge branch 'smattr/DAA0EC73-A782-4820-A059-EF0529EB2934' into 'main'

fix: don't run pylint CI job on tags

Closes #1978

See merge request graphviz/graphviz!1860

3 years agofix: don't run pylint CI job on tags
Matthew Fernandez [Sun, 21 Mar 2021 15:58:29 +0000 (08:58 -0700)]
fix: don't run pylint CI job on tags

383ec8753b8007d26fc4f6eb51c61b6d8b71d12e added a pylint task in CI. This task is
unrestricted, so Gitlab thinks it is meant to run on tags as well as on master.
Every other task is restricted to only run on master (including the dependencies
of the pylint job) so CI now fails on tags. This change limits the lint job to
not run on tags. Fixes #1978.

3 years agoMerge branch 'smattr/db8f6c58-e183-4b46-a760-45021fce63e6' into 'main'
Matthew Fernandez [Sun, 28 Mar 2021 23:20:59 +0000 (23:20 +0000)]
Merge branch 'smattr/db8f6c58-e183-4b46-a760-45021fce63e6' into 'main'

more clean up and compiler warning removal

See merge request graphviz/graphviz!1856

3 years agoremove a strcmp micro-optimization
Matthew Fernandez [Sat, 20 Mar 2021 00:48:30 +0000 (17:48 -0700)]
remove a strcmp micro-optimization

3 years agorephrase unnecessarily cryptic bitwise operations
Matthew Fernandez [Fri, 19 Mar 2021 04:48:52 +0000 (21:48 -0700)]
rephrase unnecessarily cryptic bitwise operations

This is just doing boolean logic. Sometimes there is a motivation to use bitwise
operators in place of boolean operators to optimize hot paths that are
negatively affected by the stalling semantics of boolean shortcut logic. But
this is not the case here. This is not a hot path.

3 years agoremove commented out code
Matthew Fernandez [Fri, 19 Mar 2021 04:42:29 +0000 (21:42 -0700)]
remove commented out code

3 years agoremove some unnecessary casts
Matthew Fernandez [Fri, 19 Mar 2021 04:31:54 +0000 (21:31 -0700)]
remove some unnecessary casts

3 years agoclean up some awkward manual scoping
Matthew Fernandez [Fri, 19 Mar 2021 04:31:13 +0000 (21:31 -0700)]
clean up some awkward manual scoping

C99 lets us just declare the index scoped to the for loop itself.

3 years agoremove some unnecessary bracketing
Matthew Fernandez [Fri, 19 Mar 2021 04:25:06 +0000 (21:25 -0700)]
remove some unnecessary bracketing

3 years agoremove some useless boolean logic
Matthew Fernandez [Fri, 19 Mar 2021 04:22:57 +0000 (21:22 -0700)]
remove some useless boolean logic

3 years agoremove some commented out code
Matthew Fernandez [Fri, 19 Mar 2021 04:10:49 +0000 (21:10 -0700)]
remove some commented out code

3 years agoremove an open coded NULL
Matthew Fernandez [Fri, 19 Mar 2021 04:02:44 +0000 (21:02 -0700)]
remove an open coded NULL

3 years agoabbreviate some accumulated operations
Matthew Fernandez [Fri, 19 Mar 2021 04:01:28 +0000 (21:01 -0700)]
abbreviate some accumulated operations

3 years agostronger types for set_attrwf parameters
Matthew Fernandez [Fri, 19 Mar 2021 03:59:14 +0000 (20:59 -0700)]
stronger types for set_attrwf parameters

This squashes some -Wconversion warnings.

3 years agoremove some excess bracketing
Matthew Fernandez [Fri, 19 Mar 2021 03:52:29 +0000 (20:52 -0700)]
remove some excess bracketing

3 years agounify an allocation path
Matthew Fernandez [Fri, 19 Mar 2021 03:47:29 +0000 (20:47 -0700)]
unify an allocation path

realloc(NULL, ...) is equivalent to malloc().

3 years agostronger types for startgraph parameters
Matthew Fernandez [Fri, 19 Mar 2021 03:43:53 +0000 (20:43 -0700)]
stronger types for startgraph parameters

This suppresses two -Wconversion warnings.

3 years agoremove some cryptic comments
Matthew Fernandez [Fri, 19 Mar 2021 03:36:29 +0000 (20:36 -0700)]
remove some cryptic comments

3 years agouse C99 initializers for some objects
Matthew Fernandez [Fri, 19 Mar 2021 03:32:45 +0000 (20:32 -0700)]
use C99 initializers for some objects

This squashes a number of -Wmissing-field-initializer warnings.

3 years agoMerge branch 'smattr/90b1c88b-9fb0-42ad-bab4-5e3e7ad145d9' into 'main'
Matthew Fernandez [Sun, 28 Mar 2021 22:15:05 +0000 (22:15 +0000)]
Merge branch 'smattr/90b1c88b-9fb0-42ad-bab4-5e3e7ad145d9' into 'main'

squash some compiler warnings

See merge request graphviz/graphviz!1845

3 years agoremove some -Wsign-conversion warnings
Matthew Fernandez [Thu, 18 Mar 2021 00:11:13 +0000 (17:11 -0700)]
remove some -Wsign-conversion warnings

This one expression was responsible for 4 compiler warnings, which are now dealt
with.

3 years agoremove some -Wsign-compare warnings
Matthew Fernandez [Thu, 18 Mar 2021 00:11:09 +0000 (17:11 -0700)]
remove some -Wsign-compare warnings

3 years agosuppress some -Wunused-parameter warnings
Matthew Fernandez [Thu, 18 Mar 2021 00:11:04 +0000 (17:11 -0700)]
suppress some -Wunused-parameter warnings

3 years agoremove some unnecessary bracketing
Matthew Fernandez [Thu, 18 Mar 2021 00:10:59 +0000 (17:10 -0700)]
remove some unnecessary bracketing

3 years agosuppress some -Wunused-parameter warnings
Matthew Fernandez [Thu, 18 Mar 2021 00:10:53 +0000 (17:10 -0700)]
suppress some -Wunused-parameter warnings

3 years agoremove some unnecessary casts
Matthew Fernandez [Thu, 18 Mar 2021 00:10:48 +0000 (17:10 -0700)]
remove some unnecessary casts

These pointers coerce implicitly.

3 years agoremove an unnecessary use of MIN
Matthew Fernandez [Thu, 18 Mar 2021 00:10:42 +0000 (17:10 -0700)]
remove an unnecessary use of MIN

3 years agoremove unnecessary guard to free() call
Matthew Fernandez [Thu, 18 Mar 2021 00:10:36 +0000 (17:10 -0700)]
remove unnecessary guard to free() call

It’s safe to free NULL.

3 years agosquash -Wsign-compare warnings in Pango plugin
Matthew Fernandez [Thu, 18 Mar 2021 00:10:30 +0000 (17:10 -0700)]
squash -Wsign-compare warnings in Pango plugin

3 years agoremove unused get_font_list
Matthew Fernandez [Thu, 18 Mar 2021 00:10:17 +0000 (17:10 -0700)]
remove unused get_font_list

3 years agoMerge branch 'smattr/C0B831E7-0AA4-4A1E-B32C-1E0F8265FF88' into 'main'
Matthew Fernandez [Sun, 28 Mar 2021 21:37:57 +0000 (21:37 +0000)]
Merge branch 'smattr/C0B831E7-0AA4-4A1E-B32C-1E0F8265FF88' into 'main'

add DEVELOPERS.md note about release blockers

See merge request graphviz/graphviz!1855

3 years agoadd DEVELOPERS.md note about release blockers
Matthew Fernandez [Sat, 20 Mar 2021 01:54:56 +0000 (18:54 -0700)]
add DEVELOPERS.md note about release blockers

3 years agoMerge branch 'smattr/d4e26fd5-fe22-4200-b75a-f0fd591fb919' into 'main'
Matthew Fernandez [Sun, 28 Mar 2021 21:00:49 +0000 (21:00 +0000)]
Merge branch 'smattr/d4e26fd5-fe22-4200-b75a-f0fd591fb919' into 'main'

remove remaining references to the DIA format

Closes #689

See merge request graphviz/graphviz!1861

3 years agoremove remaining references to the DIA format
Matthew Fernandez [Sun, 21 Mar 2021 22:01:34 +0000 (15:01 -0700)]
remove remaining references to the DIA format

Core support for this was removed in 2009. A partial plugin for this was written
but never matured. This was removed in 5243eaac9cbe134fc7935a8c029860632e19d523.
This change removes the final dangling references to DIA. Fixes #689.

3 years agoMerge branch 'smattr/92E357BD-EBAC-4152-BA3C-87069D8131C5' into 'main'
Matthew Fernandez [Sun, 28 Mar 2021 19:50:47 +0000 (19:50 +0000)]
Merge branch 'smattr/92E357BD-EBAC-4152-BA3C-87069D8131C5' into 'main'

change references to 'master' branch to 'main'

See merge request graphviz/graphviz!1864

3 years agochange references to 'master' branch to 'main'
Matthew Fernandez [Tue, 23 Mar 2021 00:12:52 +0000 (17:12 -0700)]
change references to 'master' branch to 'main'

To move towards using more inclusive terminology, this removes references to the
“master” branch of the repository and replaces them with references to “main.”
At time of writing, master is still the default branch of the Graphviz
repository but after merging this commit the default branch can be changed to
main.

3 years agoMerge branch 'smattr/DEA0397C-9C4C-458C-BD45-236AD5A1CAAA' into 'master' master
Matthew Fernandez [Mon, 22 Mar 2021 15:30:55 +0000 (15:30 +0000)]
Merge branch 'smattr/DEA0397C-9C4C-458C-BD45-236AD5A1CAAA' into 'master'

remove unused HAVE_ARGZ_APPEND

See merge request graphviz/graphviz!1843

3 years agoremove unused HAVE_ARGZ_APPEND
Matthew Fernandez [Tue, 16 Mar 2021 02:30:11 +0000 (19:30 -0700)]
remove unused HAVE_ARGZ_APPEND

It is unclear where this originated from. It was added in the original commit of
this file but, at the time, the Autotools build system was not generating this
variable. The argz functionality seems related to the (now removed) dependency
RxSpencer, but Graphviz never used this and never checked whether it was
available.

3 years agoMerge branch 'grammar-align' into 'master'
Mark Hansen [Mon, 22 Mar 2021 11:10:28 +0000 (11:10 +0000)]
Merge branch 'grammar-align' into 'master'

Replace deprecated `<TD ALIGN>` attr with CSS

See merge request graphviz/graphviz!1863

3 years agoReplace deprecated `<TD ALIGN>` attr with CSS
Mark Hansen [Mon, 22 Mar 2021 10:45:50 +0000 (21:45 +1100)]
Replace deprecated `<TD ALIGN>` attr with CSS

Fixes an HTML validation warning downstream.

3 years agoMerge branch 'shapes-md' into 'master'
Mark Hansen [Mon, 22 Mar 2021 10:38:33 +0000 (10:38 +0000)]
Merge branch 'shapes-md' into 'master'

Update mkcolors.awk to output less-deprecated HTML

See merge request graphviz/graphviz!1862

3 years agoUpdate mkcolors.awk to output less-deprecated HTML
Mark Hansen [Mon, 22 Mar 2021 10:14:02 +0000 (21:14 +1100)]
Update mkcolors.awk to output less-deprecated HTML

Allows removing some warnings about bgcolor and font tags.

3 years agoMerge branch 'smattr/f628b6fb-27de-42a8-a29f-e0c8db438306' into 'master'
Matthew Fernandez [Sun, 21 Mar 2021 04:42:10 +0000 (04:42 +0000)]
Merge branch 'smattr/f628b6fb-27de-42a8-a29f-e0c8db438306' into 'master'

make PIC plugin generate valid code

Closes #131

See merge request graphviz/graphviz!1841

3 years agofix: emit Bézier curves as point-by-point spline shapes in PIC plugin
Matthew Fernandez [Mon, 15 Mar 2021 02:32:37 +0000 (19:32 -0700)]
fix: emit Bézier curves as point-by-point spline shapes in PIC plugin

With this change, the PIC plugin is finally usable. Bézier curves were being
emitted as a sequence of space-separated numbers. Similar to the previous
situation with boxes, I’m not sure what the intent of this was. This is invalid
PIC syntax. As of this commit, the PIC plugin produces output that is accepted
by GNU PIC. Fixes #131.

3 years agoremove an intermediate buffer in PIC plugin
Matthew Fernandez [Mon, 15 Mar 2021 02:23:06 +0000 (19:23 -0700)]
remove an intermediate buffer in PIC plugin

The values being printed to the intermediate buffer can just be emitted directly
into the final output stream.

3 years agofix: print a point array as a point-by-point box in PIC back end
Matthew Fernandez [Mon, 15 Mar 2021 02:06:03 +0000 (19:06 -0700)]
fix: print a point array as a point-by-point box in PIC back end

The existing code was emitting the points as a space-separated list of numbers.
It’s not clear what this was attempting to achieve. This is not a valid PIC
command. This change causes this to emit a sequence of line commands to draw the
described box. Related to #131.

3 years agofix incorrect macro reference in PIC plugin
Matthew Fernandez [Mon, 15 Mar 2021 00:42:00 +0000 (17:42 -0700)]
fix incorrect macro reference in PIC plugin

This looks once again copied from the core PIC implementation
(lib/common/picgen.c) without accounting for the fact the core implementation’s
attrs macros are generated dynamically. The plugin generates a single macro,
attrs0, which it was incorrectly calling as attrs1. Related to #131.

3 years agofix comment used in PIC files by plugin back end
Matthew Fernandez [Mon, 15 Mar 2021 00:33:03 +0000 (17:33 -0700)]
fix comment used in PIC files by plugin back end

The PIC plugin seems to have copied some details from the core PIC
implementation (lib/common/picgen.c) without noticing that the core
implementation juggles its comment format to emit PIC comments on pages and only
use TROFF comments at the top level. Related to #131.

3 years agofix CHANGELOG entry incorrectly added to old version
Matthew Fernandez [Sun, 21 Mar 2021 03:51:09 +0000 (20:51 -0700)]
fix CHANGELOG entry incorrectly added to old version

3 years agoMerge branch 'smattr/3178EBB6-E879-4846-8F8B-23D5431F7D2C' into 'master'
Matthew Fernandez [Sat, 20 Mar 2021 21:15:58 +0000 (21:15 +0000)]
Merge branch 'smattr/3178EBB6-E879-4846-8F8B-23D5431F7D2C' into 'master'

remove superfluous empty @param in doxygen comments

Closes #1977

See merge request graphviz/graphviz!1840

3 years agoremove superfluous empty @param in doxygen comments
Matthew Fernandez [Sun, 14 Mar 2021 20:34:52 +0000 (13:34 -0700)]
remove superfluous empty @param in doxygen comments

Fixes #1977.

3 years agoMerge branch 'shapes-md' into 'master'
Mark Hansen [Sat, 20 Mar 2021 01:58:53 +0000 (01:58 +0000)]
Merge branch 'shapes-md' into 'master'

Remove template shapes.html.j2

See merge request graphviz/graphviz!1854

3 years agoRemove template shapes.html.j2
Mark Hansen [Sat, 20 Mar 2021 01:36:00 +0000 (12:36 +1100)]
Remove template shapes.html.j2

It's all been migrated to the graphviz.gitlab.io repo, so we can retire this python code.

3 years agoMerge branch 'smattr/24836a24-1f74-4195-aaab-01112907fd7a' into 'master'
Matthew Fernandez [Sat, 20 Mar 2021 00:42:38 +0000 (00:42 +0000)]
Merge branch 'smattr/24836a24-1f74-4195-aaab-01112907fd7a' into 'master'

document missing libxdot API functions

Closes #1957

See merge request graphviz/graphviz!1839

3 years agodocument libxdot JSON functionality
Matthew Fernandez [Sat, 13 Mar 2021 18:39:12 +0000 (10:39 -0800)]
document libxdot JSON functionality

Closes #1957.

3 years agodocument parseXDotFOn in the libxdot API
Matthew Fernandez [Sat, 13 Mar 2021 18:35:46 +0000 (10:35 -0800)]
document parseXDotFOn in the libxdot API

Related to #1957.

3 years agodocument statistics function in the libxdot AP
Matthew Fernandez [Sat, 13 Mar 2021 18:32:17 +0000 (10:32 -0800)]
document statistics function in the libxdot AP

Related to #1957.

3 years agofix: realign libxdot man page description of xop_kind
Matthew Fernandez [Sat, 13 Mar 2021 18:27:07 +0000 (10:27 -0800)]
fix: realign libxdot man page description of xop_kind

This enum was changed in 2ebad94d317711522edaff778825fadda08f7584 but the man
page was not updated. Related to #1957.

3 years agofix typo in libxdot man page
Matthew Fernandez [Sat, 13 Mar 2021 18:21:07 +0000 (10:21 -0800)]
fix typo in libxdot man page

3 years agoMerge branch 'output-md' into 'master'
Mark Hansen [Fri, 19 Mar 2021 08:32:17 +0000 (08:32 +0000)]
Merge branch 'output-md' into 'master'

Extract html_grammar.html to independent make rule

See merge request graphviz/graphviz!1853

3 years agoExtract html_grammar.html to independent make rule
Mark Hansen [Fri, 19 Mar 2021 08:04:30 +0000 (19:04 +1100)]
Extract html_grammar.html to independent make rule

This lets us build it separately and include it in the Jekyll site.

3 years agoMerge branch 'smattr/52520E52-65F9-46FF-AFB5-92DBFB4D18DB' into 'master'
Matthew Fernandez [Fri, 19 Mar 2021 02:54:52 +0000 (02:54 +0000)]
Merge branch 'smattr/52520E52-65F9-46FF-AFB5-92DBFB4D18DB' into 'master'

pylintrc: backport inclusive language change from Pylint

See merge request graphviz/graphviz!1838

3 years agopylintrc: backport inclusive language change from Pylint
Matthew Fernandez [Fri, 12 Mar 2021 02:13:31 +0000 (18:13 -0800)]
pylintrc: backport inclusive language change from Pylint

Pylint commit 850c442dbda8d332049971d5c38f82b86da44f1d modified the pylintrc
template to remove the use of the problematic term “blacklist.” This commit
extracts the relevant parts of that and applies it to our code base, removing
the term in the Graphviz tree as well.

When upgrading to a version of Pylint that includes commit
12a76469782fab5c23d78039c4bfb37e3331945a, we should also swap our usage of
extension-pkg-whitelist for extension-pkg-allow-list.

3 years agoMerge branch 'arrows-quote-close' into 'master'
Mark Hansen [Thu, 18 Mar 2021 11:18:57 +0000 (11:18 +0000)]
Merge branch 'arrows-quote-close' into 'master'

Arrows docs: Add attribute quoting and tag closing

See merge request graphviz/graphviz!1852

3 years agoMerge branch 'arrows-delete-template' into 'master'
Mark Hansen [Thu, 18 Mar 2021 10:52:06 +0000 (10:52 +0000)]
Merge branch 'arrows-delete-template' into 'master'

Remove arrows.html templating

See merge request graphviz/graphviz!1851

3 years agodocs bugfix: recreate arrow_table.html
Mark Hansen [Thu, 18 Mar 2021 10:33:14 +0000 (21:33 +1100)]
docs bugfix: recreate arrow_table.html

Don't just append.

3 years agoArrows docs: Add attribute quoting and tag closing
Mark Hansen [Thu, 18 Mar 2021 10:32:28 +0000 (21:32 +1100)]
Arrows docs: Add attribute quoting and tag closing

This is to appease the more picky Markdown HTML parser.

3 years agoMerge branch 'colors-no-nbsp' into 'master'
Mark Hansen [Thu, 18 Mar 2021 10:32:13 +0000 (10:32 +0000)]
Merge branch 'colors-no-nbsp' into 'master'

Replace non-breaking spaces with CSS class

See merge request graphviz/graphviz!1850

3 years agoMerge branch 'colors-no-a' into 'master'
Mark Hansen [Thu, 18 Mar 2021 10:19:13 +0000 (10:19 +0000)]
Merge branch 'colors-no-a' into 'master'

mkcolors.awk: add HTML quotes and close TR tag

See merge request graphviz/graphviz!1849

3 years agoRemove arrows.html templating
Mark Hansen [Thu, 18 Mar 2021 10:09:21 +0000 (21:09 +1100)]
Remove arrows.html templating

It has been migrated to the other repo in:

https://gitlab.com/graphviz/graphviz.gitlab.io/-/merge_requests/289.

3 years agoMerge branch 'mkcolors-md' into 'master'
Mark Hansen [Thu, 18 Mar 2021 10:04:32 +0000 (10:04 +0000)]
Merge branch 'mkcolors-md' into 'master'

mkcolors.awk: add HTML quotes and close TR tag

See merge request graphviz/graphviz!1848

3 years agoReplace non-breaking spaces with CSS class
Mark Hansen [Thu, 18 Mar 2021 09:44:58 +0000 (20:44 +1100)]
Replace non-breaking spaces with CSS class

This is simpler and allows easier control of width styling.

3 years agomkcolors.awk: Remove anchor tag from colors
Mark Hansen [Thu, 18 Mar 2021 09:31:47 +0000 (20:31 +1100)]
mkcolors.awk: Remove anchor tag from colors

This prevents styling the color as a link (with underline).

3 years agomkcolors.awk: add HTML quotes and close TR tag
Mark Hansen [Thu, 18 Mar 2021 09:23:18 +0000 (20:23 +1100)]
mkcolors.awk: add HTML quotes and close TR tag

This makes the HTML well-formed enough to include inside a markdown file

Without these changes, the kramdown markdown editor struggles.

3 years agoMerge branch 'smattr/fb1d8a1c-fbe1-4a18-80c1-afb32a72f94b' into 'master'
Matthew Fernandez [Thu, 18 Mar 2021 00:51:35 +0000 (00:51 +0000)]
Merge branch 'smattr/fb1d8a1c-fbe1-4a18-80c1-afb32a72f94b' into 'master'

compress CIELAB gamut lookup table

Closes #1974

See merge request graphviz/graphviz!1837

3 years agocompress CIELAB gamut lookup table
Matthew Fernandez [Thu, 11 Mar 2021 04:52:54 +0000 (20:52 -0800)]
compress CIELAB gamut lookup table

The lab_gamut_data array is a lookup table (LUT) for some approximation of the
visible gamut of the CIELAB color space.¹ We have previously had extensive
problems compiling this file on Windows due to memory usage of MSVC.
0927817d203d61305da2b019f244744c10b588e6 finally brought things under control by
removing all struct usage which somehow was a factor.

This commit further reduces our requirements and guards against future such
situations. The LUT now, instead of listing every valid CIELAB value, lists
ranges in the CIELAB space. Some numbers:

                                   old     new
                                  --------------
    file size                     8.3MB   149KB
    LUT size                      2.4MB    43KB
    gcc-8.3 -O3 -c lab_gamut.c    5.8sec  0.8sec
    max lab_gamut() malloc         18MB   151MB

If necessary, we could reduce the dynamic allocation performed by lab_gamut() by
doing a pre-scan to calculate how many actual CIELAB values we need to store for
a given call.

  ¹ I say “some approximation” because all my attempts to distill a formula for
    deriving this table have failed. The closest is to enumerate the CIELAB
    space, translate each color into Standard RGB and then check whether the
    resulting value is within (0,0,0) - (255,255,255). However, this still is
    not quite exact. I expect the machine on which this LUT was originally
    generated uses a differently floating point representation or precision than
    any that I have available.

3 years agoremove incorrect legacy comment
Matthew Fernandez [Thu, 11 Mar 2021 04:37:53 +0000 (20:37 -0800)]
remove incorrect legacy comment

3 years agofix: missing value in CIELAB lookup table
Matthew Fernandez [Thu, 11 Mar 2021 04:16:26 +0000 (20:16 -0800)]
fix: missing value in CIELAB lookup table

This lookup table contains an approximation of the visible gamut of the CIELAB
color space.¹ While scaling to, e.g., Standard RGB is not linear, it is
continuous. Therefore it follows that if (L=5,a=22,b=6) is visible and
(L=5,a=22,b=8) is visible, (L=5,a=22,b=7) is also visible. This was presumably
an accidental deletion committed in pre-version-control days. Fixes #1974.

  ¹ https://en.wikipedia.org/wiki/CIELAB_color_space

3 years agoMerge branch 'smattr/11A3B453-C39B-4B15-91B1-3312A8B52698' into 'master'
Matthew Fernandez [Wed, 17 Mar 2021 00:37:19 +0000 (00:37 +0000)]
Merge branch 'smattr/11A3B453-C39B-4B15-91B1-3312A8B52698' into 'master'

track metrics from pylint job in CI

See merge request graphviz/graphviz!1836

3 years agotrack metrics from pylint job in CI
Matthew Fernandez [Wed, 10 Mar 2021 04:41:47 +0000 (20:41 -0800)]
track metrics from pylint job in CI

This replicates the metric tracking from some other CI jobs for the pylint task.
This should make the number of pylint warnings appear in the metrics section of
MRs, allowing us to track whether MRs increase or reduce the number of pylint
warnings.

3 years agoMerge branch 'smattr/D5D52AEF-8F8A-4CFE-B22D-889A8D2F960D' into 'master'
Matthew Fernandez [Tue, 16 Mar 2021 05:44:02 +0000 (05:44 +0000)]
Merge branch 'smattr/D5D52AEF-8F8A-4CFE-B22D-889A8D2F960D' into 'master'

remove unused files

See merge request graphviz/graphviz!1832

3 years agoremove unused layout_similarity.c
Matthew Fernandez [Sat, 6 Mar 2021 16:54:56 +0000 (08:54 -0800)]
remove unused layout_similarity.c

3 years agoremove unused lib/circogen files
Matthew Fernandez [Sat, 6 Mar 2021 16:54:24 +0000 (08:54 -0800)]
remove unused lib/circogen files

3 years agoremove unused lib/glcomp files
Matthew Fernandez [Sat, 6 Mar 2021 16:52:37 +0000 (08:52 -0800)]
remove unused lib/glcomp files

3 years agoremove unused lib/common files
Matthew Fernandez [Sat, 6 Mar 2021 16:50:29 +0000 (08:50 -0800)]
remove unused lib/common files

3 years agoremove unused plugin/core files
Matthew Fernandez [Sat, 6 Mar 2021 16:49:13 +0000 (08:49 -0800)]
remove unused plugin/core files

3 years agoremove unused smyrna files
Matthew Fernandez [Sat, 6 Mar 2021 16:47:16 +0000 (08:47 -0800)]
remove unused smyrna files

3 years agoremove unused gvpack_builtins.c
Matthew Fernandez [Sat, 6 Mar 2021 16:42:49 +0000 (08:42 -0800)]
remove unused gvpack_builtins.c

3 years agoremove unused sfexit.c
Matthew Fernandez [Sat, 6 Mar 2021 16:41:23 +0000 (08:41 -0800)]
remove unused sfexit.c

379b9f58511cbb7f1ef7b6b00865e44070cbad57 removed all references to sfexit.c but
did not remove the file itself.

3 years agoMerge branch 'smattr/59c0681a-e63f-44ca-b903-04fb073e174a' into 'master'
Matthew Fernandez [Tue, 16 Mar 2021 04:46:43 +0000 (04:46 +0000)]
Merge branch 'smattr/59c0681a-e63f-44ca-b903-04fb073e174a' into 'master'

some clean up of string handling

See merge request graphviz/graphviz!1833

3 years agoswap sprintf for snprintf where straightforward
Matthew Fernandez [Sat, 6 Mar 2021 23:35:39 +0000 (15:35 -0800)]
swap sprintf for snprintf where straightforward

sprintf has consistently been in the top ten root causes of vulnerabilities in
low level applications and is generally considered unsafe for any use in modern
code bases. This commit removes the instances of it that are straightforward to
convert to snprintf. Related to #1950.

3 years agoremove an unnecessary intermediate buffer
Matthew Fernandez [Sat, 6 Mar 2021 23:17:00 +0000 (15:17 -0800)]
remove an unnecessary intermediate buffer

3 years agoremove an unnecessary intermediate buffer
Matthew Fernandez [Sat, 6 Mar 2021 23:05:41 +0000 (15:05 -0800)]
remove an unnecessary intermediate buffer