mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-13 14:27:59 +08:00
Generate ldaptclerr.h correctly.
This commit is contained in:
parent
d879fb351b
commit
1042e3f04c
@ -11,14 +11,20 @@ proc genstrings {path} {
|
||||
puts -nonewline "char *ldaptclerrorcode\[\] = {
|
||||
NULL"
|
||||
while {[gets $fp line] != -1} {
|
||||
#puts stderr $line
|
||||
puts stderr $line
|
||||
if {[clength $line] == 0 || [ctype space $line]} continue
|
||||
if {![string match #define* $line]} break
|
||||
if {[string match *typedef* $line]} break
|
||||
if {![string match #define* $line]} continue
|
||||
if {![string match "#define LDAP_*" $line]} continue
|
||||
if {[string match "*LDAP_RANGE*" $line]} continue
|
||||
if {[string match "*LDAP_API_RESULT*" $line]} continue
|
||||
if {[string match {*\\} $line]} {
|
||||
append line [gets $fp]
|
||||
}
|
||||
lassign $line define macro value
|
||||
set ldap_errcode($macro) $value
|
||||
}
|
||||
#parray ldap_errcode
|
||||
foreach i [array names ldap_errcode] {
|
||||
set value $ldap_errcode($i)
|
||||
#puts stderr "checking $value"
|
||||
|
Loading…
x
Reference in New Issue
Block a user