]> granicus.if.org Git - graphviz/log
graphviz
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

3 years agoremove some commented out code
Matthew Fernandez [Sat, 6 Mar 2021 23:00:29 +0000 (15:00 -0800)]
remove some commented out code

3 years agomove short lived arrays to the stack
Matthew Fernandez [Sat, 6 Mar 2021 22:56:36 +0000 (14:56 -0800)]
move short lived arrays to the stack

It is fine to allocate 100 bytes on the stack instead of the heap in these
situations.

3 years agoremove some commented out code
Matthew Fernandez [Sat, 6 Mar 2021 22:50:12 +0000 (14:50 -0800)]
remove some commented out code

3 years agoremove some commented out code
Matthew Fernandez [Sat, 6 Mar 2021 22:32:05 +0000 (14:32 -0800)]
remove some commented out code

3 years agoremove an unnecessary intermediate buffer
Matthew Fernandez [Sat, 6 Mar 2021 22:25:33 +0000 (14:25 -0800)]
remove an unnecessary intermediate buffer

3 years agoremove some commented out code
Matthew Fernandez [Sat, 6 Mar 2021 22:21:26 +0000 (14:21 -0800)]
remove some commented out code

3 years agoremove some errant comments
Matthew Fernandez [Sat, 6 Mar 2021 22:19:03 +0000 (14:19 -0800)]
remove some errant comments

3 years agomove a heap-allocated smyrna buffer to the stack
Matthew Fernandez [Sat, 6 Mar 2021 22:17:30 +0000 (14:17 -0800)]
move a heap-allocated smyrna buffer to the stack

It is fine to allocate 256 bytes on the stack here.

3 years agoremove redundant lefty conditional
Matthew Fernandez [Sat, 6 Mar 2021 22:10:52 +0000 (14:10 -0800)]
remove redundant lefty conditional

3 years agorephrase extremely visually confusing lefty comparison
Matthew Fernandez [Sat, 6 Mar 2021 22:10:23 +0000 (14:10 -0800)]
rephrase extremely visually confusing lefty comparison

3 years agorephrase unnecessarily cryptic string comparisons in lefty
Matthew Fernandez [Sat, 6 Mar 2021 22:09:53 +0000 (14:09 -0800)]
rephrase unnecessarily cryptic string comparisons in lefty

3 years agoremove some unnecessary intermediate buffers in lefty
Matthew Fernandez [Sat, 6 Mar 2021 21:40:21 +0000 (13:40 -0800)]
remove some unnecessary intermediate buffers in lefty

3 years agoconvert sprintf calls in xdot to snprintf
Matthew Fernandez [Sat, 6 Mar 2021 21:09:31 +0000 (13:09 -0800)]
convert sprintf calls in xdot to snprintf

Related to #1950.

3 years agoMerge branch 'smattr/3DB6A16B-DE0E-4004-A579-D109134E7310' into 'master'
Matthew Fernandez [Tue, 16 Mar 2021 03:47:07 +0000 (03:47 +0000)]
Merge branch 'smattr/3DB6A16B-DE0E-4004-A579-D109134E7310' into 'master'

remove unused hpglgen.c

See merge request graphviz/graphviz!1830

3 years agoremove unused hpglgen.c
Matthew Fernandez [Fri, 5 Mar 2021 05:27:00 +0000 (21:27 -0800)]
remove unused hpglgen.c

3 years agoMerge branch 'smattr/26d4fb27-7a4a-4114-9dff-541dec3edc65' into 'master'
Matthew Fernandez [Tue, 16 Mar 2021 02:57:15 +0000 (02:57 +0000)]
Merge branch 'smattr/26d4fb27-7a4a-4114-9dff-541dec3edc65' into 'master'

some gvmap clean up

See merge request graphviz/graphviz!1831

3 years agoremove unused plot_dot_map argument to plot_dot_map
Matthew Fernandez [Sat, 6 Mar 2021 03:00:41 +0000 (19:00 -0800)]
remove unused plot_dot_map argument to plot_dot_map

3 years agoremove unused poly_point_map parameter to get_country_graph
Matthew Fernandez [Sat, 6 Mar 2021 02:58:01 +0000 (18:58 -0800)]
remove unused poly_point_map parameter to get_country_graph

3 years agoremove unused function plot_processing_polygons
Matthew Fernandez [Sat, 6 Mar 2021 02:53:22 +0000 (18:53 -0800)]
remove unused function plot_processing_polygons

3 years agomark plot_dot_polygons static
Matthew Fernandez [Sat, 6 Mar 2021 02:52:18 +0000 (18:52 -0800)]
mark plot_dot_polygons static

This is not used outside make_map.c.

3 years agomark processing_one_poly static
Matthew Fernandez [Sat, 6 Mar 2021 02:51:28 +0000 (18:51 -0800)]
mark processing_one_poly static

This is not used outside make_map.c

3 years agoremove unused close argument from processing_polygon
Matthew Fernandez [Sat, 6 Mar 2021 02:50:40 +0000 (18:50 -0800)]
remove unused close argument from processing_polygon

3 years agoremove unused close argument to dot_one_poly
Matthew Fernandez [Sat, 6 Mar 2021 02:49:06 +0000 (18:49 -0800)]
remove unused close argument to dot_one_poly

3 years agomark dot_one_poly static
Matthew Fernandez [Sat, 6 Mar 2021 02:47:44 +0000 (18:47 -0800)]
mark dot_one_poly static

This is unused outside of make_map.c

3 years agoremove unused parameter to dot_polygon
Matthew Fernandez [Sat, 6 Mar 2021 02:43:39 +0000 (18:43 -0800)]
remove unused parameter to dot_polygon

3 years agoremove unused parameter to plot_dot_labels
Matthew Fernandez [Sat, 6 Mar 2021 02:42:11 +0000 (18:42 -0800)]
remove unused parameter to plot_dot_labels

3 years agomark plot_dot_labels static
Matthew Fernandez [Sat, 6 Mar 2021 02:41:19 +0000 (18:41 -0800)]
mark plot_dot_labels static

This is not used outside make_map.c

3 years agoremove unused parameters from plot_dot_edges
Matthew Fernandez [Sat, 6 Mar 2021 02:40:19 +0000 (18:40 -0800)]
remove unused parameters from plot_dot_edges

3 years agoremove commented out code in gvmap
Matthew Fernandez [Sat, 6 Mar 2021 02:25:37 +0000 (18:25 -0800)]
remove commented out code in gvmap

3 years agoremove plot_*_map prototypes
Matthew Fernandez [Sat, 6 Mar 2021 02:33:27 +0000 (18:33 -0800)]
remove plot_*_map prototypes

These functions are not implemented.

3 years agosquash some -Wmissing-prototypes warnings in gvmap
Matthew Fernandez [Sat, 6 Mar 2021 02:30:02 +0000 (18:30 -0800)]
squash some -Wmissing-prototypes warnings in gvmap

3 years agoremove unused label_sizes argument to improve_contiguity
Matthew Fernandez [Sat, 6 Mar 2021 02:22:12 +0000 (18:22 -0800)]
remove unused label_sizes argument to improve_contiguity

3 years agoremove intermediate string construction altogether in dot_polygon
Matthew Fernandez [Sat, 6 Mar 2021 02:16:17 +0000 (18:16 -0800)]
remove intermediate string construction altogether in dot_polygon

There's no need for this and we can achieve it in one (well two) shot.

The better way to do this would be with an in-memory expanding buffer (like
open_memstream), but this change is at least an improvement over the previous
code.

3 years agoabbreviate computation of len_swidth in gvmap
Matthew Fernandez [Sat, 6 Mar 2021 02:05:08 +0000 (18:05 -0800)]
abbreviate computation of len_swidth in gvmap

C99 semantics allow us to avoid using an intermediate buffer for this operation.

3 years agoremove redundant swidth computation
Matthew Fernandez [Sat, 6 Mar 2021 01:59:23 +0000 (17:59 -0800)]
remove redundant swidth computation

The values being computed here were already computed in a previous block and
have not changed since. There was clearly copy-pasted wholesale from the code
above it.

3 years agoMerge branch 'smattr/FD7CAB8E-F5F4-476A-83DE-B2F650DD87C6' into 'master'
Matthew Fernandez [Tue, 16 Mar 2021 02:19:15 +0000 (02:19 +0000)]
Merge branch 'smattr/FD7CAB8E-F5F4-476A-83DE-B2F650DD87C6' into 'master'

fix: remove BROWSER #define from Windows MS Build compilation

Closes #1954

See merge request graphviz/graphviz!1828

3 years agofix: remove BROWSER #define from Windows MS Build compilation
Matthew Fernandez [Thu, 4 Mar 2021 01:25:59 +0000 (17:25 -0800)]
fix: remove BROWSER #define from Windows MS Build compilation

This is only used by two plugins, glitz and xlib, and it’s unclear whether
either are intended to run on Windows. The code path using BROWSER is also only
enabled when the build environment has sys/types.h and unistd.h, neither of
which typically exist on Windows. In any event, xdg-open is not the way to open
a browser on Windows. It is better that we exclude this and fail at compile time
than build plugins that fail in unpredictable ways at runtime. Closes #1954.

3 years agoMerge branch 'smattr/6992578B-3535-4D79-B858-D75963CAD598' into 'master'
Matthew Fernandez [Tue, 16 Mar 2021 00:48:16 +0000 (00:48 +0000)]
Merge branch 'smattr/6992578B-3535-4D79-B858-D75963CAD598' into 'master'

Start 2.47 development series

See merge request graphviz/graphviz!1842

3 years agoStart 2.47 development series
Matthew Fernandez [Tue, 16 Mar 2021 00:06:40 +0000 (17:06 -0700)]
Start 2.47 development series

3 years agoMerge branch 'smattr/2438B2D8-0DA8-4113-BB34-552A50EC9C91' into 'master' 2.47.0
Matthew Fernandez [Tue, 16 Mar 2021 00:04:01 +0000 (00:04 +0000)]
Merge branch 'smattr/2438B2D8-0DA8-4113-BB34-552A50EC9C91' into 'master'

Stable Release 2.47.0

See merge request graphviz/graphviz!1835

3 years agoStable Release 2.47.0
Matthew Fernandez [Wed, 10 Mar 2021 02:41:03 +0000 (18:41 -0800)]
Stable Release 2.47.0

3 years agoMerge branch 'smattr/DE0345C1-564D-44F6-82A4-8369EFE0151A' into 'master'
Matthew Fernandez [Wed, 10 Mar 2021 01:48:06 +0000 (01:48 +0000)]
Merge branch 'smattr/DE0345C1-564D-44F6-82A4-8369EFE0151A' into 'master'

fix: correctly recognize Windows packages in deploy script

Closes #1955

See merge request graphviz/graphviz!1834

3 years agofix: correctly recognize Windows packages in deploy script
Matthew Fernandez [Wed, 10 Mar 2021 01:08:42 +0000 (17:08 -0800)]
fix: correctly recognize Windows packages in deploy script

239f6301789b603202d500f7ae58e800354c1524 identified Windows packages containing
the word “Windows” but the package filenames actually have this in lower case.
Closes #1955.

3 years agoMerge branch 'smattr/F122BD95-99D1-4293-A809-6EF587D2D8ED' into 'master'
Matthew Fernandez [Tue, 9 Mar 2021 16:44:14 +0000 (16:44 +0000)]
Merge branch 'smattr/F122BD95-99D1-4293-A809-6EF587D2D8ED' into 'master'

deploy: generate SHA256 checksums in addition to MD5, and also apply to macOS and Windows packages

Closes #1955

See merge request graphviz/graphviz!1827

3 years agogenerate checksums for macOS and Windows packages during deployment
Matthew Fernandez [Wed, 3 Mar 2021 02:12:23 +0000 (18:12 -0800)]
generate checksums for macOS and Windows packages during deployment

This is in addition to the previously generated portable source checksum. For
now, it is assumed we don't need checksums for the fined grained Linux packages.
Closes #1955.

3 years agogenerate a SHA256 checksum of the release tarball in addition to MD5
Matthew Fernandez [Wed, 3 Mar 2021 01:52:41 +0000 (17:52 -0800)]
generate a SHA256 checksum of the release tarball in addition to MD5

Related to #1955.

3 years agoextract checksumming in deploy script into a function
Matthew Fernandez [Wed, 3 Mar 2021 01:50:59 +0000 (17:50 -0800)]
extract checksumming in deploy script into a function

Related to #1955.

3 years agoMerge branch 'swaldhoer/simple-python-fixes'
Matthew Fernandez [Tue, 9 Mar 2021 01:25:24 +0000 (17:25 -0800)]
Merge branch 'swaldhoer/simple-python-fixes'

3 years agouse main convention
swaldhoer [Thu, 25 Feb 2021 21:45:58 +0000 (22:45 +0100)]
use main convention
use argparse to work with command line arguments
sort imports alphabetically
fix whitespace inconsistencies
fix some pylint errors
fix formatting

3 years agoMerge branch 'smattr/8FF1769C-58CB-4DD6-891E-3ACEE75C40A0' into 'master'
Matthew Fernandez [Sun, 7 Mar 2021 20:56:08 +0000 (20:56 +0000)]
Merge branch 'smattr/8FF1769C-58CB-4DD6-891E-3ACEE75C40A0' into 'master'

some libgvpr cleanup

See merge request graphviz/graphviz!1813

3 years agoavoid some use of literal 0 for a pointer
Matthew Fernandez [Mon, 1 Mar 2021 03:42:32 +0000 (19:42 -0800)]
avoid some use of literal 0 for a pointer

We can write this clearer as NULL.

3 years agouse more explicit types for some booleans
Matthew Fernandez [Mon, 1 Mar 2021 03:40:11 +0000 (19:40 -0800)]
use more explicit types for some booleans

Now that we build with C99, we can be more expressive with types.

3 years agoreflow some lines
Matthew Fernandez [Mon, 1 Mar 2021 03:32:18 +0000 (19:32 -0800)]
reflow some lines

3 years agoremove some unnecessary bracketing
Matthew Fernandez [Mon, 1 Mar 2021 02:53:43 +0000 (18:53 -0800)]
remove some unnecessary bracketing

3 years agoundo another strcmp micro-optimization
Matthew Fernandez [Mon, 1 Mar 2021 02:41:30 +0000 (18:41 -0800)]
undo another strcmp micro-optimization

3 years agoreplace another sfstropen with agxbuf
Matthew Fernandez [Sun, 3 Jan 2021 18:03:33 +0000 (10:03 -0800)]
replace another sfstropen with agxbuf

Related to #1873.

3 years agoreplace another sfstropen in GVPR with an agxbuf
Matthew Fernandez [Sun, 3 Jan 2021 17:35:10 +0000 (09:35 -0800)]
replace another sfstropen in GVPR with an agxbuf

Related to #1873.

3 years agoremove a use of sfstropen in GVPR
Matthew Fernandez [Sun, 3 Jan 2021 01:49:25 +0000 (17:49 -0800)]
remove a use of sfstropen in GVPR

Related to #1873.

3 years agoMerge branch 'smattr/37ce32ea-c880-4551-bbc7-91d0a3ccc596' into 'master'
Matthew Fernandez [Sun, 7 Mar 2021 19:46:30 +0000 (19:46 +0000)]
Merge branch 'smattr/37ce32ea-c880-4551-bbc7-91d0a3ccc596' into 'master'

rewrite agxbputc as a function

Closes #1814

See merge request graphviz/graphviz!1812

3 years agorewrite agxbputc as a function
Matthew Fernandez [Mon, 1 Mar 2021 04:30:59 +0000 (20:30 -0800)]
rewrite agxbputc as a function

This solves an issue where the macro implementation did not sufficiently bracket
its arguments. Fixes #1814.

3 years agoMerge branch 'smattr/F8CE1A6E-745B-4768-839C-5004B9EECA6E' into 'master'
Matthew Fernandez [Sat, 6 Mar 2021 16:58:15 +0000 (16:58 +0000)]
Merge branch 'smattr/F8CE1A6E-745B-4768-839C-5004B9EECA6E' into 'master'

remove yet more strcmp micro-optimizations

See merge request graphviz/graphviz!1805

3 years agoremove commented out M_PI
Matthew Fernandez [Sun, 28 Feb 2021 07:11:59 +0000 (23:11 -0800)]
remove commented out M_PI

3 years agoremove another strcmp micro-optimization
Matthew Fernandez [Sun, 28 Feb 2021 06:36:04 +0000 (22:36 -0800)]
remove another strcmp micro-optimization

3 years agoremove no-longer-used Strcmp
Matthew Fernandez [Sun, 28 Feb 2021 06:08:02 +0000 (22:08 -0800)]
remove no-longer-used Strcmp

3 years agoswap Strcmp calls for strcmp
Matthew Fernandez [Sun, 28 Feb 2021 06:03:43 +0000 (22:03 -0800)]
swap Strcmp calls for strcmp

Strcmp optimized strcmp by unrolling the first iteration of a byte comparison
loop. This is no longer an optimization. In modern compilers/libc, (1) strcmp is
generally no longer a byte-by-byte comparison loop and (2) the compiler knows
strcmp as a built-in and can do this kind of unrolling itself. As a result, the
compiler actually has to do *more* work to reverse Strcmp back into strcmp and
thus determine it can use, e.g., SIMD optimizations.

This is essentially the next step of f5a326cb061866bb3beaa33c3e5169efe7fc134d.

3 years agoMerge branch 'smattr/d509f519-e63e-4df1-ab2b-6daac754ff43' into 'master'
Matthew Fernandez [Sat, 6 Mar 2021 01:54:26 +0000 (01:54 +0000)]
Merge branch 'smattr/d509f519-e63e-4df1-ab2b-6daac754ff43' into 'master'

remove an intermediate buffer in libxdot’s jsonString

See merge request graphviz/graphviz!1800

3 years agoremove intermediate buffer in libxdot
Matthew Fernandez [Sat, 27 Feb 2021 04:10:31 +0000 (20:10 -0800)]
remove intermediate buffer in libxdot

The function jsonString was trying to optimize processing by constructing a
string in an intermediate agxbuf before passing this buffer to the caller’s
print callback. An implicit assumption is that the callback is significantly
more expensive than outputting to the intermediate buffer. This is not true. The
only callbacks ever passed to this function are agxbprint itself and fputs,
which does efficient buffering. Both of these are at least as efficient as
agxbuf, making the trip through the intermediate buffer actually a
*de-optimization*.

3 years agoremove irrelevant comment
Matthew Fernandez [Sat, 27 Feb 2021 03:45:08 +0000 (19:45 -0800)]
remove irrelevant comment

JSON encoding needs no special UTF-8 handling.

3 years agoadd a test case for xdot's JSON output
Matthew Fernandez [Sat, 27 Feb 2021 03:31:05 +0000 (19:31 -0800)]
add a test case for xdot's JSON output

Related to #1958.