home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / DataScope 2.0.3 / Datafiles / externs / Mac_externs / colarray.c next >
Encoding:
C/C++ Source or Header  |  1994-05-04  |  659 b   |  31 lines  |  [TEXT/MPS ]

  1. #include "DScope.h"
  2. /*
  3.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4.      colarray    Fill the result array with copies
  5.                  of the x scale values, one for
  6.                 each row.  This will be used in
  7.                 calculations which are applied
  8.                 to the whole array, but depend
  9.                 on the values of the x scale.
  10.                 In other words, at every point
  11.                 in the array, we have its
  12.                 corresponding column scale value.
  13.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  14. */
  15. long addon(l,r,a)
  16.     scope_array        *l,*r,*a;
  17. {
  18.     register float    *f,*fx;
  19.     register int    i,j;
  20.  
  21.     f = a->vals;
  22.     
  23.     for (i=0; i< a->nrows; i++) {
  24.         fx = a->cols;
  25.         for (j=0; j< a->ncols; j++)
  26.             *f++ = *fx++;
  27.     }
  28.     return (0);
  29. }
  30.  
  31.