[BACK]Return to matrix.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot

Diff for /OpenXM_contrib/gnuplot/Attic/matrix.c between version 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2000/01/22 14:15:59 version 1.1.1.3, 2003/09/15 07:09:25
Line 2 
Line 2 
 static char *RCSid = "$Id$";  static char *RCSid = "$Id$";
 #endif  #endif
   
   /*  NOTICE: Change of Copyright Status
    *
    *  The author of this module, Carsten Grammes, has expressed in
    *  personal email that he has no more interest in this code, and
    *  doesn't claim any copyright. He has agreed to put this module
    *  into the public domain.
    *
    *  Lars Hecking  15-02-1999
    */
   
 /*  /*
  *      Matrix algebra, part of   *      Matrix algebra, part of
  *   *
Line 53  int n;
Line 63  int n;
     double *dp;      double *dp;
     if( n < 1 )      if( n < 1 )
         return (double *) NULL;          return (double *) NULL;
     dp = (double *) gp_alloc ( n * sizeof(double), "vec");      dp = (double *) gp_alloc (n * sizeof(double), "vec");
     return dp;      return dp;
 }  }
   
Line 69  int cols;
Line 79  int cols;
   
     if ( rows < 1  ||  cols < 1 )      if ( rows < 1  ||  cols < 1 )
         return NULL;          return NULL;
     m = (double **) gp_alloc ( rows * sizeof(double *) , "matrix row pointers");      m = (double **) gp_alloc (rows * sizeof(double *) , "matrix row pointers");
     m[0] = (double *) gp_alloc ( rows * cols * sizeof(double), "matrix elements");      m[0] = (double *) gp_alloc (rows * cols * sizeof(double), "matrix elements");
     for ( i = 1; i<rows ; i++ )      for ( i = 1; i<rows ; i++ )
         m[i] = m[i-1] + cols;          m[i] = m[i-1] + cols;
     return m;      return m;

Legend:
Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>