mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-04 06:01:23 -05:00
removed lint
This commit is contained in:
parent
6ffddf154a
commit
cbc4b47f70
22 changed files with 142 additions and 128 deletions
|
|
@ -18,6 +18,7 @@ static char avl_version[] = "AVL library version 1.0\n";
|
|||
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "avl.h"
|
||||
|
||||
#define ROTATERIGHT(x) { \
|
||||
|
|
@ -47,7 +48,7 @@ static char avl_version[] = "AVL library version 1.0\n";
|
|||
*/
|
||||
|
||||
static
|
||||
ravl_insert( iroot, data, taller, fcmp, fdup, depth )
|
||||
int ravl_insert( iroot, data, taller, fcmp, fdup, depth )
|
||||
Avlnode **iroot;
|
||||
caddr_t data;
|
||||
int *taller;
|
||||
|
|
@ -200,7 +201,7 @@ ravl_insert( iroot, data, taller, fcmp, fdup, depth )
|
|||
* NOTE: this routine may malloc memory
|
||||
*/
|
||||
|
||||
avl_insert( root, data, fcmp, fdup )
|
||||
int avl_insert( root, data, fcmp, fdup )
|
||||
Avlnode **root;
|
||||
caddr_t data;
|
||||
IFP fcmp;
|
||||
|
|
@ -216,11 +217,11 @@ avl_insert( root, data, fcmp, fdup )
|
|||
* been shortened because of a deletion.
|
||||
*/
|
||||
|
||||
static
|
||||
static int
|
||||
right_balance( root )
|
||||
Avlnode **root;
|
||||
{
|
||||
int shorter;
|
||||
int shorter = -1;
|
||||
Avlnode *r, *l;
|
||||
|
||||
switch( (*root)->avl_bf ) {
|
||||
|
|
@ -282,10 +283,10 @@ right_balance( root )
|
|||
*/
|
||||
|
||||
static
|
||||
left_balance( root )
|
||||
int left_balance( root )
|
||||
Avlnode **root;
|
||||
{
|
||||
int shorter;
|
||||
int shorter = -1;
|
||||
Avlnode *r, *l;
|
||||
|
||||
switch( (*root)->avl_bf ) {
|
||||
|
|
@ -453,7 +454,7 @@ avl_delete( root, data, fcmp )
|
|||
}
|
||||
|
||||
static
|
||||
avl_inapply( root, fn, arg, stopflag )
|
||||
int avl_inapply( root, fn, arg, stopflag )
|
||||
Avlnode *root;
|
||||
IFP fn;
|
||||
caddr_t arg;
|
||||
|
|
@ -477,7 +478,7 @@ avl_inapply( root, fn, arg, stopflag )
|
|||
}
|
||||
|
||||
static
|
||||
avl_postapply( root, fn, arg, stopflag )
|
||||
int avl_postapply( root, fn, arg, stopflag )
|
||||
Avlnode *root;
|
||||
IFP fn;
|
||||
caddr_t arg;
|
||||
|
|
@ -500,7 +501,7 @@ avl_postapply( root, fn, arg, stopflag )
|
|||
}
|
||||
|
||||
static
|
||||
avl_preapply( root, fn, arg, stopflag )
|
||||
int avl_preapply( root, fn, arg, stopflag )
|
||||
Avlnode *root;
|
||||
IFP fn;
|
||||
caddr_t arg;
|
||||
|
|
@ -531,7 +532,7 @@ avl_preapply( root, fn, arg, stopflag )
|
|||
* of nodes.
|
||||
*/
|
||||
|
||||
avl_apply( root, fn, arg, stopflag, type )
|
||||
int avl_apply( root, fn, arg, stopflag, type )
|
||||
Avlnode *root;
|
||||
IFP fn;
|
||||
caddr_t arg;
|
||||
|
|
@ -564,7 +565,7 @@ avl_apply( root, fn, arg, stopflag, type )
|
|||
* AVL_NOMORE is returned.
|
||||
*/
|
||||
|
||||
avl_prefixapply( root, data, fmatch, marg, fcmp, carg, stopflag )
|
||||
int avl_prefixapply( root, data, fmatch, marg, fcmp, carg, stopflag )
|
||||
Avlnode *root;
|
||||
caddr_t data;
|
||||
IFP fmatch;
|
||||
|
|
@ -613,7 +614,7 @@ avl_prefixapply( root, data, fmatch, marg, fcmp, carg, stopflag )
|
|||
* number of items actually freed is returned.
|
||||
*/
|
||||
|
||||
avl_free( root, dfree )
|
||||
int avl_free( root, dfree )
|
||||
Avlnode *root;
|
||||
IFP dfree;
|
||||
{
|
||||
|
|
@ -700,7 +701,7 @@ static int avl_nextlist;
|
|||
|
||||
/* ARGSUSED */
|
||||
static
|
||||
avl_buildlist( data, arg )
|
||||
int avl_buildlist( data, arg )
|
||||
caddr_t data;
|
||||
int arg;
|
||||
{
|
||||
|
|
@ -767,12 +768,12 @@ avl_getnext()
|
|||
return( avl_list[ avl_nextlist++ ] );
|
||||
}
|
||||
|
||||
avl_dup_error()
|
||||
int avl_dup_error()
|
||||
{
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
avl_dup_ok()
|
||||
int avl_dup_ok()
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,23 +12,17 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined( DOS ) || defined( _WIN32 )
|
||||
#include "msdos.h"
|
||||
#endif /* DOS || _WIN32 */
|
||||
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
#if defined(NeXT) || defined(VMS)
|
||||
#include <stdlib.h>
|
||||
#else /* next || vms */
|
||||
#ifndef __FreeBSD__
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#endif /* next || vms */
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
|
@ -303,7 +297,7 @@ ber_flush( Sockbuf *sb, BerElement *ber, int freeit )
|
|||
#ifdef LDAP_DEBUG
|
||||
if ( lber_debug ) {
|
||||
fprintf( stderr, "ber_flush: %ld bytes to sd %ld%s\n", towrite,
|
||||
sb->sb_sd, ber->ber_rwptr != ber->ber_buf ? " (re-flush)"
|
||||
(long) sb->sb_sd, ber->ber_rwptr != ber->ber_buf ? " (re-flush)"
|
||||
: "" );
|
||||
if ( lber_debug > 1 )
|
||||
lber_bprint( ber->ber_rwptr, towrite );
|
||||
|
|
@ -421,14 +415,16 @@ void
|
|||
ber_dump( BerElement *ber, int inout )
|
||||
{
|
||||
fprintf( stderr, "ber_dump: buf 0x%lx, ptr 0x%lx, end 0x%lx\n",
|
||||
ber->ber_buf, ber->ber_ptr, ber->ber_end );
|
||||
(long) ber->ber_buf,
|
||||
(long) ber->ber_ptr,
|
||||
(long) ber->ber_end );
|
||||
if ( inout == 1 ) {
|
||||
fprintf( stderr, " current len %ld, contents:\n",
|
||||
ber->ber_end - ber->ber_ptr );
|
||||
(long) (ber->ber_end - ber->ber_ptr) );
|
||||
lber_bprint( ber->ber_ptr, ber->ber_end - ber->ber_ptr );
|
||||
} else {
|
||||
fprintf( stderr, " current len %ld, contents:\n",
|
||||
ber->ber_ptr - ber->ber_buf );
|
||||
(long) (ber->ber_ptr - ber->ber_buf) );
|
||||
lber_bprint( ber->ber_buf, ber->ber_ptr - ber->ber_buf );
|
||||
}
|
||||
}
|
||||
|
|
@ -439,9 +435,9 @@ ber_sos_dump( Seqorset *sos )
|
|||
fprintf( stderr, "*** sos dump ***\n" );
|
||||
while ( sos != NULLSEQORSET ) {
|
||||
fprintf( stderr, "ber_sos_dump: clen %ld first 0x%lx ptr 0x%lx\n",
|
||||
sos->sos_clen, sos->sos_first, sos->sos_ptr );
|
||||
(long) sos->sos_clen, (long) sos->sos_first, (long) sos->sos_ptr );
|
||||
fprintf( stderr, " current len %ld contents:\n",
|
||||
sos->sos_ptr - sos->sos_first );
|
||||
(long) (sos->sos_ptr - sos->sos_first) );
|
||||
lber_bprint( sos->sos_first, sos->sos_ptr - sos->sos_first );
|
||||
|
||||
sos = sos->sos_next;
|
||||
|
|
@ -489,7 +485,7 @@ get_tag( Sockbuf *sb )
|
|||
unsigned long
|
||||
ber_get_next( Sockbuf *sb, unsigned long *len, BerElement *ber )
|
||||
{
|
||||
unsigned long tag, netlen, toread;
|
||||
unsigned long tag = 0, netlen, toread;
|
||||
unsigned char lc;
|
||||
long rc;
|
||||
int noctets, diff;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined( MACOS ) && !defined( DOS )
|
||||
#include <sys/types.h>
|
||||
|
|
@ -23,7 +24,6 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
|
|||
#endif /* DOS */
|
||||
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
#include "macos.h"
|
||||
#endif /* MACOS */
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include <time.h>
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
|
|
@ -32,6 +33,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University
|
|||
#include <sys/socket.h>
|
||||
#endif /* DOS */
|
||||
#endif /* MACOS */
|
||||
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
#include "ldap-int.h"
|
||||
|
|
@ -139,8 +141,8 @@ ldap_flush_cache( LDAP *ld )
|
|||
void
|
||||
ldap_uncache_request( LDAP *ld, int msgid )
|
||||
{
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_uncache_request %d ld_cache %x\n",
|
||||
msgid, ld->ld_cache, 0 );
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_uncache_request %d ld_cache %lx\n",
|
||||
msgid, (long) ld->ld_cache, 0 );
|
||||
|
||||
uncache_entry_or_req( ld, NULL, msgid );
|
||||
}
|
||||
|
|
@ -149,8 +151,8 @@ ldap_uncache_request( LDAP *ld, int msgid )
|
|||
void
|
||||
ldap_uncache_entry( LDAP *ld, char *dn )
|
||||
{
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_uncache_entry %s ld_cache %x\n",
|
||||
dn, ld->ld_cache, 0 );
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_uncache_entry %s ld_cache %lx\n",
|
||||
dn, (long) ld->ld_cache, 0 );
|
||||
|
||||
uncache_entry_or_req( ld, dn, 0 );
|
||||
}
|
||||
|
|
@ -165,8 +167,8 @@ uncache_entry_or_req( LDAP *ld,
|
|||
LDAPMessage *m, *prev, *next;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"ldap_uncache_entry_or_req dn %s msgid %d ld_cache %x\n",
|
||||
dn, msgid, ld->ld_cache );
|
||||
"ldap_uncache_entry_or_req dn %s msgid %d ld_cache %lx\n",
|
||||
dn, msgid, (long) ld->ld_cache );
|
||||
|
||||
if ( ld->ld_cache == NULLLDCACHE ) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ int
|
|||
ldap_init_templates_buf( char *buf, long buflen,
|
||||
struct ldap_disptmpl **tmpllistp )
|
||||
{
|
||||
int rc, version;
|
||||
int rc=-1, version;
|
||||
char **toks;
|
||||
struct ldap_disptmpl *prevtmpl, *tmpl;
|
||||
|
||||
|
|
@ -457,9 +457,9 @@ read_next_tmpl( char **bufp, long *blenp, struct ldap_disptmpl **tmplp,
|
|||
int i, j, tokcnt, samerow, adsource;
|
||||
char **toks, *itemopts;
|
||||
struct ldap_disptmpl *tmpl;
|
||||
struct ldap_oclist *ocp, *prevocp;
|
||||
struct ldap_adddeflist *adp, *prevadp;
|
||||
struct ldap_tmplitem *rowp, *ip, *previp;
|
||||
struct ldap_oclist *ocp, *prevocp = NULL;
|
||||
struct ldap_adddeflist *adp, *prevadp = NULL;
|
||||
struct ldap_tmplitem *rowp = NULL, *ip, *previp = NULL;
|
||||
|
||||
*tmplp = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
#else /* MACOS */
|
||||
|
||||
#if defined( DOS ) || defined( _WIN32 )
|
||||
#include <malloc.h>
|
||||
#include "msdos.h"
|
||||
|
|
@ -10,7 +9,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#endif /* DOS */
|
||||
#endif /* MACOS */
|
||||
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
|
||||
|
|
@ -20,53 +19,53 @@ struct ldaperror {
|
|||
};
|
||||
|
||||
static struct ldaperror ldap_errlist[] = {
|
||||
LDAP_SUCCESS, "Success",
|
||||
LDAP_OPERATIONS_ERROR, "Operations error",
|
||||
LDAP_PROTOCOL_ERROR, "Protocol error",
|
||||
LDAP_TIMELIMIT_EXCEEDED, "Timelimit exceeded",
|
||||
LDAP_SIZELIMIT_EXCEEDED, "Sizelimit exceeded",
|
||||
LDAP_COMPARE_FALSE, "Compare false",
|
||||
LDAP_COMPARE_TRUE, "Compare true",
|
||||
LDAP_STRONG_AUTH_NOT_SUPPORTED, "Strong authentication not supported",
|
||||
LDAP_STRONG_AUTH_REQUIRED, "Strong authentication required",
|
||||
LDAP_PARTIAL_RESULTS, "Partial results and referral received",
|
||||
LDAP_NO_SUCH_ATTRIBUTE, "No such attribute",
|
||||
LDAP_UNDEFINED_TYPE, "Undefined attribute type",
|
||||
LDAP_INAPPROPRIATE_MATCHING, "Inappropriate matching",
|
||||
LDAP_CONSTRAINT_VIOLATION, "Constraint violation",
|
||||
LDAP_TYPE_OR_VALUE_EXISTS, "Type or value exists",
|
||||
LDAP_INVALID_SYNTAX, "Invalid syntax",
|
||||
LDAP_NO_SUCH_OBJECT, "No such object",
|
||||
LDAP_ALIAS_PROBLEM, "Alias problem",
|
||||
LDAP_INVALID_DN_SYNTAX, "Invalid DN syntax",
|
||||
LDAP_IS_LEAF, "Object is a leaf",
|
||||
LDAP_ALIAS_DEREF_PROBLEM, "Alias dereferencing problem",
|
||||
LDAP_INAPPROPRIATE_AUTH, "Inappropriate authentication",
|
||||
LDAP_INVALID_CREDENTIALS, "Invalid credentials",
|
||||
LDAP_INSUFFICIENT_ACCESS, "Insufficient access",
|
||||
LDAP_BUSY, "DSA is busy",
|
||||
LDAP_UNAVAILABLE, "DSA is unavailable",
|
||||
LDAP_UNWILLING_TO_PERFORM, "DSA is unwilling to perform",
|
||||
LDAP_LOOP_DETECT, "Loop detected",
|
||||
LDAP_NAMING_VIOLATION, "Naming violation",
|
||||
LDAP_OBJECT_CLASS_VIOLATION, "Object class violation",
|
||||
LDAP_NOT_ALLOWED_ON_NONLEAF, "Operation not allowed on nonleaf",
|
||||
LDAP_NOT_ALLOWED_ON_RDN, "Operation not allowed on RDN",
|
||||
LDAP_ALREADY_EXISTS, "Already exists",
|
||||
LDAP_NO_OBJECT_CLASS_MODS, "Cannot modify object class",
|
||||
LDAP_RESULTS_TOO_LARGE, "Results too large",
|
||||
LDAP_OTHER, "Unknown error",
|
||||
LDAP_SERVER_DOWN, "Can't contact LDAP server",
|
||||
LDAP_LOCAL_ERROR, "Local error",
|
||||
LDAP_ENCODING_ERROR, "Encoding error",
|
||||
LDAP_DECODING_ERROR, "Decoding error",
|
||||
LDAP_TIMEOUT, "Timed out",
|
||||
LDAP_AUTH_UNKNOWN, "Unknown authentication method",
|
||||
LDAP_FILTER_ERROR, "Bad search filter",
|
||||
LDAP_USER_CANCELLED, "User cancelled operation",
|
||||
LDAP_PARAM_ERROR, "Bad parameter to an ldap routine",
|
||||
LDAP_NO_MEMORY, "Out of memory",
|
||||
-1, 0
|
||||
{LDAP_SUCCESS, "Success" },
|
||||
{LDAP_OPERATIONS_ERROR, "Operations error" },
|
||||
{LDAP_PROTOCOL_ERROR, "Protocol error" },
|
||||
{LDAP_TIMELIMIT_EXCEEDED, "Timelimit exceeded" },
|
||||
{LDAP_SIZELIMIT_EXCEEDED, "Sizelimit exceeded" },
|
||||
{LDAP_COMPARE_FALSE, "Compare false" },
|
||||
{LDAP_COMPARE_TRUE, "Compare true" },
|
||||
{LDAP_STRONG_AUTH_NOT_SUPPORTED, "Strong authentication not supported" },
|
||||
{LDAP_STRONG_AUTH_REQUIRED, "Strong authentication required" },
|
||||
{LDAP_PARTIAL_RESULTS, "Partial results and referral received" },
|
||||
{LDAP_NO_SUCH_ATTRIBUTE, "No such attribute" },
|
||||
{LDAP_UNDEFINED_TYPE, "Undefined attribute type" },
|
||||
{LDAP_INAPPROPRIATE_MATCHING, "Inappropriate matching" },
|
||||
{LDAP_CONSTRAINT_VIOLATION, "Constraint violation" },
|
||||
{LDAP_TYPE_OR_VALUE_EXISTS, "Type or value exists" },
|
||||
{LDAP_INVALID_SYNTAX, "Invalid syntax" },
|
||||
{LDAP_NO_SUCH_OBJECT, "No such object" },
|
||||
{LDAP_ALIAS_PROBLEM, "Alias problem" },
|
||||
{LDAP_INVALID_DN_SYNTAX, "Invalid DN syntax" },
|
||||
{LDAP_IS_LEAF, "Object is a leaf" },
|
||||
{LDAP_ALIAS_DEREF_PROBLEM, "Alias dereferencing problem" },
|
||||
{LDAP_INAPPROPRIATE_AUTH, "Inappropriate authentication" },
|
||||
{LDAP_INVALID_CREDENTIALS, "Invalid credentials" },
|
||||
{LDAP_INSUFFICIENT_ACCESS, "Insufficient access" },
|
||||
{LDAP_BUSY, "DSA is busy" },
|
||||
{LDAP_UNAVAILABLE, "DSA is unavailable" },
|
||||
{LDAP_UNWILLING_TO_PERFORM, "DSA is unwilling to perform" },
|
||||
{LDAP_LOOP_DETECT, "Loop detected" },
|
||||
{LDAP_NAMING_VIOLATION, "Naming violation" },
|
||||
{LDAP_OBJECT_CLASS_VIOLATION, "Object class violation" },
|
||||
{LDAP_NOT_ALLOWED_ON_NONLEAF, "Operation not allowed on nonleaf" },
|
||||
{LDAP_NOT_ALLOWED_ON_RDN, "Operation not allowed on RDN" },
|
||||
{LDAP_ALREADY_EXISTS, "Already exists" },
|
||||
{LDAP_NO_OBJECT_CLASS_MODS, "Cannot modify object class" },
|
||||
{LDAP_RESULTS_TOO_LARGE, "Results too large" },
|
||||
{LDAP_OTHER, "Unknown error" },
|
||||
{LDAP_SERVER_DOWN, "Can't contact LDAP server" },
|
||||
{LDAP_LOCAL_ERROR, "Local error" },
|
||||
{LDAP_ENCODING_ERROR, "Encoding error" },
|
||||
{LDAP_DECODING_ERROR, "Decoding error" },
|
||||
{LDAP_TIMEOUT, "Timed out" },
|
||||
{LDAP_AUTH_UNKNOWN, "Unknown authentication method" },
|
||||
{LDAP_FILTER_ERROR, "Bad search filter" },
|
||||
{LDAP_USER_CANCELLED, "User cancelled operation" },
|
||||
{LDAP_PARAM_ERROR, "Bad parameter to an ldap routine" },
|
||||
{LDAP_NO_MEMORY, "Out of memory" },
|
||||
{-1, 0 }
|
||||
};
|
||||
|
||||
char *
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
|
|||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
#if defined( DOS ) || defined( _WIN32 )
|
||||
|
|
|
|||
|
|
@ -91,9 +91,11 @@ decode_answer( unsigned char *answer, int len )
|
|||
int dx_pref[ MAX_TO_SORT ];
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
#ifdef notdef
|
||||
if ( ldap_debug & LDAP_DEBUG_PACKETS ) {
|
||||
/* __p_query( answer ); /* */
|
||||
__p_query( answer );
|
||||
}
|
||||
#endif
|
||||
#endif /* LDAP_DEBUG */
|
||||
|
||||
dxs = NULL;
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
|
|||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
#if defined( DOS ) || defined( _WIN32 )
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
#ifdef DOS
|
||||
|
|
|
|||
|
|
@ -11,15 +11,14 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
#include "macos.h"
|
||||
#endif /* MACOS */
|
||||
|
||||
#if defined( DOS ) || defined( _WIN32 )
|
||||
#include "msdos.h"
|
||||
#include <stdlib.h>
|
||||
#endif /* DOS */
|
||||
|
||||
#if !defined(MACOS) && !defined(DOS) && !defined( _WIN32 )
|
||||
|
|
@ -167,7 +166,8 @@ int
|
|||
open_ldap_connection( LDAP *ld, Sockbuf *sb, char *host, int defport,
|
||||
char **krbinstancep, int async )
|
||||
{
|
||||
int rc, port;
|
||||
int rc = -1;
|
||||
int port;
|
||||
char *p, *q, *r;
|
||||
char *curhost, hostname[ 2*MAXHOSTNAMELEN ];
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of
|
|||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
|
@ -21,7 +22,9 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of
|
|||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#endif /* _WIN32 */
|
||||
#ifdef _AIX
|
||||
#include <sys/select.h>
|
||||
|
|
@ -29,6 +32,7 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of
|
|||
#ifdef VMS
|
||||
#include "ucx_select.h"
|
||||
#endif /* VMS */
|
||||
|
||||
#include "portable.h"
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
|
|
@ -77,9 +81,10 @@ ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address,
|
|||
* XXX async is not used yet!
|
||||
*/
|
||||
{
|
||||
int rc, i, s, connected, use_hp;
|
||||
int rc, i, s = 0;
|
||||
int connected, use_hp;
|
||||
struct sockaddr_in sin;
|
||||
struct hostent *hp;
|
||||
struct hostent *hp = NULL;
|
||||
#ifdef notyet
|
||||
#ifdef LDAP_REFERRALS
|
||||
int status; /* for ioctl call */
|
||||
|
|
|
|||
|
|
@ -11,15 +11,15 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include <time.h>
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
#if defined( DOS ) || defined( _WIN32 )
|
||||
#include "msdos.h"
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef PCNFS
|
||||
#include <tklib.h>
|
||||
#include <tk_errno.h>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include <time.h>
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
|
|
@ -35,12 +36,14 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
|
|||
#ifdef _AIX
|
||||
#include <sys/select.h>
|
||||
#endif /* _AIX */
|
||||
#include "portable.h"
|
||||
#endif /* DOS */
|
||||
#endif /* MACOS */
|
||||
#ifdef VMS
|
||||
#include "ucx_select.h"
|
||||
#endif
|
||||
|
||||
#include "portable.h"
|
||||
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
#include "ldap-int.h"
|
||||
|
|
@ -181,7 +184,8 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout,
|
|||
{
|
||||
int rc;
|
||||
struct timeval tv, *tvp;
|
||||
long start_time, tmp_time;
|
||||
time_t start_time = 0;
|
||||
time_t tmp_time;
|
||||
#ifdef LDAP_REFERRALS
|
||||
LDAPConn *lc, *nextlc;
|
||||
#endif /* LDAP_REFERRALS */
|
||||
|
|
@ -201,7 +205,7 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout,
|
|||
} else {
|
||||
tv = *timeout;
|
||||
tvp = &tv;
|
||||
start_time = (long)time( NULL );
|
||||
start_time = time( NULL );
|
||||
}
|
||||
|
||||
rc = -2;
|
||||
|
|
@ -287,7 +291,7 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout,
|
|||
#endif /* !LDAP_REFERRALS */
|
||||
|
||||
if ( rc == -2 && tvp != NULL ) {
|
||||
tmp_time = (long)time( NULL );
|
||||
tmp_time = time( NULL );
|
||||
if (( tv.tv_sec -= ( tmp_time - start_time )) <= 0 ) {
|
||||
rc = 0; /* timed out */
|
||||
ld->ld_errno = LDAP_TIMEOUT;
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
#include "macos.h"
|
||||
#endif /* MACOS */
|
||||
|
||||
|
|
@ -27,6 +27,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
|
|||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
#include "ldap-int.h"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
|
|
@ -110,7 +111,7 @@ int
|
|||
ldap_init_searchprefs_buf( char *buf, long buflen,
|
||||
struct ldap_searchobj **solistp )
|
||||
{
|
||||
int rc, version;
|
||||
int rc = -1, version;
|
||||
char **toks;
|
||||
struct ldap_searchobj *prevso, *so;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#ifdef THINK_C
|
||||
#include <console.h>
|
||||
#include <unix.h>
|
||||
|
|
@ -287,7 +288,7 @@ main(
|
|||
#endif /* WINSOCK */
|
||||
int argc, char **argv )
|
||||
{
|
||||
LDAP *ld;
|
||||
LDAP *ld = NULL;
|
||||
int i, c, port, cldapflg, errflg, method, id, msgtype;
|
||||
char line[256], command1, command2, command3;
|
||||
char passwd[64], dn[256], rdn[64], attr[64], value[256];
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
|
|
@ -989,7 +990,7 @@ searchaction( LDAP *ld, char *buf, char *base, LDAPMessage *entry, char *dn,
|
|||
struct ldap_tmplitem *tip, int labelwidth, int rdncount,
|
||||
writeptype writeproc, void *writeparm, char *eol, char *urlprefix )
|
||||
{
|
||||
int err, lderr, i, count, html;
|
||||
int err = 0, lderr, i, count, html;
|
||||
char **vals, **members;
|
||||
char *value, *filtpattern, *attr, *selectname;
|
||||
char *retattrs[2], filter[ 256 ];
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include <console.h>
|
||||
#endif /* MACOS */
|
||||
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
#include "disptmpl.h"
|
||||
#include "srchpref.h"
|
||||
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
#include <console.h>
|
||||
#endif /* MACOS */
|
||||
|
||||
#ifdef NEEDPROTOS
|
||||
void dump_tmpl( struct ldap_disptmpl *tmpl );
|
||||
void dump_srchpref( struct ldap_searchobj *sp );
|
||||
|
|
@ -18,10 +19,8 @@ void dump_tmpl();
|
|||
void dump_srchpref();
|
||||
#endif /* NEEDPROTOS */
|
||||
|
||||
|
||||
#define NULLSTRINGIFNULL( s ) ( s == NULL ? "(null)" : s )
|
||||
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
#if defined( DOS ) || defined( _WIN32 )
|
||||
|
|
@ -85,9 +85,9 @@ ldap_ufn_search_ctx( LDAP *ld, char **ufncomp, int ncomp, char *prefix,
|
|||
char **attrs, int attrsonly, LDAPMessage **res, cancelptype cancelproc,
|
||||
void *cancelparm, char *tag1, char *tag2, char *tag3 )
|
||||
{
|
||||
char *dn, *ftag;
|
||||
char **dns;
|
||||
int max, i, err, scope, phase, tries;
|
||||
char *dn, *ftag = NULL;
|
||||
char **dns = NULL;
|
||||
int max, i, err, scope = 0, phase, tries;
|
||||
LDAPFiltInfo *fi;
|
||||
LDAPMessage *tmpcand;
|
||||
LDAPMessage *candidates;
|
||||
|
|
@ -242,7 +242,7 @@ ldap_ufn_search_ct( LDAP *ld, char *ufn, char **attrs, int attrsonly,
|
|||
{
|
||||
char **ufncomp, **prefixcomp;
|
||||
char *pbuf;
|
||||
int ncomp, pcomp, i, err;
|
||||
int ncomp, pcomp, i, err = 0;
|
||||
|
||||
/* initialize the getfilter stuff if it's not already */
|
||||
if ( ld->ld_filtd == NULL && ldap_ufn_setfilter( ld, FILTERFILE )
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include "macos.h"
|
||||
#else /* MACOS */
|
||||
#if defined( DOS ) || defined( _WIN32 )
|
||||
|
|
|
|||
|
|
@ -24,14 +24,13 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#include <stdlib.h>
|
||||
#include "macos.h"
|
||||
#endif /* MACOS */
|
||||
|
||||
#if defined( DOS ) || defined( _WIN32 )
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include "msdos.h"
|
||||
#endif /* DOS || _WIN32 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue