Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
322bb86f
Commit
322bb86f
authored
25 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
#ifdef out non-reentrant prototypes.
Only testavl uses this interface.
parent
a641a926
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/avl.h
+1
-5
1 addition, 5 deletions
include/avl.h
libraries/libavl/avl.c
+5
-0
5 additions, 0 deletions
libraries/libavl/avl.c
libraries/libavl/testavl.c
+7
-1
7 additions, 1 deletion
libraries/libavl/testavl.c
with
13 additions
and
6 deletions
include/avl.h
+
1
−
5
View file @
322bb86f
...
@@ -70,14 +70,10 @@ avl_find LDAP_P((Avlnode *, void*, AVL_CMP));
...
@@ -70,14 +70,10 @@ avl_find LDAP_P((Avlnode *, void*, AVL_CMP));
LDAP_F
(
void
*
)
LDAP_F
(
void
*
)
avl_find_lin
LDAP_P
((
Avlnode
*
,
void
*
,
AVL_CMP
));
avl_find_lin
LDAP_P
((
Avlnode
*
,
void
*
,
AVL_CMP
));
#ifdef AVL_NONREENTRANT
LDAP_F
(
void
*
)
LDAP_F
(
void
*
)
avl_getfirst
LDAP_P
((
Avlnode
*
));
avl_getfirst
LDAP_P
((
Avlnode
*
));
#ifdef AVL_REENTRANT
/* ??? avl.c does not provide this version ??? */
LDAP_F
(
void
*
)
avl_getnext
LDAP_P
((
Avlnode
*
,
void
*
));
#else
LDAP_F
(
void
*
)
LDAP_F
(
void
*
)
avl_getnext
LDAP_P
((
void
));
avl_getnext
LDAP_P
((
void
));
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
libraries/libavl/avl.c
+
5
−
0
View file @
322bb86f
...
@@ -664,6 +664,8 @@ avl_find_lin( Avlnode *root, void* data, AVL_CMP fcmp )
...
@@ -664,6 +664,8 @@ avl_find_lin( Avlnode *root, void* data, AVL_CMP fcmp )
return
(
avl_find_lin
(
root
->
avl_right
,
data
,
fcmp
)
);
return
(
avl_find_lin
(
root
->
avl_right
,
data
,
fcmp
)
);
}
}
/* NON-REENTRANT INTERFACE */
static
void
*
*
avl_list
;
static
void
*
*
avl_list
;
static
int
avl_maxlist
;
static
int
avl_maxlist
;
static
int
avl_nextlist
;
static
int
avl_nextlist
;
...
@@ -736,6 +738,9 @@ avl_getnext( void )
...
@@ -736,6 +738,9 @@ avl_getnext( void )
return
(
avl_list
[
avl_nextlist
++
]
);
return
(
avl_list
[
avl_nextlist
++
]
);
}
}
/* end non-reentrant code */
int
int
avl_dup_error
(
void
*
left
,
void
*
right
)
avl_dup_error
(
void
*
left
,
void
*
right
)
{
{
...
...
This diff is collapsed.
Click to expand it.
libraries/libavl/testavl.c
+
7
−
1
View file @
322bb86f
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include
<ac/string.h>
#include
<ac/string.h>
#define AVL_NONREENTRANT
#include
"avl.h"
#include
"avl.h"
static
void
ravl_print
LDAP_P
((
Avlnode
*
root
,
int
depth
));
static
void
ravl_print
LDAP_P
((
Avlnode
*
root
,
int
depth
));
...
@@ -31,11 +32,16 @@ main( int argc, char **argv )
...
@@ -31,11 +32,16 @@ main( int argc, char **argv )
(
void
)
myprint
(
tree
);
(
void
)
myprint
(
tree
);
break
;
break
;
case
't'
:
/* traverse with first, next */
case
't'
:
/* traverse with first, next */
#ifdef AVL_NONREENTRANT
printf
(
"***
\n
"
);
printf
(
"***
\n
"
);
for
(
p
=
(
char
*
)
avl_getfirst
(
tree
);
for
(
p
=
(
char
*
)
avl_getfirst
(
tree
);
p
!=
NULL
;
p
=
(
char
*
)
avl_getnext
(
/* tree, p */
)
)
p
!=
NULL
;
p
=
(
char
*
)
avl_getnext
())
printf
(
"%s
\n
"
,
p
);
printf
(
"%s
\n
"
,
p
);
printf
(
"***
\n
"
);
printf
(
"***
\n
"
);
#else
printf
(
"*** reentrant interface not implemented ***"
);
#endif
break
;
break
;
case
'f'
:
/* find */
case
'f'
:
/* find */
printf
(
"data? "
);
printf
(
"data? "
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment