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
4046c422
Commit
4046c422
authored
22 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
add upper/lower funcs that also compute the length of the string (not used yet)
parent
b3ddb573
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/ldap_pvt.h
+6
-0
6 additions, 0 deletions
include/ldap_pvt.h
libraries/libldap/string.c
+40
-0
40 additions, 0 deletions
libraries/libldap/string.c
with
46 additions
and
0 deletions
include/ldap_pvt.h
+
6
−
0
View file @
4046c422
...
...
@@ -162,6 +162,12 @@ ldap_pvt_str2upper LDAP_P(( char *str ));
LDAP_F
(
char
*
)
ldap_pvt_str2lower
LDAP_P
((
char
*
str
));
LDAP_F
(
struct
berval
*
)
ldap_pvt_str2upperbv
LDAP_P
((
char
*
str
,
struct
berval
*
bv
));
LDAP_F
(
struct
berval
*
)
ldap_pvt_str2lowerbv
LDAP_P
((
char
*
str
,
struct
berval
*
bv
));
/* tls.c */
LDAP_F
(
int
)
ldap_int_tls_config
LDAP_P
((
struct
ldap
*
ld
,
int
option
,
const
char
*
arg
));
...
...
This diff is collapsed.
Click to expand it.
libraries/libldap/string.c
+
40
−
0
View file @
4046c422
...
...
@@ -112,6 +112,26 @@ ldap_pvt_str2upper( char *str )
return
(
str
);
}
struct
berval
*
ldap_pvt_str2upperbv
(
char
*
str
,
struct
berval
*
bv
)
{
char
*
s
=
NULL
;
assert
(
bv
);
/* to upper */
if
(
str
)
{
for
(
s
=
str
;
*
s
;
s
++
)
{
*
s
=
TOUPPER
(
(
unsigned
char
)
*
s
);
}
}
bv
->
bv_val
=
str
;
bv
->
bv_len
=
(
ber_len_t
)(
s
-
str
);
return
(
bv
);
}
char
*
ldap_pvt_str2lower
(
char
*
str
)
{
...
...
@@ -126,3 +146,23 @@ ldap_pvt_str2lower( char *str )
return
(
str
);
}
struct
berval
*
ldap_pvt_str2lowerbv
(
char
*
str
,
struct
berval
*
bv
)
{
char
*
s
=
NULL
;
assert
(
bv
);
/* to lower */
if
(
str
)
{
for
(
s
=
str
;
*
s
;
s
++
)
{
*
s
=
TOLOWER
(
(
unsigned
char
)
*
s
);
}
}
bv
->
bv_val
=
str
;
bv
->
bv_len
=
(
ber_len_t
)(
s
-
str
);
return
(
bv
);
}
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