octave-maintainers
[Top][All Lists]
Advanced

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

Re: 2.1.62 breaks octave-forge (Re: Octave 2.1.62 available for ftp)


From: Dirk Eddelbuettel
Subject: Re: 2.1.62 breaks octave-forge (Re: Octave 2.1.62 available for ftp)
Date: Tue, 16 Nov 2004 11:57:31 -0600
User-agent: Mutt/1.3.28i

On Tue, Nov 16, 2004 at 10:40:47AM +0100, Rafael Laboissiere wrote:
> * David Bateman <address@hidden> [2004-11-14 21:01]:
> 
> > Dirk Eddelbuettel <edd <at> debian.org> writes:
> > 
> > > 
> > > Having updated the Octave packages to 2.1.62 yesterday, I just tried 
> > > buildin
> > > octave-forge (based on the 2004.09.09 release). This failed in, as far as 
> > > I
> > > can tell, two spots:
> > 
> > Fixes should have been in octave-forge CVS since last Wednesday...
> 
> I succeed to build octave-forge_2004.09.09-4 againts octave2.1_2.1.62-1
> after applying the minimal patch attached below, which was extracted from
> CVS.  Dirk, please apply the patch and upload a new package ASAP. Otherwise,
> octave-forge may become broken in sarge due to the forthcoming freeze.  I am
> willing to NMU the package if you wish.

Go ahead, and add yourself in debian/control in a new Uploaders: field.
Welcome as a co-maintainer :)

Dirk

> -- 
> Rafael

> --- octave-forge-2004.09.09.orig/main/comm/galois-ops.h
> +++ octave-forge-2004.09.09/main/comm/galois-ops.h
> @@ -106,6 +106,31 @@
>  #define DEFCATOP_G_FN(name, t1, t2, f) \
>    CATOPDECL (name, a1, a2)        \
>    { \
> +    CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \
> +    return new octave_galois (f (v1.t1 ## _value (), v2.t2 ## _value (), 
> ra_idx)); \
> +  }
> +
> +#define DEFCATOP_G_METHOD(name, t1, t2, f) \
> +  CATOPDECL (name, a1, a2)        \
> +  { \
> +    CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \
> +    return new octave_galois (v1.t1 ## _value (). f (v2.t2 ## _value (), 
> ra_idx)); \
> +  }
> +
> +#define INSTALL_G_CATOP(t1, t2, f) INSTALL_CATOP(t1, t2, f) 
> +
> +#elif defined(HAVE_OLD_OCTAVE_CONCAT)
> +
> +#define DEFCATOP_G_FN(name, t1, t2, f) \
> +  CATOPDECL (name, a1, a2)        \
> +  { \
> +    CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \
> +    return new octave_galois (f (v1.t1 ## _value (), v2.t2 ## _value (), 
> ra_idx)); \
> +  }
> +
> +#define DEFCATOP_G_METHOD(name, t1, t2, f) \
> +  CATOPDECL (name, a1, a2)        \
> +  { \
>      CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \
>      return new octave_galois (f (v1.t1 ## _value (), v2.t2 ## _value (), 
> ra_idx)); \
>    }
> @@ -113,6 +138,7 @@
>  #define INSTALL_G_CATOP(t1, t2, f) INSTALL_CATOP(t1, t2, f) 
>  #else
>  #define DEFCATOP_G_FN(name, t1, t2, f) 
> +#define DEFCATOP_G_METHOD(name, t1, t2, f)
>  #define INSTALL_G_CATOP(t1, t2, f)
>  #endif
>  
> --- octave-forge-2004.09.09.orig/main/comm/galois.cc
> +++ octave-forge-2004.09.09/main/comm/galois.cc
> @@ -225,7 +225,7 @@
>    return retval;
>  }
>  
> -#ifdef HAVE_OCTAVE_CONCAT
> +#ifdef HAVE_OLD_OCTAVE_CONCAT
>  galois concat (const galois& ra, const galois& rb, const Array<int>& ra_idx)
>  {
>    galois retval (ra);
> @@ -264,6 +264,50 @@
>    retval.insert (tmp, ra_idx(0), ra_idx(1));
>    return retval;
>  }
> +#endif
> +
> +#ifdef HAVE_OCTAVE_CONCAT
> +galois 
> +galois::concat (const galois& rb, const Array<int>& ra_idx)
> +{
> +  if (rb.numel() > 0)
> +    insert (rb, ra_idx(0), ra_idx(1));
> +  return *this;
> +}
> +
> +galois 
> +galois::concat (const Matrix& rb, const Array<int>& ra_idx)
> +{
> +  if (numel() == 1)
> +    return *this;
> +
> +  galois tmp (0, 0, 0, m(), primpoly());
> +  int _n = (1<<m()) - 1;
> +  int r = rb.rows();
> +  int c = rb.columns();
> +  tmp.resize (r, c);
> +
> +  // Check the validity of the data in the matrix
> +  for (int i=0; i<r; i++) {
> +    for (int j=0; j<c; j++) {
> +      if ((rb(i,j) < 0) || (rb(i,j) > _n)) {
> +     gripe_range_galois(m());
> +     return *this;
> +      }
> +      if ((rb(i,j) - (double)((int)rb(i,j))) != 0.) {
> +     gripe_integer_galois();
> +     return *this;
> +      }
> +      tmp(i,j) = (int)rb(i,j);
> +    }
> +  }
> +
> +  insert (tmp, ra_idx(0), ra_idx(1));
> +  return *this;
> +}
> +#endif
> +
> +#if defined (HAVE_OLD_OCTAVE_CONCAT) || defined (HAVE_OCTAVE_CONCAT)
>  
>  galois concat (const Matrix& ra, const galois& rb,  const Array<int>& ra_idx)
>  {
> --- octave-forge-2004.09.09.orig/main/comm/galois.h
> +++ octave-forge-2004.09.09/main/comm/galois.h
> @@ -92,11 +92,19 @@
>    boolMatrix all (int dim = -1) const;
>    boolMatrix any (int dim = -1) const;
>  
> -#ifdef HAVE_OCTAVE_CONCAT
> +#ifdef HAVE_OLD_OCTAVE_CONCAT
>    friend galois concat (const galois& ra, const galois& rb, 
>                        const Array<int>& ra_idx);
>    friend galois concat (const galois& ra, const Matrix& rb, 
>                        const Array<int>& ra_idx);
> +#endif
> +
> +#ifdef HAVE_OCTAVE_CONCAT
> +  galois concat (const galois& rb, const Array<int>& ra_idx);
> +  galois concat (const Matrix& rb, const Array<int>& ra_idx);
> +#endif
> +
> +#if defined(HAVE_OCTAVE_CONCAT) || defined(HAVE_OLD_OCTAVE_CONCAT)
>    friend galois concat (const Matrix& ra, const galois& rb, 
>                        const Array<int>& ra_idx);
>  
> --- octave-forge-2004.09.09.orig/main/comm/op-gm-gm.cc
> +++ octave-forge-2004.09.09/main/comm/op-gm-gm.cc
> @@ -80,7 +80,7 @@
>  DEFBINOP_FN (el_and, galois, galois, mx_el_and)
>  DEFBINOP_FN (el_or, galois, galois, mx_el_or)
>  
> -DEFCATOP_G_FN (gm_gm, galois, galois, concat)
> +DEFCATOP_G_METHOD (gm_gm, galois, galois, concat)
>  
>  DEFASSIGNOP_FN (assign, galois, galois, assign)
>  
> --- octave-forge-2004.09.09.orig/main/comm/op-gm-m.cc
> +++ octave-forge-2004.09.09/main/comm/op-gm-m.cc
> @@ -68,7 +68,7 @@
>  DEFBINOP_FN (el_and, galois, matrix, mx_el_and)
>  DEFBINOP_FN (el_or, galois, matrix, mx_el_or)
>  
> -DEFCATOP_G_FN (gm_m, galois, matrix, concat)
> +DEFCATOP_G_METHOD (gm_m, galois, matrix, concat)
>  
>  // Need to create temporary Galois array so that matrix values are checked
>  DEFASSIGNOP (assign, galois, matrix) 
> --- octave-forge-2004.09.09.orig/main/comm/op-gm-s.cc
> +++ octave-forge-2004.09.09/main/comm/op-gm-s.cc
> @@ -68,13 +68,20 @@
>  DEFBINOP_FN_B_S2 (el_and, galois, scalar, mx_el_and)
>  DEFBINOP_FN_B_S2 (el_or, galois, scalar, mx_el_or)
>  
> -#ifdef DEFCATOP
> +#ifdef HAVE_OLD_OCTAVE_CONCAT
>  DEFCATOP (gm_s, galois, scalar)
>  {
>    CAST_BINOP_ARGS (const octave_galois&, const octave_scalar&);
>    return new octave_galois (concat (v1.galois_value (), v2.matrix_value (), 
>                                   ra_idx));
>  }
> +#elif defined(HAVE_OCTAVE_CONCAT)
> +DEFCATOP (gm_s, galois, scalar)
> +{
> +  CAST_BINOP_ARGS (octave_galois&, const octave_scalar&);
> +  return new octave_galois (v1.galois_value (). concat (v2.matrix_value (), 
> +                                 ra_idx));
> +}
>  #endif
>  
>  DEFASSIGNOP(assign, galois, scalar)
> --- octave-forge-2004.09.09.orig/main/comm/op-s-gm.cc
> +++ octave-forge-2004.09.09/main/comm/op-s-gm.cc
> @@ -81,13 +81,20 @@
>  DEFBINOP_FN_B_S1 (el_and, scalar, galois, mx_el_and)
>  DEFBINOP_FN_B_S1 (el_or, scalar, galois, mx_el_or)
>  
> -#ifdef DEFCATOP
> +#ifdef HAVE_OLD_OCTAVE_CONCAT
>  DEFCATOP (s_gm, scalar, galois)
>  {
>    CAST_BINOP_ARGS (const octave_scalar&, const octave_galois&);
>    return new octave_galois (concat (v1.matrix_value (), v2.galois_value (), 
>                                   ra_idx));
>  }
> +#elif defined (HAVE_OCTAVE_CONCAT)
> +DEFCATOP (s_gm, scalar, galois)
> +{
> +  CAST_BINOP_ARGS (octave_scalar&, const octave_galois&);
> +  return new octave_galois (concat (v1.matrix_value (), v2.galois_value (), 
> +                                 ra_idx));
> +}
>  #endif
>  
>  void
> --- octave-forge-2004.09.09.orig/main/comm/ov-galois.cc
> +++ octave-forge-2004.09.09/main/comm/ov-galois.cc
> @@ -56,7 +56,7 @@
>  #endif
>  
>  
> -#ifdef HAVE_OCTAVE_CONCAT
> +#if defined (HAVE_OCTAVE_CONCAT) || defined (HAVE_OLD_OCTAVE_CONCAT)
>  octave_value octave_galois::resize (const dim_vector& dv) const
>  { 
>    if (dv.length() > 2)
> --- octave-forge-2004.09.09.orig/main/comm/ov-galois.h
> +++ octave-forge-2004.09.09/main/comm/ov-galois.h
> @@ -34,7 +34,7 @@
>  #include <iostream>
>  #include <string>
>  
> -#ifdef HAVE_OCTAVE_CONCAT
> +#if defined(HAVE_OCTAVE_CONCAT) || defined(HAVE_OLD_OCTAVE_CONCAT)
>  #include <octave/dim-vector.h>
>  #endif
>  
> @@ -111,7 +111,7 @@
>    }
>  #endif
>  
> -#ifdef HAVE_OCTAVE_CONCAT
> +#if defined(HAVE_OCTAVE_CONCAT) || defined(HAVE_OLD_OCTAVE_CONCAT)
>    octave_value resize (const dim_vector& dv) const;
>  
>    size_t byte_size (void) const { return gval.byte_size (); }
> --- octave-forge-2004.09.09.orig/main/symbolic/findsymbols.cc
> +++ octave-forge-2004.09.09/main/symbolic/findsymbols.cc
> @@ -48,7 +48,7 @@
>                               /* have to convert back to compare: */
>                               get_symbol(symlist(j),ex_sym);
>                               sym = GiNaC::ex_to<GiNaC::symbol>(ex_sym);
> -                             if(sym==sym_new) {
> +                             if(GiNaC::operator == (sym,sym_new)) {
>                                       unique = false;
>                                       break;
>                               } else {
> --- octave-forge-2004.09.09.orig/main/symbolic/ov-ex.cc
> +++ octave-forge-2004.09.09/main/symbolic/ov-ex.cc
> @@ -115,7 +115,7 @@
>               GiNaC::symbol sym = GiNaC::ex_to<GiNaC::symbol>(x);
>               std::vector<symbol_list_item>::iterator iter_symlist;
>               
> for(iter_symlist=symbol_list.begin();iter_symlist<symbol_list.end();iter_symlist++)
>  {
> -                     if(sym == iter_symlist->sym) {
> +                     if(GiNaC::operator == (sym, iter_symlist->sym)) {
>                               iter_symlist->refcount --;
>                               if(iter_symlist->refcount==0)
>                                       symbol_list.erase(iter_symlist);


-- 
If your hair is standing up, then you are in extreme danger.
      -- http://www.usafa.af.mil/dfp/cockpit-phys/fp1ex3.htm



reply via email to

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