Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
67583f45
Commit
67583f45
authored
Jan 24, 2005
by
Howard Chu
Browse files
Added ldif_countlines()
parent
8fd686ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ldif.h
View file @
67583f45
...
...
@@ -75,6 +75,9 @@ ldif_fetch_url LDAP_P((
LDAP_LDIF_F
(
char
*
)
ldif_getline
LDAP_P
((
char
**
next
));
LDAP_LDIF_F
(
int
)
ldif_countlines
LDAP_P
((
LDAP_CONST
char
*
line
));
LDAP_LDIF_F
(
int
)
ldif_read_record
LDAP_P
((
FILE
*
fp
,
...
...
libraries/liblutil/ldif.c
View file @
67583f45
...
...
@@ -308,6 +308,21 @@ ldif_parse_line2(
* which it updates and must be supplied on subsequent calls.
*/
int
ldif_countlines
(
LDAP_CONST
char
*
buf
)
{
char
*
nl
;
int
ret
=
0
;
if
(
!
buf
)
return
ret
;
for
(
nl
=
strchr
(
buf
,
'\n'
);
nl
;
nl
=
strchr
(
nl
,
'\n'
)
)
{
nl
++
;
if
(
*
nl
!=
' '
)
ret
++
;
}
return
ret
;
}
char
*
ldif_getline
(
char
**
next
)
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment