- *s = savechar;
- *(value-1) = '=';
-#endif
- return( f );
-}
-
-static int
-str2subvals( const char *in, Filter *f )
-{
- char *nextstar, *val, *freeme;
- int gotstar;
-
- Debug( LDAP_DEBUG_FILTER, "str2subvals \"%s\"\n", in, 0, 0 );
-
- if( in == NULL ) return 0;
-
- val = freeme = ch_strdup( in );
- gotstar = 0;
-
- while ( *val ) {
- if ( (nextstar = ldap_pvt_find_wildcard( val )) != NULL )
- *nextstar++ = '\0';
-
- ldap_pvt_filter_value_unescape( val );
-
- if ( gotstar == 0 ) {
- f->f_sub_initial = ber_bvstrdup( val );
-
- } else if ( nextstar == NULL ) {
- f->f_sub_final = ber_bvstrdup( val );
-
- } else {
- charray_add( (char ***) &f->f_sub_any, (char *) ber_bvstrdup( val ) );
- }
-
- gotstar = 1;
- val = nextstar;
- }
-
- free( freeme );
- return( 0 );
-}
-
-/*
- * find_matching_paren - return a pointer to the right paren in s matching
- * the left paren to which *s currently points
- */
-
-static char *
-find_matching_paren( const char *s )
-{
- int balance, escape;
-
- balance = 0;
- escape = 0;
- for ( ; *s; s++ ) {
- if ( escape == 0 ) {
- if ( *s == '(' )
- balance++;
- else if ( *s == ')' )
- balance--;
- }
- if ( balance == 0 ) {
- return (char *) s;
- }
- if ( *s == '\\' && ! escape )
- escape = 1;
- else
- escape = 0;
- }