]> granicus.if.org Git - graphviz/log
graphviz
3 years agoRemove dead assignment from GFXinit
Alex Henrie [Mon, 25 Jan 2021 00:29:35 +0000 (17:29 -0700)]
Remove dead assignment from GFXinit

3 years agoRemove dead assignment from scan_num
Alex Henrie [Mon, 25 Jan 2021 00:29:35 +0000 (17:29 -0700)]
Remove dead assignment from scan_num

3 years agoRemove dead assignments from mincross_step
Alex Henrie [Mon, 25 Jan 2021 00:29:35 +0000 (17:29 -0700)]
Remove dead assignments from mincross_step

3 years agoRemove dead assignment from SparseMatrix_coordinate_form_add_entries
Alex Henrie [Mon, 25 Jan 2021 00:29:35 +0000 (17:29 -0700)]
Remove dead assignment from SparseMatrix_coordinate_form_add_entries

3 years agoRemove dead assignment from constrained_majorization_new
Alex Henrie [Mon, 25 Jan 2021 00:29:35 +0000 (17:29 -0700)]
Remove dead assignment from constrained_majorization_new

3 years agoRemove dead assignments from self(Bottom|Top|Right|Left)
Alex Henrie [Mon, 25 Jan 2021 00:29:35 +0000 (17:29 -0700)]
Remove dead assignments from self(Bottom|Top|Right|Left)

3 years agoRemove dead assignment from parseSegs
Alex Henrie [Mon, 25 Jan 2021 00:29:35 +0000 (17:29 -0700)]
Remove dead assignment from parseSegs

3 years agoRemove dead assignment from mincross
Alex Henrie [Mon, 25 Jan 2021 00:29:35 +0000 (17:29 -0700)]
Remove dead assignment from mincross

3 years agoRemove dead assignment from edge_distinct_coloring
Alex Henrie [Mon, 25 Jan 2021 00:29:35 +0000 (17:29 -0700)]
Remove dead assignment from edge_distinct_coloring

3 years agoRemove dead assignment from map_path
Alex Henrie [Mon, 25 Jan 2021 00:29:35 +0000 (17:29 -0700)]
Remove dead assignment from map_path

3 years agoMerge branch 'smattr/28CF1899-48F1-437D-B47E-F356FBF1EF2B' into 'master'
Matthew Fernandez [Sat, 30 Jan 2021 23:01:57 +0000 (23:01 +0000)]
Merge branch 'smattr/28CF1899-48F1-437D-B47E-F356FBF1EF2B' into 'master'

remove legacy CVS references

See merge request graphviz/graphviz!1712

3 years agoremove legacy CVS references
Matthew Fernandez [Sun, 24 Jan 2021 21:57:55 +0000 (13:57 -0800)]
remove legacy CVS references

Now that Graphviz lives in Git, these references are no longer relevant. Closes
#1798.

3 years agoMerge branch 'smattr/B831E666-D040-4688-8954-B4CA975B36FB' into 'master'
Matthew Fernandez [Sat, 30 Jan 2021 22:17:06 +0000 (22:17 +0000)]
Merge branch 'smattr/B831E666-D040-4688-8954-B4CA975B36FB' into 'master'

fix some unchecked allocations in gxl2gv

Closes #1928

See merge request graphviz/graphviz!1710

3 years agofix: use gcalloc wrapper for some allocations that cannot tolerate failure
Matthew Fernandez [Sun, 24 Jan 2021 18:02:53 +0000 (10:02 -0800)]
fix: use gcalloc wrapper for some allocations that cannot tolerate failure

It would have been nicer to just call the existing gcalloc() in libcommon, but
this is not exported in the MS Build compilation flow and altering this has some
unclear side effects. Related to #1928.

3 years agofix: exit on allocation failure in genUserdata
Matthew Fernandez [Sun, 24 Jan 2021 17:53:57 +0000 (09:53 -0800)]
fix: exit on allocation failure in genUserdata

Closes #1928.

3 years agofix unchecked allocation failure when making an item in gxl2gv
Matthew Fernandez [Sun, 24 Jan 2021 17:52:40 +0000 (09:52 -0800)]
fix unchecked allocation failure when making an item in gxl2gv

The callers of this callback in libcdt can tolerate this function returning
NULL. Related to #1928.

3 years agoMerge !1711 into HEAD
Matthew Fernandez [Sat, 30 Jan 2021 21:43:34 +0000 (13:43 -0800)]
Merge !1711 into HEAD

3 years agoFix potential null pointer dereferences in UniformStressSmoother_new
Alex Henrie [Sun, 24 Jan 2021 20:17:41 +0000 (13:17 -0700)]
Fix potential null pointer dereferences in UniformStressSmoother_new

3 years agoMerge branch 'smattr/18710D9F-BA89-489A-BE10-CBD90E44A0EF' into 'master'
Matthew Fernandez [Sat, 30 Jan 2021 20:16:32 +0000 (20:16 +0000)]
Merge branch 'smattr/18710D9F-BA89-489A-BE10-CBD90E44A0EF' into 'master'

fix typo in pathscross()

Closes #1926

See merge request graphviz/graphviz!1708

3 years agoremove unnecessary bracketing in pathscross()
Matthew Fernandez [Sun, 24 Jan 2021 02:24:53 +0000 (18:24 -0800)]
remove unnecessary bracketing in pathscross()

3 years agofix typo in comparison in pathscross()
Matthew Fernandez [Sun, 24 Jan 2021 02:21:01 +0000 (18:21 -0800)]
fix typo in comparison in pathscross()

This was identified by GCC -Wlogical-op:

  dotsplines.c: In function ‘pathscross’:
  dotsplines.c:2498:32: warning: logical ‘and’ of equal expressions [-Wlogical-op]
       if ((ND_out(n0).size != 1) && (ND_out(n0).size != 1))
                                  ^~

Changes in this commit are the fix suggested by Stephen. Fixes #1926.

3 years agoremove some use of K&R function syntax
Matthew Fernandez [Sun, 24 Jan 2021 02:18:18 +0000 (18:18 -0800)]
remove some use of K&R function syntax

This was deprecated in favor of ANSI syntax some time ago.

3 years agoMerge branch !1709 into HEAD
Matthew Fernandez [Sat, 30 Jan 2021 19:43:03 +0000 (11:43 -0800)]
Merge branch !1709 into HEAD

3 years agochangelog entry for prior commit
Matthew Fernandez [Sat, 30 Jan 2021 19:15:07 +0000 (11:15 -0800)]
changelog entry for prior commit

3 years agoFix bad free in lefty
Alex Henrie [Sun, 24 Jan 2021 20:14:16 +0000 (13:14 -0700)]
Fix bad free in lefty

3 years agoMerge branch 'smattr/3b850695-fd6d-437a-b88f-2d65888d30b9' into 'master'
Matthew Fernandez [Sat, 30 Jan 2021 18:47:35 +0000 (18:47 +0000)]
Merge branch 'smattr/3b850695-fd6d-437a-b88f-2d65888d30b9' into 'master'

move to C99 and C++11

Closes #1832, #1833, and #1924

See merge request graphviz/graphviz!1707

3 years agofix overflow check in sparse
Matthew Fernandez [Sat, 23 Jan 2021 23:05:07 +0000 (15:05 -0800)]
fix overflow check in sparse

Switching to C99 compilation exposes the following compiler warning:

  general.c:364:21: warning: logical ‘or’ of collectively exhaustive tests is always true [-Wlogical-op]
     if (val > INT_MAX || val < INT_MIN) return 0;
                       ^~

This change fixes the comparison to do what seems to have been intended. Related
to #1833.

3 years agoremove cached allocation in userout
Matthew Fernandez [Sat, 23 Jan 2021 22:49:52 +0000 (14:49 -0800)]
remove cached allocation in userout

We can avoid using a static pointer and avoid the allocation loop in this
function by simply leveraging the C99 semantics of vsnprintf. The result is more
readable code. Closes #1924.

3 years agouse C99 standard for compiling C code
Matthew Fernandez [Sat, 2 Jan 2021 18:33:43 +0000 (10:33 -0800)]
use C99 standard for compiling C code

Closes #1833.

3 years agoremove C++11 check when compiling with Qt5
Matthew Fernandez [Sat, 2 Jan 2021 21:55:57 +0000 (13:55 -0800)]
remove C++11 check when compiling with Qt5

The build now requires C++11 at the top level, so any Qt5 code can assume C++11
is available and the relevant compiler flag(s) have already been appended.
Related to #1832.

3 years agorequire C++11 support for compiling
Matthew Fernandez [Sat, 2 Jan 2021 21:54:38 +0000 (13:54 -0800)]
require C++11 support for compiling

Closes #1832.

3 years agofix: stop ignoring changes to m4/*
Matthew Fernandez [Sat, 2 Jan 2021 21:46:14 +0000 (13:46 -0800)]
fix: stop ignoring changes to m4/*

These files are version controlled but were being manually unignored. Thus
changes to any missing entries (e.g. ax_check_compile_flag.m4) went unnoticed.
Now we don't ignore anything in this subdirectory because no generated files are
expected to end up there.

3 years agoMerge branch 'smattr/BE94C9C3-A6E3-4C5F-B6D8-FA00B0FDD413' into 'master'
Matthew Fernandez [Sun, 24 Jan 2021 18:02:18 +0000 (18:02 +0000)]
Merge branch 'smattr/BE94C9C3-A6E3-4C5F-B6D8-FA00B0FDD413' into 'master'

add some details about downstream projects

See merge request graphviz/graphviz!1705

3 years agoadd some details about downstream projects
Matthew Fernandez [Thu, 21 Jan 2021 01:02:02 +0000 (17:02 -0800)]
add some details about downstream projects

3 years agoMerge branch 'smattr/E64BA158-2E02-488E-9F5A-2ADC94C357C6' into 'master'
Matthew Fernandez [Sun, 24 Jan 2021 02:17:42 +0000 (02:17 +0000)]
Merge branch 'smattr/E64BA158-2E02-488E-9F5A-2ADC94C357C6' into 'master'

fix: suppress re-running CI on tagged commits

Closes #1901

See merge request graphviz/graphviz!1703

3 years agofix: suppress re-running CI on tagged commits
Matthew Fernandez [Sun, 17 Jan 2021 02:33:33 +0000 (18:33 -0800)]
fix: suppress re-running CI on tagged commits

Several tasks in the CI setup were allowed to run on tagged commits. This meant
that pushing a new tag would result in re-running CI on the tagged commit. This
was already confusing, but was compounded by these unrestricted tasks depending
on non-tag-only tasks. The result was that CI would stall and fail because
dependencies could not be satisfied.

To fix this we simply disallow all CI on a tag. This means that a tagged commit
that is not on any branch will not be tested. However, no one should be pushing
such a commit to the Graphviz repository. All tagged commits that are on a
branch will be tested via their SHA. This is not expected to cause any problems
as the Graphviz build system never checks the Git tag or whether a commit is
tagged at all.

Fixes #1901.

3 years agoMerge branch 'smattr/480984E2-F863-4F4B-8813-9EFB371B8CCC' into 'master'
Matthew Fernandez [Sun, 24 Jan 2021 01:13:20 +0000 (01:13 +0000)]
Merge branch 'smattr/480984E2-F863-4F4B-8813-9EFB371B8CCC' into 'master'

document how to build Graphviz for developers

See merge request graphviz/graphviz!1700

3 years agodocument how to build Graphviz for developers
Matthew Fernandez [Thu, 7 Jan 2021 03:36:12 +0000 (19:36 -0800)]
document how to build Graphviz for developers

3 years agoMerge !1699
Matthew Fernandez [Sun, 24 Jan 2021 00:38:48 +0000 (16:38 -0800)]
Merge !1699

3 years agoadd changelog item about prior commits
Matthew Fernandez [Sat, 23 Jan 2021 23:51:45 +0000 (15:51 -0800)]
add changelog item about prior commits

3 years agoFix memory leak in make_map_internal
Alex Henrie [Sat, 9 Jan 2021 09:02:07 +0000 (02:02 -0700)]
Fix memory leak in make_map_internal

3 years agoFix memory leak in gv_get_ps_fontlist
Alex Henrie [Thu, 7 Jan 2021 03:35:57 +0000 (20:35 -0700)]
Fix memory leak in gv_get_ps_fontlist

3 years agoFix memory leaks in Multilevel_(MQ|Modularity)_Clustering_establish
Alex Henrie [Thu, 7 Jan 2021 03:35:57 +0000 (20:35 -0700)]
Fix memory leaks in Multilevel_(MQ|Modularity)_Clustering_establish

3 years agoMerge branch 'smattr/529f1002-e2fa-4706-ba00-2b3ad0811c15' into 'master'
Matthew Fernandez [Sat, 23 Jan 2021 23:46:53 +0000 (23:46 +0000)]
Merge branch 'smattr/529f1002-e2fa-4706-ba00-2b3ad0811c15' into 'master'

unify and correct RectArea implementations

Closes #1906

See merge request graphviz/graphviz!1697

3 years agofix: unify and correct RectArea implementations
Matthew Fernandez [Sat, 12 Dec 2020 16:45:19 +0000 (08:45 -0800)]
fix: unify and correct RectArea implementations

Two implementations of RectArea were provided that implemented the overflow
check based on whether there was a larger type than unsigned int available. It
is unnecessary to maintain multiple implementations of this as the overflow
check can be written in a width-independent way.

Moreover the `LLONG_MAX > UINT_MAX` alternative was incorrect. E.g. on x86-64
where this alternative is used, if `r->boundary[i + NUMDIMS] - r->boundary[i]`
is `UINT_MAX` and the accumulated value in `a_test` is `(long long)UINT_MAX`,
the multiplication (which is done on operands promoted to long long) overflows
causing undefined behavior. In practice, you would likely get a negative value,
that then erroneously passes the overflow check.

Related to #1898. Fixes #1906.

3 years agofix: remove Circo test of root.gv from rtest.py-tested graphs
Matthew Fernandez [Mon, 28 Dec 2020 03:13:58 +0000 (19:13 -0800)]
fix: remove Circo test of root.gv from rtest.py-tested graphs

This graph generates an overflow when computing the area of rectangles required
to layout it out. It should be rejected but it currently incorrectly is not.
Related to #1906.

3 years agoMerge branch 'smattr/AB3ED35D-6FC9-4811-92FB-9C0FB6F5E9E4' into 'master'
Matthew Fernandez [Sat, 23 Jan 2021 23:14:25 +0000 (23:14 +0000)]
Merge branch 'smattr/AB3ED35D-6FC9-4811-92FB-9C0FB6F5E9E4' into 'master'

Autotools build system support for Guile 2.2

See merge request graphviz/graphviz!1696

3 years agosupport Guile 2.2 in the Autotools build system
Matthew Fernandez [Sun, 27 Dec 2020 22:19:27 +0000 (14:19 -0800)]
support Guile 2.2 in the Autotools build system

The build system detection of Guile was relying on a binary named guile-config.
As of Guile 2.2, coexisting versions of Guile are supported and so the
guile-config binary is suffixed with its version. The result of this mismatch
was that the build system would fail to detect Guile 2.2 on platforms that did
not provide a guile-config redirection shim.

Guile 3.0 has already been out for awhile, but this commit does not add support
for it. The devel packages for it do not seem yet available on any major Linux
distro. We should extend this support to 3.0 when it becomes more widely
available if Graphviz' use of Guile is compatible. Related to #1885.

3 years agofix: lookup Guile version by guile-config, not guile
Matthew Fernandez [Sun, 27 Dec 2020 22:50:32 +0000 (14:50 -0800)]
fix: lookup Guile version by guile-config, not guile

The Autotools build system was using the binary "guile" to detect what version
of Guile to build and link against. However, this is the Guile runtime system,
not the Guile developer dependencies. The effect of this was that the build
system could detect e.g. Guile 2.0 when guile20-devel was not installed. Related
to #1885.

3 years agoremove legacy Python 2 comments in Dockerfiles
Matthew Fernandez [Sun, 27 Dec 2020 21:18:27 +0000 (13:18 -0800)]
remove legacy Python 2 comments in Dockerfiles

These look to have been copied from Dockerfiles for other OSes that install
python2-devel or its equivalent. However, these ones do not so this comment does
not belong here.

3 years agoMerge cherry-picked commits from !1695
Matthew Fernandez [Sat, 23 Jan 2021 22:40:25 +0000 (14:40 -0800)]
Merge cherry-picked commits from !1695

3 years agoignore (or for one internal function remove) unused params
Ed J [Sat, 26 Dec 2020 19:12:36 +0000 (19:12 +0000)]
ignore (or for one internal function remove) unused params

3 years agofix a comment typo
Ed J [Sat, 26 Dec 2020 19:10:16 +0000 (19:10 +0000)]
fix a comment typo

3 years agoignore more generated files
Ed J [Fri, 25 Dec 2020 14:58:53 +0000 (14:58 +0000)]
ignore more generated files

3 years agoMerge branch 'smattr/D2B1FED2-41ED-4F48-81E6-B421639BB5EE' into 'master'
Matthew Fernandez [Sat, 23 Jan 2021 21:55:17 +0000 (21:55 +0000)]
Merge branch 'smattr/D2B1FED2-41ED-4F48-81E6-B421639BB5EE' into 'master'

some clean up of the HTML lexer

Closes #1913

See merge request graphviz/graphviz!1694

3 years agoremove some unnecessary bracketing in the HTML lexer
Matthew Fernandez [Sat, 26 Dec 2020 01:20:13 +0000 (17:20 -0800)]
remove some unnecessary bracketing in the HTML lexer

3 years agoremove micro-optimizations in HTML lexer
Matthew Fernandez [Sat, 26 Dec 2020 01:16:16 +0000 (17:16 -0800)]
remove micro-optimizations in HTML lexer

This code was attempting to avoid an expensive call to strcasecmp when the first
byte already indicates a mismatch. Modern compilers can perform this
optimization themselves, including inlining strcasecmp and unrolling and
vectorizing its loop. Manually comparing the first byte actually impedes the
compiler because it's harder for it to see your intent. Related to #1913.

3 years agofix incorrect parsing of ALIGN attribute in a <BR> HTML tag
Matthew Fernandez [Sat, 26 Dec 2020 21:26:00 +0000 (13:26 -0800)]
fix incorrect parsing of ALIGN attribute in a <BR> HTML tag

The logical operators here were incorrect. Rather than flipping them to the
correct operators, we undo this micro-optimization and write this code in a more
obvious manner. Fixes #1913.

3 years agotest case for #1913
Matthew Fernandez [Sat, 26 Dec 2020 21:20:59 +0000 (13:20 -0800)]
test case for #1913

3 years agoremove a Vim modeline
Matthew Fernandez [Sat, 26 Dec 2020 01:12:34 +0000 (17:12 -0800)]
remove a Vim modeline

This is only relevant for Vim users that have modeline support enabled and adds
clutter to the file.

3 years agouse libc limit constants instead of defining our own
Matthew Fernandez [Sat, 26 Dec 2020 01:11:12 +0000 (17:11 -0800)]
use libc limit constants instead of defining our own

These are available in the C standard library even prior to C89. This change has
no effect on functionality, as the replaced constants have identical values.

3 years agoremove a legacy RCS tag
Matthew Fernandez [Sat, 26 Dec 2020 01:09:20 +0000 (17:09 -0800)]
remove a legacy RCS tag

Related to #1798.

3 years agoMerge branch 'smattr/E2228C5B-49AF-464B-9869-7F2D29F459D9' into 'master'
Matthew Fernandez [Sat, 23 Jan 2021 21:21:50 +0000 (21:21 +0000)]
Merge branch 'smattr/E2228C5B-49AF-464B-9869-7F2D29F459D9' into 'master'

remove the use of NIL and friends

See merge request graphviz/graphviz!1692

3 years agoremove the use of NIL and friends
Matthew Fernandez [Fri, 18 Dec 2020 01:53:07 +0000 (17:53 -0800)]
remove the use of NIL and friends

NULL is more concise and more widely understood than the Graphviz-specific macro
NIL. We leave the definitions of NIL in case others are using these through the
public API.

3 years agoMerge branch 'smattr/3fd88959-c0fa-43fa-b8d0-1a39ff9cfac4' into 'master'
Matthew Fernandez [Sat, 23 Jan 2021 20:26:52 +0000 (20:26 +0000)]
Merge branch 'smattr/3fd88959-c0fa-43fa-b8d0-1a39ff9cfac4' into 'master'

some clean up in lib/gvpr/compile.c

See merge request graphviz/graphviz!1685

3 years agoremove some unnecessary bracketing
Matthew Fernandez [Wed, 25 Nov 2020 01:21:53 +0000 (17:21 -0800)]
remove some unnecessary bracketing

3 years agoremove some unnecessary casts
Matthew Fernandez [Wed, 25 Nov 2020 01:21:03 +0000 (17:21 -0800)]
remove some unnecessary casts

These coercions happen implicitly.

3 years agoremove a Vim modeline comment
Matthew Fernandez [Wed, 25 Nov 2020 01:19:59 +0000 (17:19 -0800)]
remove a Vim modeline comment

3 years agoturn ISEDGE macro into a function
Matthew Fernandez [Wed, 25 Nov 2020 01:07:33 +0000 (17:07 -0800)]
turn ISEDGE macro into a function

There's no need for this to be a macro or play bitwise tricks.

3 years agofix a comment typo
Matthew Fernandez [Wed, 25 Nov 2020 01:07:16 +0000 (17:07 -0800)]
fix a comment typo

3 years agoremove a RCS marker
Matthew Fernandez [Wed, 25 Nov 2020 01:06:31 +0000 (17:06 -0800)]
remove a RCS marker

Related to #1798.

3 years agoMerge branch 'smattr/36c9e35e-ec5c-4cf3-add5-51e394840fb2' into 'master'
Matthew Fernandez [Sat, 23 Jan 2021 19:55:07 +0000 (19:55 +0000)]
Merge branch 'smattr/36c9e35e-ec5c-4cf3-add5-51e394840fb2' into 'master'

minor cleanups

See merge request graphviz/graphviz!1683

3 years agoremove an dead store
Matthew Fernandez [Sun, 22 Nov 2020 06:02:54 +0000 (22:02 -0800)]
remove an dead store

This variable, `el`, is immediately reassigned in the following loop.

3 years agoremove some use of the NIL macro
Matthew Fernandez [Sun, 22 Nov 2020 06:01:33 +0000 (22:01 -0800)]
remove some use of the NIL macro

3 years agoremove an unnecessary intermediate buffer
Matthew Fernandez [Sun, 22 Nov 2020 05:57:26 +0000 (21:57 -0800)]
remove an unnecessary intermediate buffer

3 years agoremove commented out code
Matthew Fernandez [Sun, 22 Nov 2020 05:56:54 +0000 (21:56 -0800)]
remove commented out code

3 years agoremove unused macros
Matthew Fernandez [Sun, 22 Nov 2020 05:56:32 +0000 (21:56 -0800)]
remove unused macros

3 years agoremove micro-optimization in streq()
Matthew Fernandez [Sun, 22 Nov 2020 05:55:38 +0000 (21:55 -0800)]
remove micro-optimization in streq()

Modern compilers can already do tricks like this as they know strcmp() through
__builtin_strcmp().

3 years agoremove some unnecessary bracketing
Matthew Fernandez [Sun, 22 Nov 2020 05:51:02 +0000 (21:51 -0800)]
remove some unnecessary bracketing

3 years agoremove some unnecessary casts
Matthew Fernandez [Sun, 22 Nov 2020 05:33:45 +0000 (21:33 -0800)]
remove some unnecessary casts

These pointers implicitly coerce.

3 years agoMerge branch 'smattr/62f363ec-36df-4415-9029-91da24a61289' into 'master'
Matthew Fernandez [Sat, 23 Jan 2021 19:23:32 +0000 (19:23 +0000)]
Merge branch 'smattr/62f363ec-36df-4415-9029-91da24a61289' into 'master'

stop disabling assertions in libcgraph when DEBUG is undefined

See merge request graphviz/graphviz!1682

3 years agostop disabling assertions in libcgraph when DEBUG is undefined
Matthew Fernandez [Sat, 21 Nov 2020 23:22:29 +0000 (15:22 -0800)]
stop disabling assertions in libcgraph when DEBUG is undefined

This is counterintuitive to developers and moreover assertions are already
controllable via NDEBUG.

3 years agoMerge branch 'smattr/3e8082b9-bc17-4b27-968e-caa712091d2b' into 'master'
Matthew Fernandez [Sat, 23 Jan 2021 18:51:16 +0000 (18:51 +0000)]
Merge branch 'smattr/3e8082b9-bc17-4b27-968e-caa712091d2b' into 'master'

more VPSC clean up

See merge request graphviz/graphviz!1677

3 years agoVPSC: uniformly treat objects as structs that need to be exposed to C
Matthew Fernandez [Sat, 21 Nov 2020 16:42:21 +0000 (08:42 -0800)]
VPSC: uniformly treat objects as structs that need to be exposed to C

The keywords "class" and "struct" are synonyms in C++, except for changing the
default visibility of declarations within the object. By using struct for
anything that needs to be declared in the C API, we can avoid some #ifdef mess
in this header.

3 years agoremove a manual allocation
Matthew Fernandez [Sat, 21 Nov 2020 02:04:10 +0000 (18:04 -0800)]
remove a manual allocation

3 years agoremove some useless code
Matthew Fernandez [Sat, 21 Nov 2020 02:03:48 +0000 (18:03 -0800)]
remove some useless code

3 years agouse empty() to check size() against 0 in VPSC
Matthew Fernandez [Sat, 21 Nov 2020 01:20:28 +0000 (17:20 -0800)]
use empty() to check size() against 0 in VPSC

This is significantly faster for large vectors.

3 years agoremove unnecessary extern C
Matthew Fernandez [Sat, 21 Nov 2020 01:13:34 +0000 (17:13 -0800)]
remove unnecessary extern C

This file #includes csolve_VPSC.h, so the compiler has already seen prototypes
for these functions marked extern C.

3 years agoremove some unused using declarations
Matthew Fernandez [Sat, 21 Nov 2020 01:13:22 +0000 (17:13 -0800)]
remove some unused using declarations

3 years agoremove unnecessary explicit void in VPSC
Matthew Fernandez [Sat, 21 Nov 2020 01:12:50 +0000 (17:12 -0800)]
remove unnecessary explicit void in VPSC

Unlike in C, prototypes with no parameter list are not ambiguous in C++.

3 years agoremove Vim modeline comments in VPSC
Matthew Fernandez [Sat, 21 Nov 2020 01:11:54 +0000 (17:11 -0800)]
remove Vim modeline comments in VPSC

These have no effect for any developer not using Vim or with modeline disabled.
A better way to achieve this now is clang-format.

3 years agouse #pragma once guards in VPSC
Matthew Fernandez [Sat, 21 Nov 2020 01:09:52 +0000 (17:09 -0800)]
use #pragma once guards in VPSC

These are supported by all recent compilers and are less error prone than old
style header guards.

3 years agoupdate Adaptagrams URLs
Matthew Fernandez [Sat, 21 Nov 2020 01:08:24 +0000 (17:08 -0800)]
update Adaptagrams URLs

It is debatable whether this is useful as the upstream project seems to be dead.

3 years agoremove VPSC RCS markers
Matthew Fernandez [Sat, 21 Nov 2020 01:05:36 +0000 (17:05 -0800)]
remove VPSC RCS markers

These RCS version control markers no longer serve a purpose, now that Graphviz
is hosted in Git. Related to #1798.

3 years agoMerge branch 'smattr/A7F35B6D-9CED-4C89-B438-AE0CC4ECD4FA' into 'master'
Matthew Fernandez [Sat, 23 Jan 2021 18:18:53 +0000 (18:18 +0000)]
Merge branch 'smattr/A7F35B6D-9CED-4C89-B438-AE0CC4ECD4FA' into 'master'

remove some extraneous lib/vpsc code

See merge request graphviz/graphviz!1675

3 years agoremove an unnecessary destructor
Matthew Fernandez [Mon, 16 Nov 2020 00:32:27 +0000 (16:32 -0800)]
remove an unnecessary destructor

These vector members of the class are automatically cleared when an object of
this type is destructed.

3 years agoremove unused BadIterator exception
Matthew Fernandez [Mon, 16 Nov 2020 00:21:50 +0000 (16:21 -0800)]
remove unused BadIterator exception

3 years agoremove unused Overflow exception
Matthew Fernandez [Mon, 16 Nov 2020 00:20:58 +0000 (16:20 -0800)]
remove unused Overflow exception

If there is a need of this in future, std::out_of_range is more appropriate.

3 years agoremove unused OutOfMemory exception
Matthew Fernandez [Mon, 16 Nov 2020 00:19:39 +0000 (16:19 -0800)]
remove unused OutOfMemory exception

If there is a need of something like this in future, std::bad_alloc is more
appropriate.

3 years agoremove undefined class
Matthew Fernandez [Mon, 16 Nov 2020 00:18:43 +0000 (16:18 -0800)]
remove undefined class

Thankfully it seems no one ever implemented this declared class which sounds,
well, stupid.