1*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
2*0Sstevel@tonic-gate 
3*0Sstevel@tonic-gate /*
4*0Sstevel@tonic-gate  * The contents of this file are subject to the Netscape Public
5*0Sstevel@tonic-gate  * License Version 1.1 (the "License"); you may not use this file
6*0Sstevel@tonic-gate  * except in compliance with the License. You may obtain a copy of
7*0Sstevel@tonic-gate  * the License at http://www.mozilla.org/NPL/
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * Software distributed under the License is distributed on an "AS
10*0Sstevel@tonic-gate  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11*0Sstevel@tonic-gate  * implied. See the License for the specific language governing
12*0Sstevel@tonic-gate  * rights and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * The Original Code is Mozilla Communicator client code, released
15*0Sstevel@tonic-gate  * March 31, 1998.
16*0Sstevel@tonic-gate  *
17*0Sstevel@tonic-gate  * The Initial Developer of the Original Code is Netscape
18*0Sstevel@tonic-gate  * Communications Corporation. Portions created by Netscape are
19*0Sstevel@tonic-gate  * Copyright (C) 1998-1999 Netscape Communications Corporation. All
20*0Sstevel@tonic-gate  * Rights Reserved.
21*0Sstevel@tonic-gate  *
22*0Sstevel@tonic-gate  * Contributor(s):
23*0Sstevel@tonic-gate  */
24*0Sstevel@tonic-gate /*
25*0Sstevel@tonic-gate  *  Copyright (c) 1990 Regents of the University of Michigan.
26*0Sstevel@tonic-gate  *  All rights reserved.
27*0Sstevel@tonic-gate  */
28*0Sstevel@tonic-gate /*
29*0Sstevel@tonic-gate  *  countvalues.c
30*0Sstevel@tonic-gate  */
31*0Sstevel@tonic-gate 
32*0Sstevel@tonic-gate #include "ldap-int.h"
33*0Sstevel@tonic-gate 
34*0Sstevel@tonic-gate int
35*0Sstevel@tonic-gate LDAP_CALL
ldap_count_values(char ** vals)36*0Sstevel@tonic-gate ldap_count_values( char **vals )
37*0Sstevel@tonic-gate {
38*0Sstevel@tonic-gate 	int	i;
39*0Sstevel@tonic-gate 
40*0Sstevel@tonic-gate 	if ( vals == NULL )
41*0Sstevel@tonic-gate 		return( 0 );
42*0Sstevel@tonic-gate 
43*0Sstevel@tonic-gate 	for ( i = 0; vals[i] != NULL; i++ )
44*0Sstevel@tonic-gate 		;	/* NULL */
45*0Sstevel@tonic-gate 
46*0Sstevel@tonic-gate 	return( i );
47*0Sstevel@tonic-gate }
48*0Sstevel@tonic-gate 
49*0Sstevel@tonic-gate int
50*0Sstevel@tonic-gate LDAP_CALL
ldap_count_values_len(struct berval ** vals)51*0Sstevel@tonic-gate ldap_count_values_len( struct berval **vals )
52*0Sstevel@tonic-gate {
53*0Sstevel@tonic-gate 	return( ldap_count_values( (char **) vals ) );
54*0Sstevel@tonic-gate }
55