Mercurial > hg > octave-nkf
changeset 1365:9b2654476502
[project @ 1995-09-05 23:44:41 by jwe]
author | jwe |
---|---|
date | Tue, 05 Sep 1995 23:50:05 +0000 |
parents | 353b06ad0194 |
children | f75432dff006 |
files | liboctave/CMatrix.cc liboctave/CmplxLU.cc liboctave/DASSL.cc liboctave/EIG.cc liboctave/NPSOL.cc liboctave/QPSOL.cc liboctave/dMatrix.cc liboctave/dMatrix.h liboctave/dbleLU.cc |
diffstat | 9 files changed, 17 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -801,7 +801,7 @@ } else { - Complex *dummy; + Complex *dummy = 0; F77_FCN (zgedi, ZGEDI) (tmp_data, nr, nc, ipvt, dummy, z, 1); }
--- a/liboctave/CmplxLU.cc +++ b/liboctave/CmplxLU.cc @@ -57,9 +57,9 @@ int *pvt = new int [n]; Complex *tmp_data = dup (a.data (), a.length ()); int info = 0; - Complex *b; + Complex *dummy = 0; - F77_FCN (zgesv, ZGESV) (n, 0, tmp_data, n, ipvt, b, n, info); + F77_FCN (zgesv, ZGESV) (n, 0, tmp_data, n, ipvt, dummy, n, info); ComplexMatrix A_fact (tmp_data, n, n);
--- a/liboctave/DASSL.cc +++ b/liboctave/DASSL.cc @@ -298,8 +298,8 @@ else info[6] = 0; - double *dummy; - int *idummy; + double *dummy = 0; + int *idummy = 0; if (restart) {
--- a/liboctave/EIG.cc +++ b/liboctave/EIG.cc @@ -71,7 +71,7 @@ int lwork = 8*n; double *work = new double[lwork]; - double *dummy; + double *dummy = 0; int idummy = 1; F77_FCN (dgeev, DGEEV) ("N", "V", n, tmp_data, n, wr, wi, dummy, @@ -143,7 +143,7 @@ Complex *work = new Complex[lwork]; double *rwork = new double[4*n]; - Complex *dummy; + Complex *dummy = 0; int idummy = 1; F77_FCN (zgeev, ZGEEV) ("N", "V", n, tmp_data, n, pw, dummy, idummy,
--- a/liboctave/NPSOL.cc +++ b/liboctave/NPSOL.cc @@ -205,8 +205,7 @@ // Constraint stuff. - double dummy; - double *pclin = &dummy; + double *pclin = 0; Matrix clin; if (nclin > 0) {
--- a/liboctave/QPSOL.cc +++ b/liboctave/QPSOL.cc @@ -87,8 +87,7 @@ double bigbnd = infinite_bound (); - double dummy; - double *pa = &dummy; + double *pa = 0; Matrix clin; if (nclin > 0) {
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -529,7 +529,7 @@ } else { - double *dummy; + double *dummy = 0; F77_FCN (dgedi, DGEDI) (tmp_data, nr, nc, ipvt, dummy, z, 1); } @@ -2187,10 +2187,10 @@ return is; } -// Read an array of data froma file in binary format. +// Read an array of data from a file in binary format. int -Matrix::read (FILE *fptr, char *type) +Matrix::read (FILE *fptr, const char *type) { // Allocate buffer pointers. @@ -2267,7 +2267,7 @@ // Write the data array to a file in binary format. int -Matrix::write (FILE *fptr, char *type) +Matrix::write (FILE *fptr, const char *type) { // Allocate buffer pointers.
--- a/liboctave/dMatrix.h +++ b/liboctave/dMatrix.h @@ -230,8 +230,8 @@ friend ostream& operator << (ostream& os, const Matrix& a); friend istream& operator >> (istream& is, Matrix& a); - int read (FILE *fptr, char *type); - int write (FILE *fptr, char *type); + int read (FILE *fptr, const char *type); + int write (FILE *fptr, const char *type); private:
--- a/liboctave/dbleLU.cc +++ b/liboctave/dbleLU.cc @@ -57,9 +57,9 @@ int *pvt = new int [n]; double *tmp_data = dup (a.data (), a.length ()); int info = 0; - double b; + double dummy = 0; - F77_FCN (dgesv, DGESV) (n, 0, tmp_data, n, ipvt, b, n, info); + F77_FCN (dgesv, DGESV) (n, 0, tmp_data, n, ipvt, dummy, n, info); Matrix A_fact (tmp_data, n, n);