help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave 3.0.1 available for ftp


From: Tatsuro MATSUOKA
Subject: Re: Octave 3.0.1 available for ftp
Date: Thu, 24 Apr 2008 18:53:16 +0900 (JST)

Hello  Michael 

> On Tue, Apr 22, 2008 at 11:04 AM, Tatsuro MATSUOKA
> <address@hidden> wrote:
> >  > This should have been fixed. Can you check whether HAVE_ROUND is
> >  > defined in your config.h?
> >  =====================================================
> >
> >  488: /* Define to 1 if you have the `round' function. */
> >  489: #define HAVE_ROUND 1
> >
> >  It was defined.
> 
> Then it might be that the "round" implementation in MinGW is
> broken (there's no "round" in MSVC). Manually undefined HAVE_ROUND
> in config.h and recompile lo-mappers.cc (and liboctave.dll) and see if
> if helps.

You are right.
in config.h, I modified as:
/* Define to 1 if you have the `round' function. */
//#define HAVE_ROUND 1
#undef HAVE_ROUND

 d:\usr\Tatsu\OctSrc\octave-3.0.1\scripts/general\bitcmp.m  PASS   15/15

success!!!
I will propose the following patch
==================================================
*** lo-mappers.cc       Tue Apr 22 01:00:19 2008
--- lo-mappers.mingw.cc Thu Apr 24 18:11:42 2008
***************
*** 72,78 ****
  double
  xround (double x)
  {
! #if defined (HAVE_ROUND)
    return round (x);
  #else
    if (x >= 0)
--- 72,78 ----
  double
  xround (double x)
  {
! #if defined (HAVE_ROUND) && ! defined (__MINGW32__)
    return round (x);
  #else
    if (x >= 0)

=======================================================






> >  octave.exe:1>  charset = setstr (0:127);
> >  warning: setstr is obsolete and will be removed from a future version of 
> > Octave; please use
> char
> >  instead
> >  octave.exe:2>
> >  octave.exe:2>  result = zeros (1, 128);
> >  octave.exe:3>
> >  octave.exe:3>  result (33:127) = 1;
> >  octave.exe:4>  if (ispc () && ! isunix ())
> >  >    result(10) = 1;
> >  >  endif
> >  octave.exe:5> isprint (charset)
> >  ans =
> >
> >   Columns 1 through 20:
> >
> >    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
> > 0   0
> 
> So it seems isprint(setstr(9)) returns 0 with MinGW while it
> returns 1 on MSVC. I guess the test "ispc() and !isunix()"
> should then be adapted, but I don't know how.


octave.exe:1> charset = setstr (0:127);
warning: setstr is obsolete and will be removed from a future version of 
Octave; please use char
instead
octave.exe:2> result (33:127) = 1;
octave.exe:3> ispc ()
ans =  1
octave.exe:4>  ! isunix ()
ans =  1
octave.exe:5> isprint (charset(1:10))
ans =

   0   0   0   0   0   0   0   0   0   0

ispc () and  ! isunix ()
works correctly

For cygwin,
octave:3>  ! isunix ()
ans = 0


For mingw,

if (ispc () && ! isunix ())
    result(10) = 1;
endif

the above should not be applied.
How can I get "i686-pc-mingw32" in octave script.
I have been looking around the function list by help, I could not find it.
However the result of charset is the same as that of cygwin.
The probelm is not serious.



Regards

Tatsuro





--------------------------------------
GANBARE! NIPPON! Win your ticket to Olympic Games 2008.
http://pr.mail.yahoo.co.jp/ganbare-nippon/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]