IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4321


Ignore:
Timestamp:
Jun 20, 2005, 12:42:30 PM (21 years ago)
Author:
drobbin
Message:

* empty log message *

Location:
trunk/psLib
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/pslib.kdevses

    r4316 r4321  
    44 <DocsAndViews NumberOfDocuments="4" >
    55  <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psList.h" >
    6    <View0 line="197" Type="Source" />
     6   <View0 Type="Source" />
    77  </Doc0>
    88  <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psList.c" >
    9    <View0 line="565" Type="Source" />
     9   <View0 Type="Source" />
    1010  </Doc1>
    1111  <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/sysUtils/psLogMsg.h" >
    12    <View0 line="69" Type="Source" />
     12   <View0 Type="Source" />
    1313  </Doc2>
    1414  <Doc3 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/sysUtils/psLogMsg.c" >
  • trunk/psLib/src/astro/psCoord.c

    r4289 r4321  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.74 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-06-16 22:42:09 $
     12*  @version $Revision: 1.75 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-06-20 22:42:29 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    268268}
    269269
    270 psPlaneDistort* psPlaneDistortAlloc(psS32 n1, psS32 n2, psS32 n3, psS32 n4)
     270psPlaneDistort* psPlaneDistortAlloc(int n1, int n2, int n3, int n4)
    271271{
    272272    PS_ASSERT_INT_NONNEGATIVE(n1, NULL);
  • trunk/psLib/src/astro/psCoord.h

    r4190 r4321  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-06-09 19:26:47 $
     12*  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-06-20 22:42:29 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    208208
    209209psPlaneDistort* psPlaneDistortAlloc(
    210     psS32 n1,  ///< The order of the w term in the transform.
    211     psS32 n2,  ///< The order of the x term in the transform.
    212     psS32 n3,  ///< The order of the y term in the transform.
    213     psS32 n4   ///< The order of the z term in the transform.
     210    int n1,                            ///< The order of the w term in the transform.
     211    int n2,                            ///< The order of the x term in the transform.
     212    int n3,                            ///< The order of the y term in the transform.
     213    int n4                             ///< The order of the z term in the transform.
    214214);
    215215
  • trunk/psLib/src/astronomy/psCoord.c

    r4289 r4321  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.74 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-06-16 22:42:09 $
     12*  @version $Revision: 1.75 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-06-20 22:42:29 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    268268}
    269269
    270 psPlaneDistort* psPlaneDistortAlloc(psS32 n1, psS32 n2, psS32 n3, psS32 n4)
     270psPlaneDistort* psPlaneDistortAlloc(int n1, int n2, int n3, int n4)
    271271{
    272272    PS_ASSERT_INT_NONNEGATIVE(n1, NULL);
  • trunk/psLib/src/astronomy/psCoord.h

    r4190 r4321  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-06-09 19:26:47 $
     12*  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-06-20 22:42:29 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    208208
    209209psPlaneDistort* psPlaneDistortAlloc(
    210     psS32 n1,  ///< The order of the w term in the transform.
    211     psS32 n2,  ///< The order of the x term in the transform.
    212     psS32 n3,  ///< The order of the y term in the transform.
    213     psS32 n4   ///< The order of the z term in the transform.
     210    int n1,                            ///< The order of the w term in the transform.
     211    int n2,                            ///< The order of the x term in the transform.
     212    int n3,                            ///< The order of the y term in the transform.
     213    int n4                             ///< The order of the z term in the transform.
    214214);
    215215
  • trunk/psLib/src/collections/psMetadata.c

    r4308 r4321  
    1212*  @author Ross Harman, MHPCC
    1313*
    14 *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2005-06-17 23:44:21 $
     14*  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2005-06-20 22:42:29 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    267267}
    268268
    269 psBool psMetadataAddItem(psMetadata *md, psMetadataItem *metadataItem, psS32 location, psS32 flags)
     269bool psMetadataAddItem(psMetadata *md, psMetadataItem *metadataItem, psS32 location, psS32 flags)
    270270{
    271271    char * key = NULL;
     
    359359}
    360360
    361 psBool psMetadataAdd(psMetadata *md, psS32 location, const char *name,
    362                      psS32 type, const char *comment, ...)
     361bool psMetadataAdd(psMetadata *md, int location, const char *name,
     362                   int format, const char *comment, ...)
    363363{
    364364    va_list argPtr;
    365365
    366366    va_start(argPtr, comment);
    367     psBool result = psMetadataAddV(md,location,name,type,comment,argPtr);
     367    psBool result = psMetadataAddV(md,location,name,format,comment,argPtr);
    368368    va_end(argPtr);
    369369
     
    371371}
    372372
    373 psBool psMetadataAddV(psMetadata *md, psS32 location, const char *name,
    374                       psS32 type, const char *comment, va_list list)
     373bool psMetadataAddV(psMetadata *md, int location, const char *name,
     374                    int format, const char *comment, va_list list)
    375375{
    376376    psMetadataItem* metadataItem = NULL;
    377377
    378     metadataItem = psMetadataItemAllocV(name, type & PS_METADATA_TYPE_MASK, comment, list);
    379 
    380     if (!psMetadataAddItem(md, metadataItem, location, type & PS_METADATA_FLAGS_MASK)) {
     378    metadataItem = psMetadataItemAllocV(name, format & PS_METADATA_TYPE_MASK, comment, list);
     379
     380    if (!psMetadataAddItem(md, metadataItem, location, format & PS_METADATA_FLAGS_MASK)) {
    381381        psError(PS_ERR_UNKNOWN,false,PS_ERRORTEXT_psMetadata_ADD_FAILED);
    382382        psFree(metadataItem);
     
    475475}
    476476
    477 psMetadataItem* psMetadataLookup(psMetadata *md, const char *key)
     477psMetadataItem* psMetadataLookup(const psMetadata *md, const char *key)
    478478{
    479479    psHash* mdTable = NULL;
     
    491491}
    492492
    493 void* psMetadataLookupPtr(psBool *status, psMetadata *md, const char *key)
     493void* psMetadataLookupPtr(bool *status, const psMetadata *md, const char *key)
    494494{
    495495    psMetadataItem *metadataItem = NULL;
     
    525525
    526526#define psMetadataLookupNumTYPE(TYPE) \
    527 ps##TYPE psMetadataLookup##TYPE(psBool *status, psMetadata *md, const char *key) \
     527ps##TYPE psMetadataLookup##TYPE(bool *status, const psMetadata *md, const char *key) \
    528528{ \
    529529    psMetadataItem *metadataItem = NULL; \
     
    630630}
    631631
    632 psBool psMetadataIteratorSet(psMetadataIterator* iterator,
    633                              int location)
     632bool psMetadataIteratorSet(psMetadataIterator* iterator,
     633                           int location)
    634634{
    635635    int match;
  • trunk/psLib/src/collections/psMetadata.h

    r4243 r4321  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2005-06-14 02:54:06 $
     13*  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2005-06-20 22:42:29 $
    1515*
    1616*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    214214    const char* name,                  ///< Name of metadata item.
    215215    const char* comment,               ///< Comment for metadata item.
    216     psBool value                       ///< the value of the metadata item.
     216    bool value                       ///< the value of the metadata item.
    217217);
    218218
     
    257257 *  @return bool: True for success, false for failure.
    258258 */
    259 psBool psMetadataAddItem(
     259bool psMetadataAddItem(
    260260    psMetadata*  md,                   ///< Metadata collection to insert metadat item.
    261261    psMetadataItem*  item,             ///< Metadata item to be added.
     
    270270 * @return bool: True for success, false for failure.
    271271 */
    272 psBool psMetadataAdd(
     272bool psMetadataAdd(
    273273    psMetadata* md,                    ///< Metadata collection to insert metadata item.
    274     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     274    int location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    275275    const char *name,                  ///< Name of metadata item.
    276     int type,                          ///< Type of metadata item (psMetadataType) and options (psMetadataFlags)
     276    int format,                      ///< Type of metadata item (psMetadataType) and options (psMetadataFlags)
    277277    const char *comment,               ///< Comment for metadata item.
    278278    ...                                ///< Arguments for name formatting and metadata item data.
     
    286286 * @return bool: True for success, false for failure.
    287287 */
    288 psBool psMetadataAddV(
     288bool psMetadataAddV(
    289289    psMetadata* md,                    ///< Metadata collection to insert metadata item.
    290     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     290    int location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    291291    const char *name,                  ///< Name of metadata item.
    292     int type,                          ///< Type of metadata item (psMetadataType) and options (psMetadataFlags)
     292    int format,                        ///< Type of metadata item (psMetadataType) and options (psMetadataFlags)
    293293    const char *comment,               ///< Comment for metadata item.
    294294    va_list list                       ///< Arguments for name formatting and metadata item data.
     
    300300 *  @return psBool:  True for success, False for failure.
    301301 */
    302 psBool psMetadataAddS32(
     302bool psMetadataAddS32(
    303303    psMetadata* md,                    ///< Metadata collection to insert metadata item
    304304    psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     
    312312 *  @return psBool:  True for success, False for failure.
    313313*/
    314 psBool psMetadataAddF32(
     314bool psMetadataAddF32(
    315315    psMetadata* md,                    ///< Metadata collection to insert metadata item
    316316    psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     
    324324 *  @return psBool:  True for success, False for failure.
    325325*/
    326 psBool psMetadataAddF64(
     326bool psMetadataAddF64(
    327327    psMetadata* md,                    ///< Metadata collection to insert metadata item
    328328    psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     
    348348 *  @return psBool:  True for success, False for failure.
    349349 */
    350 psBool psMetadataAddStr(
     350bool psMetadataAddStr(
    351351    psMetadata* md,                    ///< Metadata collection to insert metadata item
    352352    psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     
    438438 * @return bool: True for success, false for failure.
    439439 */
    440 psBool psMetadataRemove(
    441     psMetadata*  md,           ///< Metadata collection to remove metadata item.
    442     psS32 where,               ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    443     const char * key           ///< Name of metadata key.
     440bool psMetadataRemove(
     441    psMetadata*  md,                   ///< Metadata collection to remove metadata item.
     442    int location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     443    const char * key                   ///< Name of metadata key.
    444444);
    445445
     
    453453 */
    454454psMetadataItem* psMetadataLookup(
    455     psMetadata * md,                   ///< Metadata collection to lookup metadata item.
     455    const psMetadata * md,                   ///< Metadata collection to lookup metadata item.
    456456    const char * key                   ///< Name of metadata key.
    457457);
     
    466466 */
    467467psF64 psMetadataLookupF64(
    468     psBool *status,                    ///< Status of lookup.
    469     psMetadata *md,                    ///< Metadata collection to lookup metadata item.
     468    bool *status,                    ///< Status of lookup.
     469    const psMetadata *md,                    ///< Metadata collection to lookup metadata item.
    470470    const char *key                    ///< Name of metadata key.
    471471);
     
    480480 */
    481481psF32 psMetadataLookupF32(
    482     psBool *status,                    ///< Status of lookup.
    483     psMetadata *md,                    ///< Metadata collection to lookup metadata item.
     482    bool *status,                    ///< Status of lookup.
     483    const psMetadata *md,                    ///< Metadata collection to lookup metadata item.
    484484    const char *key                    ///< Name of metadata key.
    485485);
     
    494494 */
    495495psS32 psMetadataLookupS32(
    496     psBool *status,                    ///< Status of lookup.
    497     psMetadata *md,                    ///< Metadata collection to lookup metadata item.
     496    bool *status,                    ///< Status of lookup.
     497    const psMetadata *md,                    ///< Metadata collection to lookup metadata item.
    498498    const char *key                    ///< Name of metadata key.
    499499);
     
    508508 */
    509509psBool psMetadataLookupBool(
    510     psBool *status,                    ///< Status of lookup.
    511     psMetadata *md,                    ///< Metadata collection to lookup metadata item.
     510    bool *status,                    ///< Status of lookup.
     511    const psMetadata *md,                    ///< Metadata collection to lookup metadata item.
    512512    const char *key                    ///< Name of metadata key.
    513513);
     
    522522 */
    523523psPtr psMetadataLookupPtr(
    524     psBool *status,                    ///< Status of lookup.
    525     psMetadata* md,                    ///< Metadata collection to lookup metadata item.
     524    bool *status,                    ///< Status of lookup.
     525    const psMetadata* md,                    ///< Metadata collection to lookup metadata item.
    526526    const char *key                    ///< Name of metadata key.
    527527);
     
    560560 *  @return psBool        TRUE if iterator successfully set, otherwise FALSE.
    561561*/
    562 psBool psMetadataIteratorSet(
     562bool psMetadataIteratorSet(
    563563    psMetadataIterator* iterator,      ///< psMetadata iterator
    564564    int location                       ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
  • trunk/psLib/src/collections/psPixels.c

    r4230 r4321  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-13 20:43:40 $
     9 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-20 22:42:29 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    114114}
    115115
    116 psPixels* psPixelsCopy(psPixels* out, const psPixels* in)
    117 {
    118     if (in == NULL) {
     116psPixels* psPixelsCopy(psPixels* out, const psPixels* pixels)
     117{
     118    if (pixels == NULL) {
    119119        psError(PS_ERR_BAD_PARAMETER_NULL,true,PS_ERRORTEXT_psPixels_NULL);
    120120        psFree(out);
     
    122122    }
    123123
    124     out = psPixelsRealloc(out, in->n);
    125 
    126     memcpy(out->data,in->data, in->n*sizeof(psPixelCoord));
    127     out->n = in->n;
     124    out = psPixelsRealloc(out, pixels->n);
     125
     126    memcpy(out->data,pixels->data, pixels->n*sizeof(psPixelCoord));
     127    out->n = pixels->n;
    128128
    129129    return out;
  • trunk/psLib/src/collections/psPixels.h

    r4293 r4321  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-17 00:11:02 $
     9 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-20 22:42:29 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8585psPixels* psPixelsCopy(
    8686    psPixels* out,                     ///< psPixels struct to recycle, or NULL
    87     const psPixels* in                 ///< psPixels struct to copy
     87    const psPixels* pixels             ///< psPixels struct to copy
    8888);
    8989
  • trunk/psLib/src/dataIO/psLookupTable.c

    r4308 r4321  
    77*  @author Ross Harman, MHPCC
    88*
    9 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2005-06-17 23:44:21 $
     9*  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2005-06-20 22:42:29 $
    1111*
    1212*  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    254254/*****************************************************************************/
    255255
    256 psLookupTable* psLookupTableAlloc(const char *fileName, const char *format, int indexCol)
     256psLookupTable* psLookupTableAlloc(const char *fileName, const char *format, long indexCol)
    257257{
    258258    psLookupTable *outTable = NULL;
     
    633633}
    634634
    635 psS32 psLookupTableRead(psLookupTable* table)
     635long psLookupTableRead(psLookupTable* table)
    636636{
    637637    psS32           numRows  = 0;
  • trunk/psLib/src/dataIO/psLookupTable.h

    r4162 r4321  
    77*  @author Ross Harman, MHPCC
    88*
    9 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2005-06-08 23:40:45 $
     9*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2005-06-20 22:42:29 $
    1111*
    1212*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7070    const char *fileName,           ///< Name of file to read
    7171    const char *format,             ///< scanf-like format string
    72     int indexCol                    ///< Column of the index vector (starting at zero)
     72    long indexCol                    ///< Column of the index vector (starting at zero)
    7373);
    7474
     
    102102 *  @return psS32     Number of valid lines read
    103103 */
    104 psS32 psLookupTableRead(
     104long psLookupTableRead(
    105105    psLookupTable *table            ///< Table to read
    106106);
  • trunk/psLib/src/dataManip/psMatrix.c

    r4160 r4321  
    2121 *  @author Robert DeSonia, MHPCC
    2222 *
    23  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2005-06-08 22:28:07 $
     23 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2005-06-20 22:42:29 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    191191    psS32 numCols = 0;
    192192    gsl_matrix *lu = NULL;
    193     gsl_permutation perm;
     193    gsl_permutation permGSL;
    194194
    195195
     
    212212
    213213    // Initialize GSL data
    214     perm.size = numCols;
     214    permGSL.size = numCols;
    215215    if (sizeof(size_t) == 4) {
    216216        *outPerm = psVectorRecycle(*outPerm, numCols, PS_TYPE_S32);
     
    225225
    226226    (*outPerm)->n = numCols;
    227     perm.data = (psPtr)((*outPerm)->data.U8);
     227    permGSL.data = (psPtr)((*outPerm)->data.U8);
    228228    lu = gsl_matrix_alloc(numRows, numCols);
    229229
     
    232232
    233233    // Calculate LU decomposition
    234     gsl_linalg_LU_decomp(lu, &perm, &signum); // N.B., uses Gaussian Elimination with partial pivoting.
     234    gsl_linalg_LU_decomp(lu, &permGSL, &signum); // N.B., uses Gaussian Elimination with partial pivoting.
    235235
    236236    // Copy GSL matrix data to psImage data
     
    298298}
    299299
    300 psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, psF32 *det)
     300psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, float *det)
    301301{
    302302    psS32 signum = 0;
     
    346346}
    347347
    348 psF32 *psMatrixDeterminant(const psImage* inImage)
     348float *psMatrixDeterminant(const psImage* in)
    349349{
    350350    psS32 signum = 0;
     
    357357    #define DETERMINANT_EXIT { return NULL; }
    358358    // Error checks
    359     PS_ASSERT_GENERAL_IMAGE_NON_NULL(inImage, DETERMINANT_EXIT);
    360     PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, DETERMINANT_EXIT);
    361     PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(inImage, DETERMINANT_EXIT);
    362     PS_CHECK_SQUARE(inImage, DETERMINANT_EXIT);
     359    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, DETERMINANT_EXIT);
     360    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, DETERMINANT_EXIT);
     361    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, DETERMINANT_EXIT);
     362    PS_CHECK_SQUARE(in, DETERMINANT_EXIT);
    363363
    364364    // Initialize data
    365     numRows = inImage->numRows;
    366     numCols = inImage->numCols;
     365    numRows = in->numRows;
     366    numCols = in->numCols;
    367367
    368368    // Allocate GSL structs
    369369    perm = gsl_permutation_alloc(numRows);
    370370    lu = gsl_matrix_alloc(numRows, numCols);
    371     psImageToGslMatrix(lu, inImage);
     371    psImageToGslMatrix(lu, in);
    372372
    373373    // Calculate determinant
     
    480480}
    481481
    482 psImage* psMatrixEigenvectors(psImage* outImage, psImage* inImage)
     482psImage* psMatrixEigenvectors(psImage* out, psImage* in)
    483483{
    484484    psS32 numRows = 0;
     
    486486    gsl_vector *eVals = NULL;
    487487    gsl_eigen_symmv_workspace *w = NULL;
    488     gsl_matrix *out = NULL;
    489     gsl_matrix *in = NULL;
    490 
    491     #define EIGENVECTORS_CLEANUP { psFree(outImage); return NULL; }
    492     // Error checks
    493     PS_ASSERT_GENERAL_IMAGE_NON_NULL(inImage, EIGENVECTORS_CLEANUP);
    494     PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, EIGENVECTORS_CLEANUP);
    495     PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(inImage, EIGENVECTORS_CLEANUP);
    496     PS_CHECK_POINTERS(inImage, outImage, EIGENVECTORS_CLEANUP);
    497 
    498     outImage = psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type);
     488    gsl_matrix *outGSL = NULL;
     489    gsl_matrix *inGSL = NULL;
     490
     491    #define EIGENVECTORS_CLEANUP { psFree(out); return NULL; }
     492    // Error checks
     493    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, EIGENVECTORS_CLEANUP);
     494    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, EIGENVECTORS_CLEANUP);
     495    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, EIGENVECTORS_CLEANUP);
     496    PS_CHECK_POINTERS(in, out, EIGENVECTORS_CLEANUP);
     497
     498    out = psImageRecycle(out, in->numCols, in->numRows, in->type.type);
    499499
    500500    // Initialize data
    501     numRows = inImage->numRows;
    502     numCols = inImage->numCols;
    503 
    504     in = gsl_matrix_alloc(numRows, numCols);
    505     psImageToGslMatrix(in, inImage);
    506     out = gsl_matrix_alloc(numRows, numCols);
     501    numRows = in->numRows;
     502    numCols = in->numCols;
     503
     504    inGSL = gsl_matrix_alloc(numRows, numCols);
     505    psImageToGslMatrix(inGSL, in);
     506    outGSL = gsl_matrix_alloc(numRows, numCols);
    507507
    508508    // Allocate GSL structs
     
    511511
    512512    // Non-square matrices not allowed
    513     PS_CHECK_SQUARE(inImage, EIGENVECTORS_CLEANUP);
    514     PS_CHECK_SQUARE(outImage, EIGENVECTORS_CLEANUP);
     513    PS_CHECK_SQUARE(in, EIGENVECTORS_CLEANUP);
     514    PS_CHECK_SQUARE(out, EIGENVECTORS_CLEANUP);
    515515
    516516    // Calculate Eigenvalues and Eigenvectors...Eigenvalues not currently used
    517     gsl_eigen_symmv(in, eVals, out, w);
     517    gsl_eigen_symmv(inGSL, eVals, outGSL, w);
    518518
    519519    // Copy GSL matrix data to psImage data
    520     gslMatrixToPsImage(outImage, out);
     520    gslMatrixToPsImage(out, outGSL);
    521521
    522522    // Free GSL structs
    523     gsl_matrix_free(in);
    524     gsl_matrix_free(out);
     523    gsl_matrix_free(inGSL);
     524    gsl_matrix_free(outGSL);
    525525    gsl_eigen_symmv_free(w);
    526526    gsl_vector_free(eVals);
    527527
    528     return outImage;
     528    return out;
    529529}
    530530
  • trunk/psLib/src/dataManip/psMatrix.h

    r4162 r4321  
    2121 *  @author Ross Harman, MHPCC
    2222 *
    23  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2005-06-08 23:40:45 $
     23 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2005-06-20 22:42:29 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7676    psImage* outImage,                 ///< Image to return, or NULL for in-place substitution.
    7777    const psImage* inImage,            ///< Image to be inverted
    78     psF32 *det                         ///< Determinant to return, or NULL
     78    float *det                         ///< Determinant to return, or NULL
    7979);
    8080
     
    8787 *  @return  float: Determinant from psImage.
    8888 */
    89 psF32 *psMatrixDeterminant(
    90     const psImage* inMatrix        ///< Image used to calculate determinant.
     89float *psMatrixDeterminant(
     90    const psImage* in                  ///< Image used to calculate determinant.
    9191);
    9292
     
    129129 */
    130130psImage* psMatrixEigenvectors(
    131     psImage* outImage,                 ///< Eigenvectors to return, or NULL.
    132     psImage* inImage                   ///< Input image.
     131    psImage* out,                      ///< Eigenvectors to return, or NULL.
     132    psImage* in                        ///< Input image.
    133133);
    134134
  • trunk/psLib/src/dataManip/psMinimize.c

    r4225 r4321  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.122 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-06-13 20:18:18 $
     11 *  @version $Revision: 1.123 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-06-20 22:42:30 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    562562
    563563// XXX EAM this is my re-implementation of MinLM
    564 psBool psMinimizeLMChi2(psMinimization *min,
    565                         psImage *covar,
    566                         psVector *params,
    567                         const psVector *paramMask,
    568                         const psArray *x,
    569                         const psVector *y,
    570                         const psVector *yErr,
    571                         psMinimizeLMChi2Func func)
     564bool psMinimizeLMChi2(psMinimization *min,
     565                      psImage *covar,
     566                      psVector *params,
     567                      const psVector *paramMask,
     568                      const psArray *x,
     569                      const psVector *y,
     570                      const psVector *yErr,
     571                      psMinimizeLMChi2Func func)
    572572{
    573573    PS_ASSERT_PTR_NON_NULL(min, NULL);
     
    14261426/******************************************************************************
    14271427 *****************************************************************************/
    1428 psMinimization *psMinimizationAlloc(psS32 maxIter,
    1429                                     psF32 tol)
     1428psMinimization *psMinimizationAlloc(int maxIter,
     1429                                    float tol)
    14301430{
    14311431    PS_ASSERT_INT_NONNEGATIVE(maxIter, NULL);
     
    19121912#define PS_MINIMIZE_POWELL_LINEMIN_ERROR_TOLERANCE 0.01
    19131913
    1914 psBool psMinimizePowell(psMinimization *min,
    1915                         psVector *params,
    1916                         const psVector *paramMask,
    1917                         const psArray *coords,
    1918                         psMinimizePowellFunc func)
     1914bool psMinimizePowell(psMinimization *min,
     1915                      psVector *params,
     1916                      const psVector *paramMask,
     1917                      const psArray *coords,
     1918                      psMinimizePowellFunc func)
    19191919{
    19201920    PS_ASSERT_PTR_NON_NULL(min, NULL);
     
    21892189psMinimizePowell().
    21902190 *****************************************************************************/
    2191 psBool psMinimizeChi2Powell(psMinimization *min,
    2192                             psVector *params,
    2193                             const psVector *paramMask,
    2194                             const psArray *coords,
    2195                             const psVector *value,
    2196                             const psVector *error,
    2197                             psMinimizeChi2PowellFunc func)
     2191bool psMinimizeChi2Powell(psMinimization *min,
     2192                          psVector *params,
     2193                          const psVector *paramMask,
     2194                          const psArray *coords,
     2195                          const psVector *value,
     2196                          const psVector *error,
     2197                          psMinimizeChi2PowellFunc model)
    21982198{
    21992199    myValue = (psVector *) value;
    22002200    myError = (psVector *) error;
    22012201
    2202     Chi2PowellFunc = func;
     2202    Chi2PowellFunc = model;
    22032203
    22042204    return(psMinimizePowell(min, params, paramMask, coords, myPowellChi2Func));
  • trunk/psLib/src/dataManip/psMinimize.h

    r4285 r4321  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-16 03:51:58 $
     10 *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-20 22:42:30 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5656*/
    5757psMinimization *psMinimizationAlloc(
    58     psS32 maxIter,                     ///< Number of minimization iterations to perform.
    59     psF32 tol                          ///< Requested error tolerance
     58    int maxIter,                       ///< Number of minimization iterations to perform.
     59    float tol                          ///< Requested error tolerance
    6060);
    6161
     
    111111 *  @return psBool:   True if successful.
    112112 */
    113 psBool psMinimizeLMChi2(
     113bool psMinimizeLMChi2(
    114114    psMinimization *min,               ///< Minimization specification
    115115    psImage *covar,                    ///< Covariance matrix
     
    167167 *  @return psBool:   True if successful.
    168168 */
    169 psBool psMinimizePowell(
     169bool psMinimizePowell(
    170170    psMinimization *min,               ///< Minimization specification
    171171    psVector *params,                  ///< "Best guess" for parameters that minimize func
     
    211211 *  @return psBool:   True is successful.
    212212 */
    213 psBool psMinimizeChi2Powell(
     213bool psMinimizeChi2Powell(
    214214    psMinimization *min,               ///< Minimization specification
    215215    psVector *params,                  ///< "Best guess" for parameters that minimize func
     
    218218    const psVector *value,             ///< Measured values at the coordinates
    219219    const psVector *error,             ///< Errors in the measure values (or NULL)
    220     psMinimizeChi2PowellFunc func      ///< Specified function
     220    psMinimizeChi2PowellFunc model     ///< Specified function
    221221);
    222222
  • trunk/psLib/src/math/psMatrix.c

    r4160 r4321  
    2121 *  @author Robert DeSonia, MHPCC
    2222 *
    23  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2005-06-08 22:28:07 $
     23 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2005-06-20 22:42:29 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    191191    psS32 numCols = 0;
    192192    gsl_matrix *lu = NULL;
    193     gsl_permutation perm;
     193    gsl_permutation permGSL;
    194194
    195195
     
    212212
    213213    // Initialize GSL data
    214     perm.size = numCols;
     214    permGSL.size = numCols;
    215215    if (sizeof(size_t) == 4) {
    216216        *outPerm = psVectorRecycle(*outPerm, numCols, PS_TYPE_S32);
     
    225225
    226226    (*outPerm)->n = numCols;
    227     perm.data = (psPtr)((*outPerm)->data.U8);
     227    permGSL.data = (psPtr)((*outPerm)->data.U8);
    228228    lu = gsl_matrix_alloc(numRows, numCols);
    229229
     
    232232
    233233    // Calculate LU decomposition
    234     gsl_linalg_LU_decomp(lu, &perm, &signum); // N.B., uses Gaussian Elimination with partial pivoting.
     234    gsl_linalg_LU_decomp(lu, &permGSL, &signum); // N.B., uses Gaussian Elimination with partial pivoting.
    235235
    236236    // Copy GSL matrix data to psImage data
     
    298298}
    299299
    300 psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, psF32 *det)
     300psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, float *det)
    301301{
    302302    psS32 signum = 0;
     
    346346}
    347347
    348 psF32 *psMatrixDeterminant(const psImage* inImage)
     348float *psMatrixDeterminant(const psImage* in)
    349349{
    350350    psS32 signum = 0;
     
    357357    #define DETERMINANT_EXIT { return NULL; }
    358358    // Error checks
    359     PS_ASSERT_GENERAL_IMAGE_NON_NULL(inImage, DETERMINANT_EXIT);
    360     PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, DETERMINANT_EXIT);
    361     PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(inImage, DETERMINANT_EXIT);
    362     PS_CHECK_SQUARE(inImage, DETERMINANT_EXIT);
     359    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, DETERMINANT_EXIT);
     360    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, DETERMINANT_EXIT);
     361    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, DETERMINANT_EXIT);
     362    PS_CHECK_SQUARE(in, DETERMINANT_EXIT);
    363363
    364364    // Initialize data
    365     numRows = inImage->numRows;
    366     numCols = inImage->numCols;
     365    numRows = in->numRows;
     366    numCols = in->numCols;
    367367
    368368    // Allocate GSL structs
    369369    perm = gsl_permutation_alloc(numRows);
    370370    lu = gsl_matrix_alloc(numRows, numCols);
    371     psImageToGslMatrix(lu, inImage);
     371    psImageToGslMatrix(lu, in);
    372372
    373373    // Calculate determinant
     
    480480}
    481481
    482 psImage* psMatrixEigenvectors(psImage* outImage, psImage* inImage)
     482psImage* psMatrixEigenvectors(psImage* out, psImage* in)
    483483{
    484484    psS32 numRows = 0;
     
    486486    gsl_vector *eVals = NULL;
    487487    gsl_eigen_symmv_workspace *w = NULL;
    488     gsl_matrix *out = NULL;
    489     gsl_matrix *in = NULL;
    490 
    491     #define EIGENVECTORS_CLEANUP { psFree(outImage); return NULL; }
    492     // Error checks
    493     PS_ASSERT_GENERAL_IMAGE_NON_NULL(inImage, EIGENVECTORS_CLEANUP);
    494     PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, EIGENVECTORS_CLEANUP);
    495     PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(inImage, EIGENVECTORS_CLEANUP);
    496     PS_CHECK_POINTERS(inImage, outImage, EIGENVECTORS_CLEANUP);
    497 
    498     outImage = psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type);
     488    gsl_matrix *outGSL = NULL;
     489    gsl_matrix *inGSL = NULL;
     490
     491    #define EIGENVECTORS_CLEANUP { psFree(out); return NULL; }
     492    // Error checks
     493    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, EIGENVECTORS_CLEANUP);
     494    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, EIGENVECTORS_CLEANUP);
     495    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, EIGENVECTORS_CLEANUP);
     496    PS_CHECK_POINTERS(in, out, EIGENVECTORS_CLEANUP);
     497
     498    out = psImageRecycle(out, in->numCols, in->numRows, in->type.type);
    499499
    500500    // Initialize data
    501     numRows = inImage->numRows;
    502     numCols = inImage->numCols;
    503 
    504     in = gsl_matrix_alloc(numRows, numCols);
    505     psImageToGslMatrix(in, inImage);
    506     out = gsl_matrix_alloc(numRows, numCols);
     501    numRows = in->numRows;
     502    numCols = in->numCols;
     503
     504    inGSL = gsl_matrix_alloc(numRows, numCols);
     505    psImageToGslMatrix(inGSL, in);
     506    outGSL = gsl_matrix_alloc(numRows, numCols);
    507507
    508508    // Allocate GSL structs
     
    511511
    512512    // Non-square matrices not allowed
    513     PS_CHECK_SQUARE(inImage, EIGENVECTORS_CLEANUP);
    514     PS_CHECK_SQUARE(outImage, EIGENVECTORS_CLEANUP);
     513    PS_CHECK_SQUARE(in, EIGENVECTORS_CLEANUP);
     514    PS_CHECK_SQUARE(out, EIGENVECTORS_CLEANUP);
    515515
    516516    // Calculate Eigenvalues and Eigenvectors...Eigenvalues not currently used
    517     gsl_eigen_symmv(in, eVals, out, w);
     517    gsl_eigen_symmv(inGSL, eVals, outGSL, w);
    518518
    519519    // Copy GSL matrix data to psImage data
    520     gslMatrixToPsImage(outImage, out);
     520    gslMatrixToPsImage(out, outGSL);
    521521
    522522    // Free GSL structs
    523     gsl_matrix_free(in);
    524     gsl_matrix_free(out);
     523    gsl_matrix_free(inGSL);
     524    gsl_matrix_free(outGSL);
    525525    gsl_eigen_symmv_free(w);
    526526    gsl_vector_free(eVals);
    527527
    528     return outImage;
     528    return out;
    529529}
    530530
  • trunk/psLib/src/math/psMatrix.h

    r4162 r4321  
    2121 *  @author Ross Harman, MHPCC
    2222 *
    23  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2005-06-08 23:40:45 $
     23 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2005-06-20 22:42:29 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7676    psImage* outImage,                 ///< Image to return, or NULL for in-place substitution.
    7777    const psImage* inImage,            ///< Image to be inverted
    78     psF32 *det                         ///< Determinant to return, or NULL
     78    float *det                         ///< Determinant to return, or NULL
    7979);
    8080
     
    8787 *  @return  float: Determinant from psImage.
    8888 */
    89 psF32 *psMatrixDeterminant(
    90     const psImage* inMatrix        ///< Image used to calculate determinant.
     89float *psMatrixDeterminant(
     90    const psImage* in                  ///< Image used to calculate determinant.
    9191);
    9292
     
    129129 */
    130130psImage* psMatrixEigenvectors(
    131     psImage* outImage,                 ///< Eigenvectors to return, or NULL.
    132     psImage* inImage                   ///< Input image.
     131    psImage* out,                      ///< Eigenvectors to return, or NULL.
     132    psImage* in                        ///< Input image.
    133133);
    134134
  • trunk/psLib/src/math/psMinimize.c

    r4225 r4321  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.122 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-06-13 20:18:18 $
     11 *  @version $Revision: 1.123 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-06-20 22:42:30 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    562562
    563563// XXX EAM this is my re-implementation of MinLM
    564 psBool psMinimizeLMChi2(psMinimization *min,
    565                         psImage *covar,
    566                         psVector *params,
    567                         const psVector *paramMask,
    568                         const psArray *x,
    569                         const psVector *y,
    570                         const psVector *yErr,
    571                         psMinimizeLMChi2Func func)
     564bool psMinimizeLMChi2(psMinimization *min,
     565                      psImage *covar,
     566                      psVector *params,
     567                      const psVector *paramMask,
     568                      const psArray *x,
     569                      const psVector *y,
     570                      const psVector *yErr,
     571                      psMinimizeLMChi2Func func)
    572572{
    573573    PS_ASSERT_PTR_NON_NULL(min, NULL);
     
    14261426/******************************************************************************
    14271427 *****************************************************************************/
    1428 psMinimization *psMinimizationAlloc(psS32 maxIter,
    1429                                     psF32 tol)
     1428psMinimization *psMinimizationAlloc(int maxIter,
     1429                                    float tol)
    14301430{
    14311431    PS_ASSERT_INT_NONNEGATIVE(maxIter, NULL);
     
    19121912#define PS_MINIMIZE_POWELL_LINEMIN_ERROR_TOLERANCE 0.01
    19131913
    1914 psBool psMinimizePowell(psMinimization *min,
    1915                         psVector *params,
    1916                         const psVector *paramMask,
    1917                         const psArray *coords,
    1918                         psMinimizePowellFunc func)
     1914bool psMinimizePowell(psMinimization *min,
     1915                      psVector *params,
     1916                      const psVector *paramMask,
     1917                      const psArray *coords,
     1918                      psMinimizePowellFunc func)
    19191919{
    19201920    PS_ASSERT_PTR_NON_NULL(min, NULL);
     
    21892189psMinimizePowell().
    21902190 *****************************************************************************/
    2191 psBool psMinimizeChi2Powell(psMinimization *min,
    2192                             psVector *params,
    2193                             const psVector *paramMask,
    2194                             const psArray *coords,
    2195                             const psVector *value,
    2196                             const psVector *error,
    2197                             psMinimizeChi2PowellFunc func)
     2191bool psMinimizeChi2Powell(psMinimization *min,
     2192                          psVector *params,
     2193                          const psVector *paramMask,
     2194                          const psArray *coords,
     2195                          const psVector *value,
     2196                          const psVector *error,
     2197                          psMinimizeChi2PowellFunc model)
    21982198{
    21992199    myValue = (psVector *) value;
    22002200    myError = (psVector *) error;
    22012201
    2202     Chi2PowellFunc = func;
     2202    Chi2PowellFunc = model;
    22032203
    22042204    return(psMinimizePowell(min, params, paramMask, coords, myPowellChi2Func));
  • trunk/psLib/src/math/psMinimize.h

    r4285 r4321  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-16 03:51:58 $
     10 *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-20 22:42:30 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5656*/
    5757psMinimization *psMinimizationAlloc(
    58     psS32 maxIter,                     ///< Number of minimization iterations to perform.
    59     psF32 tol                          ///< Requested error tolerance
     58    int maxIter,                       ///< Number of minimization iterations to perform.
     59    float tol                          ///< Requested error tolerance
    6060);
    6161
     
    111111 *  @return psBool:   True if successful.
    112112 */
    113 psBool psMinimizeLMChi2(
     113bool psMinimizeLMChi2(
    114114    psMinimization *min,               ///< Minimization specification
    115115    psImage *covar,                    ///< Covariance matrix
     
    167167 *  @return psBool:   True if successful.
    168168 */
    169 psBool psMinimizePowell(
     169bool psMinimizePowell(
    170170    psMinimization *min,               ///< Minimization specification
    171171    psVector *params,                  ///< "Best guess" for parameters that minimize func
     
    211211 *  @return psBool:   True is successful.
    212212 */
    213 psBool psMinimizeChi2Powell(
     213bool psMinimizeChi2Powell(
    214214    psMinimization *min,               ///< Minimization specification
    215215    psVector *params,                  ///< "Best guess" for parameters that minimize func
     
    218218    const psVector *value,             ///< Measured values at the coordinates
    219219    const psVector *error,             ///< Errors in the measure values (or NULL)
    220     psMinimizeChi2PowellFunc func      ///< Specified function
     220    psMinimizeChi2PowellFunc model     ///< Specified function
    221221);
    222222
  • trunk/psLib/src/sys/psLogMsg.c

    r4316 r4321  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-18 03:13:02 $
     14 *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-20 22:42:30 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6464 The old log level.
    6565 *****************************************************************************/
    66 psS32 psLogSetLevel(psS32 level)
     66int psLogSetLevel(int level)
    6767{
    6868    // Save old global log level for changing it.
     
    233233   ap
    234234 *****************************************************************************/
    235 void psLogMsgV(const char *name, psS32 level, const char *fmt, va_list ap)
     235void psLogMsgV(const char *name, int level, const char *format, va_list ap)
    236236{
    237237    static psS32 first = 1;       // Flag for calling gethostname()
     
    287287
    288288    default:
    289         psTrace("utils.logMsg", 2, "Invalid logMsg level: %d (%s)\n", level, fmt);
     289        psTrace("utils.logMsg", 2, "Invalid logMsg level: %d (%s)\n", level, format);
    290290        level = (level < 0) ? 0 : 9;
    291291        clevel = level + '0';
     
    335335        char msg[1024];
    336336        char* msgPtr;
    337         vsnprintf(msg,1024, fmt, ap);  // create message
     337        vsnprintf(msg,1024, format, ap);  // create message
    338338
    339339        // detect multiple lines in message and indent each line by 4 spaces.
  • trunk/psLib/src/sys/psLogMsg.h

    r4316 r4321  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-18 03:13:02 $
     13 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-06-20 22:42:30 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4444 *  @return psS32    old logging level
    4545 */
    46 psS32 psLogSetLevel(
    47     psS32 level                          ///< Specifies the system log level
     46int psLogSetLevel(
     47    int level                          ///< Specifies the system log level
    4848);
    4949
     
    7979void psLogMsgV(
    8080    const char *name,                  ///< name of the log source
    81     psS32 myLevel,                       ///< severity level of this log message
    82     const char *fmt,                   ///< printf-style format command
     81    int level,                         ///< severity level of this log message
     82    const char *format,                ///< printf-style format command
    8383    va_list ap                         ///< varargs argument list
    8484);
  • trunk/psLib/src/sys/psMemory.c

    r4298 r4321  
    88*  @author Robert Lupton, Princeton University
    99*
    10 *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-06-17 21:42:02 $
     10*  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-06-20 22:42:30 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    255255}
    256256
    257 psS32 psMemCheckCorruption(psBool abort_on_error)
     257int psMemCheckCorruption(bool abort_on_error)
    258258{
    259259    psS32 nbad = 0;               // number of bad blocks
     
    504504
    505505// return refCounter
    506 psReferenceCount psMemGetRefCounter(psPtr vptr)
    507 {
    508     psMemBlock* ptr;
     506psReferenceCount psMemGetRefCounter(const psPtr ptr)
     507{
     508    psMemBlock* ptr2;
    509509    psU32 refCount;
    510510
    511     if (vptr == NULL) {
     511    if (ptr == NULL) {
    512512        return 0;
    513513    }
    514514
    515     ptr = ((psMemBlock* ) vptr) - 1;
    516 
    517     if (checkMemBlock(ptr, __func__) != 0) {
    518         memProblemCallback(ptr, __func__, __LINE__);
    519     }
    520 
    521     pthread_mutex_lock(&ptr->refCounterMutex);
    522     refCount = ptr->refCounter;
    523     pthread_mutex_unlock(&ptr->refCounterMutex);
     515    ptr2 = ((psMemBlock* ) ptr) - 1;
     516
     517    if (checkMemBlock(ptr2, __func__) != 0) {
     518        memProblemCallback(ptr2, __func__, __LINE__);
     519    }
     520
     521    pthread_mutex_lock(&ptr2->refCounterMutex);
     522    refCount = ptr2->refCounter;
     523    pthread_mutex_unlock(&ptr2->refCounterMutex);
    524524
    525525    return refCount;
  • trunk/psLib/src/sys/psMemory.h

    r4308 r4321  
    1212 *  @ingroup MemoryManagement
    1313 *
    14  *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-17 23:44:21 $
     14 *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-20 22:42:30 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    270270 *  @ingroup memTracing
    271271 */
    272 psS32 psMemCheckCorruption(
    273     psBool abort_on_error                ///< Abort on detecting corruption?
     272int psMemCheckCorruption(
     273    bool abort_on_error                ///< Abort on detecting corruption?
    274274);
    275275
     
    279279 */
    280280psReferenceCount psMemGetRefCounter(
    281     psPtr vptr                         ///< Pointer to get refCounter for
     281    const psPtr ptr                    ///< Pointer to get refCounter for
    282282);
    283283
     
    288288#ifdef DOXYGEN
    289289psPtr psMemIncrRefCounter(
    290     psPtr vptr                         ///< Pointer to increment refCounter, and return
     290    const psPtr ptr                         ///< Pointer to increment refCounter, and return
    291291);
    292292#else
     
    312312#ifdef DOXYGEN
    313313psPtr psMemDecrRefCounter(
    314     psPtr vptr                         ///< Pointer to decrement refCounter, and return
     314    psPtr ptr                         ///< Pointer to decrement refCounter, and return
    315315);
    316316#else // DOXYGEN
  • trunk/psLib/src/sysUtils/psLogMsg.c

    r4316 r4321  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-18 03:13:02 $
     14 *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-20 22:42:30 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6464 The old log level.
    6565 *****************************************************************************/
    66 psS32 psLogSetLevel(psS32 level)
     66int psLogSetLevel(int level)
    6767{
    6868    // Save old global log level for changing it.
     
    233233   ap
    234234 *****************************************************************************/
    235 void psLogMsgV(const char *name, psS32 level, const char *fmt, va_list ap)
     235void psLogMsgV(const char *name, int level, const char *format, va_list ap)
    236236{
    237237    static psS32 first = 1;       // Flag for calling gethostname()
     
    287287
    288288    default:
    289         psTrace("utils.logMsg", 2, "Invalid logMsg level: %d (%s)\n", level, fmt);
     289        psTrace("utils.logMsg", 2, "Invalid logMsg level: %d (%s)\n", level, format);
    290290        level = (level < 0) ? 0 : 9;
    291291        clevel = level + '0';
     
    335335        char msg[1024];
    336336        char* msgPtr;
    337         vsnprintf(msg,1024, fmt, ap);  // create message
     337        vsnprintf(msg,1024, format, ap);  // create message
    338338
    339339        // detect multiple lines in message and indent each line by 4 spaces.
  • trunk/psLib/src/sysUtils/psLogMsg.h

    r4316 r4321  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-18 03:13:02 $
     13 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-06-20 22:42:30 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4444 *  @return psS32    old logging level
    4545 */
    46 psS32 psLogSetLevel(
    47     psS32 level                          ///< Specifies the system log level
     46int psLogSetLevel(
     47    int level                          ///< Specifies the system log level
    4848);
    4949
     
    7979void psLogMsgV(
    8080    const char *name,                  ///< name of the log source
    81     psS32 myLevel,                       ///< severity level of this log message
    82     const char *fmt,                   ///< printf-style format command
     81    int level,                         ///< severity level of this log message
     82    const char *format,                ///< printf-style format command
    8383    va_list ap                         ///< varargs argument list
    8484);
  • trunk/psLib/src/sysUtils/psMemory.c

    r4298 r4321  
    88*  @author Robert Lupton, Princeton University
    99*
    10 *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-06-17 21:42:02 $
     10*  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-06-20 22:42:30 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    255255}
    256256
    257 psS32 psMemCheckCorruption(psBool abort_on_error)
     257int psMemCheckCorruption(bool abort_on_error)
    258258{
    259259    psS32 nbad = 0;               // number of bad blocks
     
    504504
    505505// return refCounter
    506 psReferenceCount psMemGetRefCounter(psPtr vptr)
    507 {
    508     psMemBlock* ptr;
     506psReferenceCount psMemGetRefCounter(const psPtr ptr)
     507{
     508    psMemBlock* ptr2;
    509509    psU32 refCount;
    510510
    511     if (vptr == NULL) {
     511    if (ptr == NULL) {
    512512        return 0;
    513513    }
    514514
    515     ptr = ((psMemBlock* ) vptr) - 1;
    516 
    517     if (checkMemBlock(ptr, __func__) != 0) {
    518         memProblemCallback(ptr, __func__, __LINE__);
    519     }
    520 
    521     pthread_mutex_lock(&ptr->refCounterMutex);
    522     refCount = ptr->refCounter;
    523     pthread_mutex_unlock(&ptr->refCounterMutex);
     515    ptr2 = ((psMemBlock* ) ptr) - 1;
     516
     517    if (checkMemBlock(ptr2, __func__) != 0) {
     518        memProblemCallback(ptr2, __func__, __LINE__);
     519    }
     520
     521    pthread_mutex_lock(&ptr2->refCounterMutex);
     522    refCount = ptr2->refCounter;
     523    pthread_mutex_unlock(&ptr2->refCounterMutex);
    524524
    525525    return refCount;
  • trunk/psLib/src/sysUtils/psMemory.h

    r4308 r4321  
    1212 *  @ingroup MemoryManagement
    1313 *
    14  *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-17 23:44:21 $
     14 *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-20 22:42:30 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    270270 *  @ingroup memTracing
    271271 */
    272 psS32 psMemCheckCorruption(
    273     psBool abort_on_error                ///< Abort on detecting corruption?
     272int psMemCheckCorruption(
     273    bool abort_on_error                ///< Abort on detecting corruption?
    274274);
    275275
     
    279279 */
    280280psReferenceCount psMemGetRefCounter(
    281     psPtr vptr                         ///< Pointer to get refCounter for
     281    const psPtr ptr                    ///< Pointer to get refCounter for
    282282);
    283283
     
    288288#ifdef DOXYGEN
    289289psPtr psMemIncrRefCounter(
    290     psPtr vptr                         ///< Pointer to increment refCounter, and return
     290    const psPtr ptr                         ///< Pointer to increment refCounter, and return
    291291);
    292292#else
     
    312312#ifdef DOXYGEN
    313313psPtr psMemDecrRefCounter(
    314     psPtr vptr                         ///< Pointer to decrement refCounter, and return
     314    psPtr ptr                         ///< Pointer to decrement refCounter, and return
    315315);
    316316#else // DOXYGEN
  • trunk/psLib/src/types/psLookupTable.c

    r4308 r4321  
    77*  @author Ross Harman, MHPCC
    88*
    9 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2005-06-17 23:44:21 $
     9*  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2005-06-20 22:42:29 $
    1111*
    1212*  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    254254/*****************************************************************************/
    255255
    256 psLookupTable* psLookupTableAlloc(const char *fileName, const char *format, int indexCol)
     256psLookupTable* psLookupTableAlloc(const char *fileName, const char *format, long indexCol)
    257257{
    258258    psLookupTable *outTable = NULL;
     
    633633}
    634634
    635 psS32 psLookupTableRead(psLookupTable* table)
     635long psLookupTableRead(psLookupTable* table)
    636636{
    637637    psS32           numRows  = 0;
  • trunk/psLib/src/types/psLookupTable.h

    r4162 r4321  
    77*  @author Ross Harman, MHPCC
    88*
    9 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2005-06-08 23:40:45 $
     9*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2005-06-20 22:42:29 $
    1111*
    1212*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7070    const char *fileName,           ///< Name of file to read
    7171    const char *format,             ///< scanf-like format string
    72     int indexCol                    ///< Column of the index vector (starting at zero)
     72    long indexCol                    ///< Column of the index vector (starting at zero)
    7373);
    7474
     
    102102 *  @return psS32     Number of valid lines read
    103103 */
    104 psS32 psLookupTableRead(
     104long psLookupTableRead(
    105105    psLookupTable *table            ///< Table to read
    106106);
  • trunk/psLib/src/types/psMetadata.c

    r4308 r4321  
    1212*  @author Ross Harman, MHPCC
    1313*
    14 *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2005-06-17 23:44:21 $
     14*  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2005-06-20 22:42:29 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    267267}
    268268
    269 psBool psMetadataAddItem(psMetadata *md, psMetadataItem *metadataItem, psS32 location, psS32 flags)
     269bool psMetadataAddItem(psMetadata *md, psMetadataItem *metadataItem, psS32 location, psS32 flags)
    270270{
    271271    char * key = NULL;
     
    359359}
    360360
    361 psBool psMetadataAdd(psMetadata *md, psS32 location, const char *name,
    362                      psS32 type, const char *comment, ...)
     361bool psMetadataAdd(psMetadata *md, int location, const char *name,
     362                   int format, const char *comment, ...)
    363363{
    364364    va_list argPtr;
    365365
    366366    va_start(argPtr, comment);
    367     psBool result = psMetadataAddV(md,location,name,type,comment,argPtr);
     367    psBool result = psMetadataAddV(md,location,name,format,comment,argPtr);
    368368    va_end(argPtr);
    369369
     
    371371}
    372372
    373 psBool psMetadataAddV(psMetadata *md, psS32 location, const char *name,
    374                       psS32 type, const char *comment, va_list list)
     373bool psMetadataAddV(psMetadata *md, int location, const char *name,
     374                    int format, const char *comment, va_list list)
    375375{
    376376    psMetadataItem* metadataItem = NULL;
    377377
    378     metadataItem = psMetadataItemAllocV(name, type & PS_METADATA_TYPE_MASK, comment, list);
    379 
    380     if (!psMetadataAddItem(md, metadataItem, location, type & PS_METADATA_FLAGS_MASK)) {
     378    metadataItem = psMetadataItemAllocV(name, format & PS_METADATA_TYPE_MASK, comment, list);
     379
     380    if (!psMetadataAddItem(md, metadataItem, location, format & PS_METADATA_FLAGS_MASK)) {
    381381        psError(PS_ERR_UNKNOWN,false,PS_ERRORTEXT_psMetadata_ADD_FAILED);
    382382        psFree(metadataItem);
     
    475475}
    476476
    477 psMetadataItem* psMetadataLookup(psMetadata *md, const char *key)
     477psMetadataItem* psMetadataLookup(const psMetadata *md, const char *key)
    478478{
    479479    psHash* mdTable = NULL;
     
    491491}
    492492
    493 void* psMetadataLookupPtr(psBool *status, psMetadata *md, const char *key)
     493void* psMetadataLookupPtr(bool *status, const psMetadata *md, const char *key)
    494494{
    495495    psMetadataItem *metadataItem = NULL;
     
    525525
    526526#define psMetadataLookupNumTYPE(TYPE) \
    527 ps##TYPE psMetadataLookup##TYPE(psBool *status, psMetadata *md, const char *key) \
     527ps##TYPE psMetadataLookup##TYPE(bool *status, const psMetadata *md, const char *key) \
    528528{ \
    529529    psMetadataItem *metadataItem = NULL; \
     
    630630}
    631631
    632 psBool psMetadataIteratorSet(psMetadataIterator* iterator,
    633                              int location)
     632bool psMetadataIteratorSet(psMetadataIterator* iterator,
     633                           int location)
    634634{
    635635    int match;
  • trunk/psLib/src/types/psMetadata.h

    r4243 r4321  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2005-06-14 02:54:06 $
     13*  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2005-06-20 22:42:29 $
    1515*
    1616*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    214214    const char* name,                  ///< Name of metadata item.
    215215    const char* comment,               ///< Comment for metadata item.
    216     psBool value                       ///< the value of the metadata item.
     216    bool value                       ///< the value of the metadata item.
    217217);
    218218
     
    257257 *  @return bool: True for success, false for failure.
    258258 */
    259 psBool psMetadataAddItem(
     259bool psMetadataAddItem(
    260260    psMetadata*  md,                   ///< Metadata collection to insert metadat item.
    261261    psMetadataItem*  item,             ///< Metadata item to be added.
     
    270270 * @return bool: True for success, false for failure.
    271271 */
    272 psBool psMetadataAdd(
     272bool psMetadataAdd(
    273273    psMetadata* md,                    ///< Metadata collection to insert metadata item.
    274     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     274    int location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    275275    const char *name,                  ///< Name of metadata item.
    276     int type,                          ///< Type of metadata item (psMetadataType) and options (psMetadataFlags)
     276    int format,                      ///< Type of metadata item (psMetadataType) and options (psMetadataFlags)
    277277    const char *comment,               ///< Comment for metadata item.
    278278    ...                                ///< Arguments for name formatting and metadata item data.
     
    286286 * @return bool: True for success, false for failure.
    287287 */
    288 psBool psMetadataAddV(
     288bool psMetadataAddV(
    289289    psMetadata* md,                    ///< Metadata collection to insert metadata item.
    290     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     290    int location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    291291    const char *name,                  ///< Name of metadata item.
    292     int type,                          ///< Type of metadata item (psMetadataType) and options (psMetadataFlags)
     292    int format,                        ///< Type of metadata item (psMetadataType) and options (psMetadataFlags)
    293293    const char *comment,               ///< Comment for metadata item.
    294294    va_list list                       ///< Arguments for name formatting and metadata item data.
     
    300300 *  @return psBool:  True for success, False for failure.
    301301 */
    302 psBool psMetadataAddS32(
     302bool psMetadataAddS32(
    303303    psMetadata* md,                    ///< Metadata collection to insert metadata item
    304304    psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     
    312312 *  @return psBool:  True for success, False for failure.
    313313*/
    314 psBool psMetadataAddF32(
     314bool psMetadataAddF32(
    315315    psMetadata* md,                    ///< Metadata collection to insert metadata item
    316316    psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     
    324324 *  @return psBool:  True for success, False for failure.
    325325*/
    326 psBool psMetadataAddF64(
     326bool psMetadataAddF64(
    327327    psMetadata* md,                    ///< Metadata collection to insert metadata item
    328328    psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     
    348348 *  @return psBool:  True for success, False for failure.
    349349 */
    350 psBool psMetadataAddStr(
     350bool psMetadataAddStr(
    351351    psMetadata* md,                    ///< Metadata collection to insert metadata item
    352352    psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     
    438438 * @return bool: True for success, false for failure.
    439439 */
    440 psBool psMetadataRemove(
    441     psMetadata*  md,           ///< Metadata collection to remove metadata item.
    442     psS32 where,               ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    443     const char * key           ///< Name of metadata key.
     440bool psMetadataRemove(
     441    psMetadata*  md,                   ///< Metadata collection to remove metadata item.
     442    int location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     443    const char * key                   ///< Name of metadata key.
    444444);
    445445
     
    453453 */
    454454psMetadataItem* psMetadataLookup(
    455     psMetadata * md,                   ///< Metadata collection to lookup metadata item.
     455    const psMetadata * md,                   ///< Metadata collection to lookup metadata item.
    456456    const char * key                   ///< Name of metadata key.
    457457);
     
    466466 */
    467467psF64 psMetadataLookupF64(
    468     psBool *status,                    ///< Status of lookup.
    469     psMetadata *md,                    ///< Metadata collection to lookup metadata item.
     468    bool *status,                    ///< Status of lookup.
     469    const psMetadata *md,                    ///< Metadata collection to lookup metadata item.
    470470    const char *key                    ///< Name of metadata key.
    471471);
     
    480480 */
    481481psF32 psMetadataLookupF32(
    482     psBool *status,                    ///< Status of lookup.
    483     psMetadata *md,                    ///< Metadata collection to lookup metadata item.
     482    bool *status,                    ///< Status of lookup.
     483    const psMetadata *md,                    ///< Metadata collection to lookup metadata item.
    484484    const char *key                    ///< Name of metadata key.
    485485);
     
    494494 */
    495495psS32 psMetadataLookupS32(
    496     psBool *status,                    ///< Status of lookup.
    497     psMetadata *md,                    ///< Metadata collection to lookup metadata item.
     496    bool *status,                    ///< Status of lookup.
     497    const psMetadata *md,                    ///< Metadata collection to lookup metadata item.
    498498    const char *key                    ///< Name of metadata key.
    499499);
     
    508508 */
    509509psBool psMetadataLookupBool(
    510     psBool *status,                    ///< Status of lookup.
    511     psMetadata *md,                    ///< Metadata collection to lookup metadata item.
     510    bool *status,                    ///< Status of lookup.
     511    const psMetadata *md,                    ///< Metadata collection to lookup metadata item.
    512512    const char *key                    ///< Name of metadata key.
    513513);
     
    522522 */
    523523psPtr psMetadataLookupPtr(
    524     psBool *status,                    ///< Status of lookup.
    525     psMetadata* md,                    ///< Metadata collection to lookup metadata item.
     524    bool *status,                    ///< Status of lookup.
     525    const psMetadata* md,                    ///< Metadata collection to lookup metadata item.
    526526    const char *key                    ///< Name of metadata key.
    527527);
     
    560560 *  @return psBool        TRUE if iterator successfully set, otherwise FALSE.
    561561*/
    562 psBool psMetadataIteratorSet(
     562bool psMetadataIteratorSet(
    563563    psMetadataIterator* iterator,      ///< psMetadata iterator
    564564    int location                       ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
  • trunk/psLib/src/types/psPixels.c

    r4230 r4321  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-13 20:43:40 $
     9 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-20 22:42:29 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    114114}
    115115
    116 psPixels* psPixelsCopy(psPixels* out, const psPixels* in)
    117 {
    118     if (in == NULL) {
     116psPixels* psPixelsCopy(psPixels* out, const psPixels* pixels)
     117{
     118    if (pixels == NULL) {
    119119        psError(PS_ERR_BAD_PARAMETER_NULL,true,PS_ERRORTEXT_psPixels_NULL);
    120120        psFree(out);
     
    122122    }
    123123
    124     out = psPixelsRealloc(out, in->n);
    125 
    126     memcpy(out->data,in->data, in->n*sizeof(psPixelCoord));
    127     out->n = in->n;
     124    out = psPixelsRealloc(out, pixels->n);
     125
     126    memcpy(out->data,pixels->data, pixels->n*sizeof(psPixelCoord));
     127    out->n = pixels->n;
    128128
    129129    return out;
  • trunk/psLib/src/types/psPixels.h

    r4293 r4321  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-17 00:11:02 $
     9 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-20 22:42:29 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8585psPixels* psPixelsCopy(
    8686    psPixels* out,                     ///< psPixels struct to recycle, or NULL
    87     const psPixels* in                 ///< psPixels struct to copy
     87    const psPixels* pixels             ///< psPixels struct to copy
    8888);
    8989
Note: See TracChangeset for help on using the changeset viewer.