Mercurial > hg > octave-terminal
changeset 533:883197c5ad75
[project @ 1994-07-20 20:02:51 by jwe]
author | jwe |
---|---|
date | Wed, 20 Jul 1994 20:02:51 +0000 |
parents | 2ca256b77602 |
children | 7a2521d2d3e4 |
files | libcruft/misc/lo-error.cc liboctave/CColVector.cc liboctave/CDiagMatrix.cc liboctave/CMatrix.cc liboctave/CRowVector.cc liboctave/NPSOL.cc liboctave/dColVector.cc liboctave/dDiagMatrix.cc liboctave/dMatrix.cc liboctave/dRowVector.cc liboctave/dbleSCHUR.cc |
diffstat | 11 files changed, 36 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/libcruft/misc/lo-error.cc +++ b/libcruft/misc/lo-error.cc @@ -1,7 +1,7 @@ // error.cc -*- C++ -*- /* -Copyright (C) 1992, 1993 John W. Eaton +Copyright (C) 1992, 1993, 1994 John W. Eaton This file is part of Octave. @@ -36,7 +36,7 @@ static void verror (const char *name, const char *fmt, va_list args) { - if (name != (char *) NULL) + if (name) fprintf (stderr, "%s: ", name); vfprintf (stderr, fmt, args);
--- a/liboctave/CColVector.cc +++ b/liboctave/CColVector.cc @@ -79,7 +79,7 @@ return *this; } - Complex *new_data = (Complex *) NULL; + Complex *new_data = 0; if (n > 0) { new_data = new Complex [n];
--- a/liboctave/CDiagMatrix.cc +++ b/liboctave/CDiagMatrix.cc @@ -82,7 +82,7 @@ } int new_len = r < c ? r : c; - Complex *new_data = (Complex *) NULL; + Complex *new_data = 0; if (new_len > 0) { new_data = new Complex [new_len]; @@ -113,7 +113,7 @@ } int new_len = r < c ? r : c; - Complex *new_data = (Complex *) NULL; + Complex *new_data = 0; if (new_len > 0) { new_data = new Complex [new_len]; @@ -147,7 +147,7 @@ } int new_len = r < c ? r : c; - Complex *new_data = (Complex *) NULL; + Complex *new_data = 0; if (new_len > 0) { new_data = new Complex [new_len]; @@ -448,7 +448,7 @@ ComplexRowVector ComplexDiagMatrix::row (char *s) const { - if (s == (char *) NULL) + if (! s) { (*current_liboctave_error_handler) ("invalid row selection"); return ComplexRowVector (); @@ -487,7 +487,7 @@ ComplexColumnVector ComplexDiagMatrix::column (char *s) const { - if (s == (char *) NULL) + if (! s) { (*current_liboctave_error_handler) ("invalid column selection"); return ColumnVector ();
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -127,7 +127,7 @@ } int new_len = r * c; - Complex* new_data = (Complex *) NULL; + Complex* new_data = 0; if (new_len > 0) { new_data = new Complex [new_len]; @@ -160,7 +160,7 @@ } int new_len = r * c; - Complex *new_data = (Complex *) NULL; + Complex *new_data = 0; if (new_len > 0) { new_data = new Complex [new_len]; @@ -198,7 +198,7 @@ } int new_len = r * c; - Complex *new_data = (Complex *) NULL; + Complex *new_data = 0; if (new_len > 0) { new_data = new Complex [new_len]; @@ -845,7 +845,7 @@ ComplexRowVector ComplexMatrix::row (char *s) const { - if (s == (char *) NULL) + if (! s) { (*current_liboctave_error_handler) ("invalid row selection"); return ComplexRowVector (); @@ -883,7 +883,7 @@ ComplexColumnVector ComplexMatrix::column (char *s) const { - if (s == (char *) NULL) + if (! s) { (*current_liboctave_error_handler) ("invalid column selection"); return ComplexColumnVector (); @@ -1703,7 +1703,7 @@ return ComplexMatrix (nr, nc, 0.0); Complex *c = new Complex [nr*a_nc]; - Complex *ctmp = (Complex *) NULL; + Complex *ctmp = 0; for (int j = 0; j < a.length (); j++) { @@ -1796,7 +1796,7 @@ return ComplexMatrix (nr, nc, 0.0); Complex *c = new Complex [nr*a_nc]; - Complex *ctmp = (Complex *) NULL; + Complex *ctmp = 0; for (int j = 0; j < a.length (); j++) {
--- a/liboctave/CRowVector.cc +++ b/liboctave/CRowVector.cc @@ -78,7 +78,7 @@ return *this; } - Complex *new_data = (Complex *) NULL; + Complex *new_data = 0; if (n > 0) { new_data = new Complex [n];
--- a/liboctave/NPSOL.cc +++ b/liboctave/NPSOL.cc @@ -97,7 +97,7 @@ #endif } - if ((*mode == 1 || *mode == 2) && user_grad != NULL) + if ((*mode == 1 || *mode == 2) && user_grad) { Vector tmp_grad (nn); @@ -139,7 +139,7 @@ cons[i] = tmp_c.elem (i); } - if (user_jac != NULL) + if (user_jac) { Matrix tmp_jac (nncnln, nn); @@ -291,13 +291,13 @@ pass_options_to_npsol (); - if (user_jac == NULL && user_grad == NULL) + if (! user_jac && ! user_grad) F77_FCN (npoptn) ("Derivative Level 0", 18L); - else if (user_jac == NULL && user_grad != NULL) + else if (! user_jac && user_grad) F77_FCN (npoptn) ("Derivative Level 1", 18L); - else if (user_jac != NULL && user_grad == NULL) + else if (user_jac && ! user_grad) F77_FCN (npoptn) ("Derivative Level 2", 18L); - else if (user_jac != NULL && user_grad != NULL) + else if (user_jac && user_grad) F77_FCN (npoptn) ("Derivative Level 3", 18L); int attempt = 0;
--- a/liboctave/dColVector.cc +++ b/liboctave/dColVector.cc @@ -72,7 +72,7 @@ return *this; } - double *new_data = (double *) NULL; + double *new_data = 0; if (n > 0) { new_data = new double [n];
--- a/liboctave/dDiagMatrix.cc +++ b/liboctave/dDiagMatrix.cc @@ -61,7 +61,7 @@ } int new_len = r < c ? r : c; - double *new_data = (double *) NULL; + double *new_data = 0; if (new_len > 0) { new_data = new double [new_len]; @@ -92,7 +92,7 @@ } int new_len = r < c ? r : c; - double *new_data = (double *) NULL; + double *new_data = 0; if (new_len > 0) { new_data = new double [new_len]; @@ -265,7 +265,7 @@ RowVector DiagMatrix::row (char *s) const { - if (s == (char *) NULL) + if (! s) { (*current_liboctave_error_handler) ("invalid row selection"); return RowVector (); @@ -304,7 +304,7 @@ ColumnVector DiagMatrix::column (char *s) const { - if (s == (char *) NULL) + if (! s) { (*current_liboctave_error_handler) ("invalid column selection"); return ColumnVector ();
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -113,7 +113,7 @@ } int new_len = r * c; - double* new_data = (double *) NULL; + double* new_data = 0; if (new_len > 0) { new_data = new double [new_len]; @@ -146,7 +146,7 @@ } int new_len = r * c; - double *new_data = (double *) NULL; + double *new_data = 0; if (new_len > 0) { new_data = new double [new_len]; @@ -494,7 +494,7 @@ RowVector Matrix::row (char *s) const { - if (s == (char *) NULL) + if (! s) { (*current_liboctave_error_handler) ("invalid row selection"); return RowVector (); @@ -532,7 +532,7 @@ ColumnVector Matrix::column (char *s) const { - if (s == (char *) NULL) + if (! s) { (*current_liboctave_error_handler) ("invalid column selection"); return ColumnVector (); @@ -1329,7 +1329,7 @@ return Matrix (nr, a_nc, 0.0); double *c = new double [nr*a_nc]; - double *ctmp = (double *) NULL; + double *ctmp = 0; int a_len = a.length (); for (int j = 0; j < a_len; j++) @@ -1424,7 +1424,7 @@ return ComplexMatrix (nr, a_nc, 0.0); Complex *c = new Complex [nr*a_nc]; - Complex *ctmp = (Complex *) NULL; + Complex *ctmp = 0; for (int j = 0; j < a.length (); j++) {
--- a/liboctave/dRowVector.cc +++ b/liboctave/dRowVector.cc @@ -74,7 +74,7 @@ return *this; } - double *new_data = (double *) NULL; + double *new_data = 0; if (n > 0) { new_data = new double [n];
--- a/liboctave/dbleSCHUR.cc +++ b/liboctave/dbleSCHUR.cc @@ -94,8 +94,8 @@ // These are not referenced for the non-ordered Schur routine. - int *iwork = (int *) NULL; - int *bwork = (int *) NULL; + int *iwork = 0; + int *bwork = 0; if (*ord == 'A' || *ord == 'D' || *ord == 'a' || *ord == 'd') { iwork = new int [liwork];