Used by debugnode() macro to show info about a given node. */
| 2684 | |
| 2685 | /* Used by debugnode() macro to show info about a given node. */ |
| 2686 | void raxDebugShowNode(const char *msg, raxNode *n) { |
| 2687 | if (raxDebugMsg == 0) return; |
| 2688 | printf("%s: %p [%.*s] key:%d size:%d children:", |
| 2689 | msg, (void*)n, (int)n->size, (char*)n->data, n->iskey, n->size); |
| 2690 | int numcld = n->iscompr ? 1 : n->size; |
| 2691 | raxNode **cldptr = raxNodeLastChildPtr(n) - (numcld-1); |
| 2692 | while(numcld--) { |
| 2693 | raxNode *child; |
| 2694 | memcpy(&child,cldptr,sizeof(child)); |
| 2695 | cldptr++; |
| 2696 | printf("%p ", (void*)child); |
| 2697 | } |
| 2698 | printf("\n"); |
| 2699 | fflush(stdout); |
| 2700 | } |
| 2701 | |
| 2702 | /* Touch all the nodes of a tree returning a check sum. This is useful |
| 2703 | * in order to make Valgrind detect if there is something wrong while |
nothing calls this directly
no outgoing calls
no test coverage detected