Add a path field
This commit is contained in:
@ -78,7 +78,7 @@ void DeleteFitCenter(void *pData)
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
void SmoothScanCounts(long *lData, int iDataLen)
|
||||
static void SmoothScanCounts(long *lData, int iDataLen)
|
||||
{
|
||||
int ind = (int) (sizeof(ggf1) / sizeof(float) - 1) / 2;
|
||||
long *pData = (long *) malloc(iDataLen * sizeof(long));
|
||||
|
17
hipadaba.c
17
hipadaba.c
@ -127,6 +127,9 @@ void DeleteNodeData(pHdb node)
|
||||
if (node->name != NULL) {
|
||||
free(node->name);
|
||||
}
|
||||
if (node->path != NULL) {
|
||||
free(node->path);
|
||||
}
|
||||
ReleaseHdbValue(&node->value);
|
||||
node->magic = 000000;
|
||||
|
||||
@ -562,7 +565,7 @@ int compareHdbValue(hdbValue v1, hdbValue v2)
|
||||
}
|
||||
break;
|
||||
case HIPFLOAT:
|
||||
if (ABS(v1.v.doubleValue - v2.v.doubleValue) < .01) {
|
||||
if (ABS(v1.v.doubleValue - v2.v.doubleValue) < .0001) { /* DFC */
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
@ -737,6 +740,7 @@ void AddHipadabaChild(pHdb parent, pHdb child, void *callData)
|
||||
* step to end of child chain
|
||||
*/
|
||||
while (current != NULL) {
|
||||
assert(strcmp(current->name, child->name) != 0);
|
||||
prev = current;
|
||||
current = current->next;
|
||||
}
|
||||
@ -856,6 +860,7 @@ char *GetHipadabaPath(pHdb node)
|
||||
strcat(pPtr, "/");
|
||||
strcat(pPtr, nodeStack[i]->name);
|
||||
}
|
||||
node->path = pPtr;
|
||||
return pPtr;
|
||||
}
|
||||
|
||||
@ -1112,6 +1117,16 @@ void SetHdbProperty(pHdb node, char *key, char *value)
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int HasHdbProperty(pHdb node, char *key)
|
||||
{
|
||||
if (node != NULL && node->properties != NULL) {
|
||||
return StringDictExists(node->properties, key);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int GetHdbProperty(pHdb node, char *key, char *value, int len)
|
||||
{
|
||||
|
@ -70,6 +70,7 @@ typedef struct __hipadaba {
|
||||
struct __hipadaba *next;
|
||||
struct __hdbcallback *callBackChain;
|
||||
char *name;
|
||||
char *path;
|
||||
hdbValue value;
|
||||
int protected;
|
||||
pStringDict properties;
|
||||
|
Reference in New Issue
Block a user