version 1.4.2.3, 1998/11/16 23:24:28
|
version 1.20, 2000/01/31 21:14:16
|
Line 1
|
Line 1
|
/* filter.c - routines for parsing and dealing with filters */ |
/* filter.c - routines for parsing and dealing with filters */ |
|
/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.19 2000/01/28 19:01:00 kurt Exp $ */ |
|
/* |
|
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. |
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
|
*/ |
|
|
#include "portable.h" |
#include "portable.h" |
|
|
Line 15 static int get_substring_filter(Connecti
|
Line 20 static int get_substring_filter(Connecti
|
int |
int |
get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr ) |
get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr ) |
{ |
{ |
unsigned long tag, len; |
ber_len_t len; |
int err; |
int err; |
Filter *f; |
Filter *f; |
char *ftmp; |
char *ftmp; |
Line 34 get_filter( Connection *conn, BerElement
|
Line 39 get_filter( Connection *conn, BerElement
|
* lessOrEqual [6] AttributeValueAssertion, |
* lessOrEqual [6] AttributeValueAssertion, |
* present [7] AttributeType,, |
* present [7] AttributeType,, |
* approxMatch [8] AttributeValueAssertion |
* approxMatch [8] AttributeValueAssertion |
|
* extensibleMatch [9] MatchingRuleAssertion |
* } |
* } |
* |
* |
* SubstringFilter ::= SEQUENCE { |
* SubstringFilter ::= SEQUENCE { |
Line 44 get_filter( Connection *conn, BerElement
|
Line 50 get_filter( Connection *conn, BerElement
|
* final [2] IA5String |
* final [2] IA5String |
* } |
* } |
* } |
* } |
|
* |
|
* MatchingRuleAssertion ::= SEQUENCE { |
|
* matchingRule [1] MatchingRuleId OPTIONAL, |
|
* type [2] AttributeDescription OPTIONAL, |
|
* matchValue [3] AssertionValue, |
|
* dnAttributes [4] BOOLEAN DEFAULT FALSE |
|
* } |
|
* |
*/ |
*/ |
|
|
f = (Filter *) ch_malloc( sizeof(Filter) ); |
f = (Filter *) ch_malloc( sizeof(Filter) ); |
*filt = f; |
|
f->f_next = NULL; |
f->f_next = NULL; |
|
|
err = 0; |
err = LDAP_SUCCESS; |
*fstr = NULL; |
*fstr = NULL; |
f->f_choice = ber_peek_tag( ber, &len ); |
f->f_choice = ber_peek_tag( ber, &len ); |
#ifdef LDAP_COMPAT30 |
|
if ( conn->c_version == 30 ) { |
|
switch ( f->f_choice ) { |
|
case LDAP_FILTER_EQUALITY: |
|
case LDAP_FILTER_GE: |
|
case LDAP_FILTER_LE: |
|
case LDAP_FILTER_PRESENT: |
|
case LDAP_FILTER_PRESENT_30: |
|
case LDAP_FILTER_APPROX: |
|
(void) ber_skip_tag( ber, &len ); |
|
if ( f->f_choice == LDAP_FILTER_PRESENT_30 ) { |
|
f->f_choice = LDAP_FILTER_PRESENT; |
|
} |
|
break; |
|
default: |
|
break; |
|
} |
|
} |
|
#endif |
|
switch ( f->f_choice ) { |
switch ( f->f_choice ) { |
case LDAP_FILTER_EQUALITY: |
case LDAP_FILTER_EQUALITY: |
Debug( LDAP_DEBUG_FILTER, "EQUALITY\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "EQUALITY\n", 0, 0, 0 ); |
if ( (err = get_ava( ber, &f->f_ava )) == 0 ) { |
if ( (err = get_ava( ber, &f->f_ava )) == LDAP_SUCCESS ) { |
*fstr = ch_malloc(4 + strlen( f->f_avtype ) + |
*fstr = ch_malloc(4 + strlen( f->f_avtype ) + |
f->f_avvalue.bv_len); |
f->f_avvalue.bv_len); |
sprintf( *fstr, "(%s=%s)", f->f_avtype, |
sprintf( *fstr, "(%s=%s)", f->f_avtype, |
Line 90 get_filter( Connection *conn, BerElement
|
Line 85 get_filter( Connection *conn, BerElement
|
|
|
case LDAP_FILTER_GE: |
case LDAP_FILTER_GE: |
Debug( LDAP_DEBUG_FILTER, "GE\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "GE\n", 0, 0, 0 ); |
if ( (err = get_ava( ber, &f->f_ava )) == 0 ) { |
if ( (err = get_ava( ber, &f->f_ava )) == LDAP_SUCCESS ) { |
*fstr = ch_malloc(5 + strlen( f->f_avtype ) + |
*fstr = ch_malloc(5 + strlen( f->f_avtype ) + |
f->f_avvalue.bv_len); |
f->f_avvalue.bv_len); |
sprintf( *fstr, "(%s>=%s)", f->f_avtype, |
sprintf( *fstr, "(%s>=%s)", f->f_avtype, |
Line 100 get_filter( Connection *conn, BerElement
|
Line 95 get_filter( Connection *conn, BerElement
|
|
|
case LDAP_FILTER_LE: |
case LDAP_FILTER_LE: |
Debug( LDAP_DEBUG_FILTER, "LE\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "LE\n", 0, 0, 0 ); |
if ( (err = get_ava( ber, &f->f_ava )) == 0 ) { |
if ( (err = get_ava( ber, &f->f_ava )) == LDAP_SUCCESS ) { |
*fstr = ch_malloc(5 + strlen( f->f_avtype ) + |
*fstr = ch_malloc(5 + strlen( f->f_avtype ) + |
f->f_avvalue.bv_len); |
f->f_avvalue.bv_len); |
sprintf( *fstr, "(%s<=%s)", f->f_avtype, |
sprintf( *fstr, "(%s<=%s)", f->f_avtype, |
Line 111 get_filter( Connection *conn, BerElement
|
Line 106 get_filter( Connection *conn, BerElement
|
case LDAP_FILTER_PRESENT: |
case LDAP_FILTER_PRESENT: |
Debug( LDAP_DEBUG_FILTER, "PRESENT\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "PRESENT\n", 0, 0, 0 ); |
if ( ber_scanf( ber, "a", &f->f_type ) == LBER_ERROR ) { |
if ( ber_scanf( ber, "a", &f->f_type ) == LBER_ERROR ) { |
err = LDAP_PROTOCOL_ERROR; |
err = -1; |
} else { |
} else { |
err = LDAP_SUCCESS; |
err = LDAP_SUCCESS; |
attr_normalize( f->f_type ); |
attr_normalize( f->f_type ); |
Line 122 get_filter( Connection *conn, BerElement
|
Line 117 get_filter( Connection *conn, BerElement
|
|
|
case LDAP_FILTER_APPROX: |
case LDAP_FILTER_APPROX: |
Debug( LDAP_DEBUG_FILTER, "APPROX\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "APPROX\n", 0, 0, 0 ); |
if ( (err = get_ava( ber, &f->f_ava )) == 0 ) { |
if ( (err = get_ava( ber, &f->f_ava )) == LDAP_SUCCESS ) { |
*fstr = ch_malloc(5 + strlen( f->f_avtype ) + |
*fstr = ch_malloc(5 + strlen( f->f_avtype ) + |
f->f_avvalue.bv_len); |
f->f_avvalue.bv_len); |
sprintf( *fstr, "(%s~=%s)", f->f_avtype, |
sprintf( *fstr, "(%s~=%s)", f->f_avtype, |
Line 133 get_filter( Connection *conn, BerElement
|
Line 128 get_filter( Connection *conn, BerElement
|
case LDAP_FILTER_AND: |
case LDAP_FILTER_AND: |
Debug( LDAP_DEBUG_FILTER, "AND\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "AND\n", 0, 0, 0 ); |
if ( (err = get_filter_list( conn, ber, &f->f_and, &ftmp )) |
if ( (err = get_filter_list( conn, ber, &f->f_and, &ftmp )) |
== 0 ) { |
== LDAP_SUCCESS ) { |
if (ftmp == NULL) ftmp = strdup(""); |
if (ftmp == NULL) ftmp = ch_strdup(""); |
*fstr = ch_malloc( 4 + strlen( ftmp ) ); |
*fstr = ch_malloc( 4 + strlen( ftmp ) ); |
sprintf( *fstr, "(&%s)", ftmp ); |
sprintf( *fstr, "(&%s)", ftmp ); |
free( ftmp ); |
free( ftmp ); |
Line 144 get_filter( Connection *conn, BerElement
|
Line 139 get_filter( Connection *conn, BerElement
|
case LDAP_FILTER_OR: |
case LDAP_FILTER_OR: |
Debug( LDAP_DEBUG_FILTER, "OR\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "OR\n", 0, 0, 0 ); |
if ( (err = get_filter_list( conn, ber, &f->f_or, &ftmp )) |
if ( (err = get_filter_list( conn, ber, &f->f_or, &ftmp )) |
== 0 ) { |
== LDAP_SUCCESS ) { |
if (ftmp == NULL) ftmp = strdup(""); |
if (ftmp == NULL) ftmp = ch_strdup(""); |
*fstr = ch_malloc( 4 + strlen( ftmp ) ); |
*fstr = ch_malloc( 4 + strlen( ftmp ) ); |
sprintf( *fstr, "(|%s)", ftmp ); |
sprintf( *fstr, "(|%s)", ftmp ); |
free( ftmp ); |
free( ftmp ); |
Line 155 get_filter( Connection *conn, BerElement
|
Line 150 get_filter( Connection *conn, BerElement
|
case LDAP_FILTER_NOT: |
case LDAP_FILTER_NOT: |
Debug( LDAP_DEBUG_FILTER, "NOT\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "NOT\n", 0, 0, 0 ); |
(void) ber_skip_tag( ber, &len ); |
(void) ber_skip_tag( ber, &len ); |
if ( (err = get_filter( conn, ber, &f->f_not, &ftmp )) == 0 ) { |
if ( (err = get_filter( conn, ber, &f->f_not, &ftmp )) == LDAP_SUCCESS ) { |
if (ftmp == NULL) ftmp = strdup(""); |
if (ftmp == NULL) ftmp = ch_strdup(""); |
*fstr = ch_malloc( 4 + strlen( ftmp ) ); |
*fstr = ch_malloc( 4 + strlen( ftmp ) ); |
sprintf( *fstr, "(!%s)", ftmp ); |
sprintf( *fstr, "(!%s)", ftmp ); |
free( ftmp ); |
free( ftmp ); |
} |
} |
break; |
break; |
|
|
|
case LBER_DEFAULT: |
|
Debug( LDAP_DEBUG_ANY, "decoding filter error\n", |
|
0, 0, 0 ); |
|
err = -1; |
|
break; |
|
|
default: |
default: |
Debug( LDAP_DEBUG_ANY, "unknown filter type %lu\n", |
Debug( LDAP_DEBUG_ANY, "unknown filter type %lu\n", |
f->f_choice, 0, 0 ); |
f->f_choice, 0, 0 ); |
Line 170 get_filter( Connection *conn, BerElement
|
Line 171 get_filter( Connection *conn, BerElement
|
break; |
break; |
} |
} |
|
|
if ( err != 0 ) { |
if ( err != LDAP_SUCCESS ) { |
free( (char *) f ); |
free( (char *) f ); |
if ( *fstr != NULL ) { |
if ( *fstr != NULL ) { |
free( *fstr ); |
free( *fstr ); |
} |
} |
|
} else { |
|
*filt = f; |
} |
} |
|
|
Debug( LDAP_DEBUG_FILTER, "end get_filter %d\n", err, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "end get_filter %d\n", err, 0, 0 ); |
Line 186 get_filter_list( Connection *conn, BerEl
|
Line 189 get_filter_list( Connection *conn, BerEl
|
{ |
{ |
Filter **new; |
Filter **new; |
int err; |
int err; |
unsigned long tag, len; |
ber_tag_t tag; |
|
ber_len_t len; |
char *last, *ftmp; |
char *last, *ftmp; |
|
|
Debug( LDAP_DEBUG_FILTER, "begin get_filter_list\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "begin get_filter_list\n", 0, 0, 0 ); |
|
|
#ifdef LDAP_COMPAT30 |
|
if ( conn->c_version == 30 ) { |
|
(void) ber_skip_tag( ber, &len ); |
|
} |
|
#endif |
|
*fstr = NULL; |
*fstr = NULL; |
new = f; |
new = f; |
for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT; |
for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT; |
tag = ber_next_element( ber, &len, last ) ) { |
tag = ber_next_element( ber, &len, last ) ) |
if ( (err = get_filter( conn, ber, new, &ftmp )) != 0 ) |
{ |
|
if ( (err = get_filter( conn, ber, new, &ftmp )) != LDAP_SUCCESS ) |
return( err ); |
return( err ); |
if ( *fstr == NULL ) { |
if ( *fstr == NULL ) { |
*fstr = ftmp; |
*fstr = ftmp; |
Line 215 get_filter_list( Connection *conn, BerEl
|
Line 215 get_filter_list( Connection *conn, BerEl
|
*new = NULL; |
*new = NULL; |
|
|
Debug( LDAP_DEBUG_FILTER, "end get_filter_list\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "end get_filter_list\n", 0, 0, 0 ); |
return( 0 ); |
return( LDAP_SUCCESS ); |
} |
} |
|
|
static int |
static int |
Line 226 get_substring_filter(
|
Line 226 get_substring_filter(
|
char **fstr |
char **fstr |
) |
) |
{ |
{ |
unsigned long tag, len, rc; |
ber_tag_t tag; |
char *val, *last; |
ber_len_t len; |
|
ber_tag_t rc; |
|
struct berval *val; |
|
char *last; |
int syntax; |
int syntax; |
|
|
Debug( LDAP_DEBUG_FILTER, "begin get_substring_filter\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "begin get_substring_filter\n", 0, 0, 0 ); |
|
|
#ifdef LDAP_COMPAT30 |
if ( ber_scanf( ber, "{a" /*}*/, &f->f_sub_type ) == LBER_ERROR ) { |
if ( conn->c_version == 30 ) { |
return( -1 ); |
(void) ber_skip_tag( ber, &len ); |
|
} |
|
#endif |
|
if ( ber_scanf( ber, "{a", &f->f_sub_type ) == LBER_ERROR ) { |
|
return( LDAP_PROTOCOL_ERROR ); |
|
} |
} |
|
|
attr_normalize( f->f_sub_type ); |
attr_normalize( f->f_sub_type ); |
|
|
|
#ifdef SLAPD_SCHEMA_NOT_COMPAT |
|
/* not yet implemented */ |
|
#else |
|
/* should get real syntax and see if we have a substring matching rule */ |
syntax = attr_syntax( f->f_sub_type ); |
syntax = attr_syntax( f->f_sub_type ); |
|
#endif |
|
|
f->f_sub_initial = NULL; |
f->f_sub_initial = NULL; |
f->f_sub_any = NULL; |
f->f_sub_any = NULL; |
f->f_sub_final = NULL; |
f->f_sub_final = NULL; |
|
|
*fstr = ch_malloc( strlen( f->f_sub_type ) + 3 ); |
if( fstr ) { |
sprintf( *fstr, "(%s=", f->f_sub_type ); |
*fstr = ch_malloc( strlen( f->f_sub_type ) + 3 ); |
|
sprintf( *fstr, "(%s=", f->f_sub_type ); |
|
} |
|
|
for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT; |
for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT; |
tag = ber_next_element( ber, &len, last ) ) { |
tag = ber_next_element( ber, &len, last ) ) |
#ifdef LDAP_COMPAT30 |
{ |
if ( conn->c_version == 30 ) { |
rc = ber_scanf( ber, "O", &val ); |
rc = ber_scanf( ber, "{a}", &val ); |
|
} else |
|
#endif |
|
rc = ber_scanf( ber, "a", &val ); |
|
if ( rc == LBER_ERROR ) { |
if ( rc == LBER_ERROR ) { |
return( LDAP_PROTOCOL_ERROR ); |
rc = -1; |
|
goto return_error; |
} |
} |
if ( val == NULL || *val == '\0' ) { |
|
if ( val != NULL ) { |
|
free( val ); |
|
} |
|
return( LDAP_INVALID_SYNTAX ); |
|
} |
|
value_normalize( val, syntax ); |
|
|
|
switch ( tag ) { |
if ( val == NULL || val->bv_len == 0 ) { |
#ifdef LDAP_COMPAT30 |
ber_bvfree( val ); |
case LDAP_SUBSTRING_INITIAL_30: |
rc = LDAP_INVALID_SYNTAX; |
|
goto return_error; |
|
} |
|
|
|
rc = LDAP_PROTOCOL_ERROR; |
|
|
|
#ifdef SLAPD_SCHEMA_NOT_COMPAT |
|
/* not yet implemented */ |
|
#else |
|
/* we should call a substring syntax normalization routine */ |
|
value_normalize( val->bv_val, syntax ); |
#endif |
#endif |
|
|
|
/* this is bogus, value_normalize should take a berval */ |
|
val->bv_len = strlen( val->bv_val ); |
|
|
|
switch ( tag ) { |
case LDAP_SUBSTRING_INITIAL: |
case LDAP_SUBSTRING_INITIAL: |
Debug( LDAP_DEBUG_FILTER, " INITIAL\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, " INITIAL\n", 0, 0, 0 ); |
if ( f->f_sub_initial != NULL ) { |
if ( f->f_sub_initial != NULL ) { |
return( LDAP_PROTOCOL_ERROR ); |
ber_bvfree( val ); |
|
goto return_error; |
} |
} |
f->f_sub_initial = val; |
f->f_sub_initial = val; |
*fstr = ch_realloc( *fstr, strlen( *fstr ) + |
|
strlen( val ) + 1 ); |
if( fstr ) { |
strcat( *fstr, val ); |
*fstr = ch_realloc( *fstr, |
|
strlen( *fstr ) + val->bv_len + 1 ); |
|
strcat( *fstr, val->bv_val ); |
|
} |
break; |
break; |
|
|
#ifdef LDAP_COMPAT30 |
|
case LDAP_SUBSTRING_ANY_30: |
|
#endif |
|
case LDAP_SUBSTRING_ANY: |
case LDAP_SUBSTRING_ANY: |
Debug( LDAP_DEBUG_FILTER, " ANY\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, " ANY\n", 0, 0, 0 ); |
charray_add( &f->f_sub_any, val ); |
charray_add( (char ***) &f->f_sub_any, (char *) val ); |
*fstr = ch_realloc( *fstr, strlen( *fstr ) + |
|
strlen( val ) + 2 ); |
if( fstr ) { |
strcat( *fstr, "*" ); |
*fstr = ch_realloc( *fstr, |
strcat( *fstr, val ); |
strlen( *fstr ) + val->bv_len + 2 ); |
|
strcat( *fstr, "*" ); |
|
strcat( *fstr, val->bv_val ); |
|
} |
break; |
break; |
|
|
#ifdef LDAP_COMPAT30 |
|
case LDAP_SUBSTRING_FINAL_30: |
|
#endif |
|
case LDAP_SUBSTRING_FINAL: |
case LDAP_SUBSTRING_FINAL: |
Debug( LDAP_DEBUG_FILTER, " FINAL\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, " FINAL\n", 0, 0, 0 ); |
if ( f->f_sub_final != NULL ) { |
if ( f->f_sub_final != NULL ) { |
return( LDAP_PROTOCOL_ERROR ); |
ber_bvfree( val ); |
|
goto return_error; |
} |
} |
f->f_sub_final = val; |
f->f_sub_final = val; |
*fstr = ch_realloc( *fstr, strlen( *fstr ) + |
|
strlen( val ) + 2 ); |
if( fstr ) { |
strcat( *fstr, "*" ); |
*fstr = ch_realloc( *fstr, |
strcat( *fstr, val ); |
strlen( *fstr ) + val->bv_len + 2 ); |
|
strcat( *fstr, "*" ); |
|
strcat( *fstr, val->bv_val ); |
|
} |
break; |
break; |
|
|
default: |
default: |
Debug( LDAP_DEBUG_FILTER, " unknown type\n", tag, 0, |
Debug( LDAP_DEBUG_FILTER, " unknown type\n", tag, 0, |
0 ); |
0 ); |
return( LDAP_PROTOCOL_ERROR ); |
|
|
ber_bvfree( val ); |
|
|
|
return_error: |
|
Debug( LDAP_DEBUG_FILTER, " error=%d\n", rc, 0, 0 ); |
|
|
|
if( fstr ) { |
|
free( *fstr ); |
|
*fstr = NULL; |
|
} |
|
|
|
ch_free( f->f_sub_type ); |
|
ber_bvfree( f->f_sub_initial ); |
|
ber_bvecfree( f->f_sub_any ); |
|
ber_bvfree( f->f_sub_final ); |
|
return rc; |
} |
} |
} |
} |
*fstr = ch_realloc( *fstr, strlen( *fstr ) + 3 ); |
|
if ( f->f_sub_final == NULL ) { |
if( fstr ) { |
strcat( *fstr, "*" ); |
*fstr = ch_realloc( *fstr, strlen( *fstr ) + 3 ); |
|
if ( f->f_sub_final == NULL ) { |
|
strcat( *fstr, "*" ); |
|
} |
|
strcat( *fstr, ")" ); |
} |
} |
strcat( *fstr, ")" ); |
|
|
|
Debug( LDAP_DEBUG_FILTER, "end get_substring_filter\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "end get_substring_filter\n", 0, 0, 0 ); |
return( 0 ); |
return( LDAP_SUCCESS ); |
} |
} |
|
|
void |
void |
Line 347 filter_free( Filter *f )
|
Line 384 filter_free( Filter *f )
|
free( f->f_sub_type ); |
free( f->f_sub_type ); |
} |
} |
if ( f->f_sub_initial != NULL ) { |
if ( f->f_sub_initial != NULL ) { |
free( f->f_sub_initial ); |
ber_bvfree( f->f_sub_initial ); |
} |
} |
charray_free( f->f_sub_any ); |
ber_bvecfree( f->f_sub_any ); |
if ( f->f_sub_final != NULL ) { |
if ( f->f_sub_final != NULL ) { |
free( f->f_sub_final ); |
ber_bvfree( f->f_sub_final ); |
} |
} |
break; |
break; |
|
|
Line 414 filter_print( Filter *f )
|
Line 451 filter_print( Filter *f )
|
case LDAP_FILTER_SUBSTRINGS: |
case LDAP_FILTER_SUBSTRINGS: |
fprintf( stderr, "(%s=", f->f_sub_type ); |
fprintf( stderr, "(%s=", f->f_sub_type ); |
if ( f->f_sub_initial != NULL ) { |
if ( f->f_sub_initial != NULL ) { |
fprintf( stderr, "%s", f->f_sub_initial ); |
fprintf( stderr, "%s", f->f_sub_initial->bv_val ); |
} |
} |
if ( f->f_sub_any != NULL ) { |
if ( f->f_sub_any != NULL ) { |
for ( i = 0; f->f_sub_any[i] != NULL; i++ ) { |
for ( i = 0; f->f_sub_any[i] != NULL; i++ ) { |
fprintf( stderr, "*%s", f->f_sub_any[i] ); |
fprintf( stderr, "*%s", f->f_sub_any[i]->bv_val ); |
} |
} |
} |
} |
charray_free( f->f_sub_any ); |
|
if ( f->f_sub_final != NULL ) { |
if ( f->f_sub_final != NULL ) { |
fprintf( stderr, "*%s", f->f_sub_final ); |
fprintf( stderr, "*%s", f->f_sub_final->bv_val ); |
} |
} |
break; |
break; |
|
|