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