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
3cfb6b3b
Commit
3cfb6b3b
authored
Jun 22, 2000
by
Randy Kunkee
Browse files
Correctly parse v2 OpenLDAP ldap.h.
parent
c6ad81bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
contrib/ldaptcl/ldaperr.tcl
View file @
3cfb6b3b
...
...
@@ -10,18 +10,34 @@ proc genstrings {path} {
puts
"/* This file automatically generated, hand edit at your own risk! */"
puts -nonewline
"char *ldaptclerrorcode
\[\]
= {
NULL"
set lasterr 0
while
{[
gets $fp line
]
!= -1
}
{
#puts stderr $line
if
{[
clength $line
]
== 0 ||
[
ctype space $line
]}
continue
if
{
!
[
string match #define* $line
]}
break
if
{
!
[
string match
"#define LDAP_*"
$line
]}
continue
if
{[
string match
"*LDAP_RANGE*"
$line
]}
continue
lassign $line define macro value
set ldap_errcode
(
$macro
)
$value
}
foreach i
[
array names ldap_errcode
]
{
set value $ldap_errcode
(
$i
)
#puts stderr
"checking
$value
"
if
[
regexp
{
^
[
A-Z_
]}
$value
]
{
if
[
info exists ldap_errcode
(
$value
)]
{
set value $ldap_errcode
(
$value
)
set ldap_errcode
(
$i
)
$value
}
}
set ldap_errname
(
$value
)
$i
}
set lasterr 0
foreach value
[
lsort -integer
[
array names ldap_errname
]]
{
incr lasterr
while
{
$lasterr
< $value
}
{
puts -nonewline
",
\n\t
NULL"
incr lasterr
}
puts -nonewline
",
\n\t\"
$
macro
\"
"
puts -nonewline
",
\n\t\"
$
ldap
_errname(
$value
)
\"
"
}
puts
"
\n
};"
puts
"#define LDAPTCL_MAXERR
\t
$value
"
...
...
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