PRINTF("Inserted node %ld with left %ld and right %ld\n", t->nodeID, t->left->nodeID, t->right->nodeID);
int PatriciaInsert(PatriciaTreeRef treeRef, NodeReplaceFunction replaceFunc, const unsigned char *key, void *data, void *refCon){	TPatriciaTree	*tree = (TPatriciaTree *)treeRef;	TNode		*x, *t, *p;	short		i;	x = tree->headNode;	t = InternalSearch(tree, x, key);	AE_ASSERT(t, "Should have found node");	if (memcmp(t->key, key, tree->keySize) == 0) {		if (replaceFunc) (*replaceFunc)(&t->data, t->key, data, refCon);		return 1;			/* It's already there */	}		i = tree->numKeyBits - 1;		while (CompareKeyBits(key, t->key, i))		i --;				do {		p = x;		x = (TestKeyBit(key, x->bit)) ? x->right : x->left;	} while (x->bit > i && p->bit > x->bit);		t = MakeNewNode(tree, key, i, data);	if (t == NULL) return -1;		if (TestKeyBit(key, t->bit)) {		t->right = t;		t->left = x;	} else {		t->right = x;		t->left = t;	}			if (TestKeyBit(key, p->bit))		p->right = t;	else		p->left = t;	#ifdef VERBOSE	printf("Inserted node %ld with left %ld and right %ld\n", t->nodeID, t->left->nodeID, t->right->nodeID);#endif	tree->numNodes ++;		return 0;}