Mercurial > octave-nkf
diff src/DLD-FUNCTIONS/__voronoi__.cc @ 6880:e00a8f661f06
[project @ 2007-09-07 21:39:55 by dbateman]
author | dbateman |
---|---|
date | Fri, 07 Sep 2007 21:39:56 +0000 |
parents | 9fddcc586065 |
children | 6bbf56a9718a |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/__voronoi__.cc Fri Sep 07 21:35:44 2007 +0000 +++ b/src/DLD-FUNCTIONS/__voronoi__.cc Fri Sep 07 21:39:56 2007 +0000 @@ -46,11 +46,6 @@ #ifdef NEED_QHULL_VERSION char qh_version[] = "__voronoi__.oct 2007-07-24"; #endif - -FILE *outfile = stdout; -FILE *errfile = stderr; -char flags[250]; -const char *options; #endif DEFUN_DLD (__voronoi__, args, , @@ -71,6 +66,8 @@ return retval; } + const char *options; + if (nargin == 2) { if (!args (1).is_string ()) @@ -101,8 +98,16 @@ boolT ismalloc = false; + OCTAVE_LOCAL_BUFFER(char, flags, 250); + // hmm lot's of options for qhull here sprintf(flags,"qhull v Fv T0 %s",options); + + // If you want some debugging information replace the NULL + // pointer with outfile. + FILE *outfile = stdout; + FILE *errfile = stderr; + if (!qh_new_qhull (dim, np, pt_array, ismalloc, flags, NULL, errfile)) {