From 9e7bd238945e5b10efaf694fb5f715c8543b2932 Mon Sep 17 00:00:00 2001
From: Brad Barber <bradb@shore.net>
Date: Sun, 10 Jan 2010 22:34:43 -0500
Subject: [PATCH] Qhull 2010.1 2010/01/10 Test for NULL fp in qh_eachvoronoi
 [D. Szczerba]

Cleaning up the docs.
---
 Announce.txt                    |  2 +-
 README.txt                      |  2 +-
 html/qh-faq.htm                 |  4 ++--
 html/qh-get.htm                 | 18 +++++++++---------
 html/qh-optq.htm                |  4 ++++
 html/qhull-cpp.xml              | 22 +++++-----------------
 index.htm                       | 16 +++++++++-------
 project/libqhull/libqhull.pro   |  2 +-
 project/libqhullp/libqhullp.pro | 12 ------------
 src/Changes.txt                 |  4 ++++
 src/global.c                    |  6 +++---
 src/io.c                        |  6 +++---
 12 files changed, 42 insertions(+), 56 deletions(-)

diff --git a/Announce.txt b/Announce.txt
index 3ba75c7..7436c14 100644
--- a/Announce.txt
+++ b/Announce.txt
@@ -1,5 +1,5 @@
 
- Qhull 2010.1 2010/01/09
+ Qhull 2010.1 2010/01/10
 
         http://www.qhull.org
         git@gitorious.org:qhull/qhull.git
diff --git a/README.txt b/README.txt
index 032e646..42eba2f 100644
--- a/README.txt
+++ b/README.txt
@@ -1,6 +1,6 @@
 Name
 
-      qhull, rbox         2010.1    2010/01/09
+      qhull, rbox         2010.1    2010/01/10
   
 Convex hull, Delaunay triangulation, Voronoi diagrams, Halfspace intersection
  
diff --git a/html/qh-faq.htm b/html/qh-faq.htm
index 7851b7e..29f79af 100644
--- a/html/qh-faq.htm
+++ b/html/qh-faq.htm
@@ -69,8 +69,8 @@ run the same code.
 It should be used for Delaunay triangulations instead of
 using joggled input ('<A href="qh-optq.htm#QJn">QJ</A>').
 
-<p><i>Brad Barber, Cambridge MA,
-2003/12/30 <!--
+<p><i>Brad Barber, Arlington MA,
+2010/01/09 <!--
 --> </i></p>
 
 <p><b>Copyright &copy; 1998-2010 C.B. Barber</b></p>
diff --git a/html/qh-get.htm b/html/qh-get.htm
index a2d41c5..60ff4f5 100644
--- a/html/qh-get.htm
+++ b/html/qh-get.htm
@@ -30,23 +30,24 @@ width="100" height="100"></a> Qhull Downloads</h1>
         <p>Visit <a href="http://www.qhull.org/news">Qhull News</a>
         for news, bug reports, change history, and users.</p>
 
-        <p>A serious bug was found in Qhull 2003.1.  Please upgrade to 2010.1.</p>
+        <p>A serious bug was found in Qhull 2003.1 and 2009.1.  Please upgrade to 2010.1
+        or apply <a href=http://www.qhull.org/download/poly.c-qh_gethash.patch>poly.c-qh_gethash.patch</a></p>.
         </li>
     <li><a
         href="http://www.qhull.org/download/qhull-2010.1.zip">Download:
         Qhull 2010.1 for Windows</a> (2.4 Mbytes) <p>Type: console programs for
         Windows</p>
-        <p>Includes executables, documentation, sources files, and a cygwin Makefile. It runs in a
+        <p>Includes executables, documentation, and sources files. It runs in a
         DOS window.</p>
     </li>
         <li><a href="http://www.qhull.org/download/qhull-2010.1-src.tgz">Download: Qhull 2010.1 for Unix</a> (660K)
         <p>Type: C source code for 32-bit and 64-bit architectures</p>
-        <p>Includes documentation, source files, a simple Makefile, DevStudio project files, and Qt project files.
+        <p>Includes documentation, source files, a simple Makefile, CMakeLists, DevStudio projects, and Qt projects.
             Includes preliminary C++ support.
         The C++ interface may change without notice.
         If using gcc 4.1, 4.2, or 4.3, please compile qset.c with
         -fno-strict-aliasing (otherwise qhull segfaults) [Karas, Krishnaswami].
-        See <a href=http://www.qhull.org/news/#bugs>Bugs</a> [Apr 2008] for a patch.
+        See <a href=http://www.qhull.org/news/#bugs>Bugs</a> [Apr 2008].
        </p>
         <p>Debian, rpm, and Autoconf distributions will appear later</p>
     </li>
@@ -56,14 +57,13 @@ width="100" height="100"></a> Qhull Downloads</h1>
             and test programs.  The C++ interface may change without notice.
             If using gcc 4.1, 4.2, or 4.3, please compile qset.c with
         -fno-strict-aliasing (otherwise qhull segfaults) [Karas, Krishnaswami].
-        See <a href=http://www.qhull.org/news/#bugs>Bugs</a> [Apr 2008] for a patch.
+        See <a href=http://www.qhull.org/news/#bugs>Bugs</a> [Apr 2008].
        </p>
    </li>
         <li><a href="http://www.qhull.org/download/qhull-2009.1.1.tar.gz">Download: Qhull 2009.1.1 for Unix</a> (725K)
         <p>Type: C source code for Unix systems</p>
         <p>Patch release of Qhull 2009.1 with Autoconf/Automake/Libtool
-        support [R. Laboissiere].  Apply <a href=http://www.qhull.org/download/poly.c-qh_gethash.patch>poly.c-qh_gethash.patch</a>
-        to Qhull 2003.1 and 2009.1. If using gcc 4.1, 4.2, or 4.3, please compile qset.c with
+        support [R. Laboissiere].  If using gcc 4.1, 4.2, or 4.3, please compile qset.c with
         -fno-strict-aliasing (otherwise qhull segfaults) [Karas, Krishnaswami].
         See <a href=http://www.qhull.org/news/#bugs>Bugs</a> [Apr 2008].
        </p>
@@ -104,14 +104,14 @@ and upgraded it to 2002.1.
         -->
 
     <li><a href=http://www6.uniovi.es/ftp/pub/mirrors/geom.umn.edu/software/ghindex.html>Spanish
-            mirror site</a> <p>Download Qhull's current and
+            mirror site</a> <p>Download Qhull's
                 previous versions from <a href=http://www.etsimo.uniovi.es/derechos.html>Servidor
                 WWW de la Escuela de Minas</a> of the Universidad de Oviedo.</p>
     </li>
     <li><a
         href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.117.405&rep=rep1&type=url&i=0">Download:
         Article about Qhull</a> (307K) <!-- http://www.cise.ufl.edu/~ungor/courses/fall06/papers/QuickHull.pdf -->
-        <p>Type: PDF on Citeseer</p>
+        <p>Type: PDF on <a href="http://citeseerx.ist.psu.edu/showciting?doi=10.1.1.117.405&sort=cite">Citeseer</a></p>
         <p>Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T.,
         &quot;The Quickhull algorithm for convex hulls,&quot; <i>ACM
         Transactions on Mathematical Software</i>, 22(4):469-483, Dec 1996 [<a
diff --git a/html/qh-optq.htm b/html/qh-optq.htm
index 5047076..9d4e517 100644
--- a/html/qh-optq.htm
+++ b/html/qh-optq.htm
@@ -307,6 +307,10 @@ a default value for <i>n</i>. <a href="../src/user.h#JOGGLEdefault">User.h</a>
 defines these parameters and a maximum number of retries. See <a
 href="qh-impre.htm#joggle">Merged facets or joggled input</a>. </p>
 
+<p>Users of joggled input should consider converting to
+triangulated output ('<A href="../html/qh-optq.htm#Qt">Qt</A>').  Triangulated output is
+approximately 1000 times more accurate than joggled input.
+
 <p>Option 'QJ' also sets '<a href="qh-optq.htm#Qbb">Qbb</a>' for
 Delaunay triangulations and Voronoi diagrams. It does not set
 'Qbb' if '<a href="qh-optq.htm#Qbk">Qbk:n</a>' or '<a
diff --git a/html/qhull-cpp.xml b/html/qhull-cpp.xml
index 702a103..9c73a36 100644
--- a/html/qhull-cpp.xml
+++ b/html/qhull-cpp.xml
@@ -6,8 +6,8 @@
    xmlns:rf="http://schemas.roadintranet.org/road-faq-1"
  title=" C++ interface to Qhull"
  file="qhull-cpp.xml"
- fileid="$Id: //product/qhull/main/rel/html/qhull-cpp.xml#23 $$Change: 1139 $"
- fileChange="$DateTime: 2010/01/03 11:20:29 $$Author: bbarber $">
+ fileid="$Id: //product/qhull/main/rel/html/qhull-cpp.xml#24 $$Change: 1174 $"
+ fileChange="$DateTime: 2010/01/10 22:34:05 $$Author: bbarber $">
     <div><h4>Qhull C++  -- C++ interface to Qhull</h4></div>
     <rf:copyright>
         <a href="../cpp/COPYING.txt">Copyright</a> (c) 2009-2010, C.B. Barber
@@ -25,16 +25,11 @@
            <div class="col leftcol">
                Help
                <ul><li>
-                   C++ In a Nutshell [<a href="#liscR_2003">liscR_2003</a>,
-                   <a href="http://www.tempest-sw.com/cpp/draft/">online</a>] -- 
-                   Concise and complete description of C++.
-               </li><li>
-                   <a href="http://codeidol.com/">CodeIdol</a> -- free, on-line books on coding and IT
+                </li><li>
                </li><li>
                </li></ul>
            </div>
            <div class="col rightcol">
-             C++ usage
              <ul><li>
              </li><li>
              </li></ul>
@@ -101,7 +96,7 @@ See <rf:iref item="cpp-collection-api"/>.
              </li><li>
                  Read-write for sets/maps -- insertMulti, squeeze, take, unite
              </li><li>
-                 Search -- contains(const T &), count(const T &amp;), indexOf, lastIndexOf
+                 Search -- contains(const T &amp;), count(const T &amp;), indexOf, lastIndexOf
              </li><li>
                  Search for sets/maps -- constFind, lowerBound, upperBound
              </li><li>
@@ -195,7 +190,7 @@ See <rf:iref item="cpp-collection-api"/>.
             </li><li>
                toClass -- Convert into a Class object (makes a deep copy)
             </li><li>
-                qRunId -- Requires Qh installed.  Some routines allow 0 for limited info (e.g., operator<<)
+                qRunId -- Requires Qh installed.  Some routines allow 0 for limited info (e.g., operator&lt;&lt;)
             </li><li>
                 Disable methods in derived classes -- If the default constructor, copy constructor, or copy assignment is disabled, it should be also disabled in derived classes (better error messages).
             </li><li>
@@ -203,11 +198,4 @@ See <rf:iref item="cpp-collection-api"/>.
             </li></ul>
         </rf:item>
     </rf:section>
-     <rf:section id="cpp-ref" title="C++ References" order="sorted">
-         <rf:item id="bulkD_2000" title="[bulkD_2000] Efficient C++: Performance Programming
-             Techniques" date="Dec 2008" author="bbarber">
-             <p>Bulka, Mayhew, Addison-Wesley, 2000, ISBN 0-201-37950-3</p>
-             <p>Efficient C++ programming with timing comparisons.</p>
-         </rf:item>
-     </rf:section>
 </rf:topic>
diff --git a/index.htm b/index.htm
index f0b33ce..bf9373d 100644
--- a/index.htm
+++ b/index.htm
@@ -42,6 +42,8 @@ surface areas, and approximations to the convex hull.</p>
 triangulations, triangulation of non-convex surfaces, mesh
 generation of non-convex objects, or medium-sized inputs in 9-D
 and higher. </p>
+
+<p>A serious bug was found in Qhull 2003.1. Please upgrade to 2010.1 or apply <a href="download/poly.c-qh_gethash.patch">poly.c-qh_gethash.patch</a>.</p>
 </td></tr></table>
 
 <hr>
@@ -51,13 +53,13 @@ and higher. </p>
 <ul>
     <li><a href="http://www.qhull.org/news">News</a> and
         <a href="http://www.qhull.org/news/qhull-news.html#bugs">Bugs</a>
-        about Qhull 2010.1 2010/01/09</li>
+        about Qhull 2010.1 2010/01/10</li>
     <li><a href="http://www.qhull.org/download">Download</a>
         Qhull</li>
     <li><a
         href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/welcome.html">Examples
         </a>of Qhull output </li>
-        <li><a href=http://gitorious.org/qhull/>Development</a> at Gitorious
+        <li><a href=http://gitorious.org/qhull/>Gitorious</a> C++ interface to Qhull (<a href="http://gitorious.org/qhull/pages/Home">wiki</a>)
         <li><input name=as_q size=10 value="">
                 <input type="submit" value="Search">
                 www.qhull.org
@@ -82,9 +84,12 @@ and higher. </p>
     <a href=http://www.mathworks.com/access/helpdesk/help/techdoc/ref/voronoin.shtml>voronoin</a>.  MATLAB R14 upgraded
         to Qhull 2002.1 and triangulated output ('Qt').
     </li>
+    <!-- Appears to have been removed
         <li><a href=http://www.octave.org/>GNU Octave</a> uses Qhull for their
         <a href=http://octave.sourceforge.net/index/analysis.html#Geometry>computational geometry</a> functions.
-        <li><a href=http://www.wolfram.com/products/mathematica/>Mathematica</a>'s Delaunay interface: <a href=http://library.wolfram.com/infocenter/MathSource/1160/>qh-math</a>
+      -->
+        <li><a href=http://www.wolfram.com/products/mathematica/>Mathematica</a>'s Delaunay interface <a href=http://library.wolfram.com/infocenter/MathSource/1160/>qh-math</a>
+        and <a href="http://www.imtek.uni-freiburg.de/simulation/mathematica/IMSweb/imsTOC/Interfaces/QHullInterfaceDocu.html">QHullInterface</a>
         <li><a href=http://www.geomview.org>Geomview</a> for 3-D and 4-D visualization of Qhull output
 </ul>
 </form>
@@ -166,8 +171,6 @@ and algorithms,
     <li><a href=http://www.algorithmic-solutions.com/enleda.htm>Leda</a>
 and <a href=http://www.cgal.org/>CGAL</a> libraries for writing computational
 geometry programs and other combinatorial algorithms
-        <li><a href=http://www.magic-software.com>Magic Software</a> source code for computer
-        graphics, image analysis, and numerical methods
         <li><a href=http://www.mathtools.net/>Mathtools.net</a> of scientific and engineering
         software
     <li><a href="http://www.andrew.cmu.edu/user/sowen/mesh.html">Owen's Meshing</a> Research Corner
@@ -176,9 +179,8 @@ geometry programs and other combinatorial algorithms
         Finite Element</a> Mesh Generation page</li>
     <li><a href="http://www.cs.cmu.edu/~quake/triangle.html">Shewchuk's
         triangle </a>program for 2-d Delaunay</li>
-        <li><a href=ftp://ftp.zib.de/pub/Packages/mathprog/index.html>Skorobohatyj's Mathprog@ZIB</a> for
-        mathematical software
         <li><a href=http://www.voronoi.com>Voronoi Web Site</a> for all things Voronoi
+        <li>Young's <a href="http://homepage.usask.ca/~ijm451/finite/fe_resources/">Internet Finite Element Resources</a>
         <li><a href="http://www.uic.nnov.ru/~zny/skeleton/">Zolotykh's Skeleton</a> generates all extreme rays of a polyhedral cone using the Double Description Method</li>
 </ul>
 
diff --git a/project/libqhull/libqhull.pro b/project/libqhull/libqhull.pro
index 2f43f03..3c87f06 100644
--- a/project/libqhull/libqhull.pro
+++ b/project/libqhull/libqhull.pro
@@ -10,7 +10,7 @@ CONFIG -= app_bundle qt
 # Appears to be needed for gcc 4.1, 4.2, and 4.3 with -O2
 #QMAKE_CFLAGS += -fno-strict-aliasing
 QMAKE_CFLAGS += -Wall -Wextra -Wshadow -Wcast-qual -Wwrite-strings
-QMAKE_CFLAGS += -Wno-sign-conversion # Many size_t vs. int errors
+QMAKE_CFLAGS += -Wstrict-aliasing -Wno-sign-conversion # Many size_t vs. int errors
 #QMAKE_CFLAGS_DEBUG += -Wconversion # no workaround for bit-field conversion errors
 build_pass:CONFIG(debug, debug|release):{
     TARGET = qhulld
diff --git a/project/libqhullp/libqhullp.pro b/project/libqhullp/libqhullp.pro
index 33c5fd4..8dc2335 100644
--- a/project/libqhullp/libqhullp.pro
+++ b/project/libqhullp/libqhullp.pro
@@ -42,15 +42,3 @@ SOURCES += src/mem.c
 SOURCES += src/usermem.c
 SOURCES += src/userprintf.c
 SOURCES += src/random.c
-HEADERS += src/geom.h
-HEADERS += src/io.h
-HEADERS += src/libqhull.h
-HEADERS += src/mem.h
-HEADERS += src/merge.h
-HEADERS += src/poly.h
-# qhull.h is for backwards compatibility
-HEADERS += src/qhull_a.h
-HEADERS += src/qset.h
-HEADERS += src/random.h
-HEADERS += src/stat.h
-HEADERS += src/user.h
diff --git a/src/Changes.txt b/src/Changes.txt
index d7f37d0..e7aa9f4 100644
--- a/src/Changes.txt
+++ b/src/Changes.txt
@@ -106,6 +106,10 @@ Need help
    If practical, please move to project/
  - Verify -fno-strict-aliasing needed for gcc 4.1, 4.2, and 4.3 (qset segfault)
 
+------------
+qhull 2010.1 2010/01/10
+- Test for NULL fp in qh_eachvoronoi [D. Szczerba]
+
 ------------
 qhull 2010.1 2010/01/09
 
diff --git a/src/global.c b/src/global.c
index 4292663..96c98ec 100644
--- a/src/global.c
+++ b/src/global.c
@@ -12,8 +12,8 @@
    see qhull_a.h for internal functions
 
    copyright (c) 1993-2010 The Geometry Center.
-   $Id: //product/qhull/main/rel/src/global.c#58 $$Change: 1172 $
-   $DateTime: 2010/01/09 21:42:16 $$Author: bbarber $
+   $Id: //product/qhull/main/rel/src/global.c#59 $$Change: 1174 $
+   $DateTime: 2010/01/10 22:34:05 $$Author: bbarber $
  */
 
 #include "qhull_a.h"
@@ -47,7 +47,7 @@ qhT qh_qh;              /* all global variables.
     recompile user_eg.c, rbox.c, libqhull.c, qconvex.c, qdelaun.c qvoronoi.c, qhalf.c
 */
 
-const char *qh_version = "2010.1 2010/01/09";
+const char *qh_version = "2010.1 2010/01/10";
 
 /*-<a                             href="qh-globa.htm#TOC"
   >-------------------------------</a><a name="appendprint">-</a>
diff --git a/src/io.c b/src/io.c
index 1ca1d9b..ee16846 100644
--- a/src/io.c
+++ b/src/io.c
@@ -14,8 +14,8 @@
    This allows the user to avoid loading io.o from qhull.a
 
    copyright (c) 1993-2010 The Geometry Center.
-   $Id: //product/qhull/main/rel/src/io.c#36 $$Change: 1167 $
-   $DateTime: 2010/01/08 19:03:17 $$Author: bbarber $
+   $Id: //product/qhull/main/rel/src/io.c#37 $$Change: 1174 $
+   $DateTime: 2010/01/10 22:34:05 $$Author: bbarber $
 */
 
 #include "qhull_a.h"
@@ -667,7 +667,7 @@ int qh_eachvoronoi(FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT
             totridges++;
             trace4((qh ferr, 4017, "qh_eachvoronoi: Voronoi ridge of %d vertices between sites %d and %d\n",
                   count, qh_pointid(atvertex->point), qh_pointid(vertex->point)));
-            if (printvridge) {
+            if (printvridge && fp) {
               if (inorder && qh hull_dim == 3+1) /* 3-d Voronoi diagram */
                 centers= qh_detvridge3 (atvertex, vertex);
               else
-- 
GitLab