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