Added 'W' fmt char for BVarrays

This commit is contained in:
Howard Chu 2002-01-02 08:50:07 +00:00
parent 61128d0020
commit 670c66bda9
2 changed files with 12 additions and 1 deletions

View File

@ -680,7 +680,8 @@ ber_scanf ( BerElement *ber,
case '{': /* begin sequence */
case '[': /* begin set */
if ( *(fmt + 1) != 'v' && *(fmt + 1) != 'V' )
if ( *(fmt + 1) != 'v' && *(fmt + 1) != 'V'
&& *(fmt + 1) != 'W' )
rc = ber_skip_tag( ber, &len );
break;

View File

@ -779,6 +779,16 @@ ber_printf( BerElement *ber, LDAP_CONST char *fmt, ... )
}
break;
case 'W': /* BVarray */
if ( (bv = va_arg( ap, BVarray )) == NULL )
break;
for ( i = 0; bv[i].bv_val != NULL; i++ ) {
if ( (rc = ber_put_berval( ber, &bv[i],
ber->ber_tag )) == -1 )
break;
}
break;
case '{': /* begin sequence */
rc = ber_start_seq( ber, ber->ber_tag );
break;