Emden Gansner [Tue, 22 Nov 2016 18:33:28 +0000 (13:33 -0500)]
Update man page, and fix number of nodes in the 2D Sierpinski graph;
fix edge count for 3D Sierpinski in graph_generator.c;
modify CLI to use -S for Sierpinski in any dimension.
Emden Gansner [Thu, 3 Nov 2016 20:57:52 +0000 (16:57 -0400)]
Revert version ffb894f27874ebd510a8555c28083d6e01eb80b6. The fix broke other input (rtest/graphs/url.gv).
Plus it didn't fix the problem of repeated ids. We need to rethink how to handle anchors.
Erwin Janssen [Thu, 3 Nov 2016 00:18:20 +0000 (01:18 +0100)]
Fix: shape coordinates close to 0 now absolutely 0
Check wether the values are close to zero by checking if it lies between
-0.00001 and 0.00001. If this is the case, set the value to 0. This prevents
coordinates like 7.10543e-15, that are differ by platform.
Erwin Janssen [Tue, 11 Oct 2016 10:38:23 +0000 (12:38 +0200)]
Compare output `shapes.py` to reference files
The reference files in `shapes/reference` are generated by the most recent
version of Graphviz. They will serve as a comparison for later versions to
verify the output.
`shapes.py` compares the generated files stored in `output` with the
reference files, by checking equality.
Erwin Janssen [Mon, 10 Oct 2016 22:01:22 +0000 (00:01 +0200)]
Batch file for regression tests for Windows added.
This batch file will execute the new regression tests, for now this only
inclues `shapes.py`. Also added the execution of this file to the Appveyor
configuration.
Instead of checking for the availability of stdint.h and inttypes.h with HAVE_STDINT_H and HAVE_INTTYPES_H, simply include stdint.h. The header stdint.h is part of the C99 standard, so it can be safely assumed that this header is present.
inttypes.h contains everything stdint.h includes, but in all cases here, stdint.h suffices.
This define is only used three times in lib/cgraph:
- In cghdr.h to include vmalloc.h
- In main.c in a function that is never called.
- in mem.c where malloc based allocation is used instead.
The defines _BEGIN_EXTERNS_ and _END_EXTERNS_ define `extern "C"` based on compilation with C++. However, the header files containing this define already have this check in a more conventional way. This additional define is therefore not needed in these files.
There are various checks for the alloca function and a definition of this function if it isn't found. However, the alloca function is never used anywhere in the code. These checks and defintions can therefore be removed.
This function is never used somewhere. Removed the function declaration from sfdisc.h and the file containing the definition.
The define `HAVE_STRUCT_DIOATTR` was only used in this code file, so the check setting this define in `configure.ac` can also be removed.
The header file float.h is part of the standard C library, so we can
assume it is always available. This header file also isn't included in the
sfio build when `_SFBINARY` is defined, resulting in a failed build.
The checks defining `_hdr_float` are removed and <float.h> is only
included were required in lib/sfio: in sfputd.c
There used to be a check that defined `Void_t` as `void` when standard C
was used and `char` otherwise. Since we are always compiling with standard
C and `void` is a valid type, there is no reason to keep this typedef.
It seems that the condition where this macro is defined
(`#if !defined(_DLL_BLD) && defined(_dll_import)`) is never met. This
macro also seems to be meant for very specific scenario.
All in all, it seems safe to remove the macros by replacing them with
the value it gets when the above condition is not met.
This macro is used to simplify function prototyping when using the old
K&R C and more modern C dialects. Only three projects use this macro:
cdt, sfio and vmalloc. K&R is obsolete, so this macro adds no benefits and
only makes the code more complicated.
Definition and usage of this macro is removed from all files.
Change the build directory of libgd to `build` instead of `gdbuild`,
because `build` is ignored by the libgd's .gitignore file. The vcxproject
files have been updated to reflect this change.
Changed the download link for freetype because the link was changed.
Removed old-style function defintions from vmalloc
The functions definitions in vmalloc are all surrounded by an `#if __STD_C`, if __STD_C is not defined than the old style function definition is used. These days STD C is the standard and the old style function defintions are obsolete.
They have been removed from lib/vmalloc and its subprojects, comments have been preserved by converting them to a Doxygen style.
The functions definitions in sfio are all surrounded by an `#if __STD_C`, if __STD_C is not defined than the old style function definition is used. These days STD C is the standard and the old style function defintions are obsolete.
They have been removed from lib/sfio and its subprojects, comments have been preserved by converting time to a Doxygen style.
Removed old-style function defintions from lib/cdt
The functions definitions in cdt are all surrounded by an `#if __STD_C`, if __STD_C is not defined than the old style function definition is used. These days STD C is the standard and the old style function defintions are obsolete.
They have been removed from lib/cdt, but not from the subprojects.
There are multiple checks to set SF_MAXDOUBLE, which is then only used
once. Since we are compiling with standard C and `float.h` is part of the
standard C API, we can use DBL_MAX instead and remove the define of
SF_MAXDOUBLE. This also results in some header files that are no longer
included, so checks for these could also be removed.
This define is used in `lib/sfio` to determine if it is alright to include
`<stdint.h>`. Since we are compiling with standard C and stdint.h is part
of the standard, we can safely assume this check always evaluates to true
and remove it.
This define was only used twice. Once surrounded by a `#if 0` and once
only if HAVE_STDBOOL_H wasn't defined (HAVE_STDBOOL_H is part of the C99
standard library and is always defined).
The header string.h is always present since we are compiling with standard C.
There is no need for this check, since it will always evaluate to true.
In addition to this, most includes of string.h to not use this check.
This define is used in `lib/sfio` to determine if it is alright to include
`<string.h>`. Since we are compiling with standard C and string.h is part
of the standard, we can safely assume this check always evaluates to true
and remove it.
The presence of `socklen_t` is tested and an alternative typedef is
created when `socklen_t` is absent, but `socklen_t` is never used in the
code, this check should be removed.
This define is used in `lib/sfio` and `lib/vmalloc' to determine if it is
alright to include `<stdlib.h>`. Since we are compiling with standard C
and stdlib.h is part of the standard, we can safely assume this check
always evaluates to true and remove it.
The .vcproj files are the old Visual Studio project files. A lot of these
were upgraded and the old versions removed. These vcproj files have an
upgraded .vcxproj, but hadn't been removed yet.
Removed the checks that define `HAVE_GETOPT_H` and `HAVE_GETOPT_DECL`.
Because getopt can be used by the Windows build, these checks are no
longer needed.
These two files were present because Windows doesn't have the getopt
function. With the new getopt library for Windows added, these two files
are no longer needed.
This library should provide the ability to use `getopt` in the Windows
build. The implementatation of the `getopt` function is taken from the
ingraphs library.
Adding this project also added a x64 build configuration to the Visual
Studio solution, but this configuration isn't tested yet.
config.h should always be included, a build without it never happens.
The checks on Linux always succeed, because autotools automatically
defines HAVE_CONFIG_H on all the Makefiles. On Windows this is not the
case. Removing all the checks revealed that multiple projects did not
include config.h because HAVE_CONFIG_H wasn't defined. This was the case
for at least the following projects:
- acyclic
- bcomps
- ccomps
- dijkstra
- ingraphs
- gc
- gml2gv
- graphml2gv
- gv2gml
- gvcolor
- gvgen
- mm2gv
- nop
- pathplan
- rbtree
- sccmap
- topfish
- tred
Added `windows\include` to the additional include directories and adding
some library paths solves some, but not all problems that emerged when the
check was removed and some code actually got compiled that wasn't compiled
before.
Because of the use of `sudo` the created file is owned by root and the default travis user has no permission to deploy it. Using `chown` fixes this.
Also added a condition on the deploy, so only one file gets deployed.
This file isn't used in the build. If I understand correctly, ast_common.h used to be using this file and iffe, but this is no longer the case. It seems safe to remove it.