static char *rcsid
= "$Header: /f/osi/quipu/RCS/turbo_debug.c,v 7.1 91/02/22 09:40:06 mrose Interim $";
* $Header: /f/osi/quipu/RCS/turbo_debug.c,v 7.1 91/02/22 09:40:06 mrose Interim $
* $Log: turbo_debug.c,v $
* Revision 7.1 91/02/22 09:40:06 mrose
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
#include "quipu/commonarg.h"
AttributeType
*turbo_index
;
static rsavl_print( root
, fn
, fps
, depth
)
rsavl_print( root
->avl_right
, fn
, fps
, depth
+1 );
for ( i
= 0; i
< depth
; i
++ )
(*fn
)( fps
, ((Index_node
*)root
->avl_data
)->in_value
);
(*fn
)( fps
, " %d\n", root
->avl_bf
);
rsavl_print( root
->avl_left
, fn
, fps
, depth
+1 );
(void) printf( "**** soundex avl_print ****\n" );
(void) printf( "NULL\n" );
( void ) rsavl_print( root
, fprintf
, (FILE *)stdout
, 0 );
(void) printf( "**** soundex avl_print end ****\n" );
static ravl_print( root
, fn
, fps
, format
, depth
)
ravl_print( root
->avl_right
, fn
, fps
, format
, depth
+1 );
for ( i
= 0; i
< depth
; i
++ )
(*fn
)( fps
, (( Entry
)(root
->avl_data
))->e_name
, format
);
ps_printf( fps
, " %d\n", root
->avl_bf
);
ravl_print( root
->avl_left
, fn
, fps
, format
, depth
+1 );
(void) printf( "**** avl_print ****\n" );
(void) printf( "NULL\n" );
if ( (fps
= ps_alloc( std_open
)) == NULLPS
) {
(void) printf( "avl_print: ps_alloc failed\n" );
if ( std_setup( fps
, stdout
) == NOTOK
) {
(void) printf( "avl_print: std_setup failed\n" );
( void ) ravl_print( root
, rdn_print
, fps
, EDBOUT
, 0 );
(void) printf( "**** avl_print end ****\n" );
static rprint_directory( node
, depth
)
for ( i
= 0; i
< depth
; i
++ )
rdn_print( ps
, node
->e_name
, EDBOUT
);
if ( node
->e_children
!= NULLAVL
)
(void) avl_apply( node
->e_children
, rprint_directory
, (caddr_t
) (depth
+ 1),
if ( (ps
= ps_alloc( std_open
)) == NULLPS
) {
(void) printf( "avl_print: ps_alloc failed\n" );
if ( std_setup( ps
, stdout
) == NOTOK
) {
(void) printf( "avl_print: std_setup failed\n" );
rprint_directory( node
, 0 );
* print_optimized_attrs -- print out a list of attributes being optimized.
if ( (fps
= ps_alloc( std_open
)) == NULLPS
) {
(void) printf( "turbo_index_print: ps_alloc failed\n" );
if ( std_setup( fps
, stdout
) == NOTOK
) {
(void) printf( "turbo_index_print: std_setup failed\n" );
ps_print( fps
, "Optimized attributes:\n" );
for ( i
= 0; i
< turbo_index_num
; i
++ ) {
AttrT_print( fps
, turbo_index
[ i
], EDBOUT
);
ps_printf( fps
, "End of Optimized Attributes:\n" );
static print_index_node( node
, fps
)
AttrV_print( fps
, (AttributeValue
)node
->in_value
, EDBOUT
);
for ( i
= 0; i
< node
->in_num
; i
++ ) {
rdn_print( fps
, node
->in_entries
[ i
]->e_name
,
static print_soundex_node( node
, fps
)
ps_print( fps
, node
->in_value
);
for ( i
= 0; i
< node
->in_num
; i
++ ) {
rdn_print( fps
, node
->in_entries
[ i
]->e_name
,
* print_index -- print the given attribute index.
if ( pindex
== (Index
*) 0 ) {
(void) printf("NULLINDEX\n");
if ( (fps
= ps_alloc( std_open
)) == NULLPS
) {
(void) printf( "turbo_index_print: ps_alloc failed\n" );
if ( std_setup( fps
, stdout
) == NOTOK
) {
(void) printf( "turbo_index_print: std_setup failed\n" );
ps_print( fps
, "*******\n" );
for ( i
= 0; i
< turbo_index_num
; i
++ ) {
ps_printf( fps
, " Index for attribute (%s)\n",
pindex
[i
].i_attr
->oa_ot
.ot_name
);
(void) avl_apply( pindex
[i
].i_root
, print_index_node
, (caddr_t
) fps
,
ps_printf( fps
, " Soundex index for attribute (%s)\n",
pindex
[i
].i_attr
->oa_ot
.ot_name
);
(void) avl_apply( pindex
[i
].i_sroot
, print_soundex_node
, (caddr_t
) fps
,
ps_print( fps
, " Endof index\n" );
ps_print( fps
, "*******\n" );
if ( e
== NULLENTRYINFO
) {
(void) printf("\tNULL\n");
while ( e
!= NULLENTRYINFO
) {
for ( dnend
= e
->ent_dn
; dnend
->dn_parent
!= NULLDN
;
dnend
= dnend
->dn_parent
)
(void) printf("\t(%s)\n", dnend
->dn_rdn
->rdn_av
.av_struct
);
(void) printf("(end)\n");
if ( (fps
= ps_alloc( std_open
)) == NULLPS
) {
(void) printf( "turbo_index_print: ps_alloc failed\n" );
if ( std_setup( fps
, stdout
) == NOTOK
) {
(void) printf( "turbo_index_print: std_setup failed\n" );
ps_print( fps
, "\tDN= " );
dn_print( fps
, dn
, EDBOUT
);