diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch) | |
tree | 5ac38a06f3dde268dc7927dc155896926aaf7012 /kate/data/list-keywords-ldif.awk | |
download | tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/data/list-keywords-ldif.awk')
-rw-r--r-- | kate/data/list-keywords-ldif.awk | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/kate/data/list-keywords-ldif.awk b/kate/data/list-keywords-ldif.awk new file mode 100644 index 000000000..fc693c3c3 --- /dev/null +++ b/kate/data/list-keywords-ldif.awk @@ -0,0 +1,38 @@ +#!/bin/awk -f + +function printName (name) +{ + if ((name != "") && (name != "(") && (name != ")")) print type, name; +} + +function printNames (str) +{ + s = substr(str,index(str,"NAME")+4); + split (s, a, " "); +# for (i=0; i<length(a); i++) { +# print type,a[i] +# } + # ATTENTION: The loop above does not work for some strange reason. + # The following statements imitate it for a limited amount of elements. + # If you happen to have more then the ones given here, you have to extend it! + printName(a[0]); + printName(a[1]); + printName(a[2]); + printName(a[3]); +} + +BEGIN { + type=""; +} + +/attributetype/ { + type="attributetype"; +} + +/objectclass/ { + type="objectclass"; +} + +/ NAME / { + printNames($0); +} |