Mercurial > octave-nkf
diff src/DLD-FUNCTIONS/__voronoi__.cc @ 14309:824e5d362aba stable
Fix Qhull calling convention by passing true file pointer to qh_new_qhull
* __delaunayn__.cc, __voronoi__.cc, convhulln.cc: Pass file pointer
to "/dev/null" for output of Qhull rather than 0.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 01 Feb 2012 10:37:25 -0800 |
parents | 72c96de7a403 |
children | 3e4350f09a55 |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/__voronoi__.cc Fri Jan 27 14:06:07 2012 -0500 +++ b/src/DLD-FUNCTIONS/__voronoi__.cc Wed Feb 01 10:37:25 2012 -0800 @@ -115,9 +115,19 @@ boolT ismalloc = false; - // Replace the 0 pointer with stdout for debugging information - FILE *outfile = 0; + // Replace the outfile pointer with stdout for debugging information. +#if defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM) + FILE *outfile = gnulib::fopen ("NUL", "w"); +#else + FILE *outfile = gnulib::fopen ("/dev/null", "w"); +#endif FILE *errfile = stderr; + + if (! outfile) + { + error ("__voronoi__: Unable to create temporary file for output."); + return retval; + } // qh_new_qhull command and points arguments are not const...