changeset 7520:b166043585a8

use 0 instead of NULL
author John W. Eaton <jwe@octave.org>
date Fri, 22 Feb 2008 16:44:03 -0500
parents 3bf53d7f9d39
children 6f10bbb2854a
files liboctave/CSparse.cc liboctave/ChangeLog liboctave/SparseCmplxLU.cc liboctave/SparsedbleLU.cc liboctave/dSparse.cc liboctave/file-ops.cc liboctave/oct-group.cc liboctave/oct-shlib.cc liboctave/sparse-base-chol.h liboctave/sparse-dmsolve.cc src/ChangeLog src/DLD-FUNCTIONS/ccolamd.cc src/DLD-FUNCTIONS/colamd.cc src/DLD-FUNCTIONS/convhulln.cc src/DLD-FUNCTIONS/dmperm.cc src/DLD-FUNCTIONS/qz.cc src/DLD-FUNCTIONS/regexp.cc src/DLD-FUNCTIONS/symbfact.cc src/zfstream.cc src/zfstream.h
diffstat 20 files changed, 134 insertions(+), 120 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/CSparse.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/liboctave/CSparse.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -1123,14 +1123,14 @@
 
       UMFPACK_ZNAME (report_matrix) (nr, nc, Ap, Ai, 
 				     reinterpret_cast<const double *> (Ax), 
-				     NULL, 1, control);
+				     0, 1, control);
 
       void *Symbolic;
       Matrix Info (1, UMFPACK_INFO);
       double *info = Info.fortran_vec ();
       int status = UMFPACK_ZNAME (qsymbolic) 
-	(nr, nc, Ap, Ai, reinterpret_cast<const double *> (Ax), NULL, 
-	 NULL, &Symbolic, control, info);
+	(nr, nc, Ap, Ai, reinterpret_cast<const double *> (Ax), 0, 
+	 0, &Symbolic, control, info);
 
       if (status < 0)
 	{
@@ -1150,7 +1150,7 @@
 	  status
 	    = UMFPACK_ZNAME (numeric) (Ap, Ai,
 				       reinterpret_cast<const double *> (Ax),
-				       NULL, Symbolic, &Numeric, control, info) ;
+				       0, Symbolic, &Numeric, control, info) ;
 	  UMFPACK_ZNAME (free_symbolic) (&Symbolic) ;
 
 	  rcond = Info (UMFPACK_RCOND);
@@ -1173,7 +1173,7 @@
 	      double d_exponent;
 
 	      status = UMFPACK_ZNAME (get_determinant) 
-		(reinterpret_cast<double *> (&d[0]), NULL, &d_exponent,
+		(reinterpret_cast<double *> (&d[0]), 0, &d_exponent,
 		 Numeric, info);
 	      d[1] = d_exponent;
 
@@ -5469,14 +5469,14 @@
 
   UMFPACK_ZNAME (report_matrix) (nr, nc, Ap, Ai,
 				 reinterpret_cast<const double *> (Ax),
-				 NULL, 1, control);
+				 0, 1, control);
 
   void *Symbolic;
   Info = Matrix (1, UMFPACK_INFO);
   double *info = Info.fortran_vec ();
   int status = UMFPACK_ZNAME (qsymbolic) (nr, nc, Ap, Ai, 
 				     reinterpret_cast<const double *> (Ax), 
-				     NULL, NULL, &Symbolic, control, info);
+				     0, 0, &Symbolic, control, info);
 
   if (status < 0)
     {
@@ -5494,7 +5494,7 @@
       UMFPACK_ZNAME (report_symbolic) (Symbolic, control);
 
       status = UMFPACK_ZNAME (numeric) (Ap, Ai,
-				   reinterpret_cast<const double *> (Ax), NULL, 
+				   reinterpret_cast<const double *> (Ax), 0, 
 				   Symbolic, &Numeric, control, info) ;
       UMFPACK_ZNAME (free_symbolic) (&Symbolic) ;
 
@@ -5581,7 +5581,7 @@
 	  if (spu == 0.)
 	    {
 	      cm->print = -1;
-	      cm->print_function = NULL;
+	      cm->print_function = 0;
 	    }
 	  else
 	    {
@@ -5606,7 +5606,7 @@
 	  A->nzmax = nnz();
 	  A->packed = true;
 	  A->sorted = true;
-	  A->nz = NULL;
+	  A->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  A->itype = CHOLMOD_LONG;
 #else
@@ -5736,9 +5736,9 @@
 		  status = UMFPACK_ZNAME (solve) (UMFPACK_A, Ap,
 					     Ai,
 					     reinterpret_cast<const double *> (Ax), 
-					     NULL,
+					     0,
 					     reinterpret_cast<double *> (&Xx[iidx]), 
-					     NULL,
+					     0,
 					     &Bx[iidx], Bz, Numeric, 
 					     control, info);
 #else
@@ -5748,11 +5748,11 @@
 		  status = UMFPACK_ZNAME (solve) (UMFPACK_A, Ap,
 					     Ai,
 					     reinterpret_cast<const double *> (Ax), 
-					     NULL,
+					     0,
 					     reinterpret_cast<double *> (&Xx[iidx]), 
-					     NULL,
+					     0,
 					     reinterpret_cast<const double *> (Bz),
-					     NULL, Numeric, 
+					     0, Numeric, 
 					     control, info);
 #endif
 
@@ -5824,7 +5824,7 @@
 	  if (spu == 0.)
 	    {
 	      cm->print = -1;
-	      cm->print_function = NULL;
+	      cm->print_function = 0;
 	    }
 	  else
 	    {
@@ -5849,7 +5849,7 @@
 	  A->nzmax = nnz();
 	  A->packed = true;
 	  A->sorted = true;
-	  A->nz = NULL;
+	  A->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  A->itype = CHOLMOD_LONG;
 #else
@@ -5873,7 +5873,7 @@
 	  B->nzmax = b.nnz();
 	  B->packed = true;
 	  B->sorted = true;
-	  B->nz = NULL;
+	  B->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  B->itype = CHOLMOD_LONG;
 #else
@@ -6007,9 +6007,9 @@
 		  status = UMFPACK_ZNAME (solve) (UMFPACK_A, Ap,
 					     Ai,
 					     reinterpret_cast<const double *> (Ax),
-					     NULL,
+					     0,
 					     reinterpret_cast<double *> (Xx),
-					     NULL, 
+					     0, 
 					     Bx, Bz, Numeric, control, 
 					     info);
 #else
@@ -6018,11 +6018,11 @@
 
 		  status = UMFPACK_ZNAME (solve) (UMFPACK_A, Ap, Ai, 
 					     reinterpret_cast<const double *> (Ax),
-					     NULL,
+					     0,
 					     reinterpret_cast<double *> (Xx),
-					     NULL,
+					     0,
 					     reinterpret_cast<double *> (Bz),
-					     NULL,
+					     0,
 					     Numeric, control, 
 					     info);
 #endif
@@ -6115,7 +6115,7 @@
 	  if (spu == 0.)
 	    {
 	      cm->print = -1;
-	      cm->print_function = NULL;
+	      cm->print_function = 0;
 	    }
 	  else
 	    {
@@ -6140,7 +6140,7 @@
 	  A->nzmax = nnz();
 	  A->packed = true;
 	  A->sorted = true;
-	  A->nz = NULL;
+	  A->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  A->itype = CHOLMOD_LONG;
 #else
@@ -6263,11 +6263,11 @@
 		  status = 
 		    UMFPACK_ZNAME (solve) (UMFPACK_A, Ap, Ai, 
 				      reinterpret_cast<const double *> (Ax), 
-				      NULL,
+				      0,
 				      reinterpret_cast<double *> (&Xx[iidx]), 
-				      NULL,
+				      0,
 				      reinterpret_cast<const double *> (&Bx[iidx]), 
-				      NULL, Numeric, control, info);
+				      0, Numeric, control, info);
 		  
 		  if (status < 0)
 		    {
@@ -6337,7 +6337,7 @@
 	  if (spu == 0.)
 	    {
 	      cm->print = -1;
-	      cm->print_function = NULL;
+	      cm->print_function = 0;
 	    }
 	  else
 	    {
@@ -6362,7 +6362,7 @@
 	  A->nzmax = nnz();
 	  A->packed = true;
 	  A->sorted = true;
-	  A->nz = NULL;
+	  A->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  A->itype = CHOLMOD_LONG;
 #else
@@ -6386,7 +6386,7 @@
 	  B->nzmax = b.nnz();
 	  B->packed = true;
 	  B->sorted = true;
-	  B->nz = NULL;
+	  B->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  B->itype = CHOLMOD_LONG;
 #else
@@ -6511,11 +6511,11 @@
 		  status = UMFPACK_ZNAME (solve) (UMFPACK_A, Ap,
 					     Ai,
 					     reinterpret_cast<const double *> (Ax),
-					     NULL,
+					     0,
 					     reinterpret_cast<double *> (Xx),
-					     NULL,
+					     0,
 					     reinterpret_cast<double *> (Bx),
-					     NULL, Numeric, control, info);
+					     0, Numeric, control, info);
 		  
 		  if (status < 0)
 		    {
--- a/liboctave/ChangeLog	Fri Feb 22 15:17:15 2008 -0500
+++ b/liboctave/ChangeLog	Fri Feb 22 16:44:03 2008 -0500
@@ -1,3 +1,9 @@
+2008-02-22  John W. Eaton  <jwe@octave.org>
+
+	* CSparse.cc, SparseCmplxLU.cc, SparsedbleLU.cc, dSparse.cc,
+	file-ops.cc, oct-group.cc, oct-shlib.cc, sparse-base-chol.h,
+	sparse-dmsolve.cc: Use 0 instead of NULL.
+
 2008-02-22  David Bateman  <dbateman@free.fr>
 
 	* boolSparse.cc (SparseBoolMatrix SparseBoolMatrix::diag 
--- a/liboctave/SparseCmplxLU.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/liboctave/SparseCmplxLU.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -95,14 +95,14 @@
 
   UMFPACK_ZNAME (report_matrix) (nr, nc, Ap, Ai,
 				 reinterpret_cast<const double *> (Ax),
-				 NULL, 1, control);
+				 0, 1, control);
 
   void *Symbolic;
   Matrix Info (1, UMFPACK_INFO);
   double *info = Info.fortran_vec ();
   int status = UMFPACK_ZNAME (qsymbolic) (nr, nc, Ap, Ai, 
 					  reinterpret_cast<const double *> (Ax),
-					  NULL, NULL,
+					  0, 0,
 					  &Symbolic, control, info);
 
   if (status < 0)
@@ -122,7 +122,7 @@
       void *Numeric;
       status = UMFPACK_ZNAME (numeric) (Ap, Ai,
 					reinterpret_cast<const double *> (Ax),
-					NULL, Symbolic, &Numeric, control,
+					0, Symbolic, &Numeric, control,
 					info);
       UMFPACK_ZNAME (free_symbolic) (&Symbolic) ;
 
@@ -198,9 +198,9 @@
 	      octave_idx_type do_recip;
 	      status = UMFPACK_ZNAME (get_numeric) (Ltp, Ltj,
 						    reinterpret_cast<double *> (Ltx),
-						    NULL, Up, Uj,
+						    0, Up, Uj,
 						    reinterpret_cast <double *> (Ux),
-						    NULL, p, q, NULL, NULL,
+						    0, p, q, 0, 0,
 						    &do_recip, Rx, Numeric);
 
 	      UMFPACK_ZNAME (free_numeric) (&Numeric) ;
@@ -223,12 +223,12 @@
 		  UMFPACK_ZNAME (report_matrix) (nr, n_inner,
 					    Lfact.cidx (), Lfact.ridx (), 
 					    reinterpret_cast<double *> (Lfact.data()), 
-					    NULL, 1, control);
+					    0, 1, control);
 
 		  UMFPACK_ZNAME (report_matrix) (n_inner, nc,
 					    Ufact.cidx (), Ufact.ridx (), 
 					    reinterpret_cast<double *> (Ufact.data()), 
-					    NULL, 1, control);
+					    0, 1, control);
 		  UMFPACK_ZNAME (report_perm) (nr, p, control);
 		  UMFPACK_ZNAME (report_perm) (nc, q, control);
 		}
@@ -311,7 +311,7 @@
       const Complex *Ax = a.data ();
 
       UMFPACK_ZNAME (report_matrix) (nr, nc, Ap, Ai, 
-				reinterpret_cast<const double *> (Ax), NULL,
+				reinterpret_cast<const double *> (Ax), 0,
 				1, control);
 
       void *Symbolic;
@@ -329,7 +329,7 @@
 
 	status = UMFPACK_ZNAME (qsymbolic) (nr, nc, Ap, Ai, 
 				       reinterpret_cast<const double *> (Ax),
-				       NULL, qinit, &Symbolic, control, 
+				       0, qinit, &Symbolic, control, 
 				       info);
       } while (0);
 
@@ -349,7 +349,7 @@
 
 	  void *Numeric;
 	  status = UMFPACK_ZNAME (numeric) (Ap, Ai, 
-				       reinterpret_cast<const double *> (Ax), NULL,
+				       reinterpret_cast<const double *> (Ax), 0,
 				       Symbolic, &Numeric, control, info) ;
 	  UMFPACK_ZNAME (free_symbolic) (&Symbolic) ;
 
@@ -426,9 +426,9 @@
 		  status = 
 		    UMFPACK_ZNAME (get_numeric) (Ltp, Ltj, 
 					    reinterpret_cast<double *> (Ltx),
-					    NULL, Up, Uj,
+					    0, Up, Uj,
 					    reinterpret_cast<double *> (Ux), 
-					    NULL, p, q, NULL, NULL, 
+					    0, p, q, 0, 0, 
 					    &do_recip, Rx, Numeric) ;
 
 		  UMFPACK_ZNAME (free_numeric) (&Numeric) ;
@@ -452,13 +452,13 @@
 						Lfact.cidx (), 
 						Lfact.ridx (), 
 						reinterpret_cast<double *> (Lfact.data()), 
-						NULL, 1, control);
+						0, 1, control);
 
 		      UMFPACK_ZNAME (report_matrix) (n_inner, nc, 
 						Ufact.cidx (), 
 						Ufact.ridx (), 
 						reinterpret_cast<double *> (Ufact.data()), 
-						NULL, 1, control);
+						0, 1, control);
 		      UMFPACK_ZNAME (report_perm) (nr, p, control);
 		      UMFPACK_ZNAME (report_perm) (nc, q, control);
 		    }
--- a/liboctave/SparsedbleLU.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/liboctave/SparsedbleLU.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -97,7 +97,7 @@
   void *Symbolic;
   Matrix Info (1, UMFPACK_INFO);
   double *info = Info.fortran_vec ();
-  int status = UMFPACK_DNAME (qsymbolic) (nr, nc, Ap, Ai, Ax, NULL,
+  int status = UMFPACK_DNAME (qsymbolic) (nr, nc, Ap, Ai, Ax, 0,
 				     &Symbolic, control, info);
 
   if (status < 0)
@@ -190,7 +190,7 @@
 
 	      octave_idx_type do_recip;
 	      status = UMFPACK_DNAME (get_numeric) (Ltp, Ltj, Ltx,
-					       Up, Uj, Ux, p, q, NULL,
+					       Up, Uj, Ux, p, q, 0,
 					       &do_recip, Rx, 
 					       Numeric) ;
 
@@ -407,7 +407,7 @@
 		  octave_idx_type do_recip;
 		  status = UMFPACK_DNAME (get_numeric) (Ltp, Ltj,
 						   Ltx, Up, Uj, Ux, p, q, 
-						   NULL, &do_recip, 
+						   0, &do_recip, 
 						   Rx, Numeric) ;
 
 		  UMFPACK_DNAME (free_numeric) (&Numeric) ;
--- a/liboctave/dSparse.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/liboctave/dSparse.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -1201,7 +1201,7 @@
       Matrix Info (1, UMFPACK_INFO);
       double *info = Info.fortran_vec ();
       int status = UMFPACK_DNAME (qsymbolic) (nr, nc, Ap, Ai, 
-					 Ax, NULL, &Symbolic, control, info);
+					 Ax, 0, &Symbolic, control, info);
 
       if (status < 0)
 	{
@@ -5652,7 +5652,7 @@
   void *Symbolic;
   Info = Matrix (1, UMFPACK_INFO);
   double *info = Info.fortran_vec ();
-  int status = UMFPACK_DNAME (qsymbolic) (nr, nc, Ap, Ai, Ax, NULL,
+  int status = UMFPACK_DNAME (qsymbolic) (nr, nc, Ap, Ai, Ax, 0,
 				     &Symbolic, control, info);
 
   if (status < 0)
@@ -5758,7 +5758,7 @@
 	  if (spu == 0.)
 	    {
 	      cm->print = -1;
-	      cm->print_function = NULL;
+	      cm->print_function = 0;
 	    }
 	  else
 	    {
@@ -5783,7 +5783,7 @@
 	  A->nzmax = nnz();
 	  A->packed = true;
 	  A->sorted = true;
-	  A->nz = NULL;
+	  A->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  A->itype = CHOLMOD_LONG;
 #else
@@ -5974,7 +5974,7 @@
 	  if (spu == 0.)
 	    {
 	      cm->print = -1;
-	      cm->print_function = NULL;
+	      cm->print_function = 0;
 	    }
 	  else
 	    {
@@ -5999,7 +5999,7 @@
 	  A->nzmax = nnz();
 	  A->packed = true;
 	  A->sorted = true;
-	  A->nz = NULL;
+	  A->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  A->itype = CHOLMOD_LONG;
 #else
@@ -6023,7 +6023,7 @@
 	  B->nzmax = b.nnz();
 	  B->packed = true;
 	  B->sorted = true;
-	  B->nz = NULL;
+	  B->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  B->itype = CHOLMOD_LONG;
 #else
@@ -6236,7 +6236,7 @@
 	  if (spu == 0.)
 	    {
 	      cm->print = -1;
-	      cm->print_function = NULL;
+	      cm->print_function = 0;
 	    }
 	  else
 	    {
@@ -6261,7 +6261,7 @@
 	  A->nzmax = nnz();
 	  A->packed = true;
 	  A->sorted = true;
-	  A->nz = NULL;
+	  A->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  A->itype = CHOLMOD_LONG;
 #else
@@ -6470,7 +6470,7 @@
 	  if (spu == 0.)
 	    {
 	      cm->print = -1;
-	      cm->print_function = NULL;
+	      cm->print_function = 0;
 	    }
 	  else
 	    {
@@ -6495,7 +6495,7 @@
 	  A->nzmax = nnz();
 	  A->packed = true;
 	  A->sorted = true;
-	  A->nz = NULL;
+	  A->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  A->itype = CHOLMOD_LONG;
 #else
@@ -6519,7 +6519,7 @@
 	  B->nzmax = b.nnz();
 	  B->packed = true;
 	  B->sorted = true;
-	  B->nz = NULL;
+	  B->nz = 0;
 #ifdef IDX_TYPE_LONG
 	  B->itype = CHOLMOD_LONG;
 #else
--- a/liboctave/file-ops.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/liboctave/file-ops.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -467,7 +467,7 @@
 
   while (true)
     {
-      int status = GetFullPathName (name.c_str (), n, &win_path[0], NULL);
+      int status = GetFullPathName (name.c_str (), n, &win_path[0], 0);
 
       if (status == 0)
         break;
--- a/liboctave/oct-group.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/liboctave/oct-group.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -192,7 +192,7 @@
       gr_gid = gr->gr_gid;
 
       // FIXME -- maybe there should be a string_vector
-      // constructor that takes a NULL terminated list of C
+      // constructor that takes a NUL terminated list of C
       // strings.
 
       const char * const *tmp = gr->gr_mem;
--- a/liboctave/oct-shlib.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/liboctave/oct-shlib.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -464,7 +464,7 @@
 
       handle = LoadLibrary (file.c_str ());
 
-      if (handle != NULL)
+      if (handle)
 	stamp_time ();
       else
 	{
--- a/liboctave/sparse-base-chol.h	Fri Feb 22 15:17:15 2008 -0500
+++ b/liboctave/sparse-base-chol.h	Fri Feb 22 16:44:03 2008 -0500
@@ -40,7 +40,7 @@
   class sparse_base_chol_rep
   {
   public:
-    sparse_base_chol_rep (void) : count (1), Lsparse (NULL), 
+    sparse_base_chol_rep (void) : count (1), Lsparse (0), 
 				  is_pd (false), minor_p (0) { }
 
     sparse_base_chol_rep (const chol_type& a, 
--- a/liboctave/sparse-dmsolve.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/liboctave/sparse-dmsolve.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -380,7 +380,7 @@
       CXSPARSE_DNAME () csm;
       csm.m = nr;
       csm.n = nc;
-      csm.x = NULL;
+      csm.x = 0;
       csm.nz = -1;
       csm.nzmax = a.nnz ();
       // Cast away const on A, with full knowledge that CSparse won't touch it.
@@ -412,7 +412,7 @@
 				  nnz_remaining, true);
 	  nnz_remaining -= m.nnz();
 	  RT mtmp = 
-	    qrsolve (m, dmsolve_extract (btmp, NULL, NULL, dm->rr[2], b_nr, 0,
+	    qrsolve (m, dmsolve_extract (btmp, 0, 0, dm->rr[2], b_nr, 0,
 					 b_nc), info);
 	  dmsolve_insert (retval, mtmp, q, dm->cc [3], 0);
 	  if (dm->rr [2] > 0 && !info)
@@ -420,7 +420,7 @@
 	      m = dmsolve_extract (a, pinv, q, 0, dm->rr [2], 
 				   dm->cc [3], nc, nnz_remaining, true);
 	      nnz_remaining -= m.nnz();
-	      RT ctmp = dmsolve_extract (btmp, NULL, NULL, 0, 
+	      RT ctmp = dmsolve_extract (btmp, 0, 0, 0, 
 					 dm->rr[2], 0, b_nc);
 	      btmp.insert (ctmp - m * mtmp, 0, 0);
 	    }
@@ -433,7 +433,7 @@
 	  ST m = dmsolve_extract (a, pinv, q, dm->rr [1], dm->rr [2], 
 				  dm->cc [2], dm->cc [3], nnz_remaining, false);
 	  nnz_remaining -= m.nnz();
-	  RT btmp2 = dmsolve_extract (btmp, NULL, NULL, dm->rr [1], dm->rr [2], 
+	  RT btmp2 = dmsolve_extract (btmp, 0, 0, dm->rr [1], dm->rr [2], 
 				      0, b_nc);
 	  double rcond = 0.0;
 	  MatrixType mtyp (MatrixType::Full);
@@ -451,7 +451,7 @@
 	      m = dmsolve_extract (a, pinv, q, 0, dm->rr [1], dm->cc [2],
 				   dm->cc [3], nnz_remaining, true);
 	      nnz_remaining -= m.nnz();
-	      RT ctmp = dmsolve_extract (btmp, NULL, NULL, 0,
+	      RT ctmp = dmsolve_extract (btmp, 0, 0, 0,
 					 dm->rr[1], 0, b_nc);
 	      btmp.insert (ctmp - m * mtmp, 0, 0);
 	    }
@@ -463,7 +463,7 @@
 	  ST m = dmsolve_extract (a, pinv, q, 0, dm->rr [1], 0, 
 				  dm->cc [2], nnz_remaining, true);
 	  RT mtmp = 
-	    qrsolve (m, dmsolve_extract(btmp, NULL, NULL, 0, dm->rr [1] , 0, 
+	    qrsolve (m, dmsolve_extract(btmp, 0, 0, 0, dm->rr [1] , 0, 
 					b_nc), info);
 	  dmsolve_insert (retval, mtmp, q, 0, 0);
 	}
--- a/src/ChangeLog	Fri Feb 22 15:17:15 2008 -0500
+++ b/src/ChangeLog	Fri Feb 22 16:44:03 2008 -0500
@@ -1,3 +1,11 @@
+2008-02-22  John W. Eaton  <jwe@octave.org>
+
+	* DLD-FUNCTIONS/ccolamd.cc, DLD-FUNCTIONS/colamd.cc,
+	DLD-FUNCTIONS/convhulln.cc, DLD-FUNCTIONS/dmperm.cc,
+	DLD-FUNCTIONS/qz.cc, DLD-FUNCTIONS/regexp.cc,
+	DLD-FUNCTIONS/symbfact.cc, zfstream.h, zfstream.cc:
+	Use 0 instead of NULL.
+
 2008-02-22  David Bateman  <dbateman@free.fr>
 
 	* DLD-FUNCTIONS/chol.c (Fchol, Fcholinv, Fchol2iinv): Treat 
--- a/src/DLD-FUNCTIONS/ccolamd.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/src/DLD-FUNCTIONS/ccolamd.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -286,7 +286,7 @@
       else
 	{
 	  // Order the columns (destroys A)
-	  if (! CCOLAMD_NAME () (n_row, n_col, Alen, A, p, knobs, stats, NULL))
+	  if (! CCOLAMD_NAME () (n_row, n_col, Alen, A, p, knobs, stats, 0))
 	    {
 	      CCOLAMD_NAME (_report) (stats) ;
 	      error ("ccolamd: internal error!");
@@ -521,7 +521,7 @@
       else
 	{
 	  if (!CSYMAMD_NAME () (n_col, ridx, cidx, perm, knobs, stats, 
-				&calloc, &free, NULL, -1))
+				&calloc, &free, 0, -1))
 	    {
 	      CSYMAMD_NAME (_report) (stats) ;
 	      error ("symamd: internal error!") ;
--- a/src/DLD-FUNCTIONS/colamd.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/src/DLD-FUNCTIONS/colamd.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -718,7 +718,7 @@
 	      error ("etree: matrix is marked as symmetric, but not square");
 	      return retval;
 	    }
-	  symetree (ridx, cidx, etree, NULL, n_col);
+	  symetree (ridx, cidx, etree, 0, n_col);
 	}
       else
 	{
--- a/src/DLD-FUNCTIONS/convhulln.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/src/DLD-FUNCTIONS/convhulln.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -121,7 +121,7 @@
   // QJ guarantees that the output will be triangles
   snprintf (flags, 250, "qhull QJ %s", options.c_str ());
 
-  if (! qh_new_qhull (dim, n, pt_array, ismalloc, flags, NULL, stderr)) 
+  if (! qh_new_qhull (dim, n, pt_array, ismalloc, flags, 0, stderr)) 
     {
       // If you want some debugging information replace the NULL
       // pointer with stdout
--- a/src/DLD-FUNCTIONS/dmperm.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/src/DLD-FUNCTIONS/dmperm.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -64,7 +64,7 @@
   CXSPARSE_NAME () csm;
   csm.m = nr;
   csm.n = nc;
-  csm.x = NULL;
+  csm.x = 0;
   csm.nz = -1;
 
   if (arg.is_real_type ())
--- a/src/DLD-FUNCTIONS/qz.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/src/DLD-FUNCTIONS/qz.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -619,7 +619,7 @@
 
 	  // declared static to avoid vfork/long jump compiler complaints
 	  static sort_function sort_test;
-	  sort_test = NULL;
+	  sort_test = 0;
 
 	  switch (ord_job[0])
 	    {
@@ -848,7 +848,7 @@
     {
       char side = (nargout == 5 ? 'R' : 'B');	// which side to compute?
       char howmny = 'B';  // compute all of them and backtransform
-      octave_idx_type *select = NULL; // dummy pointer; select is not used.
+      octave_idx_type *select = 0; // dummy pointer; select is not used.
       octave_idx_type m;
 
       if (complex_case)
--- a/src/DLD-FUNCTIONS/regexp.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/src/DLD-FUNCTIONS/regexp.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -259,9 +259,9 @@
 			 (dotexceptnewline ? 0 : PCRE_DOTALL) |
 			 (lineanchors ? PCRE_MULTILINE : 0) |
 			 (freespacing ? PCRE_EXTENDED : 0),
-			 &err, &erroffset, NULL);
+			 &err, &erroffset, 0);
     
-      if (re == NULL) {
+      if (re == 0) {
 	error("%s: %s at position %d of expression", nm.c_str(), 
 	      err, erroffset);
 	return 0;
@@ -273,10 +273,10 @@
       char *nametable;
       int idx = 0;
 
-      pcre_fullinfo(re, NULL, PCRE_INFO_CAPTURECOUNT,  &subpatterns);
-      pcre_fullinfo(re, NULL, PCRE_INFO_NAMECOUNT, &namecount);
-      pcre_fullinfo(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize);
-      pcre_fullinfo(re, NULL, PCRE_INFO_NAMETABLE, &nametable);
+      pcre_fullinfo(re, 0, PCRE_INFO_CAPTURECOUNT,  &subpatterns);
+      pcre_fullinfo(re, 0, PCRE_INFO_NAMECOUNT, &namecount);
+      pcre_fullinfo(re, 0, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize);
+      pcre_fullinfo(re, 0, PCRE_INFO_NAMETABLE, &nametable);
 
       OCTAVE_LOCAL_BUFFER(int, ovector, (subpatterns+1)*3);
       OCTAVE_LOCAL_BUFFER(int, nidx, namecount);
@@ -293,7 +293,7 @@
 	{
 	  OCTAVE_QUIT;
 
-	  int matches = pcre_exec(re, NULL, buffer.c_str(), 
+	  int matches = pcre_exec(re, 0, buffer.c_str(), 
 				  buffer.length(), idx, 
 				  (idx ? PCRE_NOTBOL : 0),
 				  ovector, (subpatterns+1)*3);
@@ -375,7 +375,7 @@
 		      (case_insensitive ? REG_ICASE : 0));
       if (err)
 	{
-	  int len = regerror(err, &compiled, NULL, 0);
+	  int len = regerror(err, &compiled, 0, 0);
 	  OCTAVE_LOCAL_BUFFER (char, errmsg, len);
 	  regerror(err, &compiled, errmsg, len);
 	  error("%s: %s in pattern (%s)", nm.c_str(), errmsg, 
--- a/src/DLD-FUNCTIONS/symbfact.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/src/DLD-FUNCTIONS/symbfact.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -109,7 +109,7 @@
   if (spu == 0.)
     {
       cm->print = -1;
-      cm->print_function = NULL;
+      cm->print_function = 0;
     }
   else
     {
@@ -126,7 +126,7 @@
   cholmod_sparse *A = &Astore;
   A->packed = true;
   A->sorted = true;
-  A->nz = NULL;
+  A->nz = 0;
 #ifdef IDX_TYPE_LONG
   A->itype = CHOLMOD_LONG;
 #else
@@ -222,13 +222,13 @@
 	  goto symbfact_error;
 	}
 
-      if (CHOLMOD_NAME(postorder) (Parent, n, NULL, Post, cm) != n)
+      if (CHOLMOD_NAME(postorder) (Parent, n, 0, Post, cm) != n)
 	{
 	  error("postorder failed");
 	  goto symbfact_error;
 	}
 
-      CHOLMOD_NAME(rowcolcounts) (Alo, NULL, 0, Parent, Post, NULL,
+      CHOLMOD_NAME(rowcolcounts) (Alo, 0, 0, Parent, Post, 0,
 				  ColCount, First, Level, cm);
 
       if (cm->status < CHOLMOD_OK)
@@ -244,12 +244,12 @@
 	  if (A->stype == 1)
 	    {
 	      A1 = A;
-	      A2 = NULL;
+	      A2 = 0;
 	    }
 	  else if (A->stype == -1)
 	    {
 	      A1 = F;
-	      A2 = NULL;
+	      A2 = 0;
 	    }
 	  else if (coletree)
 	    {
--- a/src/zfstream.cc	Fri Feb 22 15:17:15 2008 -0500
+++ b/src/zfstream.cc	Fri Feb 22 16:44:03 2008 -0500
@@ -47,8 +47,8 @@
 
 // Default constructor
 gzfilebuf::gzfilebuf()
-: file(NULL), io_mode(std::ios_base::openmode(0)), own_fd(false),
-  buffer(NULL), buffer_size(BIGBUFSIZE), own_buffer(true)
+: file(0), io_mode(std::ios_base::openmode(0)), own_fd(false),
+  buffer(0), buffer_size(BIGBUFSIZE), own_buffer(true)
 {
   // No buffers to start with
   this->disable_buffer();
@@ -81,19 +81,19 @@
 {
   // Fail if file already open
   if (this->is_open())
-    return NULL;
+    return 0;
   // Don't support simultaneous read/write access (yet)
   if ((mode & std::ios_base::in) && (mode & std::ios_base::out))
-    return NULL;
+    return 0;
 
   // Build mode string for gzopen and check it [27.8.1.3.2]
   char char_mode[6] = "\0\0\0\0\0";
   if (!this->open_mode(mode, char_mode))
-    return NULL;
+    return 0;
 
   // Attempt to open file
-  if ((file = gzopen(name, char_mode)) == NULL)
-    return NULL;
+  if ((file = gzopen(name, char_mode)) == 0)
+    return 0;
 
   // On success, allocate internal buffer and set flags
   this->enable_buffer();
@@ -109,19 +109,19 @@
 {
   // Fail if file already open
   if (this->is_open())
-    return NULL;
+    return 0;
   // Don't support simultaneous read/write access (yet)
   if ((mode & std::ios_base::in) && (mode & std::ios_base::out))
-    return NULL;
+    return 0;
 
   // Build mode string for gzdopen and check it [27.8.1.3.2]
   char char_mode[6] = "\0\0\0\0\0";
   if (!this->open_mode(mode, char_mode))
-    return NULL;
+    return 0;
 
   // Attempt to attach to file
-  if ((file = gzdopen(fd, char_mode)) == NULL)
-    return NULL;
+  if ((file = gzdopen(fd, char_mode)) == 0)
+    return 0;
 
   // On success, allocate internal buffer and set flags
   this->enable_buffer();
@@ -136,16 +136,16 @@
 {
   // Fail immediately if no file is open
   if (!this->is_open())
-    return NULL;
+    return 0;
   // Assume success
   gzfilebuf* retval = this;
   // Attempt to sync and close gzipped file
   if (this->sync() == -1)
-    retval = NULL;
+    retval = 0;
   if (gzclose(file) < 0)
-    retval = NULL;
+    retval = 0;
   // File is now gone anyway (postcondition [27.8.1.3.8])
-  file = NULL;
+  file = 0;
   own_fd = false;
   // Destroy internal buffer if it exists
   this->disable_buffer();
@@ -351,7 +351,7 @@
 {
   // First make sure stuff is sync'ed, for safety
   if (this->sync() == -1)
-    return NULL;
+    return 0;
   // If buffering is turned off on purpose via setbuf(0,0), still allocate one...
   // "Unbuffered" only really refers to put [27.8.1.4.10], while get needs at
   // least a buffer of size 1 (very inefficient though, therefore make it bigger?)
@@ -360,7 +360,7 @@
   {
     // Replace existing buffer (if any) with small internal buffer
     this->disable_buffer();
-    buffer = NULL;
+    buffer = 0;
     buffer_size = 0;
     own_buffer = true;
     this->enable_buffer();
@@ -436,7 +436,7 @@
     if (!this->pbase())
       buffer_size = 0;
     delete[] buffer;
-    buffer = NULL;
+    buffer = 0;
     this->setg(0, 0, 0);
     this->setp(0, 0);
   }
@@ -510,13 +510,13 @@
 
 // Default constructor initializes stream buffer
 gzifstream::gzifstream()
-: std::istream(NULL), sb()
+: std::istream(0), sb()
 { this->init(&sb); }
 
 // Initialize stream buffer and open file
 gzifstream::gzifstream(const char* name,
                        std::ios_base::openmode mode)
-: std::istream(NULL), sb()
+: std::istream(0), sb()
 {
   this->init(&sb);
   this->open(name, mode);
@@ -525,7 +525,7 @@
 // Initialize stream buffer and attach to file
 gzifstream::gzifstream(int fd,
                        std::ios_base::openmode mode)
-: std::istream(NULL), sb()
+: std::istream(0), sb()
 {
   this->init(&sb);
   this->attach(fd, mode);
@@ -565,13 +565,13 @@
 
 // Default constructor initializes stream buffer
 gzofstream::gzofstream()
-: std::ostream(NULL), sb()
+: std::ostream(0), sb()
 { this->init(&sb); }
 
 // Initialize stream buffer and open file
 gzofstream::gzofstream(const char* name,
                        std::ios_base::openmode mode)
-: std::ostream(NULL), sb()
+: std::ostream(0), sb()
 {
   this->init(&sb);
   this->open(name, mode);
@@ -580,7 +580,7 @@
 // Initialize stream buffer and attach to file
 gzofstream::gzofstream(int fd,
                        std::ios_base::openmode mode)
-: std::ostream(NULL), sb()
+: std::ostream(0), sb()
 {
   this->init(&sb);
   this->attach(fd, mode);
--- a/src/zfstream.h	Fri Feb 22 15:17:15 2008 -0500
+++ b/src/zfstream.h	Fri Feb 22 16:44:03 2008 -0500
@@ -83,7 +83,7 @@
    *  @return  True if file is open.
   */
   bool
-  is_open() const { return (file != NULL); }
+  is_open() const { return (file != 0); }
 
   /**
    *  @brief  Open gzipped file.