Changeset 7311 for trunk/psModules/src/objects/pmPeaks.c
- Timestamp:
- Jun 2, 2006, 3:02:08 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmPeaks.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmPeaks.c
r6943 r7311 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 4-21 21:26:44$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-06-03 01:02:08 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 94 94 pmPeakAlloc(): Allocate the pmPeak data structure and set appropriate members. 95 95 *****************************************************************************/ 96 static void peakFree(pmPeak *tmp) 97 {} // used by pmIsPeak() 98 96 99 pmPeak *pmPeakAlloc(psS32 x, 97 100 psS32 y, … … 100 103 { 101 104 psTrace(__func__, 3, "---- %s() begin ----\n", __func__); 105 static int id = 1; 102 106 pmPeak *tmp = (pmPeak *) psAlloc(sizeof(pmPeak)); 107 *(int *)&tmp->id = id++; 103 108 tmp->x = x; 104 109 tmp->y = y; … … 106 111 tmp->type = type; 107 112 113 psMemSetDeallocator(tmp, (psFreeFunc) peakFree); 114 108 115 psTrace(__func__, 3, "---- %s() end ----\n", __func__); 109 116 return(tmp); 117 } 118 119 bool pmIsPeak(const psPtr ptr) 120 { 121 return (psMemGetDeallocator(ptr) == (psFreeFunc)peakFree); 110 122 } 111 123
Note:
See TracChangeset
for help on using the changeset viewer.
