IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 2, 2006, 3:02:08 PM (20 years ago)
Author:
Paul Price
Message:

Applying RHL patch. Generally improves the error handling and traceback. pmConcepts.c and pmConceptsRead.c done by PAP (RHL did this also, but I had already done them). Resolved conflicts, except for pmFPAfile.c, which uses psAbort in some instances where RHL's patch had psError; leave this for Gene to decide.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmPeaks.c

    r6943 r7311  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-04-21 21:26:44 $
     8 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-06-03 01:02:08 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    9494pmPeakAlloc(): Allocate the pmPeak data structure and set appropriate members.
    9595*****************************************************************************/
     96static void peakFree(pmPeak *tmp)
     97{} // used by pmIsPeak()
     98
    9699pmPeak *pmPeakAlloc(psS32 x,
    97100                    psS32 y,
     
    100103{
    101104    psTrace(__func__, 3, "---- %s() begin ----\n", __func__);
     105    static int id = 1;
    102106    pmPeak *tmp = (pmPeak *) psAlloc(sizeof(pmPeak));
     107    *(int *)&tmp->id = id++;
    103108    tmp->x = x;
    104109    tmp->y = y;
     
    106111    tmp->type = type;
    107112
     113    psMemSetDeallocator(tmp, (psFreeFunc) peakFree);
     114
    108115    psTrace(__func__, 3, "---- %s() end ----\n", __func__);
    109116    return(tmp);
     117}
     118
     119bool pmIsPeak(const psPtr ptr)
     120{
     121    return (psMemGetDeallocator(ptr) == (psFreeFunc)peakFree);
    110122}
    111123
Note: See TracChangeset for help on using the changeset viewer.