[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
octave 3.2.4 and latest graphicsmagick
From: |
Marco Atzeri |
Subject: |
octave 3.2.4 and latest graphicsmagick |
Date: |
Fri, 12 Mar 2010 16:14:21 +0000 (GMT) |
Hi,
before releasing any new version of graphicsmagick (after 1.3.7)
for cygwin I am trying to backport the
changeset
__magick_read__ (F__magick_read__): call Magick::InitializeMagick
http://hg.savannah.gnu.org/hgweb/octave/rev/ad0b54ae206a
to 3.2.4 .
I tried this:
------------------------------------------------------------
--- origsrc/octave-3.2.4/src/DLD-FUNCTIONS/__magick_read__.cc 2009-08-25
10:26 :01.000000000 +0200
+++ src/octave-3.2.4/src/DLD-FUNCTIONS/__magick_read__.cc 2010-03-04
15:45 :31.365065500 +0100
@@ -27,6 +27,7 @@
#include <cmath>
+#include "oct-env.h"
#include "defun-dld.h"
#include "error.h"
#include "ov-struct.h"
@@ -358,6 +359,17 @@
#ifdef HAVE_MAGICK
+ static bool initialized = false;
+
+ if (! initialized)
+ {
+ std::string program_name = octave_env::get_program_invocation_name ();
+
+ Magick::InitializeMagick (program_name.c_str ());
+
+ initialized = true;
+ }
+
if (args.length () > 2 || args.length () < 1 || ! args(0).is_string ()
|| nargout > 3)
{
-----------------------------------------------------------
but I have one, and only, problem with strftime:
on patched 3.2.4
octave:1> strftime("%s",localtime(time()))
error: memory exhausted or requested size too large for range of Octave's index
type -- trying to return to prompt
while on 3.3.50+
octave:1> strftime("%s",localtime(time()))
ans = 1268409816
It is the only fault, all the other tests are passed.
I have not found any changeset impacting
src/DLD-FUNCTIONS/time.cc
that could explain the different outputs.
Any idea ?
I already changed GM-1.3.12 as suggested by the author from
setlocale(LC_ALL,"");
to
setlocale(LC_ALL,"C");
but it made no difference
Regards
Marco
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- octave 3.2.4 and latest graphicsmagick,
Marco Atzeri <=