From 1042e3f04ceda5e36a6cc1a9807798ee11cac2e7 Mon Sep 17 00:00:00 2001 From: Randy Kunkee Date: Thu, 2 May 2002 08:11:41 +0000 Subject: [PATCH] Generate ldaptclerr.h correctly. --- contrib/ldaptcl/ldaperr.tcl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/contrib/ldaptcl/ldaperr.tcl b/contrib/ldaptcl/ldaperr.tcl index ef77d7f736..84bba4e440 100644 --- a/contrib/ldaptcl/ldaperr.tcl +++ b/contrib/ldaptcl/ldaperr.tcl @@ -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" -- 2.39.5