IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4203


Ignore:
Timestamp:
Jun 9, 2005, 1:51:49 PM (21 years ago)
Author:
desonia
Message:

changed psPixelsAlloc to set n to nalloc (as psVectorAlloc does).

Location:
trunk/psLib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/pslib.kdevses

    r4191 r4203  
    22<!DOCTYPE KDevPrjSession>
    33<KDevPrjSession>
    4  <DocsAndViews NumberOfDocuments="1" >
     4 <DocsAndViews NumberOfDocuments="7" >
    55  <Doc0 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psLib/src/dataIO/psFits.h" >
    6    <View0 line="242" Type="Source" />
     6   <View0 line="243" Type="Source" />
    77  </Doc0>
     8  <Doc1 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psLib/src/dataIO/psFits.c" >
     9   <View0 line="1525" Type="Source" />
     10  </Doc1>
     11  <Doc2 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psLib/src/collections/psMetadata.h" >
     12   <View0 line="418" Type="Source" />
     13  </Doc2>
     14  <Doc3 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psLib/test/dataIO/tst_psFits.c" >
     15   <View0 line="123" Type="Source" />
     16  </Doc3>
     17  <Doc4 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psLib/test/image/tst_psImageGeomManip.c" >
     18   <View0 line="560" Type="Source" />
     19  </Doc4>
     20  <Doc5 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psLib/src/image/psImageConvolve.c" >
     21   <View0 line="435" Type="Source" />
     22  </Doc5>
     23  <Doc6 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psLib/src/image/psImageFFT.c" >
     24   <View0 line="413" Type="Source" />
     25  </Doc6>
    826 </DocsAndViews>
    927 <pluginList>
  • trunk/psLib/src/collections/psPixels.c

    r4154 r4203  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-08 19:47:19 $
     9 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-09 23:51:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6464        out->data = NULL;
    6565    }
    66     out->n = 0;
     66    out->n = size;
    6767    out->nalloc = size;
    6868
  • trunk/psLib/src/types/psPixels.c

    r4154 r4203  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-08 19:47:19 $
     9 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-09 23:51:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6464        out->data = NULL;
    6565    }
    66     out->n = 0;
     66    out->n = size;
    6767    out->nalloc = size;
    6868
  • trunk/psLib/test/collections/tst_psPixels.c

    r4155 r4203  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.6 $
     7 *  @version $Revision: 1.7 $
    88 *           $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-06-08 19:48:15 $
     9 *  @date $Date: 2005-06-09 23:51:49 $
    1010 *
    1111 *  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
     
    5858        return 2;
    5959    }
    60     if (p0->n != 0) {
     60    if (p0->n != p0->nalloc) {
    6161        psError(PS_ERR_UNKNOWN, true,
    6262                "psPixelsAlloc failed to set n = 0");
     
    8484    p1->data[0].y = 2;
    8585
    86     if (p1->n != 0) {
    87         psError(PS_ERR_UNKNOWN, true,
    88                 "psPixelsAlloc failed to set n = 0");
     86    if (p1->n != p1->nalloc) {
     87        psError(PS_ERR_UNKNOWN, true,
     88                "psPixelsAlloc failed to set n = %d", p1->nalloc);
    8989        return 13;
    9090    }
     
    113113    }
    114114
    115     if (p2->n != 0) {
    116         psError(PS_ERR_UNKNOWN, true,
    117                 "psPixelsAlloc failed to set n = 0");
     115    if (p2->n != p2->nalloc) {
     116        psError(PS_ERR_UNKNOWN, true,
     117                "psPixelsAlloc failed to set n = %d", p2->nalloc);
    118118        return 13;
    119119    }
     
    149149        return 2;
    150150    }
    151     if (p0->n != 0) {
     151    if (p0->n != p0->nalloc) {
    152152        psError(PS_ERR_UNKNOWN, true,
    153153                "psPixelsRealloc failed to set n = 0");
Note: See TracChangeset for help on using the changeset viewer.