Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 115972 Details for
Bug 173274
sci-mathematics/octave-forge-2006.03.17 fails to compile fails in ov-galois.cc
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch to remove missing variables
octave-forge-fortran-fix.patch (text/plain), 10.22 KB, created by
Markus Dittrich (RETIRED)
on 2007-04-11 13:41:37 UTC
(
hide
)
Description:
proposed patch to remove missing variables
Filename:
MIME Type:
Creator:
Markus Dittrich (RETIRED)
Created:
2007-04-11 13:41:37 UTC
Size:
10.22 KB
patch
obsolete
>diff -Naur octave-forge-2006.03.17.old/main/comm/ov-galois.cc octave-forge-2006.03.17/main/comm/ov-galois.cc >--- octave-forge-2006.03.17.old/main/comm/ov-galois.cc 2004-11-09 18:34:49.000000000 -0500 >+++ octave-forge-2006.03.17/main/comm/ov-galois.cc 2007-04-11 08:27:54.000000000 -0400 >@@ -322,20 +322,12 @@ > { > double retval = lo_ieee_nan_value (); > >- // XXX FIXME XXX -- maybe this should be a function, valid_as_scalar() >-#if defined(HAVE_DO_FORTRAN_INDEXING) >- if ((rows () == 1 && columns () == 1) >- || (Vdo_fortran_indexing && rows () > 0 && columns () > 0)) >- retval = (double) gval (0, 0); >-#else > if (rows () > 0 && columns () > 0) > { >- if (Vwarn_fortran_indexing) >- gripe_implicit_conversion ("real matrix", "real scalar"); >+ gripe_implicit_conversion ("real matrix", "real scalar"); > > retval = (double) gval (0, 0); > } >-#endif > else > gripe_invalid_conversion ("galois", "real scalar"); > >@@ -349,19 +341,12 @@ > > Complex retval (tmp, tmp); > >-#if defined(HAVE_DO_FORTRAN_INDEXING) >- if ((rows () == 1 && columns () == 1) >- || (Vdo_fortran_indexing && rows () > 0 && columns () > 0)) >- retval = (double) gval (0, 0); >-#else > if (rows () > 0 && columns () > 0) > { >- if (Vwarn_fortran_indexing) >- gripe_implicit_conversion ("real matrix", "real scalar"); >+ gripe_implicit_conversion ("real matrix", "real scalar"); > > retval = (double) gval (0, 0); > } >-#endif > else > gripe_invalid_conversion ("galois", "complex scalar"); > >diff -Naur octave-forge-2006.03.17.old/main/fixed/ov-fixed-complex.cc octave-forge-2006.03.17/main/fixed/ov-fixed-complex.cc >--- octave-forge-2006.03.17.old/main/fixed/ov-fixed-complex.cc 2004-11-09 18:34:49.000000000 -0500 >+++ octave-forge-2006.03.17/main/fixed/ov-fixed-complex.cc 2007-04-11 08:42:56.000000000 -0400 >@@ -73,21 +73,12 @@ > octave_fixed_complex::array_value (bool force_conversion) const > { > NDArray retval; >- int flag = force_conversion; > >-#if defined(HAVE_OK_TO_LOSE_IMAGINARY_PART) >- if (! flag) >- flag = Vok_to_lose_imaginary_part; >-#else >- if (! flag) >- flag = (Vwarn_imag_to_real ? -1 : 1); >-#endif >- >- if (flag > 0) >- retval = NDArray (dim_vector (1, 1), real (scalar.fixedpoint ())); >- else >+ if (! force_conversion) > gripe_implicit_conversion ("fixed complex", "matrix"); > >+ retval = NDArray (dim_vector (1, 1), real (scalar.fixedpoint ())); >+ > return retval; > } > >@@ -247,23 +238,10 @@ > { > FixedPoint retval; > >- int flag = force_conversion; >- >-#if defined(HAVE_OK_TO_LOSE_IMAGINARY_PART) >- if (! flag) >- flag = Vok_to_lose_imaginary_part; >-#else >- if (! flag) >- flag = (Vwarn_imag_to_real ? -1 : 1); >-#endif >- >- if (flag < 0) >+ if (! force_conversion) > gripe_implicit_conversion ("fixed complex", "fixed scalar"); > >- if (flag) >- retval = FixedPoint(real (scalar)); >- else >- gripe_invalid_conversion ("fixed complex", "fixed scalar"); >+ retval = FixedPoint(real (scalar)); > > return retval; > } >@@ -273,20 +251,10 @@ > { > FixedMatrix retval; > >- int flag = force_conversion; >- >-#if defined(HAVE_OK_TO_LOSE_IMAGINARY_PART) >- if (! flag) >- flag = Vok_to_lose_imaginary_part; >-#else >- if (! flag) >- flag = (Vwarn_imag_to_real ? -1 : 1); >-#endif >- >- if (flag > 0) >- retval = FixedMatrix(1,1,real (scalar)); >- else >- gripe_invalid_conversion ("fixed complex", "fixed matrix"); >+ if (! force_conversion) >+ gripe_implicit_conversion ("fixed complex", "fixed matrix"); >+ >+ retval = FixedMatrix(1,1,real (scalar)); > > return retval; > } >diff -Naur octave-forge-2006.03.17.old/main/fixed/ov-fixed-cx-mat.cc octave-forge-2006.03.17/main/fixed/ov-fixed-cx-mat.cc >--- octave-forge-2006.03.17.old/main/fixed/ov-fixed-cx-mat.cc 2004-11-09 18:34:49.000000000 -0500 >+++ octave-forge-2006.03.17/main/fixed/ov-fixed-cx-mat.cc 2007-04-11 08:57:12.000000000 -0400 >@@ -94,30 +94,19 @@ > octave_fixed_complex_matrix::array_value (bool force_conversion) const > { > NDArray retval; >- int flag = force_conversion; > >-#if defined(HAVE_OK_TO_LOSE_IMAGINARY_PART) >- if (! flag) >- flag = Vok_to_lose_imaginary_part; >-#else >- if (! flag) >- flag = (Vwarn_imag_to_real ? -1 : 1); >-#endif >- >- if (flag > 0) >- { >- int nr = rows (); >- int nc = columns (); >- dim_vector dv(nr,nc); >- retval.resize (dv); >- >- for (int i=0; i<nr; i++) >- for (int j=0; j<nc; j++) >- retval(i + j*nr) = real (matrix(i,j).fixedpoint()); >- } >- else >+ if (! force_conversion) > gripe_implicit_conversion ("fixed complex", "matrix"); > >+ int nr = rows (); >+ int nc = columns (); >+ dim_vector dv(nr,nc); >+ retval.resize (dv); >+ >+ for (int i=0; i<nr; i++) >+ for (int j=0; j<nc; j++) >+ retval(i + j*nr) = real (matrix(i,j).fixedpoint()); >+ > return retval; > } > >@@ -349,37 +338,14 @@ > { > double retval = lo_ieee_nan_value (); > >- int flag = force_conversion; >- >-#if defined(HAVE_OK_TO_LOSE_IMAGINARY_PART) >- if (! flag) >- flag = Vok_to_lose_imaginary_part; >-#else >- if (! flag) >- flag = (Vwarn_imag_to_real ? -1 : 1); >-#endif >- >- if (flag < 0) >+ if (! force_conversion) > gripe_implicit_conversion ("fixed complex matrix", "real scalar"); > >- if (flag) >+ if (rows () > 0 && columns () > 0) > { >- >-#if defined(HAVE_DO_FORTRAN_INDEXING) >- if ((rows () == 1 && columns () == 1) >- || (Vdo_fortran_indexing && rows () > 0 && columns () > 0)) >- retval = std::real (matrix (0, 0) .fixedpoint()); >-#else >- if (rows () > 0 && columns () > 0) >- { >- if (Vwarn_fortran_indexing) >- gripe_implicit_conversion ("real matrix", "real scalar"); >+ gripe_implicit_conversion ("real matrix", "real scalar"); > >- retval = std::real (matrix (0, 0) .fixedpoint()); >- } >-#endif >- else >- gripe_invalid_conversion ("fixed complex matrix", "real scalar"); >+ retval = std::real (matrix (0, 0) .fixedpoint()); > } > else > gripe_invalid_conversion ("fixed complex matrix", "real scalar"); >@@ -392,36 +358,14 @@ > { > FixedPoint retval; > >- int flag = force_conversion; >- >-#if defined(HAVE_OK_TO_LOSE_IMAGINARY_PART) >- if (! flag) >- flag = Vok_to_lose_imaginary_part; >-#else >- if (! flag) >- flag = (Vwarn_imag_to_real ? -1 : 1); >-#endif >- >- if (flag < 0) >+ if (! force_conversion) > gripe_implicit_conversion ("fixed complex matrix", "fixed scalar"); > >- if (flag) >+ if (rows () > 0 && columns () > 0) > { >-#if defined(HAVE_DO_FORTRAN_INDEXING) >- if ((rows () == 1 && columns () == 1) >- || (Vdo_fortran_indexing && rows () > 0 && columns () > 0)) >- retval = real( matrix (0, 0)); >-#else >- if (rows () > 0 && columns () > 0) >- { >- if (Vwarn_fortran_indexing) >- gripe_implicit_conversion ("real matrix", "real scalar"); >- >- retval = real( matrix (0, 0)); >- } >-#endif >- else >- gripe_invalid_conversion ("fixed complex matrix", "fixed scalar"); >+ gripe_implicit_conversion ("real matrix", "real scalar"); >+ >+ retval = real( matrix (0, 0)); > } > else > gripe_invalid_conversion ("fixed complex matrix", "fixed scalar"); >@@ -434,23 +378,11 @@ > { > Matrix retval; > >- int flag = force_conversion; >- >-#if defined(HAVE_OK_TO_LOSE_IMAGINARY_PART) >- if (! flag) >- flag = Vok_to_lose_imaginary_part; >-#else >- if (! flag) >- flag = (Vwarn_imag_to_real ? -1 : 1); >-#endif >- >- if (flag < 0) >+ if (! force_conversion) > gripe_implicit_conversion ("fixed complex matrix", "real matrix"); > >- if (flag) >- retval = ::real (matrix.fixedpoint()); >- else >- gripe_invalid_conversion ("fixed complex matrix", "real matrix"); >+ >+ retval = ::real (matrix.fixedpoint()); > > return retval; > } >@@ -460,23 +392,10 @@ > { > FixedMatrix retval; > >- int flag = force_conversion; >- >-#if defined(HAVE_OK_TO_LOSE_IMAGINARY_PART) >- if (! flag) >- flag = Vok_to_lose_imaginary_part; >-#else >- if (! flag) >- flag = (Vwarn_imag_to_real ? -1 : 1); >-#endif >- >- if (flag < 0) >+ if (! force_conversion) > gripe_implicit_conversion ("fixed complex matrix", "fixed matrix"); > >- if (flag) >- retval = real (matrix); >- else >- gripe_invalid_conversion ("fixed complex matrix", "fixed matrix"); >+ retval = real (matrix); > > return retval; > } >@@ -488,19 +407,12 @@ > > Complex retval (tmp, tmp); > >-#if defined(HAVE_DO_FORTRAN_INDEXING) >- if ((rows () == 1 && columns () == 1) >- || (Vdo_fortran_indexing && rows () > 0 && columns () > 0)) >- retval = matrix (0, 0) .fixedpoint(); >-#else >- if (rows () > 0 && columns () > 0) >- { >- if (Vwarn_fortran_indexing) >- gripe_implicit_conversion ("real matrix", "real scalar"); >+ if (rows () > 0 && columns () > 0) >+ { >+ gripe_implicit_conversion ("real matrix", "real scalar"); > >- retval = matrix (0, 0) .fixedpoint(); >- } >-#endif >+ retval = matrix (0, 0) .fixedpoint(); >+ } > else > gripe_invalid_conversion ("fixed matrix", "complex scalar"); > >diff -Naur octave-forge-2006.03.17.old/main/fixed/ov-fixed-mat.cc octave-forge-2006.03.17/main/fixed/ov-fixed-mat.cc >--- octave-forge-2006.03.17.old/main/fixed/ov-fixed-mat.cc 2004-11-09 18:34:49.000000000 -0500 >+++ octave-forge-2006.03.17/main/fixed/ov-fixed-mat.cc 2007-04-11 08:43:30.000000000 -0400 >@@ -309,20 +309,12 @@ > { > double retval = lo_ieee_nan_value (); > >- // XXX FIXME XXX -- maybe this should be a function, valid_as_scalar() >-#if defined(HAVE_DO_FORTRAN_INDEXING) >- if ((rows () == 1 && columns () == 1) >- || (Vdo_fortran_indexing && rows () > 0 && columns () > 0)) >- retval = matrix (0, 0) .fixedpoint(); >-#else > if (rows () > 0 && columns () > 0) > { >- if (Vwarn_fortran_indexing) >- gripe_implicit_conversion ("real matrix", "real scalar"); >+ gripe_implicit_conversion ("real matrix", "real scalar"); > > retval = matrix (0, 0) .fixedpoint(); > } >-#endif > else > gripe_invalid_conversion ("fixed matrix", "real scalar"); > >@@ -349,19 +341,12 @@ > > Complex retval (tmp, tmp); > >-#if defined(HAVE_DO_FORTRAN_INDEXING) >- if ((rows () == 1 && columns () == 1) >- || (Vdo_fortran_indexing && rows () > 0 && columns () > 0)) >- retval = matrix (0, 0) .fixedpoint(); >-#else > if (rows () > 0 && columns () > 0) > { >- if (Vwarn_fortran_indexing) >- gripe_implicit_conversion ("real matrix", "real scalar"); >+ gripe_implicit_conversion ("real matrix", "real scalar"); > > retval = matrix (0, 0) .fixedpoint(); > } >-#endif > else > gripe_invalid_conversion ("fixed matrix", "complex scalar"); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 173274
:
115382
|
115383
| 115972 |
115975
|
116023
|
116028
|
116050
|
116051