Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
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
openldap
OpenLDAP
Commits
f704f1c4
Commit
f704f1c4
authored
25 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
(barely) hide AVL internals
parent
322bb86f
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
+6
-2
6 additions, 2 deletions
include/avl.h
libraries/libavl/avl.c
+1
-0
1 addition, 0 deletions
libraries/libavl/avl.c
libraries/libavl/testavl.c
+3
-2
3 additions, 2 deletions
libraries/libavl/testavl.c
with
10 additions
and
4 deletions
include/avl.h
+
6
−
2
View file @
f704f1c4
...
...
@@ -32,12 +32,15 @@
LDAP_BEGIN_DECL
typedef
struct
avlnode
{
typedef
struct
avlnode
Avlnode
;
#ifdef AVL_INTERNAL
struct
avlnode
{
void
*
avl_data
;
signed
char
avl_bf
;
struct
avlnode
*
avl_left
;
struct
avlnode
*
avl_right
;
}
Avlnode
;
};
#define NULLAVL ((Avlnode *) NULL)
...
...
@@ -45,6 +48,7 @@ typedef struct avlnode {
#define LH (-1)
#define EH 0
#define RH 1
#endif
/* avl routines */
#define avl_getone(x) ((x) == 0 ? 0 : (x)->avl_data)
...
...
This diff is collapsed.
Click to expand it.
libraries/libavl/avl.c
+
1
−
0
View file @
f704f1c4
...
...
@@ -21,6 +21,7 @@ static char avl_version[] = "AVL library version 1.0\n";
#include
<stdio.h>
#include
<stdlib.h>
#define AVL_INTERNAL
#include
"avl.h"
#define ROTATERIGHT(x) { \
...
...
This diff is collapsed.
Click to expand it.
libraries/libavl/testavl.c
+
3
−
2
View file @
f704f1c4
...
...
@@ -7,6 +7,7 @@
#include
<ac/string.h>
#define AVL_INTERNAL
#define AVL_NONREENTRANT
#include
"avl.h"
...
...
@@ -16,7 +17,7 @@ static void myprint LDAP_P(( Avlnode *root ));
int
main
(
int
argc
,
char
**
argv
)
{
Avlnode
*
tree
=
NULL
AVL
;
Avlnode
*
tree
=
NULL
;
char
command
[
10
];
char
name
[
80
];
char
*
p
;
...
...
@@ -26,7 +27,7 @@ main( int argc, char **argv )
switch
(
*
command
)
{
case
'n'
:
/* new tree */
(
void
)
avl_free
(
tree
,
(
AVL_FREE
)
free
);
tree
=
NULL
AVL
;
tree
=
NULL
;
break
;
case
'p'
:
/* print */
(
void
)
myprint
(
tree
);
...
...
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