liquid_feedback_frontend
diff lib/mldap/convert_errorcodes.lua @ 1071:58f48a8a202a
Imported and merged LDAP patch
author | bsw |
---|---|
date | Fri Jul 18 21:42:59 2014 +0200 (2014-07-18) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/lib/mldap/convert_errorcodes.lua Fri Jul 18 21:42:59 2014 +0200 1.3 @@ -0,0 +1,7 @@ 1.4 +#!/usr/bin/env lua 1.5 +for line in io.lines() do 1.6 + local ident, code = line:match("^#define[ \t]+LDAP_([A-Z][A-Z_]*)[ \t]+([^ \t/]+)") 1.7 + if ident then 1.8 + io.stdout:write(' {"', ident:lower(), '", ', tonumber(code) or code, '},\n') 1.9 + end 1.10 +end