From 7c28cbdd07c7dcbb90f579d0c53f3e692b4563b2 Mon Sep 17 00:00:00 2001
From: "(no author)" <(no author)@18797224-902f-48f8-a5cc-f745e15eee43>
Date: Mon, 22 Oct 2001 21:52:22 +0000
Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'pwd'.
git-svn-id: svn://10.0.0.236/tags/pwd@105972 18797224-902f-48f8-a5cc-f745e15eee43
---
mozilla/directory/Makefile | 196 --
mozilla/directory/c-sdk/build.mk | 489 ----
mozilla/directory/c-sdk/config/AIX.mk | 175 --
mozilla/directory/c-sdk/config/BSD_OS.mk | 91 -
mozilla/directory/c-sdk/config/BeOS.mk | 138 --
mozilla/directory/c-sdk/config/DGUX.mk | 63 -
mozilla/directory/c-sdk/config/FreeBSD.mk | 82 -
mozilla/directory/c-sdk/config/HP-UX.mk | 211 --
mozilla/directory/c-sdk/config/IRIX.mk | 158 --
mozilla/directory/c-sdk/config/Linux.mk | 133 -
mozilla/directory/c-sdk/config/Makefile | 137 --
mozilla/directory/c-sdk/config/Makefile.in | 129 -
mozilla/directory/c-sdk/config/NCR.mk | 97 -
mozilla/directory/c-sdk/config/NEC.mk | 61 -
mozilla/directory/c-sdk/config/NEWS-OS.mk | 74 -
mozilla/directory/c-sdk/config/NEXTSTEP.mk | 68 -
mozilla/directory/c-sdk/config/NTO.mk | 90 -
mozilla/directory/c-sdk/config/NetBSD.mk | 82 -
mozilla/directory/c-sdk/config/OS2.mk | 170 --
mozilla/directory/c-sdk/config/OSF1.mk | 131 -
mozilla/directory/c-sdk/config/OpenBSD.mk | 78 -
mozilla/directory/c-sdk/config/OpenVMS.mk | 67 -
mozilla/directory/c-sdk/config/QNX.mk | 57 -
mozilla/directory/c-sdk/config/README | 9 -
mozilla/directory/c-sdk/config/Rhapsody.mk | 83 -
mozilla/directory/c-sdk/config/SCOOS.mk | 63 -
mozilla/directory/c-sdk/config/SINIX.mk | 108 -
mozilla/directory/c-sdk/config/SunOS.mk | 42 -
mozilla/directory/c-sdk/config/SunOS4.mk | 68 -
.../directory/c-sdk/config/SunOS5.8_i86pc.mk | 48 -
mozilla/directory/c-sdk/config/SunOS5.9.mk | 44 -
.../directory/c-sdk/config/SunOS5.9_i86pc.mk | 48 -
mozilla/directory/c-sdk/config/SunOS5.mk | 214 --
mozilla/directory/c-sdk/config/UNIX.mk | 91 -
mozilla/directory/c-sdk/config/UNIXWARE.mk | 71 -
mozilla/directory/c-sdk/config/WIN32.mk | 175 --
mozilla/directory/c-sdk/config/WIN95.mk | 38 -
mozilla/directory/c-sdk/config/WINNT.mk | 38 -
mozilla/directory/c-sdk/config/arch.mk | 295 ---
mozilla/directory/c-sdk/config/autoconf.mk.in | 67 -
mozilla/directory/c-sdk/config/config.mk | 233 --
mozilla/directory/c-sdk/config/libc_r.h | 155 --
mozilla/directory/c-sdk/config/module.df | 40 -
mozilla/directory/c-sdk/config/nfspwd | 46 -
mozilla/directory/c-sdk/config/nfspwd.pl | 46 -
mozilla/directory/c-sdk/config/now.c | 129 -
mozilla/directory/c-sdk/config/nsinstall.c | 592 -----
mozilla/directory/c-sdk/config/nsprincl.mk.in | 5 -
mozilla/directory/c-sdk/config/nsprincl.sh.in | 5 -
mozilla/directory/c-sdk/config/pathsub.h | 75 -
mozilla/directory/c-sdk/config/prdepend.h | 42 -
mozilla/directory/c-sdk/config/prmkdir.bat | 18 -
mozilla/directory/c-sdk/config/rules.mk | 480 ----
mozilla/directory/c-sdk/config/win16.mk | 115 -
mozilla/directory/c-sdk/ldap/Makefile.client | 62 -
mozilla/directory/c-sdk/ldap/Makefile.in | 35 -
mozilla/directory/c-sdk/ldap/README.configure | 31 -
.../c-sdk/ldap/build/Makefile.client | 57 -
.../directory/c-sdk/ldap/build/Makefile.in | 29 -
.../directory/c-sdk/ldap/build/autoconf.mk.in | 57 -
mozilla/directory/c-sdk/ldap/build/compver.sh | 60 -
mozilla/directory/c-sdk/ldap/build/dirver.c | 236 --
.../directory/c-sdk/ldap/build/genexports.pl | 211 --
.../c-sdk/ldap/build/my_overrides.mk | 23 -
mozilla/directory/c-sdk/ldap/build/nsftp.sh | 38 -
mozilla/directory/c-sdk/ldap/build/replace.pl | 37 -
.../c-sdk/ldap/clients/tools/Makefile | 467 ----
.../c-sdk/ldap/clients/tools/Makefile.client | 363 ---
.../c-sdk/ldap/clients/tools/Options.txt | 59 -
.../c-sdk/ldap/clients/tools/argpin.c | 147 --
.../c-sdk/ldap/clients/tools/argpin.h | 36 -
.../c-sdk/ldap/clients/tools/common.c | 2185 ----------------
.../c-sdk/ldap/clients/tools/convutf8.cpp | 598 -----
.../tools/examples-from-ldif-spec.ldif | 181 --
.../c-sdk/ldap/clients/tools/fileurl.c | 488 ----
.../c-sdk/ldap/clients/tools/fileurl.h | 84 -
.../c-sdk/ldap/clients/tools/ldapcmp.c | 603 -----
.../c-sdk/ldap/clients/tools/ldapcompare.c | 215 --
.../c-sdk/ldap/clients/tools/ldapdelete.c | 142 --
.../c-sdk/ldap/clients/tools/ldapmodify.c | 1027 --------
.../c-sdk/ldap/clients/tools/ldapmodrdn.c | 172 --
.../c-sdk/ldap/clients/tools/ldapsearch.c | 1185 ---------
.../c-sdk/ldap/clients/tools/ldaptool.h | 179 --
.../c-sdk/ldap/clients/tools/ntuserpin.c | 115 -
.../c-sdk/ldap/clients/tools/ntuserpin.h | 43 -
.../c-sdk/ldap/clients/tools/tools.mak | 1812 --------------
mozilla/directory/c-sdk/ldap/configure | 798 ------
mozilla/directory/c-sdk/ldap/configure.in | 50 -
mozilla/directory/c-sdk/ldap/docs/README | 17 -
mozilla/directory/c-sdk/ldap/docs/redist.txt | 43 -
mozilla/directory/c-sdk/ldap/docs/release.gif | Bin 2508 -> 0 bytes
.../directory/c-sdk/ldap/docs/relnotes_41.htm | 500 ----
.../directory/c-sdk/ldap/docs/relnotes_5x.htm | 245 --
.../directory/c-sdk/ldap/examples/Makefile | 282 ---
mozilla/directory/c-sdk/ldap/examples/README | 132 -
mozilla/directory/c-sdk/ldap/examples/add.c | 175 --
.../directory/c-sdk/ldap/examples/asearch.c | 151 --
.../directory/c-sdk/ldap/examples/compare.c | 84 -
.../directory/c-sdk/ldap/examples/crtfilt.c | 170 --
.../directory/c-sdk/ldap/examples/csearch.c | 136 -
mozilla/directory/c-sdk/ldap/examples/del.c | 112 -
.../directory/c-sdk/ldap/examples/examples.h | 107 -
.../directory/c-sdk/ldap/examples/getattrs.c | 90 -
.../directory/c-sdk/ldap/examples/getfilt.c | 124 -
.../examples/macintosh/asearch (2i).68k.u | Bin 15329 -> 0 bytes
.../examples/macintosh/asearch (4i).68k.u | Bin 15329 -> 0 bytes
.../ldap/examples/macintosh/asearch PPC.u | Bin 32115 -> 0 bytes
.../directory/c-sdk/ldap/examples/modattrs.c | 81 -
.../directory/c-sdk/ldap/examples/modrdn.c | 167 --
.../directory/c-sdk/ldap/examples/nsprio.c | 168 --
.../directory/c-sdk/ldap/examples/ppolicy.c | 210 --
.../directory/c-sdk/ldap/examples/psearch.c | 212 --
.../directory/c-sdk/ldap/examples/rdentry.c | 82 -
.../directory/c-sdk/ldap/examples/search.c | 87 -
.../directory/c-sdk/ldap/examples/srvrsort.c | 164 --
.../directory/c-sdk/ldap/examples/ssearch.c | 121 -
.../directory/c-sdk/ldap/examples/ssnoauth.c | 99 -
.../directory/c-sdk/ldap/examples/win32.mak | 145 --
.../ldap/examples/windows/winldap/ConnDlg.cpp | 46 -
.../ldap/examples/windows/winldap/ConnDlg.h | 36 -
.../ldap/examples/windows/winldap/LDAP16.DEF | 8 -
.../ldap/examples/windows/winldap/LDAP16.MAK | 186 --
.../ldap/examples/windows/winldap/LDAP16.RC | 241 --
.../ldap/examples/windows/winldap/LdapDoc.cpp | 76 -
.../ldap/examples/windows/winldap/LdapDoc.h | 42 -
.../examples/windows/winldap/LdapView.cpp | 190 --
.../ldap/examples/windows/winldap/LdapView.h | 60 -
.../ldap/examples/windows/winldap/MainFrm.cpp | 85 -
.../ldap/examples/windows/winldap/MainFrm.h | 43 -
.../ldap/examples/windows/winldap/PropDlg.cpp | 78 -
.../ldap/examples/windows/winldap/PropDlg.h | 45 -
.../ldap/examples/windows/winldap/Resource.h | 32 -
.../ldap/examples/windows/winldap/SrchDlg.cpp | 89 -
.../ldap/examples/windows/winldap/SrchDlg.h | 47 -
.../ldap/examples/windows/winldap/StdAfx.cpp | 6 -
.../ldap/examples/windows/winldap/StdAfx.h | 18 -
.../examples/windows/winldap/res/LdapDoc.ico | Bin 1078 -> 0 bytes
.../examples/windows/winldap/res/Toolbar.bmp | Bin 1078 -> 0 bytes
.../examples/windows/winldap/res/winldap.ico | Bin 1078 -> 0 bytes
.../examples/windows/winldap/res/winldap.rc2 | 13 -
.../ldap/examples/windows/winldap/winldap.cpp | 299 ---
.../ldap/examples/windows/winldap/winldap.h | 61 -
.../ldap/examples/windows/winldap/winldap.mak | 404 ---
.../ldap/examples/windows/winldap/winldap.rc | 406 ---
.../c-sdk/ldap/examples/xmplflt.conf | 43 -
mozilla/directory/c-sdk/ldap/include/MANIFEST | 4 -
.../c-sdk/ldap/include/Makefile.client | 96 -
.../directory/c-sdk/ldap/include/Makefile.in | 51 -
mozilla/directory/c-sdk/ldap/include/avl.h | 84 -
.../directory/c-sdk/ldap/include/dblayer.h | 23 -
.../directory/c-sdk/ldap/include/disptmpl.h | 364 ---
mozilla/directory/c-sdk/ldap/include/iutil.h | 57 -
mozilla/directory/c-sdk/ldap/include/lber.h | 310 ---
mozilla/directory/c-sdk/ldap/include/lcache.h | 79 -
.../c-sdk/ldap/include/ldap-deprecated.h | 186 --
.../c-sdk/ldap/include/ldap-extension.h | 654 -----
.../c-sdk/ldap/include/ldap-platform.h | 74 -
.../c-sdk/ldap/include/ldap-standard-tmpl.h | 438 ----
.../ldap/include/ldap-to-be-deprecated.h | 175 --
mozilla/directory/c-sdk/ldap/include/ldap.h | 47 -
.../directory/c-sdk/ldap/include/ldap_ssl.h | 131 -
.../directory/c-sdk/ldap/include/ldaplog.h | 90 -
mozilla/directory/c-sdk/ldap/include/ldappr.h | 170 --
.../directory/c-sdk/ldap/include/ldaprot.h | 180 --
mozilla/directory/c-sdk/ldap/include/ldbm.h | 384 ---
mozilla/directory/c-sdk/ldap/include/ldif.h | 92 -
.../directory/c-sdk/ldap/include/lthread.h | 440 ----
.../c-sdk/ldap/include/ntslapdregparms.h | 57 -
.../directory/c-sdk/ldap/include/ntwatchdog.h | 75 -
.../directory/c-sdk/ldap/include/portable.h | 420 ----
.../c-sdk/ldap/include/proto-ntutil.h | 84 -
mozilla/directory/c-sdk/ldap/include/regex.h | 80 -
.../directory/c-sdk/ldap/include/srchpref.h | 139 --
.../c-sdk/ldap/include/sysexit-compat.h | 124 -
.../c-sdk/ldap/libraries/Makefile.client | 59 -
.../c-sdk/ldap/libraries/Makefile.in | 34 -
.../c-sdk/ldap/libraries/genMakefile.client | 128 -
.../c-sdk/ldap/libraries/libiutil/Makefile | 46 -
.../ldap/libraries/libiutil/Makefile.client | 103 -
.../c-sdk/ldap/libraries/libiutil/README | 3 -
.../ldap/libraries/libiutil/iutil-lock.c | 88 -
.../ldap/libraries/liblber/Makefile.client | 97 -
.../c-sdk/ldap/libraries/liblber/Makefile.in | 80 -
.../c-sdk/ldap/libraries/liblber/bprint.c | 87 -
.../c-sdk/ldap/libraries/liblber/decode.c | 759 ------
.../c-sdk/ldap/libraries/liblber/dtest.c | 98 -
.../c-sdk/ldap/libraries/liblber/encode.c | 668 -----
.../c-sdk/ldap/libraries/liblber/etest.c | 178 --
.../c-sdk/ldap/libraries/liblber/idtest.c | 85 -
.../c-sdk/ldap/libraries/liblber/io.c | 1484 -----------
.../c-sdk/ldap/libraries/liblber/lber-int.h | 306 ---
.../directory/c-sdk/ldap/libraries/libldap.ex | 271 --
.../ldap/libraries/libldap/Makefile.client | 266 --
.../c-sdk/ldap/libraries/libldap/Makefile.in | 160 --
.../c-sdk/ldap/libraries/libldap/abandon.c | 271 --
.../c-sdk/ldap/libraries/libldap/add.c | 210 --
.../c-sdk/ldap/libraries/libldap/bind.c | 155 --
.../c-sdk/ldap/libraries/libldap/cache.c | 130 -
.../c-sdk/ldap/libraries/libldap/charray.c | 230 --
.../c-sdk/ldap/libraries/libldap/charset.c | 1830 --------------
.../c-sdk/ldap/libraries/libldap/cldap.c | 569 -----
.../c-sdk/ldap/libraries/libldap/compare.c | 179 --
.../c-sdk/ldap/libraries/libldap/compat.c | 71 -
.../c-sdk/ldap/libraries/libldap/control.c | 493 ----
.../ldap/libraries/libldap/countvalues.c | 52 -
.../c-sdk/ldap/libraries/libldap/delete.c | 154 --
.../c-sdk/ldap/libraries/libldap/disptmpl.c | 757 ------
.../c-sdk/ldap/libraries/libldap/dllmain.c | 163 --
.../c-sdk/ldap/libraries/libldap/dsparse.c | 212 --
.../c-sdk/ldap/libraries/libldap/error.c | 462 ----
.../c-sdk/ldap/libraries/libldap/extendop.c | 250 --
.../c-sdk/ldap/libraries/libldap/free.c | 138 --
.../c-sdk/ldap/libraries/libldap/freevalues.c | 58 -
.../c-sdk/ldap/libraries/libldap/friendly.c | 136 -
.../c-sdk/ldap/libraries/libldap/getattr.c | 135 -
.../c-sdk/ldap/libraries/libldap/getdn.c | 349 ---
.../ldap/libraries/libldap/getdxbyname.c | 250 --
.../c-sdk/ldap/libraries/libldap/getentry.c | 126 -
.../c-sdk/ldap/libraries/libldap/getfilter.c | 536 ----
.../c-sdk/ldap/libraries/libldap/getoption.c | 381 ---
.../c-sdk/ldap/libraries/libldap/getvalues.c | 465 ----
.../c-sdk/ldap/libraries/libldap/globals.c | 33 -
.../c-sdk/ldap/libraries/libldap/ldap-int.h | 807 ------
.../ldap/libraries/libldap/ldapfilter.conf | 105 -
.../c-sdk/ldap/libraries/libldap/ldapfriendly | 242 --
.../libraries/libldap/ldapsearchprefs.conf | 153 --
.../ldap/libraries/libldap/ldaptemplates.conf | 677 -----
.../c-sdk/ldap/libraries/libldap/memcache.c | 2188 -----------------
.../c-sdk/ldap/libraries/libldap/message.c | 90 -
.../c-sdk/ldap/libraries/libldap/modify.c | 211 --
.../c-sdk/ldap/libraries/libldap/mozock.c | 694 ------
.../ldap/libraries/libldap/nsprthreadtest.c | 606 -----
.../c-sdk/ldap/libraries/libldap/open.c | 793 ------
.../c-sdk/ldap/libraries/libldap/os-ip.c | 1721 -------------
.../ldap/libraries/libldap/proxyauthctrl.c | 149 --
.../c-sdk/ldap/libraries/libldap/psearch.c | 174 --
.../ldap/libraries/libldap/pthreadtest.c | 1013 --------
.../c-sdk/ldap/libraries/libldap/referral.c | 162 --
.../c-sdk/ldap/libraries/libldap/regex.c | 905 -------
.../c-sdk/ldap/libraries/libldap/rename.c | 250 --
.../c-sdk/ldap/libraries/libldap/request.c | 1329 ----------
.../c-sdk/ldap/libraries/libldap/reslist.c | 63 -
.../c-sdk/ldap/libraries/libldap/result.c | 1443 -----------
.../c-sdk/ldap/libraries/libldap/saslbind.c | 276 ---
.../c-sdk/ldap/libraries/libldap/sbind.c | 262 --
.../c-sdk/ldap/libraries/libldap/search.c | 1007 --------
.../c-sdk/ldap/libraries/libldap/setoption.c | 320 ---
.../c-sdk/ldap/libraries/libldap/sort.c | 318 ---
.../c-sdk/ldap/libraries/libldap/sortctrl.c | 422 ----
.../c-sdk/ldap/libraries/libldap/srchpref.c | 421 ----
.../c-sdk/ldap/libraries/libldap/svrcore.c | 35 -
.../c-sdk/ldap/libraries/libldap/test.c | 1849 --------------
.../c-sdk/ldap/libraries/libldap/tmplout.c | 1129 ---------
.../c-sdk/ldap/libraries/libldap/tmpltest.c | 304 ---
.../c-sdk/ldap/libraries/libldap/ufn.c | 534 ----
.../c-sdk/ldap/libraries/libldap/unbind.c | 218 --
.../c-sdk/ldap/libraries/libldap/unescape.c | 66 -
.../c-sdk/ldap/libraries/libldap/url.c | 502 ----
.../c-sdk/ldap/libraries/libldap/utf8.c | 267 --
.../c-sdk/ldap/libraries/libldap/vlistctrl.c | 243 --
.../c-sdk/ldap/libraries/libldap_ssl.ex | 12 -
.../c-sdk/ldap/libraries/libldif/Makefile | 45 -
.../ldap/libraries/libldif/Makefile.client | 95 -
.../c-sdk/ldap/libraries/libldif/line64.c | 597 -----
.../ldap/libraries/libprldap/ldappr-error.c | 227 --
.../ldap/libraries/libprldap/ldappr-int.h | 97 -
.../ldap/libraries/libprldap/ldappr-io.c | 566 -----
.../ldap/libraries/libprldap/ldappr-public.c | 213 --
.../ldap/libraries/libprldap/ldappr-threads.c | 411 ----
.../ldap/libraries/libprldap/libprldap.ex | 6 -
.../c-sdk/ldap/libraries/libssldap/Makefile | 45 -
.../ldap/libraries/libssldap/Makefile.client | 177 --
.../ldap/libraries/libssldap/clientinit.c | 614 -----
.../c-sdk/ldap/libraries/libssldap/errormap.c | 207 --
.../ldap/libraries/libssldap/ldapsinit.c | 736 ------
.../ldap/libraries/libssldap/prerrstrs.h | 139 --
.../ldap/libraries/libssldap/secerrstrs.h | 392 ---
.../ldap/libraries/libssldap/sslerrstrs.h | 328 ---
.../c-sdk/ldap/libraries/libutil/Makefile | 71 -
.../ldap/libraries/libutil/Makefile.client | 96 -
.../c-sdk/ldap/libraries/libutil/getopt.c | 131 -
.../ldap/libraries/macintosh/LDAPClient.exp | 264 --
.../ldap/libraries/macintosh/LDAPClient.mcp | Bin 100197 -> 0 bytes
.../libraries/macintosh/LDAPClientDebugDefs.h | 44 -
.../ldap/libraries/macintosh/LDAPClientDefs.h | 43 -
.../c-sdk/ldap/libraries/macintosh/README | 67 -
.../c-sdk/ldap/libraries/macintosh/getopt.c | 125 -
.../ldap/libraries/macintosh/kerberos-macos.c | 98 -
.../libraries/macintosh/ldap-macos-defs.h | 28 -
.../ldap/libraries/macintosh/ldap-macos.h | 96 -
.../ldap/libraries/macintosh/libldap-PPC.r | 10 -
.../c-sdk/ldap/libraries/macintosh/macos-ip.c | 508 ----
.../c-sdk/ldap/libraries/macintosh/strings.c | 118 -
.../libraries/macintosh/tcp-univhdrs/tcp.c | 1018 --------
.../libraries/macintosh/tcp-univhdrs/tcp.h | 90 -
.../ldap/libraries/msdos/winsock/ldap32.def | 282 ---
.../ldap/libraries/msdos/winsock/ldap32.tdf | 9 -
.../ldap/libraries/msdos/winsock/ldapssl.def | 19 -
.../ldap/libraries/msdos/winsock/ldapssl.tdf | 3 -
.../ldap/libraries/msdos/winsock/libldap.def | 285 ---
.../ldap/libraries/msdos/winsock/libldap.rc | 53 -
.../ldap/libraries/msdos/winsock/libldap.tdf | 12 -
.../ldap/libraries/msdos/winsock/mozock.c | 670 -----
.../ldap/libraries/msdos/winsock/nslch32.tdf | 9 -
.../ldap/libraries/msdos/winsock/nsldap.def | 285 ---
.../ldap/libraries/msdos/winsock/nsldap.mak | 981 --------
.../ldap/libraries/msdos/winsock/nsldap.rc | 52 -
.../ldap/libraries/msdos/winsock/nsldap.tdf | 12 -
.../ldap/libraries/msdos/winsock/nsldap32.def | 282 ---
.../ldap/libraries/msdos/winsock/nsldap32.tdf | 9 -
.../libraries/msdos/winsock/nsldappr-incl.def | 13 -
.../libraries/msdos/winsock/nsldappr-incl.tdf | 3 -
.../libraries/msdos/winsock/nsldappr32.def | 19 -
.../libraries/msdos/winsock/nsldappr32.tdf | 9 -
.../libraries/msdos/winsock/nsldapssl32.def | 25 -
.../libraries/msdos/winsock/nsldapssl32.tdf | 9 -
.../libraries/msdos/winsock/nssldap32.def | 25 -
.../libraries/msdos/winsock/nssldap32.tdf | 9 -
mozilla/directory/c-sdk/makefile.win | 119 -
mozilla/directory/c-sdk/package.mk | 166 --
mozilla/directory/c-sdk/packageup.mk | 48 -
mozilla/directory/ldapsdk.mak | 204 --
mozilla/directory/ldapsdk.mk | 70 -
323 files changed, 76990 deletions(-)
delete mode 100644 mozilla/directory/Makefile
delete mode 100644 mozilla/directory/c-sdk/build.mk
delete mode 100644 mozilla/directory/c-sdk/config/AIX.mk
delete mode 100644 mozilla/directory/c-sdk/config/BSD_OS.mk
delete mode 100644 mozilla/directory/c-sdk/config/BeOS.mk
delete mode 100644 mozilla/directory/c-sdk/config/DGUX.mk
delete mode 100644 mozilla/directory/c-sdk/config/FreeBSD.mk
delete mode 100644 mozilla/directory/c-sdk/config/HP-UX.mk
delete mode 100644 mozilla/directory/c-sdk/config/IRIX.mk
delete mode 100644 mozilla/directory/c-sdk/config/Linux.mk
delete mode 100644 mozilla/directory/c-sdk/config/Makefile
delete mode 100644 mozilla/directory/c-sdk/config/Makefile.in
delete mode 100644 mozilla/directory/c-sdk/config/NCR.mk
delete mode 100644 mozilla/directory/c-sdk/config/NEC.mk
delete mode 100644 mozilla/directory/c-sdk/config/NEWS-OS.mk
delete mode 100644 mozilla/directory/c-sdk/config/NEXTSTEP.mk
delete mode 100644 mozilla/directory/c-sdk/config/NTO.mk
delete mode 100644 mozilla/directory/c-sdk/config/NetBSD.mk
delete mode 100644 mozilla/directory/c-sdk/config/OS2.mk
delete mode 100644 mozilla/directory/c-sdk/config/OSF1.mk
delete mode 100644 mozilla/directory/c-sdk/config/OpenBSD.mk
delete mode 100644 mozilla/directory/c-sdk/config/OpenVMS.mk
delete mode 100644 mozilla/directory/c-sdk/config/QNX.mk
delete mode 100644 mozilla/directory/c-sdk/config/README
delete mode 100644 mozilla/directory/c-sdk/config/Rhapsody.mk
delete mode 100644 mozilla/directory/c-sdk/config/SCOOS.mk
delete mode 100644 mozilla/directory/c-sdk/config/SINIX.mk
delete mode 100644 mozilla/directory/c-sdk/config/SunOS.mk
delete mode 100644 mozilla/directory/c-sdk/config/SunOS4.mk
delete mode 100644 mozilla/directory/c-sdk/config/SunOS5.8_i86pc.mk
delete mode 100755 mozilla/directory/c-sdk/config/SunOS5.9.mk
delete mode 100755 mozilla/directory/c-sdk/config/SunOS5.9_i86pc.mk
delete mode 100644 mozilla/directory/c-sdk/config/SunOS5.mk
delete mode 100644 mozilla/directory/c-sdk/config/UNIX.mk
delete mode 100644 mozilla/directory/c-sdk/config/UNIXWARE.mk
delete mode 100644 mozilla/directory/c-sdk/config/WIN32.mk
delete mode 100644 mozilla/directory/c-sdk/config/WIN95.mk
delete mode 100644 mozilla/directory/c-sdk/config/WINNT.mk
delete mode 100644 mozilla/directory/c-sdk/config/arch.mk
delete mode 100644 mozilla/directory/c-sdk/config/autoconf.mk.in
delete mode 100644 mozilla/directory/c-sdk/config/config.mk
delete mode 100644 mozilla/directory/c-sdk/config/libc_r.h
delete mode 100644 mozilla/directory/c-sdk/config/module.df
delete mode 100755 mozilla/directory/c-sdk/config/nfspwd
delete mode 100644 mozilla/directory/c-sdk/config/nfspwd.pl
delete mode 100644 mozilla/directory/c-sdk/config/now.c
delete mode 100644 mozilla/directory/c-sdk/config/nsinstall.c
delete mode 100644 mozilla/directory/c-sdk/config/nsprincl.mk.in
delete mode 100644 mozilla/directory/c-sdk/config/nsprincl.sh.in
delete mode 100644 mozilla/directory/c-sdk/config/pathsub.h
delete mode 100644 mozilla/directory/c-sdk/config/prdepend.h
delete mode 100755 mozilla/directory/c-sdk/config/prmkdir.bat
delete mode 100644 mozilla/directory/c-sdk/config/rules.mk
delete mode 100644 mozilla/directory/c-sdk/config/win16.mk
delete mode 100644 mozilla/directory/c-sdk/ldap/Makefile.client
delete mode 100644 mozilla/directory/c-sdk/ldap/Makefile.in
delete mode 100644 mozilla/directory/c-sdk/ldap/README.configure
delete mode 100644 mozilla/directory/c-sdk/ldap/build/Makefile.client
delete mode 100644 mozilla/directory/c-sdk/ldap/build/Makefile.in
delete mode 100644 mozilla/directory/c-sdk/ldap/build/autoconf.mk.in
delete mode 100755 mozilla/directory/c-sdk/ldap/build/compver.sh
delete mode 100644 mozilla/directory/c-sdk/ldap/build/dirver.c
delete mode 100755 mozilla/directory/c-sdk/ldap/build/genexports.pl
delete mode 100644 mozilla/directory/c-sdk/ldap/build/my_overrides.mk
delete mode 100644 mozilla/directory/c-sdk/ldap/build/nsftp.sh
delete mode 100755 mozilla/directory/c-sdk/ldap/build/replace.pl
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/Makefile
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/Makefile.client
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/Options.txt
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/argpin.c
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/argpin.h
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/common.c
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/convutf8.cpp
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/examples-from-ldif-spec.ldif
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/fileurl.c
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/fileurl.h
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/ldapcmp.c
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/ldapcompare.c
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/ldapdelete.c
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/ldapmodify.c
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/ldapmodrdn.c
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/ldapsearch.c
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/ldaptool.h
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/ntuserpin.c
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/ntuserpin.h
delete mode 100644 mozilla/directory/c-sdk/ldap/clients/tools/tools.mak
delete mode 100755 mozilla/directory/c-sdk/ldap/configure
delete mode 100644 mozilla/directory/c-sdk/ldap/configure.in
delete mode 100644 mozilla/directory/c-sdk/ldap/docs/README
delete mode 100644 mozilla/directory/c-sdk/ldap/docs/redist.txt
delete mode 100755 mozilla/directory/c-sdk/ldap/docs/release.gif
delete mode 100755 mozilla/directory/c-sdk/ldap/docs/relnotes_41.htm
delete mode 100644 mozilla/directory/c-sdk/ldap/docs/relnotes_5x.htm
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/Makefile
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/README
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/add.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/asearch.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/compare.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/crtfilt.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/csearch.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/del.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/examples.h
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/getattrs.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/getfilt.c
delete mode 100755 mozilla/directory/c-sdk/ldap/examples/macintosh/asearch (2i).68k.u
delete mode 100755 mozilla/directory/c-sdk/ldap/examples/macintosh/asearch (4i).68k.u
delete mode 100755 mozilla/directory/c-sdk/ldap/examples/macintosh/asearch PPC.u
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/modattrs.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/modrdn.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/nsprio.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/ppolicy.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/psearch.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/rdentry.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/search.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/srvrsort.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/ssearch.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/ssnoauth.c
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/win32.mak
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/ConnDlg.cpp
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/ConnDlg.h
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.DEF
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.MAK
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.RC
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapDoc.cpp
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapDoc.h
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapView.cpp
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapView.h
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/MainFrm.cpp
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/MainFrm.h
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/PropDlg.cpp
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/PropDlg.h
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/Resource.h
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/SrchDlg.cpp
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/SrchDlg.h
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/StdAfx.cpp
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/StdAfx.h
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/LdapDoc.ico
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/Toolbar.bmp
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/winldap.ico
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/winldap.rc2
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.cpp
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.h
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.mak
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.rc
delete mode 100644 mozilla/directory/c-sdk/ldap/examples/xmplflt.conf
delete mode 100644 mozilla/directory/c-sdk/ldap/include/MANIFEST
delete mode 100644 mozilla/directory/c-sdk/ldap/include/Makefile.client
delete mode 100644 mozilla/directory/c-sdk/ldap/include/Makefile.in
delete mode 100755 mozilla/directory/c-sdk/ldap/include/avl.h
delete mode 100755 mozilla/directory/c-sdk/ldap/include/dblayer.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/disptmpl.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/iutil.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/lber.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/lcache.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/ldap-deprecated.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/ldap-extension.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/ldap-platform.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/ldap-standard-tmpl.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/ldap-to-be-deprecated.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/ldap.h
delete mode 100755 mozilla/directory/c-sdk/ldap/include/ldap_ssl.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/ldaplog.h
delete mode 100755 mozilla/directory/c-sdk/ldap/include/ldappr.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/ldaprot.h
delete mode 100755 mozilla/directory/c-sdk/ldap/include/ldbm.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/ldif.h
delete mode 100755 mozilla/directory/c-sdk/ldap/include/lthread.h
delete mode 100755 mozilla/directory/c-sdk/ldap/include/ntslapdregparms.h
delete mode 100755 mozilla/directory/c-sdk/ldap/include/ntwatchdog.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/portable.h
delete mode 100755 mozilla/directory/c-sdk/ldap/include/proto-ntutil.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/regex.h
delete mode 100644 mozilla/directory/c-sdk/ldap/include/srchpref.h
delete mode 100755 mozilla/directory/c-sdk/ldap/include/sysexit-compat.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/Makefile.client
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/Makefile.in
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/genMakefile.client
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libiutil/Makefile
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libiutil/Makefile.client
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libiutil/README
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libiutil/iutil-lock.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.client
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.in
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/liblber/bprint.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/liblber/decode.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/liblber/dtest.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/liblber/encode.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/liblber/etest.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/liblber/idtest.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/liblber/io.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/liblber/lber-int.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap.ex
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.client
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/abandon.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/add.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/bind.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/cache.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/charray.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/charset.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/cldap.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/compare.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/compat.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/control.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/countvalues.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/delete.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/disptmpl.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/dllmain.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/dsparse.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/error.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/extendop.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/free.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/freevalues.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/friendly.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/getattr.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/getdn.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/getdxbyname.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/getentry.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/getfilter.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/getoption.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/getvalues.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/globals.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldap-int.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapfilter.conf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapfriendly
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapsearchprefs.conf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldaptemplates.conf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/memcache.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/message.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/modify.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/mozock.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/nsprthreadtest.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/open.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/os-ip.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/proxyauthctrl.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/psearch.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/pthreadtest.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/referral.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/regex.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/rename.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/request.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/reslist.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/result.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/saslbind.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/sbind.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/search.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/setoption.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/sort.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/sortctrl.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/srchpref.c
delete mode 100755 mozilla/directory/c-sdk/ldap/libraries/libldap/svrcore.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/test.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/tmplout.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/tmpltest.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/ufn.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/unbind.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/unescape.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/url.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/utf8.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap/vlistctrl.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldap_ssl.ex
delete mode 100755 mozilla/directory/c-sdk/ldap/libraries/libldif/Makefile
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libldif/Makefile.client
delete mode 100755 mozilla/directory/c-sdk/ldap/libraries/libldif/line64.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libprldap/ldappr-error.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libprldap/ldappr-int.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libprldap/ldappr-io.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libprldap/ldappr-public.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libprldap/ldappr-threads.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libprldap/libprldap.ex
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile.client
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libssldap/clientinit.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libssldap/errormap.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libssldap/ldapsinit.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libssldap/prerrstrs.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libssldap/secerrstrs.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libssldap/sslerrstrs.h
delete mode 100755 mozilla/directory/c-sdk/ldap/libraries/libutil/Makefile
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/libutil/Makefile.client
delete mode 100755 mozilla/directory/c-sdk/ldap/libraries/libutil/getopt.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/LDAPClient.exp
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/LDAPClient.mcp
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/LDAPClientDebugDefs.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/LDAPClientDefs.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/README
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/getopt.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/kerberos-macos.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/ldap-macos-defs.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/ldap-macos.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/libldap-PPC.r
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/macos-ip.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/strings.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/tcp-univhdrs/tcp.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/macintosh/tcp-univhdrs/tcp.h
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/ldap32.def
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/ldap32.tdf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/ldapssl.def
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/ldapssl.tdf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/libldap.def
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/libldap.rc
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/libldap.tdf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/mozock.c
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nslch32.tdf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldap.def
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldap.mak
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldap.rc
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldap.tdf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldap32.def
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldap32.tdf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldappr-incl.def
delete mode 100755 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldappr-incl.tdf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldappr32.def
delete mode 100755 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldappr32.tdf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldapssl32.def
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nsldapssl32.tdf
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nssldap32.def
delete mode 100644 mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/nssldap32.tdf
delete mode 100644 mozilla/directory/c-sdk/makefile.win
delete mode 100644 mozilla/directory/c-sdk/package.mk
delete mode 100644 mozilla/directory/c-sdk/packageup.mk
delete mode 100644 mozilla/directory/ldapsdk.mak
delete mode 100644 mozilla/directory/ldapsdk.mk
diff --git a/mozilla/directory/Makefile b/mozilla/directory/Makefile
deleted file mode 100644
index 1d76a01c75d..00000000000
--- a/mozilla/directory/Makefile
+++ /dev/null
@@ -1,196 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/NPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is Mozilla Communicator client code, released
-# March 31, 1998.
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation. Portions created by Netscape are
-# Copyright (C) 1998-1999 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-#
-
-LDAP_DEPTH = .
-NSPR_TREE = ../nsprpub
-NSS_TREE = ../security
-MOD_DEPTH = ../nsprpub
-CORECONFDIR = ../coreconf
-ALTCORECONFDIR = ../../coreconf
-NSPR_VERSION = 4.1.2
-NSS_VERSION = 3.3.1
-DEPTH = ..
-CONFIGDIR = c-sdk/config
-MOD_DEPTH = c-sdk
-
-include $(CONFIGDIR)/config.mk
-include c-sdk/build.mk
-
-all: FORCE
- @echo
- @echo The following are build targets that you can choose from:
- @echo
- @echo " gmake buildLdapClientSDK"
- @echo " gmake clean"
- @echo
- @echo Allowed options:
- @echo
- @echo " BUILD_OPT=1 for optimized build"
- @echo " USE_PTHREADS=1 for using pthreads"
- @echo " USE_64=1 for building 64 bit versions"
- @echo " BUILD_CLU=1 build command line utilities"
- @echo " COMPS_FROM_OBJDIR=1 use components from ../dist/$(OBJDIR_NAME)"
- @echo " VENDOR_NAME=string SDK vendor name (default $(DEFAULT_VENDOR_NAME))"
- @echo " VENDOR_VERSION=# vendor specific version number * 100 (default $(DEFAULT_VENDOR_VERSION))"
- @echo
- @echo Internal options
- @echo
- @echo " gmake buildAndPkgLdapSDK"
- @echo " gmake PullSDKComponents"
- @echo " gmake pkgLdapSDK"
- @echo
- @echo " HAVE_LIBNLS=1 for building/linking with LIBNLS"
- @echo " HAVE_CCONF=1 for building with components"
- @echo " HAVE_SVRCORE=1 for building with svrcore"
- @echo " DONT_REPULL=1 for not repulling components"
- @echo " PKG_PRIVATE_HDRS=0 do not ship private headers"
- @echo " PKG_PRIVATE_LIBS=0 do not ship private libraries"
- @echo " PKG_DEP_LIBS=0 do not ship dependent libraries"
-
- @echo
- @echo " For internal builds, coreconf must be installed"
- @echo " in $(CORECONFDIR)"
-
-buildLdapClientSDK export: PullSDKComponents
- @echo
- @echo ==== Starting LDAP Client SDK ==========
- @echo
-ifneq ($(HAVE_CCONF), 1)
- @if [ -d $(NSPR_TREE)/ ]; then \
- echo "NSPR $(NSPR_VERSION) directory found"; \
- else \
- echo "No NSPR $(NSPR_VERSION) directory found"; \
- fi
- @if [ -d $(NSS_TREE)/ ]; then \
- echo "NSS $(NSS_VERSION) directory found"; \
- else \
- echo "No NSS $(NSS_VERSION) directory found"; \
- fi
-else
- @if [ -d $(CORECONFDIR)/ ]; then \
- echo "coreconf $(CORECONFDIR) directory found"; \
- else \
- echo "No $(CORECONFDIR) found checking for alternate location"; \
- if [ -d $(ALTCORECONFDIR)/ ]; then \
- echo "found $(ALTCORECONFDIR)....copying to $(CORECONFDIR)/"; \
- cp -r $(ALTCORECONFDIR) $(CORECONFDIR); \
- else \
- echo "No coreconf directory found"; \
- exit 1; \
- fi \
- fi
- @if [ -d $(CORECONFDIR)/ ]; then \
- cd $(CORECONFDIR); \
- gmake; \
- else \
- echo "No $(CORECONFDIR) directory found"; \
- fi
-endif
- @if [ -d $(CONFIGDIR)/ ]; then \
- cd $(CONFIGDIR); \
- gmake; \
- else \
- echo "No $(CONFIGDIR) directory found"; \
- fi
- @if [ -d $(LDAP_DEPTH)/c-sdk/ldap ]; then \
- cd $(LDAP_DEPTH)/c-sdk/ldap; \
- $(MAKE) -f Makefile.client $(MFLAGS) export; \
- $(MAKE) -f Makefile.client $(MFLAGS) install; \
- else \
- echo "No LDAP directory -- skipping"; \
- exit 0; \
- fi
-
-pkgLdapSDK: FORCE
- @echo
- @echo ==== Starting LDAP Client SDK packaging ===
- @echo
- @if [ -d $(DIST_TREE)/ ]; then \
- cd $(LDAP_DEPTH)/c-sdk/; \
- $(MAKE) -f package.mk $(MFLAGS) all; \
- else \
- echo "No dist directory found -- can't package"; \
- exit 0; \
- fi
-
-buildAndPkgLdapSDK: buildLdapClientSDK pkgLdapSDK
-
-PullSDKComponents: FORCE
- @echo
- @echo ==== Starting to pull components ==========
- @echo
-ifneq ($(DONT_REPULL), 1)
-ifeq ($(HAVE_CCONF), 1)
- @if [ -d $(CORECONFDIR)/ ]; then \
- echo "coreconf $(CORECONFDIR) directory found"; \
- else \
- echo "No $(CORECONFDIR) found checking for alternate location"; \
- if [ -d $(ALTCORECONFDIR)/ ]; then \
- echo "found $(ALTCORECONFDIR)....copying to $(CORECONFDIR)/"; \
- cp -r $(ALTCORECONFDIR) $(CORECONFDIR); \
- else \
- echo "No coreconf directory found"; \
- exit 1; \
- fi \
- fi
- @if [ -d $(CORECONFDIR)/ ]; then \
- cd $(CORECONFDIR); \
- gmake; \
- else \
- echo "No $(CORECONFDIR) directory found"; \
- fi
-ifeq ($(OS_ARCH), WINNT)
-# cd $(CORECONFDIR)/dbm; \
-# $(MAKE) VERSION=$(DBM_RELEASE_TAG) $(MFLAGS) USE_FTP=YES import
- cd $(CORECONFDIR)/nspr20; \
- $(MAKE) VERSION=$(NSPR_RELEASE_TAG) $(MFLAGS) USE_FTP=YES import
- cd $(CORECONFDIR)/security; \
- $(MAKE) VERSION=$(NSS_RELEASE_TAG) $(MFLAGS) USE_FTP=YES import
- cd $(CORECONFDIR)/svrcore; \
- $(MAKE) VERSION=$(SVRCORE_RELEASE_TAG) $(MFLAGS) USE_FTP=YES import
-else
-# cd $(CORECONFDIR)/dbm; \
-# $(MAKE) VERSION=$(DBM_RELEASE_TAG) $(MFLAGS) import
- cd $(CORECONFDIR)/nspr20; \
- $(MAKE) VERSION=$(NSPR_RELEASE_TAG) $(MFLAGS) import
- cd $(CORECONFDIR)/security; \
- $(MAKE) VERSION=$(NSS_RELEASE_TAG) $(MFLAGS) import
- cd $(CORECONFDIR)/svrcore; \
- $(MAKE) VERSION=$(SVRCORE_RELEASE_TAG) $(MFLAGS) import
-endif
-endif
-endif
-
-clean clobber: FORCE
- @if [ -d $(LDAP_DEPTH)/c-sdk/ldap ]; then \
- cd $(LDAP_DEPTH)/c-sdk/ldap; \
- $(MAKE) -f Makefile.client $(MFLAGS) clean; \
- else \
- echo "No LDAP directory -- skipping"; \
- exit 0; \
- fi
- @if [ -d $(CONFIGDIR) ]; then \
- cd $(CONFIGDIR); \
- gmake cleanconfig; \
- fi
-
-FORCE:
diff --git a/mozilla/directory/c-sdk/build.mk b/mozilla/directory/c-sdk/build.mk
deleted file mode 100644
index 85cbe73784b..00000000000
--- a/mozilla/directory/c-sdk/build.mk
+++ /dev/null
@@ -1,489 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/NPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is Mozilla Communicator client code, released
-# March 31, 1998.
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation. Portions created by Netscape are
-# Copyright (C) 1998-1999 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-#
-
-DEFAULT_VENDOR_NAME=mozilla.org
-DEFAULT_VENDOR_VERSION=500
-
-ifndef VENDOR_NAME
-VENDOR_NAME = $(DEFAULT_VENDOR_NAME)
-endif
-
-ifndef VENDOR_VERSION
-VENDOR_VERSION = $(DEFAULT_VENDOR_VERSION)
-endif
-
-
-ifdef HAVE_CCONF
-# component tags for internal build only
-NSPR_RELEASE_TAG=v4.1.2
-NSS_RELEASE_TAG =NSS_3_3_1_RTM
-SVRCORE_RELEASE_TAG=SVRCORE_3_3_RTM
-# NSPR, NSS, and SVRCORE already had existing Solaris 5.8 symbolic
-# link to a Solaris 5.6 version. Hence, the new respun components
-# were put in in a forte6 directory in each of the component
-# respectively. For Solaris 5.8 only we have to pick up the components
-# from the forte6 directory. As we move forward with new components,
-# we can take the mess below out
-# Michael.....
-ifeq ($(OS_ARCH), SunOS)
-ifneq ($(USE_64), 1)
-OS_VERS := $(shell uname -r)
-ifeq ($(OS_VERS),5.8)
-ifneq ($(OS_TEST),i86pc)
-NSPR_RELEASE_TAG=v4.1.2/forte6
-NSS_RELEASE_TAG =NSS_3_3_1_RTM/forte6
-SVRCORE_RELEASE_TAG=SVRCORE_3_3_RTM/forte6
-endif
-endif
-endif
-endif
-endif
-
-# Ldap library
-LDAPVERS = 50
-LDAPVERS_SUFFIX = 5.0
-ifeq ($(OS_ARCH), WINNT)
-LDAP_LIBNAME = nsldap32v$(LDAPVERS)
-else
-LDAP_LIBNAME = ldap$(LDAPVERS)
-endif
-DIR_VERSION = $(LDAPVERS_SUFFIX)
-DIRSDK_VERSION = $(LDAPVERS_SUFFIX)
-
-# PrLdap library
-PRLDAPVERS = 50
-PRLDAPVERS_SUFFIX= 5.0
-ifeq ($(OS_ARCH), WINNT)
-PRLDAP_LIBNAME = nsldappr32v$(PRLDAPVERS)
-else
-PRLDAP_LIBNAME = prldap$(PRLDAPVERS)
-endif
-
-# lber library
-LBERVERS = 50
-LBERVERS_SUFFIX = 5.0
-ifeq ($(OS_ARCH), WINNT)
-LBER_LIBNAME = nslber32v$(LBERVERS)
-else
-LBER_LIBNAME = lber$(LBERVERS)
-endif
-
-# ldif library
-LDIFVERS = 50
-LDIFVERS_SUFFIX = 5.0
-ifeq ($(OS_ARCH), WINNT)
-LDIF_LIBNAME = nsldif32v$(LDIFVERS)
-else
-LDIF_LIBNAME = ldif$(LDIFVERS)
-endif
-
-# iutil library
-IUTILVERS = 50
-IUTILVERS_SUFFIX = 5.0
-ifeq ($(OS_ARCH), WINNT)
-IUTIL_LIBNAME = nsiutil32v$(IUTILVERS)
-else
-IUTIL_LIBNAME = iutil$(IUTILVERS)
-endif
-
-# util library
-UTILVERS = 50
-UTILVERS_SUFFIX = 5.0
-ifeq ($(OS_ARCH), WINNT)
-UTIL_LIBNAME = nsutil32v$(UTILVERS)
-else
-UTIL_LIBNAME = util$(UTILVERS)
-endif
-
-# ssl library
-SSLDAPVERS = 50
-SSLDAPVERS_SUFFIX = 5.0
-ifeq ($(OS_ARCH), WINNT)
-SSLDAP_LIBNAME = nsldapssl32v$(SSLDAPVERS)
-else
-SSLDAP_LIBNAME = ssldap$(SSLDAPVERS)
-endif
-
-# nss library
-NSSVERS = 3
-NSS_LIBNAME = nss$(NSSVERS)
-SSL_LIBNAME = ssl$(NSSVERS)
-HYBRID_LIBNAME = freebl_hybrid_$(NSSVERS)
-PURE32_LIBNAME = freebl_pure32_$(NSSVERS)
-
-ifneq ($(USE_64), 1)
-ifeq ($(OS_ARCH), SunOS)
-ifneq ($(OS_TEST),i86pc)
-COPYFREEBL = 1
-endif
-endif
-ifeq ($(OS_ARCH), HP-UX)
-COPYFREEBL = 1
-endif
-endif
-
-# svrcore library
-SVRCOREVERS =
-SVRCOREVERS_SUFFIX =
-SVRCORE_LIBNAME = svrcore$(SVRCOREVERS)
-
-#
-# NSPR library
-#
-
-NSPR_LIBVERSION=4
-ifeq ($(OS_TARGET), WIN95)
-PLC_BASENAME=plc$(NSPR_LIBVERSION)
-PLDS_BASENAME=plds$(NSPR_LIBVERSION)
-NSPR_BASENAME=nspr$(NSPR_LIBVERSION)
-else
-PLC_BASENAME=libplc$(NSPR_LIBVERSION)
-PLDS_BASENAME=libplds$(NSPR_LIBVERSION)
-NSPR_BASENAME=libnspr$(NSPR_LIBVERSION)
-endif
-
-PLCBASE=plc$(NSPR_LIBVERSION)
-PLDSBASE=plds$(NSPR_LIBVERSION)
-NSPRBASE=nspr$(NSPR_LIBVERSION)
-
-DYNAMICNSPR = -l$(PLCBASE) -l$(PLDSBASE) -l$(NSPRBASE)
-
-PLC_LIBNAME=plc$(NSPR_LIBVERSION)
-PLDS_LIBNAME=plds$(NSPR_LIBVERSION)
-NSPR_LIBNAME=nspr$(NSPR_LIBVERSION)
-
-#
-# NLS library
-#
-NLS_LIBVERSION =31
-LIBNLS_RELDATE=v3.2
-ifeq ($(OS_ARCH), WINNT)
-NSCNV_LIBNAME =nscnv32$(NLS_LIBVERSION).$(LIB_SUFFIX)
-NSJPN_LIBNAME =nsjpn32$(NLS_LIBVERSION).$(LIB_SUFFIX)
-NSCCK_LIBNAME =nscck32$(NLS_LIBVERSION).$(LIB_SUFFIX)
-NSSB_LIBNAME =nssb32$(NLS_LIBVERSION).$(LIB_SUFFIX)
-else
-NSCNV_LIBNAME =libnscnv$(NLS_LIBVERSION).$(LIB_SUFFIX)
-NSJPN_LIBNAME =libnsjpn$(NLS_LIBVERSION).$(LIB_SUFFIX)
-NSCCK_LIBNAME =libnscck$(NLS_LIBVERSION).$(LIB_SUFFIX)
-NSSB_LIBNAME =libnssb$(NLS_LIBVERSION).$(LIB_SUFFIX)
-endif
-
-ifdef RELEASE_TREE
-LIBNLS_INCLUDES_LOC = $(RELEASE_TREE)/libnls$(NLS_LIBVERSION)/v3.2/$(OBJDIR_NAME)/include
-LIBNLS_LIB_LOC = $(RELEASE_TREE)/libnls$(NLS_LIBVERSION)/v3.2/$(OBJDIR_NAME)/lib
-else
-LIBNLS_INCLUDES_LOC = /share/builds/components/libnls$(NLS_LIBVERSION)/v3.2/$(OBJDIR_NAME)/include
-LIBNLS_LIB_LOC = /share/builds/components/libnls$(NLS_LIBVERSION)/v3.2/$(OBJDIR_NAME)/lib
-
-ifeq ($(OS_ARCH), SunOS)
-ifneq ($(USE_64), 1)
-OS_VERS := $(shell uname -r)
-ifeq ($(OS_VERS),5.8)
-ifneq ($(OS_TEST),i86pc)
-LIBNLS_INCLUDES_LOC = /share/builds/components/libnls$(NLS_LIBVERSION)/v3.2/forte6/$(OBJDIR_NAME)/include
-LIBNLS_LIB_LOC = /share/builds/components/libnls$(NLS_LIBVERSION)/v3.2/forte6/$(OBJDIR_NAME)/lib
-endif
-endif
-endif
-endif
-
-endif
-LIBNLS_DIR = ../../../../../dist/libnls$(NLS_LIBVERSION)
-ifeq ($(OS_ARCH), WINNT)
-LIBNLS_INCLUDES =../../../../../dist/libnls$(NLS_LIBVERSION)/$(OBJDIR_NAME)/include
-LIBNLS_LIBDIR =../../../../../dist/libnls$(NLS_LIBVERSION)/$(OBJDIR_NAME)/lib
-else
-LIBNLS_INCLUDES =../../../../../dist/public/libnls
-LIBNLS_LIBDIR =../../../../../dist/$(OBJDIR_NAME)/libnls
-endif
-
-RM = rm -f
-SED = sed
-
-# uncomment to enable support for LDAP referrals
-LDAP_REFERRALS = -DLDAP_REFERRALS
-DEFNETSSL = -DNET_SSL
-NOLIBLCACHE = -DNO_LIBLCACHE
-NSDOMESTIC = -DNS_DOMESTIC
-
-
-ifdef BUILD_OPT
-LDAP_DEBUG =
-else
-LDAP_DEBUG = -DLDAP_DEBUG
-endif
-
-ifdef HAVE_LIBNLS
-HAVELIBNLS = -DHAVE_LIBNLS
-else
-HAVELIBNLS =
-endif
-
-ifdef BUILD_CLU
-BUILDCLU = 1
-else
-BUILDCLU =
-endif
-
-#
-# DEFS are included in CFLAGS
-#
-DEFS = $(PLATFORMCFLAGS) $(LDAP_DEBUG) $(HAVELIBNLS) \
- $(CLDAP) $(DEFNETSSL) $(NOLIBLCACHE) \
- $(LDAP_REFERRALS) $(LDAP_DNS) $(STR_TRANSLATION) \
- $(LIBLDAP_CHARSETS) $(LIBLDAP_DEF_CHARSET) \
- $(NSDOMESTIC) $(LDAPSSLIO)
-
-
-ifeq ($(OS_ARCH), WINNT)
-DIRVER_PROG=$(COMMON_OBJDIR)/dirver.exe
-else
-DIRVER_PROG=$(COMMON_OBJDIR)/dirver
-endif
-
-ifeq ($(OS_ARCH), WINNT)
-EXE_SUFFIX=.exe
-RSC=rc
-OFFLAG=/Fo
-else
-OFFLAG=-o
-endif
-
-ifeq ($(OS_ARCH), Linux)
-DEFS += -DLINUX2_0 -DLINUX1_2 -DLINUX2_1
-endif
-
-ifeq ($(OS_ARCH), WINNT)
-DLLEXPORTS_PREFIX=/DEF:
-USE_DLL_EXPORTS_FILE = 1
-endif
-
-ifeq ($(OS_ARCH), SunOS)
-DLLEXPORTS_PREFIX=-Blocal -M
-USE_DLL_EXPORTS_FILE = 1
-endif
-
-ifeq ($(OS_ARCH), IRIX)
-DLLEXPORTS_PREFIX=-exports_file
-USE_DLL_EXPORTS_FILE = 1
-endif
-
-ifeq ($(OS_ARCH), HP-UX)
-DEFS += -Dhpux -D_REENTRANT
-endif
-
-ifeq ($(OS_ARCH),AIX)
-DLLEXPORTS_PREFIX=-bE:
-DL=-ldl
-USE_DLL_EXPORTS_FILE = 1
-endif
-
-ifeq ($(OS_ARCH),OSF1)
-DEFS += -DOSF1V4
-DL=
-endif
-
-ifeq ($(OS_ARCH),ReliantUNIX)
-DL=-ldl
-endif
-
-ifeq ($(OS_ARCH),UnixWare)
-DL=
-endif
-
-RPATHFLAG = ..:../lib:../../lib:../../../lib:../../../../lib
-
-ifeq ($(OS_ARCH), SunOS)
-# flag to pass to cc when linking to set runtime shared library search path
-# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
-RPATHFLAG_PREFIX=-Wl,-R,
-
-# flag to pass to ld when linking to set runtime shared library search path
-# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
-LDRPATHFLAG_PREFIX=-R
-
-# OS network libraries
-PLATFORMLIBS+=-lresolv -lsocket -lnsl -lgen -ldl -lposix4
-endif
-
-ifeq ($(OS_ARCH), OSF1)
-# flag to pass to cc when linking to set runtime shared library search path
-# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
-RPATHFLAG_PREFIX=-Wl,-rpath,
-
-# flag to pass to ld when linking to set runtime shared library search path
-# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
-LDRPATHFLAG_PREFIX=-rpath
-
-# allow for unresolved symbols
-DLL_LDFLAGS += -expect_unresolved "*"
-endif # OSF1
-
-ifeq ($(OS_ARCH), AIX)
-# Flags to set runtime shared library search path. For example:
-# $(CC) $(RPATHFLAG_PREFIX)../..$(RPATHFLAG_EXTRAS)
-RPATHFLAG_PREFIX=-blibpath:
-RPATHFLAG_EXTRAS=:/usr/lib:/lib
-
-# flag to pass to ld when linking to set runtime shared library search path
-# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
-LDRPATHFLAG_PREFIX=-blibpath:/usr/lib:/lib:
-DLL_LDFLAGS= -bM:SRE -bnoentry \
- -L.:/usr/lib/threads:/usr/lpp/xlC/lib:/usr/lib:/lib
-DLL_EXTRA_LIBS= -bI:/usr/lib/lowsys.exp -lC_r -lC -lpthreads -lc_r -lm \
- /usr/lib/libc.a
-
-EXE_EXTRA_LIBS= -bI:/usr/lib/syscalls.exp -lsvld -lpthreads
-endif # AIX
-
-ifeq ($(OS_ARCH), HP-UX)
-# flag to pass to cc when linking to set runtime shared library search path
-# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
-RPATHFLAG_PREFIX=-Wl,+s,+b,
-
-# flag to pass to ld when linking to set runtime shared library search path
-# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
-LDRPATHFLAG_PREFIX=+s +b
-
-# we need to link in the rt library to get sem_*()
-PLATFORMLIBS += -lrt
-PLATFORMCFLAGS=
-
-endif # HP-UX
-
-ifeq ($(OS_ARCH), Linux)
-# flag to pass to cc when linking to set runtime shared library search path
-# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
-RPATHFLAG_PREFIX=-Wl,-rpath,
-
-# flag to pass to ld when linking to set runtime shared library search path
-# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
-# note, there is a trailing space
-LDRPATHFLAG_PREFIX=-rpath
-endif # Linux
-
-#
-# XXX: does anyone know of a better way to solve the "LINK_LIB2" problem? -mcs
-#
-# Link to produce a console/windows exe on Windows
-#
-
-ifeq ($(OS_ARCH), WINNT)
-
-DEBUG_LINK_OPT=/DEBUG:FULL
-ifeq ($(BUILD_OPT), 1)
- DEBUG_LINK_OPT=
-endif
-
-SUBSYSTEM=CONSOLE
-LINK_EXE = link $(DEBUG_LINK_OPT) -OUT:"$@" /MAP $(ALDFLAGS) $(LDFLAGS) $(ML_DEBUG) \
- $(LCFLAGS) /NOLOGO /PDB:NONE /DEBUGTYPE:BOTH /INCREMENTAL:NO \
- /NODEFAULTLIB:MSVCRTD /SUBSYSTEM:$(SUBSYSTEM) $(DEPLIBS) \
- $(EXTRA_LIBS) $(PLATFORMLIBS) $(OBJS)
-LINK_LIB = lib -OUT:"$@" $(OBJS)
-LINK_DLL = link $(DEBUG_LINK_OPT) /nologo /MAP /DLL /PDB:NONE /DEBUGTYPE:BOTH \
- $(ML_DEBUG) /SUBSYSTEM:$(SUBSYSTEM) $(LLFLAGS) $(DLL_LDFLAGS) \
- $(EXTRA_LIBS) /out:"$@" $(OBJS)
-else # WINNT
-#
-# UNIX link commands
-#
-LINK_LIB = $(RM) $@; $(AR) $(OBJS); $(RANLIB) $@
-LINK_LIB2 = $(RM) $@; $(AR) $@ $(OBJS2); $(RANLIB) $@
-ifdef SONAMEFLAG_PREFIX
-LINK_DLL = $(LD) $(DSO_LDOPTS) $(ALDFLAGS) $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
- -o $@ $(SONAMEFLAG_PREFIX)$(notdir $@) $(OBJS)
-else # SONAMEFLAG_PREFIX
-LINK_DLL = $(LD) $(ALDFLAGS) $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
- -o $@ $(OBJS)
-endif # SONAMEFLAG_PREFIX
-
-ifeq ($(OS_ARCH), OSF1)
-# The linker on OSF/1 gets confused if it finds an so_locations file
-# that doesn't meet its expectations, so we arrange to remove it before
-# linking.
-SO_FILES_TO_REMOVE=so_locations
-endif
-
-ifeq ($(OS_ARCH), HP-UX)
-# On HPUX, we need a couple of changes:
-# 1) Use the C++ compiler for linking, which will pass the +eh flag on down to the
-# linker so the correct exception-handling-aware libC gets used (libnshttpd.sl
-# needs this).
-# 2) Add a "-Wl,-E" option so the linker gets a "-E" flag. This makes symbols
-# in an executable visible to shared libraries loaded at runtime.
-LINK_EXE = $(CCC) -Wl,-E $(ALDFLAGS) $(LDFLAGS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) -o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
-
-ifeq ($(USE_64), 1)
-LINK_EXE = $(CCC) -DHPUX_ACC -D__STDC_EXT__ -D_POSIX_C_SOURCE=199506L +DA2.0W +DS2.0 -Wl,-E $(ALDFLAGS) $(LDFLAGS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) -o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
-endif
-
-else # HP-UX
-# everything except HPUX
-ifeq ($(OS_ARCH), ReliantUNIX)
-# Use the C++ compiler for linking if at least ONE object is C++
-export LD_RUN_PATH=$(RPATHFLAG)
-LINK_EXE = $(CXX) $(ALDFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
-
-else # ReliantUNIX
-ifdef USE_LD_RUN_PATH
-#does RPATH differently. instead we export RPATHFLAG as LD_RUN_PATH
-#see ns/netsite/ldap/clients/tools/Makefile for an example
-export LD_RUN_PATH=$(RPATHFLAG)
-LINK_EXE = $(CC) $(ALDFLAGS) $(LDFLAGS) \
- -o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
-LINK_EXE_NOLIBSOBJS = $(CC) $(ALDFLAGS) $(LDFLAGS) -o $@
-else # USE_LD_RUN_PATH
-LINK_EXE = $(CC) $(ALDFLAGS) $(LDFLAGS) \
- $(RPATHFLAG_PREFIX)$(RPATHFLAG)$(RPATHFLAG_EXTRAS) \
- -o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
-LINK_EXE_NOLIBSOBJS = $(CC) $(ALDFLAGS) $(LDFLAGS) \
- $(RPATHFLAG_PREFIX)$(RPATHFLAG)$(RPATHFLAG_EXTRAS) -o $@
-endif # USE_LD_RUN_PATH
-endif # ReliantUNIX
-endif # HP-UX
-endif # WINNT
-
-ifeq ($(OS_ARCH), OSF1)
-LINK_EXE = $(CCC) $(ALDFLAGS) $(LDFLAGS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) \
- -o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
-endif
-
-ifeq ($(OS_ARCH), SunOS)
-ifeq ($(USE_64), 1)
-LINK_EXE = $(CCC) $(ALDFLAGS) $(LDFLAGS) -R:$(RPATHFLAG)\
- -o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
-endif
-endif
-
-
-PERL = perl
-#
-# shared library symbol export definitions
-#
-ifeq ($(OS_ARCH), WINNT)
-GENEXPORTS=cmd /c $(PERL) $(LDAP_SRC)/build/genexports.pl
-else
-GENEXPORTS=$(PERL) $(LDAP_SRC)/build/genexports.pl
-endif
-
diff --git a/mozilla/directory/c-sdk/config/AIX.mk b/mozilla/directory/c-sdk/config/AIX.mk
deleted file mode 100644
index 4d8c4ca89d6..00000000000
--- a/mozilla/directory/c-sdk/config/AIX.mk
+++ /dev/null
@@ -1,175 +0,0 @@
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is the Netscape Portable Runtime (NSPR).
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation. Portions created by Netscape are
-# Copyright (C) 1998-2000 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable
-# instead of those above. If you wish to allow use of your
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL. If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-#
-# Config stuff for AIX.
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-#
-# XXX
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
-ifneq ($(USE_PTHREADS),1)
-CLASSIC_NSPR = 1
-endif
-endif
-
-#
-# There are three implementation strategies available on AIX:
-# pthreads, classic, and pthreads-user.
-#
-# On AIX 3.2, classic nspr is the default (and only) implementation
-# strategy. On AIX 4.1 and later, the default is pthreads.
-#
-ifeq ($(OS_RELEASE),3.2)
-CLASSIC_NSPR = 1
-endif
-
-ifeq ($(CLASSIC_NSPR),1)
- PTHREADS_USER =
- USE_PTHREADS =
- IMPL_STRATEGY = _EMU
- DEFINES += -D_PR_LOCAL_THREADS_ONLY
-else
-ifeq ($(PTHREADS_USER),1)
- USE_PTHREADS =
- IMPL_STRATEGY = _PTH_USER
-else
- USE_PTHREADS = 1
-ifeq ($(HAVE_CCONF), 1)
- IMPL_STRATEGY =
-else
- IMPL_STRATEGY = _PTH
-endif
-endif
-endif
-
-# IPv6 support part of the standard AIX 4.3 release.
-ifneq (,$(filter-out 3.2 4.1 4.2,$(OS_RELEASE)))
-USE_IPV6 = 1
-endif
-
-ifeq ($(CLASSIC_NSPR),1)
-CC = xlC
-CCC = xlC
-else
-CC = xlC_r
-CCC = xlC_r
-endif
-OS_CFLAGS = -qro -qroconst
-ifeq ($(USE_64),1)
-OBJECT_MODE = 64
-export OBJECT_MODE
-COMPILER_TAG = _64
-else
-ifeq ($(HAVE_CCONF), 1)
-COMPILER_TAG =
-else
-COMPILER_TAG = _32
-endif
-endif
-
-CPU_ARCH = rs6000
-
-RANLIB = ranlib
-
-OS_CFLAGS += -DAIX -DSYSV
-ifeq ($(CC),xlC_r)
-OS_CFLAGS += -qarch=com
-endif
-
-ifneq ($(OS_RELEASE),3.2)
-OS_CFLAGS += -DAIX_HAVE_ATOMIC_OP_H -DAIX_TIMERS
-endif
-
-ifeq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
-ifndef USE_PTHREADS
-OS_CFLAGS += -DAIX_RENAME_SELECT
-endif
-endif
-
-ifeq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
-OS_CFLAGS += -D_PR_NO_LARGE_FILES
-else
-OS_CFLAGS += -D_PR_HAVE_OFF64_T
-endif
-
-ifeq ($(OS_RELEASE),4.1)
-OS_CFLAGS += -DAIX4_1
-else
-DSO_LDOPTS = -brtl -bM:SRE -bnoentry -bexpall
-MKSHLIB = $(LD) $(DSO_LDOPTS)
-ifeq ($(OS_RELEASE),4.3)
-OS_CFLAGS += -DAIX4_3
-endif
-endif
-
-# Have the socklen_t data type
-ifeq ($(OS_RELEASE),4.3)
-OS_CFLAGS += -DHAVE_SOCKLEN_T
-endif
-
-ifeq (,$(filter-out 4.2 4.3,$(OS_RELEASE)))
-# On these OS revisions, localtime_r() is declared if _THREAD_SAFE
-# is defined.
-ifneq ($(CLASSIC_NSPR),1)
-OS_CFLAGS += -DHAVE_POINTER_LOCALTIME_R
-endif
-endif
-
-ifeq (,$(filter-out 4.3,$(OS_RELEASE)))
-# On these OS revisions, gethostbyXXX() returns result in thread
-# specific storage.
-ifeq ($(USE_PTHREADS),1)
-OS_CFLAGS += -D_PR_HAVE_THREADSAFE_GETHOST
-endif
-endif
-
-#
-# Special link info for constructing AIX programs. On AIX we have to
-# statically link programs that use NSPR into a single .o, rewriting the
-# calls to select to call "aix". Once that is done we then can
-# link that .o with a .o built in nspr which implements the system call.
-#
-ifneq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
-AIX_LINK_OPTS = -brtl -bnso -berok
-else
-AIX_LINK_OPTS = -bnso -berok
-#AIX_LINK_OPTS = -bnso -berok -brename:.select,.wrap_select -brename:.poll,.wrap_poll -bI:/usr/lib/syscalls.exp
-endif
-
-AIX_WRAP = $(DIST)/lib/aixwrap.o
-AIX_TMP = $(OBJDIR)/_aix_tmp.o
diff --git a/mozilla/directory/c-sdk/config/BSD_OS.mk b/mozilla/directory/c-sdk/config/BSD_OS.mk
deleted file mode 100644
index 17b6ee549eb..00000000000
--- a/mozilla/directory/c-sdk/config/BSD_OS.mk
+++ /dev/null
@@ -1,91 +0,0 @@
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is the Netscape Portable Runtime (NSPR).
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation. Portions created by Netscape are
-# Copyright (C) 1998-2000 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable
-# instead of those above. If you wish to allow use of your
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL. If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-#
-# Config stuff for BSD/OS Unix.
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-ifeq (,$(filter-out 1.1 4.%,$(OS_RELEASE)))
-CC = gcc -Wall -Wno-format
-CCC = g++
-else
-CC = shlicc2
-CCC = shlicc2
-endif
-RANLIB = ranlib
-
-ifeq ($(USE_PTHREADS),1)
-IMPL_STRATEGY = _PTH
-DEFINES += -D_PR_NEED_PTHREAD_INIT
-else
-IMPL_STRATEGY = _EMU
-DEFINES += -D_PR_LOCAL_THREADS_ONLY
-endif
-
-OS_CFLAGS = $(DSO_CFLAGS) -DBSDI -DHAVE_STRERROR -DNEED_BSDREGEX
-
-ifeq (86,$(findstring 86,$(OS_TEST)))
-CPU_ARCH = x86
-endif
-ifeq (sparc,$(findstring sparc,$(OS_TEST)))
-CPU_ARCH = sparc
-endif
-
-ifeq ($(OS_RELEASE),2.1)
-OS_CFLAGS += -D_PR_TIMESPEC_HAS_TS_SEC
-endif
-
-ifeq (,$(filter-out 1.1 2.1,$(OS_RELEASE)))
-OS_CFLAGS += -D_PR_BSDI_JMPBUF_IS_ARRAY
-else
-OS_CFLAGS += -D_PR_SELECT_CONST_TIMEVAL -D_PR_BSDI_JMPBUF_IS_STRUCT
-endif
-
-NOSUCHFILE = /no-such-file
-
-ifeq ($(OS_RELEASE),1.1)
-OS_CFLAGS += -D_PR_STAT_HAS_ONLY_ST_ATIME -D_PR_NEED_H_ERRNO
-else
-OS_CFLAGS += -DHAVE_DLL -DUSE_DLFCN -D_PR_STAT_HAS_ST_ATIMESPEC
-OS_LIBS = -ldl
-ifeq (,$(filter-out 4.%,$(OS_RELEASE)))
-MKSHLIB = $(CC) $(DSO_LDOPTS)
-DSO_CFLAGS = -fPIC
-DSO_LDOPTS = -shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)
-else
-MKSHLIB = $(LD) $(DSO_LDOPTS)
-DSO_LDOPTS = -r
-endif
-endif
diff --git a/mozilla/directory/c-sdk/config/BeOS.mk b/mozilla/directory/c-sdk/config/BeOS.mk
deleted file mode 100644
index 25cb693641c..00000000000
--- a/mozilla/directory/c-sdk/config/BeOS.mk
+++ /dev/null
@@ -1,138 +0,0 @@
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is the Netscape Portable Runtime (NSPR).
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation. Portions created by Netscape are
-# Copyright (C) 1998-2000 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable
-# instead of those above. If you wish to allow use of your
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL. If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-
-######################################################################
-# Config stuff for BeOS (all architectures)
-######################################################################
-
-######################################################################
-# Version-independent
-######################################################################
-
-DEFINES +=
-XP_DEFINE = -DXP_BEOS
-
-OBJ_SUFFIX = o
-LIB_SUFFIX = a
-DLL_SUFFIX = so
-AR = ar cr $@
-
-ifdef BUILD_OPT
-DEFINES = -UDEBUG -DNDEBUG
-OBJDIR_TAG = _OPT
-else
-DEFINES = -DDEBUG -UNDEBUG
-OBJDIR_TAG = _DBG
-endif
-
-ifeq (PC,$(findstring PC,$(OS_TEST)))
-CPU_ARCH = x86
-CC = gcc
-CCC = g++
-LD = gcc
-RANLIB = ranlib
-DSO_LDOPTS = -nostart
-PORT_FLAGS = -DHAVE_STRERROR
-ifdef BUILD_OPT
-OPTIMIZER = -O2
-LDFLAGS += -s
-else
-OPTIMIZER = -gdwarf-2 -O0
-endif
-else
-CPU_ARCH = ppc
-CC = mwcc
-CCC = mwcc
-LD = mwld
-RANLIB = ranlib
-DSO_LDOPTS = -xms -export pragma \
- -init _init_routine_ \
- -term _term_routine_ \
- -lroot -lnet \
- /boot/develop/lib/ppc/glue-noinit.a \
- /boot/develop/lib/ppc/init_term_dyn.o \
- /boot/develop/lib/ppc/start_dyn.o
-
-PORT_FLAGS = -DHAVE_STRERROR -D_POSIX_SOURCE
-ifdef BUILD_OPT
-OPTIMIZER = -O2
-else
-OPTIMIZER = -g -O0
-endif
-endif
-CPU_ARCH_TAG = _$(CPU_ARCH)
-
-OS_INCLUDES = -I- -I.
-#G++INCLUDES = -I/usr/include/g++
-
-PLATFORM_FLAGS = -DBeOS -DBEOS $(OS_INCLUDES)
-
-OS_CFLAGS = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
-
-USE_BTHREADS = 1
-
-MKSHLIB = $(LD) $(DSO_LDOPTS)
-
-OBJDIR_NAME = $(OS_CONFIG)_$(CPU_ARCH)$(OBJDIR_TAG).OBJ
-
-####################################################################
-#
-# One can define the makefile variable NSDISTMODE to control
-# how files are published to the 'dist' directory. If not
-# defined, the default is "install using relative symbolic
-# links". The two possible values are "copy", which copies files
-# but preserves source mtime, and "absolute_symlink", which
-# installs using absolute symbolic links. The "absolute_symlink"
-# option requires NFSPWD.
-#
-####################################################################
-
-NSINSTALL = $(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall
-
-ifeq ($(NSDISTMODE),copy)
-# copy files, but preserve source mtime
-INSTALL = $(NSINSTALL) -t
-else
-ifeq ($(NSDISTMODE),absolute_symlink)
-# install using absolute symbolic links
-INSTALL = $(NSINSTALL) -L `$(NFSPWD)`
-else
-# install using relative symbolic links
-INSTALL = $(NSINSTALL) -R
-endif
-endif
-
-define MAKE_OBJDIR
-if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
-endef
diff --git a/mozilla/directory/c-sdk/config/DGUX.mk b/mozilla/directory/c-sdk/config/DGUX.mk
deleted file mode 100644
index 3928aa4fcf8..00000000000
--- a/mozilla/directory/c-sdk/config/DGUX.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is the Netscape Portable Runtime (NSPR).
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation. Portions created by Netscape are
-# Copyright (C) 1998-2000 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable
-# instead of those above. If you wish to allow use of your
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL. If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-#
-# Config stuff for Data General DG/UX
-#
-# Initial DG/UX port by Marc Fraioli ![]()
-
| - |
-
--CONTENTS- -These release notes include: - -
- SUPPORTED -PLATFORMS- -The LDAP SDK for C, version 4.1 provides support for the following platforms: - -
- - INSTALLING THE SDK- -Follow these instructions to install the Netscape LDAP SDK for C: - -
Note that you should install this version of the LDAP SDK for C into a different directory than any other installed version of this software. - - - -- - NEW FEATURES AND ENHANCEMENTS- -This section of enhancements details the changes that were made to both versions 4.0 and 4.1 of the LDAP SDK for C. - -The following set of modifications were made to the LDAP SDK for C, version 4.1: - -
The following set of modifications were made to the LDAP SDK for C, version 4.0: - -
- - LDAP_X_OPT_CONNECT_TIMEOUT- -The LDAP SDK for C, v4.1 provides a new option that allows you to control the TCP/IP timeout. Normally connection attempts will block for a period of time when the connection is for a host that is not reachable. LDAP_X_OPT_CONNECT_TIMEOUT allows you to control the amount of time for which a connection attempt will block in the event that the host is not reachable. You can tell the SDK to return immediately, return after an amount of time that you specify, or to block indefinitely. - -The timeout value is set on a per-session handle basis and you can control the default timeout that is used by all session handles. Use ldap_set_option() to set the timeout value. Use ldap_get_option() to return the timeout value that is set for the current session handle. - -Timeout Values- -To support this option, the following special values are now available: -
In addition, you can specify a timeout value in milliseconds. - -Setting the Timeout Value-The following code fragment sets the timeout value for the session handle to 10 seconds. - -
-#include <stdio.h>
-#include "ldap.h"
-
-#define HOST "mydirectory.siroe.com"
-#define PORT 389
-
-...
-
-LDAP *ld;
-LDAPMessage *result;
-int rc, version;
-
-/* timeout is specified in milliseconds. 10000 = 10 seconds. */
-int timeout = 10000;
-
-...
-
-if ( ( ld = ldap_init( HOST, PORT ) ) == NULL ) {
- perror( "ldap_init" );
- return( -1 );
-}
-
-if ( ldap_set_option( ld, LDAP_X_OPT_CONNECT_TIMEOUT, &timeout ) != LDAP_SUCCESS ) {
- rc = ldap_get_lderrno( ld, NULL, NULL);
- fprintf( stderr, "ldap_set_option: %s\n", ldap_err2string( rc ) );
- ldap_unbind( ld );
- return (rc);
-}
-
-...
-
-
-You can also control the default timeout for all LDAP session handles by setting the -int timeout = LDAP_X_IO_TIMEOUT_WAIT; - -ldap_set_option( NULL, LDAP_X_OPT_CONNECT_TIMEOUT, &timeout ); - -/* the default timeout is now set for all new ldap connections that - are created after this call to ldap_set_option. */ -- - Retrieving the Timeout Value- -The following code fragment retrieves the timeout value for the current session handle. - -
-#include <stdio.h>
-#include "ldap.h"
-
-#define HOST "mydirectory.siroe.com"
-#define PORT 389
-
-...
-
-LDAP *ld;
-LDAPMessage *result;
-int rc, version, timeout;
-
-...
-
-if ( ( ld = ldap_init( HOST, PORT ) ) == NULL ) {
- perror( "ldap_init" );
- return( -1 );
-}
-
-if ( ldap_get_option( ld, LDAP_X_OPT_CONNECT_TIMEOUT, &timeout ) != LDAP_SUCCESS ) {
- rc = ldap_get_lderrno( ld, NULL, NULL);
- fprintf( stderr, "ldap_set_option: %s\n", ldap_err2string( rc ) );
- ldap_unbind( ld );
- return (rc);
-}
-
-switch( timeout ) {
- case LDAP_X_IO_TIMEOUT_NO_WAIT:
- printf("The connection is set to not block\n");
- break;
-
- case LDAP_X_IO_TIMEOUT_NO_TIMEOUT:
- printf("The connection is set to block indefinitely\n");
- break;
-
- default:
- printf("The connection timeout is set to %d seconds", (timeout/1000) );
- break;
-}
-
-...
-
-
-- - LDAP library/API Version Mismatch Error Messages- -This feature was added to version 4.0 of the LDAP SDK for C. - -Various macros and structures have been added to the SDK to allow for compile-time and run-time discovery of the API version. Their intended use is to allow you to ensure that you are compiling and running with the correct version of the LDAP SDK for C. These features are in line with the latest LDAP SDK for C API Internet Draft. - -As a result of these changes, the command line tools bundled with the LDAP SDK for C now check to ensure that they are running with the correct version of the library. If your library path variable (LD_LIBRARY_PATH on most Unix systems and the PATH variable on Windows NT) is set so that an old version of the LDAP SDK for C library is in use, then the command line tools can return one of the following error messages: - -ldapsearch: unable to retrieve LDAP library version information; - this program requires an LDAP library that implements revision - 2003 or greater of the LDAP API. - -ldapsearch: this program requires an LDAP library that implements revision - 2003 or greater of the LDAP API; running with revision 2002. - -ldapsearch: this program requires Netscape Communications Corp.'s LDAP - library version 3.20 or greater; running with version 3.00.- - By default, the tools will exit if they see a mismatch in versions. To override the version mismatch, you can use -0 option (zero, not 'o') with the tools, but results may vary. - -- - 64-Bit Safe Changes- -This feature was added to version 4.0 of the LDAP SDK for C. - -Internal data types for liblber have been upgraded so that the data types are 64-bit safe. This is done in the following section of code in lber.h: - -- --/* - * Implementation-specific integer data types. If living in an LP64 - * environment (where sizeof(long) is 64 bits), we use unsigned ints; - * otherwise we use unsigned longs. The goal is to always use 32-bit - * quantities and to also be backwards compatible with previous SDK - * versions which used unsigned longs. - */ - -#if defined(_LP64) - typedef unsigned int ber_len_t; - typedef int ber_signed_len_t; - typedef unsigned int ber_tag_t; - typedef int ber_int_t; -#else - typedef unsigned long ber_len_t; - typedef long ber_signed_len_t; - typedef unsigned long ber_tag_t; - typedef long ber_int_t; -#endif - This change makes liblber consistent between environments where int data types are 32 bits and those where they are 64 bits. However, this change may cause some compilers, especially c++ compilers where strong type checking is enforced, to emit warnings or errors when you recompile old code. - -- - ldap_url_parse() with Space-Separated Lists of Hosts- -This feature was added to version 4.0 of the LDAP SDK for C. - -You can now pass ldap_url_parse() a string that uses the following format: - -ldap://host1:port1 host2:port2 host2:port3 ... hostn:portn/<basedn>- - Using this formatting, ldap_url_parse() will return results that are acceptable to ldap_init(). For example: - -- --LDAP *ld; -LDAPURLDesc *ludpp; -int res; - -char *url = "ldap://phonebook.example.com:2389 directory.example.com:389/o=example.com"; - -res = ldap_url_parse(url, &ludpp); -ld = ldap_init(ludpp->host, ludpp->port); - This input causes ldap_init() to try to connect to each host and port in the URL string until it finds a host with which it can connect. - -Note that ludpp->port is set to the port identified on the last host in the URL string. If ludpp->port is used as shown here, then the last port identified on the URL string becomes the default port for any hosts for which a port is not explicitly set. Using the example above, suppose the URL string contained the following: - --ldap://phonebook.example.com phonebook2.example.com phonebook3.example.com:2389/o=example.com -- - Here, ldap_init() would use port 2389 for all the hosts that it tries. If the last host in the string does not identify a port, then ludpp->port is set to zero (0). Setting the port to 0 tells ldap_init() to use the default port, which is 389 for ldap:// urls and 636 for ldaps:// urls. - -- - KNOWN -PROBLEMS- -The following is a known bug in this release of the LDAP SDK for C: - -
- - MORE -INFORMATION- -Netscape and iPlanet provide binary releases of this SDK. However, note that this SDK is also available in source code form as part of the Mozilla.org open source project. Refer to the following site for more information on how you can get the source code and contribute to the further development of this SDK: - -http://www.mozilla.org/directory- - Product Documentation- -The LDAP SDK for C Programmer's Guide, version 4.1 is available in HTML and PDF formats. You can access this manual at the following site: http://docs.iplanet.com/docs/manuals/directory.html#SDK. - -Installation instructions and release notes for all iPlanet and Netscape servers are posted at http://docs.iplanet.com/docs/manuals/index.html. - -Reporting Problems with the LDAP SDK for C- -Please submit problem reports to the netscape.public.mozilla.directory newsgroup and/or mailing list. For information on locating this and other Mozilla newsgroups and mailing lists, please see http://www.mozilla.org/community.html - - -- |
-- |
LDAP C SDK 5.0 (3/28/2001)
-
LDAP C SDK 5.01 (06/13/2001)
-
LDAP C SDK 5.02 (07/03/2001)
-
LDAP C SDK 5.03 (08/02/2001)
-
LDAP C SDK 5.04
-(08/15/2001)
-
LDAP C SDK 5.05
-(10/04/2001)
-
-
LDAP C SDK 5.0 (3/28/2001) -(Available on www.iplanet.com) -
LDAP C SDK 5.01 (06/13/2001)
-
LDAP C SDK 5.02 (07/03/2001)
-
LDAP C SDK 5.03 (08/02/2001)
-
LDAP C SDK -5.04 (08/15/2001) -
-
LDAP C SDK 5.05 (10/04/2001) (This release is targeted
-for www.iplanet.com)
-
r{=$Kl{JJ_|biz7Xx3(OkA!wbB)4+c=pO6{X8&u@4=y=gZDPAdKr_M z%uAJ)vxtdZrAEDuiNY0Bkt5h9YJ|~iY0uk)o+D;r=3cq+!{eOz-g ze?1KHgsu+cgWNarX|DUkWOdcpXnW&%#y0OWVW0YWr)R*YmcVjMh|@12eSN|3Oyo$3 zJg#{4_xc`n%}d|8H#;*vvDe%?J~lUoBtMm%+q>qq?xTXZlGVT$CJ4BbO#3K45tUeA zty>_X$zJQ~uU z)Vv#{@Q42r;!ioFDS^ZS-4;NLF{Iw>nOStYi{j?m_epGx2F9mPoGx9gl=-I7d;!yD z U##Qem am} zX_gkkRA|3)gf#*D_?AF)L5&}l2f(A zcqoSpz;sp*=;mHRR>~<`=ekQ)o>OvG=NWv#M9K-hZlZN-%Za)IBka87>f?l(Ia(ob z$i+MK3K70LY?rSD=U)4;@yrhoiPVc95j$V}Mw|22;(xU99t8YNl8mF*-g^cqUNEeR zKFG;dZChkYbf7?e&}Oh=f-g~02SP`mum6ns+ g zdMJl`{ExmxEl1#A7?*kmjI!;CyF&mU<;ZJ2pgb;_a@=b@Y#+aCy_dgVXF^}=z2dv_ zyw;;YURzO25#?u4ZZA|rW3UJj?P7%DjK ~Cd?=hg6s%ya!dNFr~;Sb%NG z+8gmriNVPEnRl+WJFHx8`goLIct&8k5SB0G^3#*P1s-B7IUFTgC7i+j{l0T7g^U*X z-8uS>5|zR$hS3YPv~8f3-LZhM=Kyj9Kc<{;h2rZY2Oa|}w*on#f?~_DE{DnqRMb-- z@6aR0pQH5I0eMnRgf@`lS!d3pga=h}u&Q$i#FrEEiBy0eE SK$Au
dHe zRkfYP$dRHrawvSYPZ0Bvp?X};+Ty)hulF98%bEMa3VYmOIeqGJXO5pVeHHZ(bNPAq z8El|F>$>L-tknv8?npT?d+ta%;ayX^1&@{!Dk!#`8{KmU)N2QPc4a+xfS|UVxIK52 zoR~d#fS9GWJ~4alC^>!WxvleI&*QlGZt!!@Ywtz1#5(VB11ybaGb`(H1Le?0{pfKq zIcVgF$q$$WOk>z8ubl7(s 8Y!nFWByrBkszh)NIR%x&o6~VIEUOFPm|uBHLUjE2D(9dy<6VR|I?9^{-;ja zTR}ILlpHVp)~CTkI^=li#y-#onk~$CKk?{u!1+Xx$pLIM{p9a}^C=_1IE2jw$v=7R z=fKmXg8nIN?oo1fy&E{+KLHru#b&eO|G|fW^PLoc@iI0aRrG%*zL``UW)7Q^ivBsy zmgX!qK Qr@}p0jH3mpy1u;YO@0 48zXiP9=Z(Q4&bS#5dS;=hqc|&qqMe-^&=j1YFnaUtR^yZ$towzlhCkO8##> z-_aO;5%jG}&WS8=248?-*8L_$pK`w|LHbXy`CCPQl*haUKfrdbW-zMc|CIW3AHeXR zaijR(p9j8^RPg^AcKDT|Kg@S#_&p22&ELZ20Y!g^^0{Id;O2kDX1kLArS|~W-{}}; z-L>65O&@`M3EQcsuGjH7;QI4=2fhvbWhMX8zXQJ$KfrzPLqpr=+4CUWCCMW5EYdHl z<33NByA=K2uOiJTIe+yR!1d?&4nBx;uj)Jb`~c{8EB?b1I4#-^&L=?It>_ ?f`$Kn|^@D z+K20obPxOqd@Kby=ON#FJw8|i{Xng0gWpTvPg}i|pT>tOPwb|h-=T!<=lRs~z5L^t zIU+s-efXTrQ?Gk}iM+PYGfTkt;0Jh!AC5b#?EE0l)jLTA9sZvhSM &D##h(+4(6hyEnT0f4zAn&%1r$$g8-@ z_+jnTDVKf@pyVqG^H;BWk55W>eq^LO4+rt+J2KL(|Hw$U{E?Bi{Q6fvv~b|)Yex>b zEu9cA9QoDn@cTDcKQ~R+O12n0oH?91k~!RC3-at)Y?h0TRW_UIBdF#%eya2wKK<=3 z!J8r5#Xo#Uwzf2VuavfQc+Gtm8{(F^YPs07%NL&*Is60`0k3;UOZU|6gLTWXD~@%L zYzM8agp!*#~RIQl;)R>;>gBofB-_adF}8FX6bm#H28|tO4*_YNbnbue-$(wk|Bm xPY1P(-TOXylm5yoYBFAQif_Xss_f$h^KpD!uY&K4&04nn4qCS_xN mod_op = 0; - mods[ 0 ]->mod_type = "objectclass"; - mods[ 0 ]->mod_values = objectclass_values; - mods[ 1 ]->mod_op = 0; - mods[ 1 ]->mod_type = "cn"; - mods[ 1 ]->mod_values = cn_values; - mods[ 2 ]->mod_op = 0; - mods[ 2 ]->mod_type = "sn"; - mods[ 2 ]->mod_values = sn_values; - mods[ 3 ]->mod_op = 0; - mods[ 3 ]->mod_type = "givenname"; - mods[ 3 ]->mod_values = givenname_values; - mods[ 4 ] = NULL; - - - /* Add the entry */ - if (( rc = ldap_add_s( ld, dn, mods )) != LDAP_SUCCESS ) { - /* If entry exists already, fine. Ignore this error. */ - if ( rc == LDAP_ALREADY_EXISTS ) { - printf( "Entry \"%s is already in the directory.\n", dn ); - } else { - ldap_perror( ld, "ldap_add_s" ); - free_mods( mods ); - return( 1 ); - } - } else { - printf( "Added entry \"%s\".\n", dn ); - } - free_mods( mods ); - - /* Delete the destination entry, for this example */ - if (( rc = ldap_delete_s( ld, ndn )) != LDAP_SUCCESS ) { - /* If entry does not exist, fine. Ignore this error. */ - if ( rc == LDAP_NO_SUCH_OBJECT ) { - printf( "Entry \"%s\" is not in the directory. " - "No need to delete.\n", ndn ); - } else { - ldap_perror( ld, "ldap_delete_s" ); - return( 1 ); - } - } else { - printf( "Deleted entry \"%s\".\n", ndn ); - } - - /* Do the modrdn operation */ - if ( ldap_modrdn2_s( ld, dn, nrdn, 0 ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_modrdn2_s" ); - return( 1 ); - } - - printf( "The modrdn operation was successful. Entry\n" - "\"%s\" has been changed to\n" - "\"%s\".\n", dn, ndn ); - - ldap_unbind( ld ); - return 0; -} - - - -/* - * Free a mods array. - */ -static void -free_mods( LDAPMod **mods ) -{ - int i; - - for ( i = 0; i < NMODS; i++ ) { - free( mods[ i ] ); - } - free( mods ); -} diff --git a/mozilla/directory/c-sdk/ldap/examples/nsprio.c b/mozilla/directory/c-sdk/ldap/examples/nsprio.c deleted file mode 100644 index ccc209f1e04..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/nsprio.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * A version of asearch.c that uses NSPR (Netscape Portable Runtime) I/O. - * - * Search the directory for all people whose surname (last name) is - * "Jensen". Since the "sn" attribute is a caseignorestring (cis), case - * is not significant when searching. - * - * Instead of calling the synchronous ldap_search_s() routine, we call - * the asynchronous routine ldap_search() and poll for results using - * ldap_result(). - * - */ - -#include "examples.h" -#include -#include - -static void do_other_work(); - -unsigned long global_counter = 0; - -int -main( int argc, char **argv ) -{ - LDAP *ld; - LDAPMessage *result, *e; - BerElement *ber; - char *host, *a, *dn; - char **vals; - int i; - int rc; - int finished; - int msgid; - int num_entries = 0; - struct timeval zerotime; - - if ( argc > 1 ) { - host = argv[1]; - } else { - host = MY_HOST; - } - - zerotime.tv_sec = zerotime.tv_usec = 0L; - - if ( prldap_install_routines( NULL, 1 /* shared */ ) != LDAP_SUCCESS ) { - ldap_perror( NULL, "prldap_install_routines" ); - return( 1 ); - } - - /* get a handle to an LDAP connection */ - if ( (ld = ldap_init( host, MY_PORT )) == NULL ) { - perror( host ); - return( 1 ); - } - - /* authenticate to the directory as nobody */ - if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_simple_bind_s" ); - return( 1 ); - } - /* search for all entries with surname of Jensen */ - if (( msgid = ldap_search( ld, MY_SEARCHBASE, LDAP_SCOPE_SUBTREE, - MY_FILTER, NULL, 0 )) < 0 ) { - ldap_perror( ld, "ldap_search" ); - return( 1 ); - } - - /* Loop, polling for results until finished */ - finished = 0; - while ( !finished ) { - /* - * Poll for results. We call ldap_result with the "all" argument - * set to LDAP_MSG_ONE. This causes ldap_result() to return exactly one - * entry if at least one entry is available. This allows us to - * display the entries as they are received. - */ - result = NULL; - rc = ldap_result( ld, msgid, LDAP_MSG_ONE, &zerotime, &result ); - switch ( rc ) { - case -1: - /* some error occurred */ - ldap_perror( ld, "ldap_result" ); - return( 1 ); - case 0: - /* Timeout was exceeded. No entries are ready for retrieval. */ - if ( result != NULL ) { - ldap_msgfree( result ); - } - break; - default: - /* - * Either an entry is ready for retrieval, or all entries have - * been retrieved. - */ - if (( e = ldap_first_entry( ld, result )) == NULL ) { - /* All done */ - finished = 1; - if ( result != NULL ) { - ldap_msgfree( result ); - } - continue; - } - /* for each entry print out name + all attrs and values */ - num_entries++; - if (( dn = ldap_get_dn( ld, e )) != NULL ) { - printf( "dn: %s\n", dn ); - ldap_memfree( dn ); - } - for ( a = ldap_first_attribute( ld, e, &ber ); - a != NULL; a = ldap_next_attribute( ld, e, ber ) ) { - if (( vals = ldap_get_values( ld, e, a )) != NULL ) { - for ( i = 0; vals[ i ] != NULL; i++ ) { - printf( "%s: %s\n", a, vals[ i ] ); - } - ldap_value_free( vals ); - } - ldap_memfree( a ); - } - if ( ber != NULL ) { - ber_free( ber, 0 ); - } - printf( "\n" ); - ldap_msgfree( result ); - } - /* Do other work here while you are waiting... */ - do_other_work(); - } - - /* All done. Print a summary. */ - printf( "%d entries retrieved. I counted to %ld " - "while I was waiting.\n", num_entries, - global_counter ); - ldap_unbind( ld ); - return( 0 ); -} - - -/* - * Perform other work while polling for results. This doesn't do anything - * useful, but it could. - */ -static void -do_other_work() -{ - global_counter++; -} diff --git a/mozilla/directory/c-sdk/ldap/examples/ppolicy.c b/mozilla/directory/c-sdk/ldap/examples/ppolicy.c deleted file mode 100644 index ee2d41a8cf9..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/ppolicy.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Attempt to bind to the directory, and report back any password - * expiration information received. - */ -#include "examples.h" - -#define NO_PASSWORD_CONTROLS 0 -#define PASSWORD_EXPIRED -1 - -static void doUsage() { - printf( "Usage: ppolicy HOST PORT DN PASSWORD\n" ); -} - -static int -check_controls( LDAPControl **ctrls ) { - int i; - char buf[256]; - int status = NO_PASSWORD_CONTROLS; - - if ( ctrls == NULL ) { - return NO_PASSWORD_CONTROLS; - } - - for ( i = 0; ctrls[ i ] != NULL; ++i ) { - memcpy( buf, ctrls[ i ]->ldctl_value.bv_val, - ctrls[ i ]->ldctl_value.bv_len ); - buf[ctrls[ i ]->ldctl_value.bv_len] = 0; - if( !strcmp( LDAP_CONTROL_PWEXPIRED, ctrls[ i ]->ldctl_oid ) ) { - status = PASSWORD_EXPIRED; - } else if ( !strcmp( LDAP_CONTROL_PWEXPIRING, - ctrls[ i ]->ldctl_oid ) ) { - status = atoi( buf ); - } - } - - return status; -} - -static void -process_other_errors( int lderr ) { - fprintf( stderr, "ldap_parse_result: %s", - ldap_err2string( lderr )); - if ( LDAP_CONNECT_ERROR == lderr ) { - perror( " - " ); - } else { - fputc( '\n', stderr ); - } -} - -static void -process_other_messages( char *errmsg ) { - if ( errmsg != NULL ) { - if ( *errmsg != '\0' ) { - fprintf( stderr, "Additional info: %s\n", - errmsg ); - } - ldap_memfree( errmsg ); - } -} - - -int -main( int argc, char **argv ) { - LDAP *ld; - char *dn; - char *password; - char *host; - int port; - int rc = 0; - int version = LDAP_VERSION3; - int msgid; - LDAPMessage *result; - LDAPControl **ctrls; - int lderr; - int password_status = 0; - char *matcheddn, *errmsg, **refs; - - if ( argc == 1 ) { - host = MY_HOST; - port = MY_PORT; - dn = USER_DN; - password = USER_PW; - } else if ( argc == 5 ) { - host = argv[1]; - port = atoi( argv[2] ); - dn = argv[3]; - password = argv[4]; - } else { - doUsage(); - return( 1 ); - } - - /* get a handle to an LDAP connection */ - if ( (ld = ldap_init( host, port )) == NULL ) { - perror( "ldap_init" ); - return( 1 ); - } - - if (ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &version ) != 0) { - ldap_perror( ld, "ldap_set_option"); - return ( 1 ); - } - - /* authenticate to the directory */ -#ifdef SYNCHRONOUS_BIND - /* Synchronous bind */ - ldap_simple_bind_s( ld, dn, password ); - lderr = ldap_get_lderrno( ld, NULL, &errmsg ); - if ( LDAP_SUCCESS == lderr ) { - printf( "Authentication successful\n" ); - } else { - rc = -1; - if ( LDAP_INVALID_CREDENTIALS == lderr ) { - fprintf( stderr, "Invalid credentials\n" ); - } else { - process_other_errors( lderr ); - } - if ( errmsg != NULL ) { - if ( strstr( errmsg, "password expired" ) != NULL ) { - fprintf( stderr, "Password expired\n" ); - } else { - fprintf( stderr, "Additional info: %s\n", - errmsg ); - } - ldap_memfree( errmsg ); - } - } - /* You can't get the controls with a synchronous bind, so we - can't report if the password is about to expire */ - -#else - /* Asynchronous bind */ - if ( msgid = ldap_simple_bind( ld, dn, password ) < 0 ) { - ldap_perror( ld, "ldap_simple_bind" ); - rc = -1; - } else { - rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ONE, - (struct timeval *)NULL, &result ); - if ( rc == LDAP_RES_BIND ) { - if ( ldap_parse_result( ld, result, &lderr, &matcheddn, &errmsg, - &refs, &ctrls, 0 ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_parse_result" ); - } else { - if ( LDAP_SUCCESS == lderr ) { - printf( "Authentication successful\n" ); - } else { - if ( LDAP_INVALID_CREDENTIALS == lderr ) { - fprintf( stderr, "Invalid credentials\n" ); - } else { - process_other_errors( lderr ); - } - if ( errmsg != NULL ) { - if ( strstr( errmsg, "password expired" ) != NULL ) { - fprintf( stderr, "Password expired\n" ); - } else { - fprintf( stderr, "Additional info: %s\n", - errmsg ); - } - ldap_memfree( errmsg ); - } - } - - password_status = check_controls( ctrls ); - ldap_controls_free( ctrls ); - if ( password_status == PASSWORD_EXPIRED ) { - fprintf( stderr, - "Password expired and must be reset\n" ); - } else if ( password_status > 0 ) { - fprintf( stderr, - "Password will expire in %d seconds\n", - password_status ); - } - rc = 0; - } - } else { - fprintf( stderr, "ldap_result returned %d\n", rc ); - ldap_perror( ld, "ldap_result" ); - rc = -1; - } - } -#endif - - if ( LDAP_SUCCESS == lderr ) { - ldap_unbind( ld ); - } - - return rc; -} diff --git a/mozilla/directory/c-sdk/ldap/examples/psearch.c b/mozilla/directory/c-sdk/ldap/examples/psearch.c deleted file mode 100644 index 616aaf53b6d..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/psearch.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Use a Persistent Search to monitor the directory server for changes to - * all people entries whose surname (last name) is "Jensen". - * - */ - -#include "examples.h" - -static char *changetype_num2string( int chgtype ); - -int -main( int argc, char **argv ) -{ - LDAP *ld; - LDAPMessage *result, *e; - BerElement *ber; - char *a, *dn; - char **vals; - int i; - int rc; - int finished; - int msgid; - int num_entries = 0; - int version = LDAP_VERSION3; - LDAPControl *ctrls[2], *psctrl, **ectrls; - - /* arrange to use LDAP version 3 */ - if ( ldap_set_option( NULL, LDAP_OPT_PROTOCOL_VERSION, &version ) != 0 ) { - perror( "ldap_set_option" ); - return( 1 ); - } - - /* get a handle to an LDAP connection */ - if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) { - perror( "ldap_init" ); - return( 1 ); - } - - /* authenticate to the directory as nobody */ - if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_simple_bind_s" ); - ldap_unbind( ld ); - return( 1 ); - } - - /* construct the Persistent Search control */ - if ( ldap_create_persistentsearch_control( ld, LDAP_CHANGETYPE_ANY, - 1 /* changesOnly */, 1 /* request entry change controls */, - 1 /* critical */, &psctrl ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_create_persistentsearch_control" ); - ldap_unbind( ld ); - return( 1 ); - } - ctrls[0] = psctrl; - ctrls[1] = NULL; - - /* issue a persistent search for all entries with surname of Jensen */ - if ( LDAP_SUCCESS != ldap_search_ext( ld, MY_SEARCHBASE, - LDAP_SCOPE_SUBTREE, MY_FILTER, NULL /* all attrs */, - 0 /* get attrs and values */, ctrls, NULL /* no client ctrls */, - NULL /* no timeout */, 0 /* no sizelimit */, &msgid )) { - ldap_perror( ld, "ldap_search_ext" ); - ldap_unbind( ld ); - return( 1 ); - } - - ldap_control_free( psctrl ); /* no longer needed */ - - /* - * Loop, polling for results until finished. - * Since this is a persistent search, this loop won't end until the - * server shuts down or we lose the connection for some other reason. - * We could abandon the persistent search or close the connection of - * course, but we don't in this example. - */ - finished = 0; - while ( !finished ) { - /* - * Poll for results. We call ldap_result with the "all" argument - * set to LDAP_MSG_ONE. This causes ldap_result() to return exactly one - * entry if at least one entry is available. This allows us to - * display the entries as they are received. - */ - result = NULL; - rc = ldap_result( ld, msgid, LDAP_MSG_ONE, NULL /* no timeout */, &result ); - switch ( rc ) { - case -1: - /* some error occurred */ - ldap_perror( ld, "ldap_result" ); - ldap_unbind( ld ); - return( 1 ); - case 0: - /* Timeout was exceeded. No entries are ready for retrieval. */ - if ( result != NULL ) { - ldap_msgfree( result ); - } - break; - default: - /* - * Either an entry is ready for retrieval, or all entries have - * been retrieved. - */ - if (( e = ldap_first_entry( ld, result )) == NULL ) { - /* All done */ - finished = 1; - if ( result != NULL ) { - ldap_msgfree( result ); - } - continue; - } - num_entries++; - - /* for each entry print out name */ - if (( dn = ldap_get_dn( ld, e )) != NULL ) { - printf( "dn: %s\n", dn ); - ldap_memfree( dn ); - } - - /* print entry change info. if it was returned */ - if ( LDAP_SUCCESS == ldap_get_entry_controls( ld, e, &ectrls )) { - int chgtype, chgnumpresent; - long chgnum; - char *prevdn; - - if ( LDAP_SUCCESS == ldap_parse_entrychange_control( ld, - ectrls, &chgtype, &prevdn, &chgnumpresent, &chgnum )) { - printf( "changeType: %s\n", - changetype_num2string( chgtype )); - if ( prevdn != NULL ) { - printf( "previousDN: %s\n", prevdn ); - ldap_memfree( prevdn ); - } - if ( chgnumpresent ) { - printf( "changeNumber: %d\n", chgnum ); - } - ldap_controls_free( ectrls ); - } - } - - /* print out all attrs and values */ - for ( a = ldap_first_attribute( ld, e, &ber ); - a != NULL; a = ldap_next_attribute( ld, e, ber ) ) { - if (( vals = ldap_get_values( ld, e, a )) != NULL ) { - for ( i = 0; vals[ i ] != NULL; i++ ) { - printf( "%s: %s\n", a, vals[ i ] ); - } - ldap_value_free( vals ); - } - ldap_memfree( a ); - } - if ( ber != NULL ) { - ber_free( ber, 0 ); - } - printf( "\n" ); - ldap_msgfree( result ); - } - } - - /* All done. Print a summary. */ - printf( "%d entries retrieved.\n", num_entries ); - ldap_unbind( ld ); - return( 0 ); -} - - -static char * -changetype_num2string( int chgtype ) -{ - static char buf[ 25 ]; - char *s; - - switch( chgtype ) { - case LDAP_CHANGETYPE_ADD: - s = "add"; - break; - case LDAP_CHANGETYPE_DELETE: - s = "delete"; - break; - case LDAP_CHANGETYPE_MODIFY: - s = "modify"; - break; - case LDAP_CHANGETYPE_MODDN: - s = "moddn"; - break; - default: - sprintf( s, "unknown (%d)", chgtype ); - } - - return( s ); -} diff --git a/mozilla/directory/c-sdk/ldap/examples/rdentry.c b/mozilla/directory/c-sdk/ldap/examples/rdentry.c deleted file mode 100644 index 7ae9a8ce7e7..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/rdentry.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Search the directory for the specific entry ENTRYDN (defined in examples.h) - * Retrieve all attributes from the entry. - * - */ - -#include "examples.h" - -int -main( int argc, char **argv ) -{ - LDAP *ld; - LDAPMessage *result, *e; - BerElement *ber; - char *a, *dn; - char **vals; - int i; - - /* get a handle to an LDAP connection */ - if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) { - perror( "ldap_init" ); - return( 1 ); - } - /* authenticate to the directory as nobody */ - if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_simple_bind_s" ); - return( 1 ); - } - /* search for Babs' entry */ - if ( ldap_search_s( ld, ENTRYDN, LDAP_SCOPE_SUBTREE, - "(objectclass=*)", NULL, 0, &result ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_search_s" ); - return( 1 ); - } - /* for each entry print out name + all attrs and values */ - for ( e = ldap_first_entry( ld, result ); e != NULL; - e = ldap_next_entry( ld, e ) ) { - if ( (dn = ldap_get_dn( ld, e )) != NULL ) { - printf( "dn: %s\n", dn ); - ldap_memfree( dn ); - } - for ( a = ldap_first_attribute( ld, e, &ber ); - a != NULL; a = ldap_next_attribute( ld, e, ber ) ) { - if ((vals = ldap_get_values( ld, e, a)) != NULL ) { - for ( i = 0; vals[i] != NULL; i++ ) { - printf( "%s: %s\n", a, vals[i] ); - } - ldap_value_free( vals ); - } - ldap_memfree( a ); - } - if ( ber != NULL ) { - ber_free( ber, 0 ); - } - printf( "\n" ); - } - ldap_msgfree( result ); - ldap_unbind( ld ); - return( 0 ); -} diff --git a/mozilla/directory/c-sdk/ldap/examples/search.c b/mozilla/directory/c-sdk/ldap/examples/search.c deleted file mode 100644 index fd218d0636d..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/search.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Search the directory for all people whose surname (last name) is - * "Jensen". Since the "sn" attribute is a caseignorestring (cis), case - * is not significant when searching. - * - */ - -#include "examples.h" - -int -main( int argc, char **argv ) -{ - LDAP *ld; - LDAPMessage *result, *e; - BerElement *ber; - char *a, *dn; - char **vals; - int i; - - /* get a handle to an LDAP connection */ - if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) { - perror( "ldap_init" ); - return( 1 ); - } - /* authenticate to the directory as nobody */ - if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_simple_bind_s" ); - ldap_unbind( ld ); - return( 1 ); - } - /* search for all entries with surname of Jensen */ - if ( ldap_search_s( ld, MY_SEARCHBASE, LDAP_SCOPE_SUBTREE, - MY_FILTER, NULL, 0, &result ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_search_s" ); - if ( result == NULL ) { - ldap_unbind( ld ); - return( 1 ); - } - } - /* for each entry print out name + all attrs and values */ - for ( e = ldap_first_entry( ld, result ); e != NULL; - e = ldap_next_entry( ld, e ) ) { - if ( (dn = ldap_get_dn( ld, e )) != NULL ) { - printf( "dn: %s\n", dn ); - ldap_memfree( dn ); - } - for ( a = ldap_first_attribute( ld, e, &ber ); - a != NULL; a = ldap_next_attribute( ld, e, ber ) ) { - if ((vals = ldap_get_values( ld, e, a)) != NULL ) { - for ( i = 0; vals[i] != NULL; i++ ) { - printf( "%s: %s\n", a, vals[i] ); - } - ldap_value_free( vals ); - } - ldap_memfree( a ); - } - if ( ber != NULL ) { - ber_free( ber, 0 ); - } - printf( "\n" ); - } - ldap_msgfree( result ); - ldap_unbind( ld ); - return( 0 ); -} diff --git a/mozilla/directory/c-sdk/ldap/examples/srvrsort.c b/mozilla/directory/c-sdk/ldap/examples/srvrsort.c deleted file mode 100644 index 20d123826a5..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/srvrsort.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Search the directory for all people. Ask the server to sort the entries - * first by sn (last name) and then in reverse order by givenname (first name). - */ - -#include "examples.h" - -int -main( int argc, char **argv ) -{ - LDAP *ld; - LDAPMessage *result, *e; - char *attrfail, *matched = NULL, *errmsg = NULL; - char **vals, **referrals; - int rc, parse_rc, version; - unsigned long sortrc; - LDAPControl *sortctrl = NULL; - LDAPControl *requestctrls[ 2 ]; - LDAPControl **resultctrls = NULL; - LDAPsortkey **sortkeylist; - - /* Arrange for all connections to use LDAPv3 */ - version = LDAP_VERSION3; - if ( ldap_set_option( NULL, LDAP_OPT_PROTOCOL_VERSION, &version ) - != 0 ) { - fprintf( stderr, - "ldap_set_option protocol version to %d failed\n", - version ); - return( 1 ); - } - - /* Get a handle to an LDAP connection */ - if ( (ld = ldap_init( MY_HOST, MY_PORT ) ) == NULL ) { - perror( "ldap_init" ); - return( 1 ); - } - - /* Authenticate as Directory Manager */ - if ( ldap_simple_bind_s( ld, MGR_DN, MGR_PW ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_simple_bind_s" ); - ldap_unbind( ld ); - return( 1 ); - } - - /* - * Create a sort key list that specifies the sort order of the results. - * Sort the results by last name first, then by first name. - */ - ldap_create_sort_keylist( &sortkeylist, "description -givenname" ); - - /* Create the sort control. */ - rc = ldap_create_sort_control( ld, sortkeylist, 1, &sortctrl ); - if ( rc != LDAP_SUCCESS ) { - fprintf( stderr, "ldap_create_sort_control: %s\n", - ldap_err2string( rc ) ); - ldap_unbind( ld ); - return( 1 ); - } - requestctrls[ 0 ] = sortctrl; - requestctrls[ 1 ] = NULL; - - /* Search for all entries in Sunnyvale */ - - rc = ldap_search_ext_s( ld, PEOPLE_BASE, LDAP_SCOPE_SUBTREE, - "(objectclass=person)", NULL, 0, requestctrls, NULL, NULL, 0, - &result ); - - if ( rc != LDAP_SUCCESS ) { - fprintf( stderr, "ldap_search_ext_s: %s\n", - ldap_err2string( rc ) ); - ldap_unbind( ld ); - return( 1 ); - } - - parse_rc = ldap_parse_result( ld, result, &rc, &matched, &errmsg, - &referrals, &resultctrls, 0 ); - - if ( parse_rc != LDAP_SUCCESS ) { - fprintf( stderr, "ldap_parse_result: %s\n", - ldap_err2string( parse_rc ) ); - ldap_unbind( ld ); - return( 1 ); - } - - if ( rc != LDAP_SUCCESS ) { - fprintf( stderr, "ldap_search_ext_s: %s\n", - ldap_err2string( rc ) ); - if ( errmsg != NULL && *errmsg != '\0' ) { - fprintf( stderr, "%s\n", errmsg ); - } - - ldap_unbind( ld ); - return( 1 ); - } - - parse_rc = ldap_parse_sort_control( ld, resultctrls, &sortrc, - &attrfail ); - - if ( parse_rc != LDAP_SUCCESS ) { - fprintf( stderr, "ldap_parse_sort_control: %s\n", - ldap_err2string( parse_rc ) ); - ldap_unbind( ld ); - return( 1 ); - } - - if ( sortrc != LDAP_SUCCESS ) { - fprintf( stderr, "Sort error: %s\n", ldap_err2string( sortrc )); - if ( attrfail != NULL && *attrfail != '\0' ) { - fprintf( stderr, "Bad attribute: %s\n", attrfail); - } - ldap_unbind( ld ); - return( 1 ); - } - - /* for each entry print out name + all attrs and values */ - for ( e = ldap_first_entry( ld, result ); e != NULL; - e = ldap_next_entry( ld, e ) ) { - if ((vals = ldap_get_values( ld, e, "sn")) != NULL ) { - if ( vals[0] != NULL ) { - printf( "%s", vals[0] ); - } - ldap_value_free( vals ); - } - - if ((vals = ldap_get_values( ld, e, "givenname")) != NULL ) { - if ( vals[0] != NULL ) { - printf( "\t%s", vals[0] ); - } - ldap_value_free( vals ); - } - - putchar( '\n' ); - } - - ldap_msgfree( result ); - ldap_free_sort_keylist( sortkeylist ); - ldap_control_free( sortctrl ); - ldap_controls_free( resultctrls ); - ldap_unbind( ld ); - - return( 0 ); -} diff --git a/mozilla/directory/c-sdk/ldap/examples/ssearch.c b/mozilla/directory/c-sdk/ldap/examples/ssearch.c deleted file mode 100644 index ff62f3d7bda..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/ssearch.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Use an SSL connection to search the directory for all people whose - * surname (last name) is "Jensen". Since the "sn" attribute is a - * caseignorestring (cis), case is not significant when searching. - * - * Authenticate using a client certificate. - * - */ - -#include "examples.h" -#include "ldap_ssl.h" - -#define MY_CERTDB "/usr/netscape4/alias/client-cert.db" -#define MY_KEYDB "/usr/netscape4/alias/client-key.db" -#define MY_KEYNICKNAME "Server-Key" -#define MY_CERTNICKNAME "Server-Cert" -#define MY_KEYPASSWD "secret" - -int -main( int argc, char **argv ) -{ - LDAP *ld; - LDAPMessage *result, *e; - BerElement *ber; - char *a, *dn; - char **vals; - int i; - - /* Initialize the client */ - if ( ldapssl_clientauth_init( MY_CERTDB, NULL, 1 /* need key db */, - MY_KEYDB, NULL ) < 0 ) { - perror( "ldapssl_clientauth_init" ); - return( 1 ); - } - - /* get a handle to an LDAP connection */ - if ( (ld = ldapssl_init( MY_HOST, MY_SSL_PORT, 1 )) == NULL ) { - perror( "ldapssl_init" ); - return( 1 ); - } - - /* use LDAPv3 */ - i = LDAP_VERSION3; - if ( ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &i ) < 0 ) { - ldap_perror( ld, "ldap_set_option LDAPv3" ); - ldap_unbind( ld ); - return( 1 ); - } - - /* enable certificate-based client authentication. */ - if ( ldapssl_enable_clientauth( ld, MY_KEYNICKNAME, MY_KEYPASSWD, - MY_CERTNICKNAME ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldapssl_enable_clientauth" ); - ldap_unbind( ld ); - return( 1 ); - } - - if ( ldap_sasl_bind_s( ld, NULL, LDAP_SASL_EXTERNAL, NULL, NULL, NULL, - NULL ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_sasl_bind_s EXTERNAL" ); - ldap_unbind( ld ); - return( 1 ); - } - - /* search for all entries with surname of Jensen */ - if ( ldap_search_s( ld, PEOPLE_BASE, LDAP_SCOPE_SUBTREE, - "(sn=jensen)", NULL, 0, &result ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_search_s" ); - if ( result == NULL ) { - ldap_unbind( ld ); - return( 1 ); - } - } - /* for each entry print out name + all attrs and values */ - for ( e = ldap_first_entry( ld, result ); e != NULL; - e = ldap_next_entry( ld, e ) ) { - if ( (dn = ldap_get_dn( ld, e )) != NULL ) { - printf( "dn: %s\n", dn ); - ldap_memfree( dn ); - } - for ( a = ldap_first_attribute( ld, e, &ber ); - a != NULL; a = ldap_next_attribute( ld, e, ber ) ) { - if ((vals = ldap_get_values( ld, e, a)) != NULL ) { - for ( i = 0; vals[i] != NULL; i++ ) { - printf( "%s: %s\n", a, vals[i] ); - } - ldap_value_free( vals ); - } - ldap_memfree( a ); - } - if ( ber != NULL ) { - ber_free( ber, 0 ); - } - printf( "\n" ); - } - ldap_msgfree( result ); - ldap_unbind( ld ); - return( 0 ); -} diff --git a/mozilla/directory/c-sdk/ldap/examples/ssnoauth.c b/mozilla/directory/c-sdk/ldap/examples/ssnoauth.c deleted file mode 100644 index 35b17bdae7e..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/ssnoauth.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Use an SSL connection to search the directory for all people whose - * surname (last name) is "Jensen". Since the "sn" attribute is a - * caseignorestring (cis), case is not significant when searching. - * - */ - -#include "examples.h" -#include "ldap_ssl.h" - -#define MY_CERTDB_PATH "/u/mhein/.netscape/" - -int -main( int argc, char **argv ) -{ - LDAP *ld; - LDAPMessage *result, *e; - BerElement *ber; - char *a, *dn; - char **vals; - int i; - - /* Initialize the client */ - if ( ldapssl_client_init( MY_CERTDB_PATH, NULL ) < 0 ) { - perror( "ldapssl_client_init" ); - return( 1 ); - } - - /* get a handle to an LDAP connection */ - if ( (ld = ldapssl_init( MY_HOST, MY_PORT, 1 )) == NULL ) { - perror( "ldapssl_init" ); - return( 1 ); - } - - /* use LDAPv3 */ - i = LDAP_VERSION3; - if ( ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &i ) < 0 ) { - ldap_perror( ld, "ldap_set_option LDAPv3" ); - ldap_unbind( ld ); - return( 1 ); - } - - /* search for all entries with surname of Jensen */ - if ( ldap_search_s( ld, PEOPLE_BASE, LDAP_SCOPE_SUBTREE, - "(sn=jensen)", NULL, 0, &result ) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_search_s" ); - if ( result == NULL ) { - ldap_unbind( ld ); - return( 1 ); - } - } - /* for each entry print out name + all attrs and values */ - for ( e = ldap_first_entry( ld, result ); e != NULL; - e = ldap_next_entry( ld, e ) ) { - if ( (dn = ldap_get_dn( ld, e )) != NULL ) { - printf( "dn: %s\n", dn ); - ldap_memfree( dn ); - } - for ( a = ldap_first_attribute( ld, e, &ber ); - a != NULL; a = ldap_next_attribute( ld, e, ber ) ) { - if ((vals = ldap_get_values( ld, e, a)) != NULL ) { - for ( i = 0; vals[i] != NULL; i++ ) { - printf( "%s: %s\n", a, vals[i] ); - } - ldap_value_free( vals ); - } - ldap_memfree( a ); - } - if ( ber != NULL ) { - ber_free( ber, 0 ); - } - printf( "\n" ); - } - ldap_msgfree( result ); - ldap_unbind( ld ); - return( 0 ); -} diff --git a/mozilla/directory/c-sdk/ldap/examples/win32.mak b/mozilla/directory/c-sdk/ldap/examples/win32.mak deleted file mode 100644 index 375a7b530b8..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/win32.mak +++ /dev/null @@ -1,145 +0,0 @@ -# -# Copyright (c) 1996-1998. Netscape Communications Corporation. All -# rights reserved. -# -# -# Win32 GNU Makefile for Directory SDK examples -# -# build the examples by typing: gmake -f win32.mak -# SSL examples are not built by default. Use 'gmake -f win32.mak ssl' -# NSPR examples are not built by default. Use 'gmake -f win32.mak nspr' -# - - -# For Win32 (NT) -LDAPLIB=nsldap32v50 -SSLDAPLIB=nsldapssl32v50 -PRLDAPLIB=nsldappr32v50 -NSPRLIB=libnspr4 -EXTRACFLAGS=-nologo -W3 -GT -GX -D_X86_ -Dx386 -DWIN32 -D_WINDOWS -c -Od -EXTRALDFLAGS=/NOLOGO /PDB:NONE /DEBUG /DEBUGTYPE:BOTH /SUBSYSTEM:console /FIXED:NO - - -############################################################################### -# You should not need to change anything below here.... - -INTERNAL_LIBLDAP_HEADERS=$(wildcard ../libraries/libldap/*.h) -ifeq (,$(findstring h, $(INTERNAL_LIBLDAP_HEADERS))) -IN_SRC_TREE=0 -else -IN_SRC_TREE=1 -endif - -ifneq ($(IN_SRC_TREE),1) -# we are not in the C SDK source tree... so must be in a binary distribution -INCDIR=../include -LIBDIR=../lib -NSPRINCDIR=../include -NSPRLIBDIR=../lib - -else -# we are in the C SDK source tree... paths to headers and libs are different -NS_DEPTH = ../../.. -LDAP_SRC = .. -NSCP_DISTDIR = ../../../../dist -NSPR_TREE = ../.. -MOD_DEPTH = ../.. - -ifeq ($(HAVE_CCONF), 1) -COMPS_FROM_OBJDIR=1 -endif - -include $(NSPR_TREE)/config/config.mk - -ifeq ($(COMPS_FROM_OBJDIR),1) -NSPR_DISTDIR=$(NSCP_DISTDIR)/$(OBJDIR_NAME) -else -NSPR_DISTDIR=$(NSCP_DISTDIR) -endif - -INCDIR=$(NSCP_DISTDIR)/public/ldap -LIBDIR=$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -NSPRINCDIR=$(NSPR_DISTDIR)/include -NSPRLIBDIR=$(NSPR_DISTDIR)/lib -endif - -SYSLIBS=wsock32.lib kernel32.lib user32.lib shell32.lib -LIBS=$(LIBDIR)/$(LDAPLIB).lib $(LIBDIR)/$(SSLDAPLIB).lib $(LIBDIR)/$(PRLDAPLIB).lib $(NSPRLIBDIR)/$(NSPRLIB).lib - -CC=cl -OPTFLAGS=-MD -CFLAGS=$(OPTFLAGS) $(EXTRACFLAGS) -I$(INCDIR) -I$(NSPRINCDIR) -LINK=link -LDFLAGS=$(EXTRALDFLAGS) - - -PROGS=search asearch csearch psearch rdentry getattrs srvrsort modattrs add del compare modrdn ppolicy getfilt crtfilt -EXES=$(addsuffix .exe,$(PROGS)) - -SSLPROGS=ssnoauth ssearch -SSLEXES=$(addsuffix .exe,$(SSLPROGS)) - -NSPRPROGS=nsprio -NSPREXES=$(addsuffix .exe,$(NSPRPROGS)) - -ALLEXES= $(EXES) $(SSLEXES) $(NSPREXES) - -standard: $(EXES) - -ssl: $(SSLEXES) - -nspr: $(NSPREXES) - -all: $(ALLEXES) - -search.obj: examples.h - -csearch.obj: examples.h - -psearch.obj: examples.h - -ssearch.obj: examples.h - -ssnoauth.obj: examples.h - -rdentry.obj: examples.h - -getattrs.obj: examples.h - -srvrsort.obj: examples.h - -modattrs.obj: examples.h - -asearch.obj: examples.h - -add.obj: examples.h - -del.obj: examples.h - -compare.obj: examples.h - -modrdn.obj: examples.h - -ppolicy.obj: examples.h - -getfilt.obj: examples.h - -crtfilt.obj: examples.h - -nsprio.obj: examples.h - -runall: $(EXES) - @for i in $(PROGS); do \ - echo '-------------------------------------------------'; \ - ./$$i; \ - done - -clean: - rm -f $(ALLEXES) *.obj - -%.obj : %.c - $(CC) $(CFLAGS) $< -Fo$@ - - -%.exe : %.obj - $(LINK) -OUT:$@ $(LDFLAGS) $(SYSLIBS) $< $(LIBS) diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/ConnDlg.cpp b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/ConnDlg.cpp deleted file mode 100644 index 65a2515de8d..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/ConnDlg.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// ConnDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "winldap.h" -#include "ConnDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// ConnDlg dialog - - -ConnDlg::ConnDlg(CWnd* pParent /*=NULL*/) - : CDialog(ConnDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(ConnDlg) - m_dirHost = _T(""); - m_dirPort = 0; - //}}AFX_DATA_INIT -} - - -void ConnDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(ConnDlg) - DDX_Text(pDX, IDC_DIR_HOST, m_dirHost); - DDX_Text(pDX, IDC_DIR_PORT, m_dirPort); - DDV_MinMaxInt(pDX, m_dirPort, 1, 32000); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(ConnDlg, CDialog) - //{{AFX_MSG_MAP(ConnDlg) - // NOTE: the ClassWizard will add message map macros here - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// ConnDlg message handlers diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/ConnDlg.h b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/ConnDlg.h deleted file mode 100644 index 6a3667dbc17..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/ConnDlg.h +++ /dev/null @@ -1,36 +0,0 @@ -// ConnDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// ConnDlg dialog - -class ConnDlg : public CDialog -{ -// Construction -public: - ConnDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(ConnDlg) - enum { IDD = IDD_CONNECT_DIALOG }; - CString m_dirHost; - int m_dirPort; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(ConnDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(ConnDlg) - // NOTE: the ClassWizard will add member functions here - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.DEF b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.DEF deleted file mode 100644 index 862b8719d3b..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.DEF +++ /dev/null @@ -1,8 +0,0 @@ -NAME LDAP16 -EXETYPE WINDOWS -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 - -EXPORTS -; ===List your explicitly exported functions here=== diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.MAK b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.MAK deleted file mode 100644 index d37827cfba4..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.MAK +++ /dev/null @@ -1,186 +0,0 @@ -# Microsoft Visual C++ generated build script - Do not modify - -PROJ = LDAP16 -DEBUG = 0 -PROGTYPE = 0 -CALLER = -ARGS = -DLLS = -D_RCDEFINES = -d_DEBUG -R_RCDEFINES = -dNDEBUG -ORIGIN = MSVC -ORIGIN_VER = 1.00 -PROJPATH = C:\NETSCAPE\LDAPSDK\EXAMPLES\WINDOWS\WINLDAP\ -USEMFC = 1 -CC = cl -CPP = cl -CXX = cl -CCREATEPCHFLAG = -CPPCREATEPCHFLAG = -CUSEPCHFLAG = -CPPUSEPCHFLAG = -FIRSTC = -FIRSTCPP = CONNDLG.CPP -RC = rc -CFLAGS_D_WEXE = /nologo /G3 /W3 /Zi /AL /Od /D "_DEBUG" /D "_AFX_NO_AFXCMN_SUPPORT" /D "_WINDOWS" /FR /GA /Fd"LDAP16.PDB" -CFLAGS_R_WEXE = /nologo /W3 /AL /O1 /D "NDEBUG" /D "_AFX_NO_AFXCMN_SUPPORT" /D "_WINDOWS" /FR /GA -LFLAGS_D_WEXE = /NOLOGO /NOD /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE /CO -LFLAGS_R_WEXE = /NOLOGO /NOD /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE -LIBS_D_WEXE = nsldap.lib lafxcwd oldnames libw llibcew commdlg.lib shell.lib -LIBS_R_WEXE = nsldap.lib lafxcw oldnames libw llibcew commdlg.lib shell.lib -RCFLAGS = /nologo -RESFLAGS = /nologo -RUNFLAGS = -DEFFILE = LDAP16.DEF -OBJS_EXT = -LIBS_EXT = -!if "$(DEBUG)" == "1" -CFLAGS = $(CFLAGS_D_WEXE) -LFLAGS = $(LFLAGS_D_WEXE) -LIBS = $(LIBS_D_WEXE) -MAPFILE = nul -RCDEFINES = $(D_RCDEFINES) -!else -CFLAGS = $(CFLAGS_R_WEXE) -LFLAGS = $(LFLAGS_R_WEXE) -LIBS = $(LIBS_R_WEXE) -MAPFILE = nul -RCDEFINES = $(R_RCDEFINES) -!endif -!if [if exist MSVC.BND del MSVC.BND] -!endif -SBRS = CONNDLG.SBR \ - LDAPDOC.SBR \ - LDAPVIEW.SBR \ - MAINFRM.SBR \ - PROPDLG.SBR \ - SRCHDLG.SBR \ - STDAFX.SBR \ - WINLDAP.SBR - - -CONNDLG_DEP = c:\netscape\ldapsdk\examples\windows\winldap\stdafx.h \ - c:\netscape\ldapsdk\examples\windows\winldap\winldap.h \ - c:\netscape\ldapsdk\examples\windows\winldap\conndlg.h - - -LDAPDOC_DEP = c:\netscape\ldapsdk\examples\windows\winldap\stdafx.h \ - c:\netscape\ldapsdk\examples\windows\winldap\winldap.h \ - c:\netscape\ldapsdk\examples\windows\winldap\ldapdoc.h - - -LDAPVIEW_DEP = c:\netscape\ldapsdk\examples\windows\winldap\stdafx.h \ - c:\netscape\ldapsdk\include\ldap.h \ - c:\netscape\ldapsdk\include\lber.h \ - c:\netscape\ldapsdk\examples\windows\winldap\winldap.h \ - c:\netscape\ldapsdk\examples\windows\winldap\ldapdoc.h \ - c:\netscape\ldapsdk\examples\windows\winldap\ldapview.h \ - c:\netscape\ldapsdk\examples\windows\winldap\propdlg.h - - -MAINFRM_DEP = c:\netscape\ldapsdk\examples\windows\winldap\stdafx.h \ - c:\netscape\ldapsdk\include\ldap.h \ - c:\netscape\ldapsdk\include\lber.h \ - c:\netscape\ldapsdk\examples\windows\winldap\winldap.h \ - c:\netscape\ldapsdk\examples\windows\winldap\mainfrm.h - - -PROPDLG_DEP = c:\netscape\ldapsdk\examples\windows\winldap\stdafx.h \ - c:\netscape\ldapsdk\include\ldap.h \ - c:\netscape\ldapsdk\include\lber.h \ - c:\netscape\ldapsdk\examples\windows\winldap\winldap.h \ - c:\netscape\ldapsdk\examples\windows\winldap\propdlg.h - - -SRCHDLG_DEP = c:\netscape\ldapsdk\examples\windows\winldap\stdafx.h \ - c:\netscape\ldapsdk\include\ldap.h \ - c:\netscape\ldapsdk\include\lber.h \ - c:\netscape\ldapsdk\examples\windows\winldap\winldap.h \ - c:\netscape\ldapsdk\examples\windows\winldap\srchdlg.h - - -STDAFX_DEP = c:\netscape\ldapsdk\examples\windows\winldap\stdafx.h - - -WINLDAP_DEP = c:\netscape\ldapsdk\examples\windows\winldap\stdafx.h \ - c:\netscape\ldapsdk\include\ldap.h \ - c:\netscape\ldapsdk\include\lber.h \ - c:\netscape\ldapsdk\examples\windows\winldap\winldap.h \ - c:\netscape\ldapsdk\examples\windows\winldap\mainfrm.h \ - c:\netscape\ldapsdk\examples\windows\winldap\ldapdoc.h \ - c:\netscape\ldapsdk\examples\windows\winldap\ldapview.h \ - c:\netscape\ldapsdk\examples\windows\winldap\conndlg.h \ - c:\netscape\ldapsdk\examples\windows\winldap\srchdlg.h - - -LDAP16_RCDEP = c:\netscape\ldapsdk\examples\windows\winldap\res\winldap.ico \ - c:\netscape\ldapsdk\examples\windows\winldap\res\winldap.rc2 - - -all: $(PROJ).EXE $(PROJ).BSC - -CONNDLG.OBJ: CONNDLG.CPP $(CONNDLG_DEP) - $(CPP) $(CFLAGS) $(CPPCREATEPCHFLAG) /c CONNDLG.CPP - -LDAPDOC.OBJ: LDAPDOC.CPP $(LDAPDOC_DEP) - $(CPP) $(CFLAGS) $(CPPUSEPCHFLAG) /c LDAPDOC.CPP - -LDAPVIEW.OBJ: LDAPVIEW.CPP $(LDAPVIEW_DEP) - $(CPP) $(CFLAGS) $(CPPUSEPCHFLAG) /c LDAPVIEW.CPP - -MAINFRM.OBJ: MAINFRM.CPP $(MAINFRM_DEP) - $(CPP) $(CFLAGS) $(CPPUSEPCHFLAG) /c MAINFRM.CPP - -PROPDLG.OBJ: PROPDLG.CPP $(PROPDLG_DEP) - $(CPP) $(CFLAGS) $(CPPUSEPCHFLAG) /c PROPDLG.CPP - -SRCHDLG.OBJ: SRCHDLG.CPP $(SRCHDLG_DEP) - $(CPP) $(CFLAGS) $(CPPUSEPCHFLAG) /c SRCHDLG.CPP - -STDAFX.OBJ: STDAFX.CPP $(STDAFX_DEP) - $(CPP) $(CFLAGS) $(CPPUSEPCHFLAG) /c STDAFX.CPP - -WINLDAP.OBJ: WINLDAP.CPP $(WINLDAP_DEP) - $(CPP) $(CFLAGS) $(CPPUSEPCHFLAG) /c WINLDAP.CPP - -LDAP16.RES: LDAP16.RC $(LDAP16_RCDEP) - $(RC) $(RCFLAGS) $(RCDEFINES) -r LDAP16.RC - - -$(PROJ).EXE:: LDAP16.RES - -$(PROJ).EXE:: CONNDLG.OBJ LDAPDOC.OBJ LDAPVIEW.OBJ MAINFRM.OBJ PROPDLG.OBJ SRCHDLG.OBJ \ - STDAFX.OBJ WINLDAP.OBJ $(OBJS_EXT) $(DEFFILE) - echo >NUL @<<$(PROJ).CRF -STDAFX.OBJ + -CONNDLG.OBJ + -LDAPDOC.OBJ + -LDAPVIEW.OBJ + -MAINFRM.OBJ + -PROPDLG.OBJ + -SRCHDLG.OBJ + -WINLDAP.OBJ + -$(OBJS_EXT) -$(PROJ).EXE -$(MAPFILE) -C:\MSVC\LIB\+ -C:\MSVC\MFC\LIB\+ -..\..\..\lib\+ -$(LIBS) -$(DEFFILE); -<< - link $(LFLAGS) @$(PROJ).CRF - $(RC) $(RESFLAGS) LDAP16.RES $@ - @copy $(PROJ).CRF MSVC.BND - -$(PROJ).EXE:: LDAP16.RES - if not exist MSVC.BND $(RC) $(RESFLAGS) LDAP16.RES $@ - -run: $(PROJ).EXE - $(PROJ) $(RUNFLAGS) - - -$(PROJ).BSC: $(SBRS) - bscmake @<< -/o$@ $(SBRS) -<< diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.RC b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.RC deleted file mode 100644 index 2c3c3690dcc..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LDAP16.RC +++ /dev/null @@ -1,241 +0,0 @@ -//Microsoft App Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////// -// -// From TEXTINCLUDE 2 -// -#include "afxres.h" - -//////////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -#ifdef APSTUDIO_INVOKED - -//////////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""res\\winldap.rc2"" // non-App Studio edited resources\r\n" - "\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "\0" -END - -///////////////////////////////////////////////////////////////////////// -#endif // APSTUDIO_INVOKED - - -//////////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -IDR_MAINFRAME ICON DISCARDABLE res\winldap.ico - - -//////////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU PRELOAD DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&Connect...\tCtrl+N", ID_FILE_CONNECT - MENUITEM "&Disconnect\tCtrl+D", ID_FILE_DISCONNECT - MENUITEM "&Search...\tCtrl+S", ID_FILE_SEARCH - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&Help" - BEGIN - MENUITEM "&About Test16...", ID_APP_ABOUT - END -END - - - -//////////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE -BEGIN - "N", ID_FILE_NEW, VIRTKEY,CONTROL - "O", ID_FILE_OPEN, VIRTKEY,CONTROL - "S", ID_FILE_SAVE, VIRTKEY,CONTROL - "Z", ID_EDIT_UNDO, VIRTKEY,CONTROL - "X", ID_EDIT_CUT, VIRTKEY,CONTROL - "C", ID_EDIT_COPY, VIRTKEY,CONTROL - "V", ID_EDIT_PASTE, VIRTKEY,CONTROL - VK_BACK, ID_EDIT_UNDO, VIRTKEY,ALT - VK_DELETE, ID_EDIT_CUT, VIRTKEY,SHIFT - VK_INSERT, ID_EDIT_COPY, VIRTKEY,CONTROL - VK_INSERT, ID_EDIT_PASTE, VIRTKEY,SHIFT - VK_F6, ID_NEXT_PANE, VIRTKEY - VK_F6, ID_PREV_PANE, VIRTKEY,SHIFT -END - - - - -//////////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOG DISCARDABLE 34, 22, 217, 55 -CAPTION "About Test16" -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -FONT 8, "MS Sans Serif" -BEGIN - ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 - LTEXT "Test16 Application Version 1.0",IDC_STATIC,40,10,119,8 - LTEXT "Copyright \251 1997",IDC_STATIC,40,25,119,8 - DEFPUSHBUTTON "OK",IDOK,176,6,32,14,WS_GROUP -END - -IDD_CONNECT_DIALOG DIALOG DISCARDABLE 0, 0, 186, 76 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Connect to Directory Server" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,35,55,50,14 - PUSHBUTTON "Cancel",IDCANCEL,103,55,50,14 - RTEXT "Host name:",IDC_STATIC,21,17,52,12 - EDITTEXT IDC_DIR_PORT,79,33,92,14,ES_AUTOHSCROLL - RTEXT "Port number:",IDC_STATIC,28,36,45,12 - EDITTEXT IDC_DIR_HOST,79,14,92,14,ES_AUTOHSCROLL -END - -IDD_SEARCH_DIALOG DIALOG DISCARDABLE 0, 0, 186, 103 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Search parameters" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,39,82,50,14 - PUSHBUTTON "Cancel",IDCANCEL,105,82,50,14 - RTEXT "Directory base:",IDC_STATIC,7,16,54,12 - EDITTEXT IDC_SEARCH_BASE,65,13,106,14,ES_AUTOHSCROLL - RTEXT "Search filter:",IDC_STATIC,10,34,51,12 - EDITTEXT IDC_SEARCH_FILTER,65,31,105,14,ES_AUTOHSCROLL - CONTROL "Base",IDC_SCOPE_BASE,"Button",BS_AUTORADIOBUTTON,23,60, - 32,10 - CONTROL "One level",IDC_SCOPE_ONE,"Button",BS_AUTORADIOBUTTON,69, - 60,46,10 - CONTROL "Subtree",IDC_SCOPE_SUB,"Button",BS_AUTORADIOBUTTON,121, - 60,41,10 - GROUPBOX "Scope",IDC_STATIC,13,49,159,24 -END - -IDD_ENTRY_PROPERTIES DIALOG DISCARDABLE 0, 0, 273, 202 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Properties" -FONT 8, "MS Sans Serif" -BEGIN -END - - -//////////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE PRELOAD DISCARDABLE -BEGIN - IDR_MAINFRAME "winldap\n\nWinlda\n\n\nWinldap.Document\nWinlda Document" -END -STRINGTABLE PRELOAD DISCARDABLE -BEGIN - AFX_IDS_APP_TITLE "Test16 Windows Application" - AFX_IDS_IDLEMESSAGE "Ready" -END -STRINGTABLE DISCARDABLE -BEGIN - ID_INDICATOR_EXT "EXT" - ID_INDICATOR_CAPS "CAP" - ID_INDICATOR_NUM "NUM" - ID_INDICATOR_SCRL "SCRL" - ID_INDICATOR_OVR "OVR" - ID_INDICATOR_REC "REC" -END -STRINGTABLE DISCARDABLE -BEGIN - ID_FILE_NEW "Create a new document" - ID_FILE_OPEN "Open an existing document" - ID_FILE_CLOSE "Close the active document" - ID_FILE_SAVE "Save the active document" - ID_FILE_SAVE_AS "Save the active document with a new name" - ID_APP_ABOUT "Display program information, version number and copyright" - ID_APP_EXIT "Quit the application; prompts to save documents" - ID_FILE_MRU_FILE1 "Open this document" - ID_FILE_MRU_FILE2 "Open this document" - ID_FILE_MRU_FILE3 "Open this document" - ID_FILE_MRU_FILE4 "Open this document" - ID_NEXT_PANE "Switch to the next window pane" - ID_PREV_PANE "Switch back to the previous window pane" - ID_EDIT_CLEAR "Erase the selection" - ID_EDIT_CLEAR_ALL "Erase everything" - ID_EDIT_COPY "Copy the selection and put it on the Clipboard" - ID_EDIT_CUT "Cut the selection and put it on the Clipboard" - ID_EDIT_FIND "Find the specified text" - ID_EDIT_PASTE "Insert Clipboard contents" - ID_EDIT_REPEAT "Repeat the last action" - ID_EDIT_REPLACE "Replace specific text with different text" - ID_EDIT_SELECT_ALL "Select the entire document" - ID_EDIT_UNDO "Undo the last action" - ID_EDIT_REDO "Redo the previously undone action" -END - -STRINGTABLE DISCARDABLE -BEGIN - AFX_IDS_SCSIZE "Change the window size" - AFX_IDS_SCMOVE "Change the window position" - AFX_IDS_SCMINIMIZE "Reduce the window to an icon" - AFX_IDS_SCMAXIMIZE "Enlarge the window to full size" - AFX_IDS_SCNEXTWINDOW "Switch to the next document window" - AFX_IDS_SCPREVWINDOW "Switch to the previous document window" - AFX_IDS_SCCLOSE "Close the active window and prompts to save the documents" - AFX_IDS_SCRESTORE "Restore the window to normal size" - AFX_IDS_SCTASKLIST "Activate Task List" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_FILE_CONNECT "Connect to Directory Server" - ID_FILE_DISCONNECT "Disconnect from Directory Server" - ID_FILE_SEARCH "Search in Directory" -END - - -#ifndef APSTUDIO_INVOKED -//////////////////////////////////////////////////////////////////////////////// -// -// From TEXTINCLUDE 3 -// - -#include "res\winldap.rc2" // non-App Studio edited resources - -#include "afxres.rc" // Standard components - -//////////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapDoc.cpp b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapDoc.cpp deleted file mode 100644 index 6998a59bff6..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapDoc.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// LdapDoc.cpp : implementation of the LdapDoc class -// - -#include "stdafx.h" -#include "winldap.h" - -#include "LdapDoc.h" - -#ifdef _DEBUG -#ifdef _WIN32 -#define new DEBUG_NEW -#endif -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// LdapDoc - -IMPLEMENT_DYNCREATE(LdapDoc, CDocument) - -BEGIN_MESSAGE_MAP(LdapDoc, CDocument) - //{{AFX_MSG_MAP(LdapDoc) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// LdapDoc construction/destruction - -LdapDoc::LdapDoc() -{ -} - -LdapDoc::~LdapDoc() -{ -} - -BOOL LdapDoc::OnNewDocument() -{ - if (!CDocument::OnNewDocument()) - return FALSE; - - SetTitle( "" ); - return TRUE; -} - -///////////////////////////////////////////////////////////////////////////// -// LdapDoc serialization - -void LdapDoc::Serialize(CArchive& ar) -{ - if (ar.IsStoring()) - { - } - else - { - } -} - -///////////////////////////////////////////////////////////////////////////// -// LdapDoc diagnostics - -#ifdef _DEBUG -void LdapDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void LdapDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// LdapDoc commands diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapDoc.h b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapDoc.h deleted file mode 100644 index a538d0b3226..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapDoc.h +++ /dev/null @@ -1,42 +0,0 @@ -// LdapDoc.h : interface of the LdapDoc class -// -///////////////////////////////////////////////////////////////////////////// - -class LdapDoc : public CDocument -{ -protected: // create from serialization only - LdapDoc(); - DECLARE_DYNCREATE(LdapDoc) - -// Attributes -public: - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(LdapDoc) - public: - virtual BOOL OnNewDocument(); - virtual void Serialize(CArchive& ar); - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~LdapDoc(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - -// Generated message map functions -protected: - //{{AFX_MSG(LdapDoc) - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapView.cpp b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapView.cpp deleted file mode 100644 index 8cb908ad5b3..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapView.cpp +++ /dev/null @@ -1,190 +0,0 @@ -// LdapView.cpp : implementation of the LdapView class -// - -#include "stdafx.h" -#include "ldap.h" -#include "winldap.h" - -#include "LdapDoc.h" -#include "LdapView.h" -#include "PropDlg.h" - -#ifdef _DEBUG -#ifdef _WIN32 -#define new DEBUG_NEW -#endif -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// LdapView - -IMPLEMENT_DYNCREATE(LdapView, CView) - -BEGIN_MESSAGE_MAP(LdapView, CView) - //{{AFX_MSG_MAP(LdapView) - ON_WM_SIZE() - ON_LBN_DBLCLK(5000,OnListDoubleClick) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// LdapView construction/destruction - -LdapView::LdapView() -{ -} - -LdapView::~LdapView() -{ -} - -BOOL LdapView::PreCreateWindow(CREATESTRUCT& cs) -{ - return CView::PreCreateWindow(cs); -} - -///////////////////////////////////////////////////////////////////////////// -// LdapView drawing - -void LdapView::OnDraw(CDC* pDC) -{ - LdapDoc* pDoc = GetDocument(); - ASSERT_VALID(pDoc); -} - -void LdapView::OnInitialUpdate() -{ - CView::OnInitialUpdate(); - // Create a list box the same size as the client area - CRect rect; - GetClientRect( &rect ); - m_list.Create( WS_CHILD|WS_VISIBLE|WS_VSCROLL|LBS_NOTIFY, rect, this, 5000 ); -} - -void LdapView::AddLine( LPCSTR line, const char *dn ) -{ - // Add a string to the list box - int ind = m_list.AddString( line ); - if ( NULL != dn ) - m_list.SetItemDataPtr( ind, (void *)strdup(dn) ); -} - -void LdapView::ClearLines() -{ - // Remove all lines from the list box - int nCount = m_list.GetCount(); - while ( nCount > 0 ) - { - char *str = (char *)m_list.GetItemDataPtr( 0 ); - if ( str ) - free( str ); - nCount = m_list.DeleteString( 0 ); - } -} - -///////////////////////////////////////////////////////////////////////////// -// LdapView diagnostics - -#ifdef _DEBUG -void LdapView::AssertValid() const -{ - CView::AssertValid(); -} - -void LdapView::Dump(CDumpContext& dc) const -{ - CView::Dump(dc); -} - -LdapDoc* LdapView::GetDocument() // non-debug version is inline -{ - ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(LdapDoc))); - return (LdapDoc*)m_pDocument; -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// LdapView message handlers - -void LdapView::OnSize(UINT nType, int cx, int cy) -{ - // Make sure the list box is resized along with the View - CView::OnSize(nType, cx, cy); - if ( ::IsWindow( m_list.m_hWnd ) ) - m_list.SetWindowPos( &wndTop, 0, 0, cx, cy, SWP_NOZORDER ); -} - -// Fetch all attributes of an entry, and display them in a dialog -void LdapView::showProperties( LDAP *ld, char *dn ) -{ - PropDlg dlg; - if ( ldap_search( ld, dn, LDAP_SCOPE_BASE, "objectclass=*", - NULL, FALSE ) == -1 ) - { - AfxMessageBox( "Failed to start asynchronous search" ); - return; - } - - LDAPMessage *res; - int rc; - // Process results as they come in - while ( (rc = ldap_result( ld, LDAP_RES_ANY, 0, NULL, &res )) - == LDAP_RES_SEARCH_ENTRY ) - { - LDAPMessage *e = ldap_first_entry( ld, res ); - BerElement *ber; - // Loop over attributes in this entry - for ( char *a = ldap_first_attribute( ld, e, &ber ); a != NULL; - a = ldap_next_attribute( ld, e, ber ) ) - { - struct berval **bvals; - if ( (bvals = ldap_get_values_len( ld, e, a )) != NULL ) - { - dlg.AddLine( a ); - // Loop over values for this attribute - for ( int i = 0; bvals[i] != NULL; i++ ) - { - CString val; - val.Format( " %s", bvals[ i ]->bv_val ); - dlg.AddLine( val ); - } - ber_bvecfree( bvals ); - } - } - if ( ber != NULL ) - ber_free( ber, 0 ); - ldap_msgfree( res ); - } - if ( rc == -1 ) - { - AfxMessageBox( "Error on ldap_result" ); - return; - } - else if (( rc = ldap_result2error( ld, res, 0 )) != LDAP_SUCCESS ) - { - char *errString = ldap_err2string( rc ); - AfxMessageBox( errString ); - } - ldap_msgfree( res ); - // Set the title of the dialog to the distinguished name, and display it - dlg.SetTitle( dn ); - dlg.DoModal(); -} - -// Catch double-clicks on the list box, and fetch properties for a dn -void LdapView::OnListDoubleClick() -{ - int ind = m_list.GetCurSel(); - if ( ind >= 0 ) - { - char *dn = (char *)m_list.GetItemDataPtr( ind ); - if ( NULL != dn ) - { - LDAP *ld = ((LdapApp *)AfxGetApp())->GetConnection(); - if ( NULL != ld ) - showProperties( ld, dn ); - } - } -} diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapView.h b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapView.h deleted file mode 100644 index 1fdf82f160c..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/LdapView.h +++ /dev/null @@ -1,60 +0,0 @@ -// LdapView.h : interface of the LdapView class -// -///////////////////////////////////////////////////////////////////////////// - -class LdapView : public CView -{ -protected: // create from serialization only - LdapView(); - DECLARE_DYNCREATE(LdapView) - -// Attributes -public: - LdapDoc* GetDocument(); - -private: - CListBox m_list; - -// Operations -public: - void AddLine( LPCSTR line, const char *dn=NULL ); - void ClearLines(); - -private: - void showProperties( LDAP *ld, char *dn ); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(LdapView) - public: - virtual void OnDraw(CDC* pDC); // overridden to draw this view - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - protected: - virtual void OnInitialUpdate(); // called first time after construct - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~LdapView(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - -// Generated message map functions -protected: - //{{AFX_MSG(LdapView) - afx_msg void OnSize(UINT nType, int cx, int cy); - afx_msg void OnListDoubleClick(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -#ifndef _DEBUG // debug version in LdapView.cpp -inline LdapDoc* LdapView::GetDocument() - { return (LdapDoc*)m_pDocument; } -#endif - -///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/MainFrm.cpp b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/MainFrm.cpp deleted file mode 100644 index f5d2c28ec21..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/MainFrm.cpp +++ /dev/null @@ -1,85 +0,0 @@ -// MainFrm.cpp : implementation of the CMainFrame class -// - -#include "stdafx.h" -#include "winldap.h" - -#include "MainFrm.h" - -#ifdef _DEBUG -#ifdef _WIN32 -#define new DEBUG_NEW -#endif -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame - -IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) - -BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) - //{{AFX_MSG_MAP(CMainFrame) - ON_WM_CREATE() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -static UINT indicators[] = -{ - ID_SEPARATOR, // status line indicator - ID_INDICATOR_CAPS, - ID_INDICATOR_NUM, - ID_INDICATOR_SCRL, -}; - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame construction/destruction - -CMainFrame::CMainFrame() -{ -} - -CMainFrame::~CMainFrame() -{ -} - -int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) -{ - if (CFrameWnd::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_wndStatusBar.Create(this) || - !m_wndStatusBar.SetIndicators(indicators, - sizeof(indicators)/sizeof(UINT))) - { - TRACE0("Failed to create status bar\n"); - return -1; // fail to create - } - - return 0; -} - -BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) -{ - return CFrameWnd::PreCreateWindow(cs); -} - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame diagnostics - -#ifdef _DEBUG -void CMainFrame::AssertValid() const -{ - CFrameWnd::AssertValid(); -} - -void CMainFrame::Dump(CDumpContext& dc) const -{ - CFrameWnd::Dump(dc); -} - -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame message handlers diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/MainFrm.h b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/MainFrm.h deleted file mode 100644 index 07bf52d673e..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/MainFrm.h +++ /dev/null @@ -1,43 +0,0 @@ -// MainFrm.h : interface of the CMainFrame class -// -///////////////////////////////////////////////////////////////////////////// - -class CMainFrame : public CFrameWnd -{ -protected: // create from serialization only - CMainFrame(); - DECLARE_DYNCREATE(CMainFrame) - -// Attributes -public: - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CMainFrame) - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~CMainFrame(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: // control bar embedded members - CStatusBar m_wndStatusBar; - CToolBar m_wndToolBar; - -// Generated message map functions -protected: - //{{AFX_MSG(CMainFrame) - afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/PropDlg.cpp b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/PropDlg.cpp deleted file mode 100644 index e8080b2316b..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/PropDlg.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// PropDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "winldap.h" -#include "PropDlg.h" - -#ifdef _DEBUG -#ifdef _WIN32 -#define new DEBUG_NEW -#endif -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// PropDlg dialog - - -PropDlg::PropDlg(CWnd* pParent /*=NULL*/) - : CDialog(PropDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(PropDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void PropDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(PropDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(PropDlg, CDialog) - //{{AFX_MSG_MAP(PropDlg) - ON_WM_SIZE() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// PropDlg message handlers - -void PropDlg::OnSize(UINT nType, int cx, int cy) -{ - CDialog::OnSize(nType, cx, cy); - - if ( ::IsWindow( m_list.m_hWnd ) ) - m_list.SetWindowPos( &wndTop, 0, 0, cx, cy, SWP_NOZORDER ); -} - -BOOL PropDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - if ( m_title.GetLength() > 0 ) - SetWindowText( m_title ); - CRect rect; - GetClientRect( &rect ); - m_list.Create( WS_CHILD|WS_VISIBLE|WS_VSCROLL|LBS_NOTIFY, rect, this, 5000 ); - - POSITION pos; - // Iterate through the list in head-to-tail order. - for( pos = m_strings.GetHeadPosition(); pos != NULL; ) - { - m_list.AddString( m_strings.GetNext( pos ) ); - } - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void PropDlg::AddLine( const char *str ) -{ - m_strings.AddTail( str ); -} diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/PropDlg.h b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/PropDlg.h deleted file mode 100644 index f681642a2b0..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/PropDlg.h +++ /dev/null @@ -1,45 +0,0 @@ -// PropDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// PropDlg dialog - -class PropDlg : public CDialog -{ -// Construction -public: - PropDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(PropDlg) - enum { IDD = IDD_ENTRY_PROPERTIES }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - void SetTitle( const char *str ) { m_title = str; } - -private: - CListBox m_list; - CStringList m_strings; - CString m_title; - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(PropDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -public: - void AddLine( const char *line ); - -protected: - - // Generated message map functions - //{{AFX_MSG(PropDlg) - afx_msg void OnSize(UINT nType, int cx, int cy); - virtual BOOL OnInitDialog(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/Resource.h b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/Resource.h deleted file mode 100644 index e938bbccf1c..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/Resource.h +++ /dev/null @@ -1,32 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by winldap.rc -// -#define IDD_ABOUTBOX 100 -#define IDR_MAINFRAME 128 -#define IDR_WINLDATYPE 129 -#define IDD_CONNECT_DIALOG 130 -#define IDD_SEARCH_DIALOG 131 -#define IDD_ENTRY_PROPERTIES 132 -#define IDC_SEARCH_BASE 1000 -#define IDC_DIR_PORT 1001 -#define IDC_SEARCH_FILTER 1001 -#define IDC_DIR_HOST 1002 -#define IDC_SCOPE_BASE 1002 -#define IDC_SCOPE_ONE 1003 -#define IDC_SCOPE_SUB 1004 -#define ID_FILE_CONNECT 32771 -#define ID_FILE_DISCONNECT 32772 -#define ID_FILE_SEARCH 32773 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 133 -#define _APS_NEXT_COMMAND_VALUE 32774 -#define _APS_NEXT_CONTROL_VALUE 1003 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/SrchDlg.cpp b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/SrchDlg.cpp deleted file mode 100644 index 782e47dedbf..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/SrchDlg.cpp +++ /dev/null @@ -1,89 +0,0 @@ -// SrchDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "ldap.h" -#include "winldap.h" -#include "SrchDlg.h" - -#ifdef _DEBUG -#ifdef _WIN32 -#define new DEBUG_NEW -#endif -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// SearchDlg dialog - - -SearchDlg::SearchDlg(CWnd* pParent /*=NULL*/) - : CDialog(SearchDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(SearchDlg) - m_searchBase = _T(""); - m_searchFilter = _T(""); - //}}AFX_DATA_INIT -} - - -void SearchDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(SearchDlg) - DDX_Text(pDX, IDC_SEARCH_BASE, m_searchBase); - DDX_Text(pDX, IDC_SEARCH_FILTER, m_searchFilter); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(SearchDlg, CDialog) - //{{AFX_MSG_MAP(SearchDlg) - ON_BN_CLICKED(IDC_SCOPE_BASE, OnScopeBase) - ON_BN_DOUBLECLICKED(IDC_SCOPE_BASE, OnScopeBase) - ON_BN_CLICKED(IDC_SCOPE_ONE, OnScopeOne) - ON_BN_DOUBLECLICKED(IDC_SCOPE_ONE, OnScopeOne) - ON_BN_CLICKED(IDC_SCOPE_SUB, OnScopeSub) - ON_BN_DOUBLECLICKED(IDC_SCOPE_SUB, OnScopeSub) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// SearchDlg message handlers - -BOOL SearchDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - switch( m_scope ) - { - case LDAP_SCOPE_SUBTREE: - ((CButton *)GetDlgItem( IDC_SCOPE_SUB ))->SetCheck( 1 ); - break; - case LDAP_SCOPE_BASE: - ((CButton *)GetDlgItem( IDC_SCOPE_BASE ))->SetCheck( 1 ); - break; - case LDAP_SCOPE_ONELEVEL: - ((CButton *)GetDlgItem( IDC_SCOPE_ONE ))->SetCheck( 1 ); - break; - } - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void SearchDlg::OnScopeBase() -{ - m_scope = LDAP_SCOPE_BASE; -} - -void SearchDlg::OnScopeOne() -{ - m_scope = LDAP_SCOPE_ONELEVEL; -} - -void SearchDlg::OnScopeSub() -{ - m_scope = LDAP_SCOPE_SUBTREE; -} diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/SrchDlg.h b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/SrchDlg.h deleted file mode 100644 index 1b0c0714378..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/SrchDlg.h +++ /dev/null @@ -1,47 +0,0 @@ -// SrchDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// SearchDlg dialog - -class SearchDlg : public CDialog -{ -// Construction -public: - SearchDlg(CWnd* pParent = NULL); // standard constructor - -public: - void SetScope( int scope ) { m_scope = scope; } - int GetScope() { return m_scope; } - -private: - int m_scope; - -public: -// Dialog Data - //{{AFX_DATA(SearchDlg) - enum { IDD = IDD_SEARCH_DIALOG }; - CString m_searchBase; - CString m_searchFilter; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(SearchDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(SearchDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnScopeBase(); - afx_msg void OnScopeOne(); - afx_msg void OnScopeSub(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/StdAfx.cpp b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/StdAfx.cpp deleted file mode 100644 index eb9e17657bc..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// winldap.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/StdAfx.h b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/StdAfx.h deleted file mode 100644 index 9ff48947f9b..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/StdAfx.h +++ /dev/null @@ -1,18 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#ifdef _WIN32 -#include -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT -#endif - - - diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/LdapDoc.ico b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/LdapDoc.ico deleted file mode 100644 index 2a1f1ae6ef15e51df8c39bc028bbfb2171822ba5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmcJNF;c@Y5JlGsgIpoERJdY%i*S@2!JS&si6f-)RXoFGDAfg5;z_dQBoi_)1DpI^ z{oS?KlD %25H@>BZ{KJV|_dD9_G1MV<{5a&-}7^W%4AM)k- zx&P*V(j}a@*Y~UhksXTAK!NRyiYN-8NMyKz<)2v9@tUao7A!g+SzkAcsHvdq6!0vQ z#-rA6>0BAr)4* u6Y57EdkamnXf Uh-a7VEuQ2KJb_2>o71HC3-%7w@Bjb+ diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/Toolbar.bmp b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/Toolbar.bmp deleted file mode 100644 index d501723c1ceb781cccf04bc42408a2bee6b0eab4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmb_byK2Kg5WFD46)N-_DGd%mbvRHJ@+(`2Y#@z5De^h$T}Yp#;yM?~%&rw%!DZII z_s!1Ct^M-)Tn3AG^p9vgT8;J){9rDyxEsA+?t8 wt)o$n@0`>@NK8bGHkdKdb4m#tglAgQo-)Js1!#;+~GSl z37z4Z<|(I?jV44Q_xOeQ!(IFmLY86pVjciLPfC9(?0)$t7hw7W^>>N<@a4LVKPMb~ ze5>=j|BL>!3lPen5hUo~ANKN`l7C&3 z%0PPq3XFRT-e1OO0*EKjOA>DIfd!JKE>l7s8ZOWoALnDl7bEaBMvn{Ll0`lMj_p*2 zeyj@cEB=w(f%+@Ig9SfK=ePQ9c)El>T>d0F2ei{lnHqPg}I t<8 diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/winldap.ico b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/winldap.ico deleted file mode 100644 index 6cf11ea5d08af24a7ed81ecdb95fefc9b867784a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmb_b%}&BV5dI1pQ?r2*Pn_(@@EAUTv5(>-*!TqH#>NJ@L&BN%z$RV{X~Mx5F!6v# zPDY`zezOe(u@@uL&d)b9-)y#-0uE~MeGejUHQ<8Y^Ge)tfJPnYFy~V*sSb{4fsnn` z60*oj7?zHfA&fEfQYh?;qL7HnM^a)AEUi5$Z?!$dIW%r-E6|a6IG%=fBR&vou}iOa zFe_k}hO4#ompCGh-0l{;yO<37y4|)WnOsW}{`P7%I5^(>oUNb7{U31$eu+%IEsC!y zMcr#$=}G@Op7ewG@h*s;dqMo#3-qFQQeV`nIFgf@MTN+o%Qy6?n>{y-t0m-)v%;OW zj+Wsc_grO};S3nHRCH=S8_$`@PKU`LhiVR|X_7&y;pcs_G-@{0IvpFeO0`~(4C|AJ z#2D7ob&>;f;bokYuSPlNz%-4_#pWD|;Xf}bvE-yC KJ<=;2;eG>fllFiB diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/winldap.rc2 b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/winldap.rc2 deleted file mode 100644 index e298e789cdb..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/res/winldap.rc2 +++ /dev/null @@ -1,13 +0,0 @@ -// -// WINLDAP.RC2 - resources Microsoft Visual C++ does not edit directly -// - -#ifdef APSTUDIO_INVOKED - #error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// Add manually edited resources here... - -///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.cpp b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.cpp deleted file mode 100644 index 51cef5af5dd..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.cpp +++ /dev/null @@ -1,299 +0,0 @@ -// winldap.cpp : Defines the class behaviors for the application. -// - -#include "stdafx.h" -#include "ldap.h" -#include "winldap.h" - -#include "MainFrm.h" -#include "LdapDoc.h" -#include "LdapView.h" -#include "ConnDlg.h" -#include "SrchDlg.h" - -#ifdef _DEBUG -#ifdef _WIN32 -#define new DEBUG_NEW -#endif -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// LdapApp - -BEGIN_MESSAGE_MAP(LdapApp, CWinApp) - //{{AFX_MSG_MAP(LdapApp) - ON_COMMAND(ID_APP_ABOUT, OnAppAbout) - ON_COMMAND(ID_FILE_CONNECT, OnFileConnect) - ON_UPDATE_COMMAND_UI(ID_FILE_CONNECT, OnUpdateFileConnect) - ON_COMMAND(ID_FILE_DISCONNECT, OnFileDisconnect) - ON_UPDATE_COMMAND_UI(ID_FILE_DISCONNECT, OnUpdateFileDisconnect) - ON_COMMAND(ID_FILE_SEARCH, OnFileSearch) - ON_UPDATE_COMMAND_UI(ID_FILE_SEARCH, OnUpdateFileSearch) - //}}AFX_MSG_MAP - // Standard file based document commands - ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) - ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// LdapApp construction - -LdapApp::LdapApp() -{ - m_ld = NULL; - m_connected = FALSE; -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only LdapApp object - -LdapApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// LdapApp initialization - -BOOL LdapApp::InitInstance() -{ - // Standard initialization -#ifdef _WIN32 -#ifdef _AFXDLL - Enable3dControls(); // Call this when using MFC in a shared DLL -#else - Enable3dControlsStatic(); // Call this when linking to MFC statically -#endif -#endif - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register document templates - - CSingleDocTemplate* pDocTemplate; - pDocTemplate = new CSingleDocTemplate( - IDR_MAINFRAME, - RUNTIME_CLASS(LdapDoc), - RUNTIME_CLASS(CMainFrame), // main SDI frame window - RUNTIME_CLASS(LdapView)); - AddDocTemplate(pDocTemplate); - -#ifdef _WIN32 - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; -#else - // create a new (empty) document - OnFileNew(); - - if (m_lpCmdLine[0] != '\0') - { - } -#endif - - m_dirHost = GetProfileString( "Connection", "host", "localhost" ); - m_dirPort = GetProfileInt( "Connection", "port", 389 ); - m_searchBase = GetProfileString( "Search", "base", "dc=example,dc=com" ); - - m_scope = GetProfileInt( "Search", "scope", LDAP_SCOPE_SUBTREE ); - m_searchFilter = GetProfileString( "Search", "filter", "objectclass=*" ); - - return TRUE; -} - -///////////////////////////////////////////////////////////////////////////// -// CAboutDlg dialog used for App About - -class CAboutDlg : public CDialog -{ -public: - CAboutDlg(); - -// Dialog Data - //{{AFX_DATA(CAboutDlg) - enum { IDD = IDD_ABOUTBOX }; - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CAboutDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - //{{AFX_MSG(CAboutDlg) - // No message handlers - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) -{ - //{{AFX_DATA_INIT(CAboutDlg) - //}}AFX_DATA_INIT -} - -void CAboutDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CAboutDlg) - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) - //{{AFX_MSG_MAP(CAboutDlg) - // No message handlers - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -// App command to run the dialog -void LdapApp::OnAppAbout() -{ - CAboutDlg aboutDlg; - aboutDlg.DoModal(); -} - -///////////////////////////////////////////////////////////////////////////// -// LdapApp commands - -// Initialize an anonymous connection to a Directory Server -void LdapApp::OnFileConnect() -{ - ConnDlg dlg; - dlg.m_dirHost = m_dirHost; - dlg.m_dirPort = m_dirPort; - if ( IDOK == dlg.DoModal() ) - { - m_dirHost = dlg.m_dirHost; - m_dirPort = dlg.m_dirPort; - m_ld = ldap_init( m_dirHost, m_dirPort ); - if ( NULL != m_ld ) - { - // Bind as anonymous - if ( ldap_bind_s( m_ld, "", "", LDAP_AUTH_SIMPLE ) - != LDAP_SUCCESS ) - { - AfxMessageBox( "Error binding!" ); - return; - } - } - else - { - AfxMessageBox( "Error connecting!" ); - return; - } - m_connected = TRUE; - LdapView *view = (LdapView *)((CFrameWnd *)AfxGetMainWnd())->GetActiveView(); - if ( view ) - { - CString title; - title.Format( "Host %s, port %d", m_dirHost, m_dirPort ); - view->GetDocument()->SetTitle( title ); - } - } -} - -void LdapApp::OnUpdateFileConnect(CCmdUI* pCmdUI) -{ - pCmdUI->Enable( !IsConnected() ); -} - -// Disconnect (unbind from) a Directory Server -void LdapApp::OnFileDisconnect() -{ - ldap_unbind( m_ld ); - m_ld = NULL; - m_connected = FALSE; - LdapView *view = (LdapView *)((CFrameWnd *)AfxGetMainWnd())->GetActiveView(); - if ( view ) - { - view->GetDocument()->SetTitle( "" ); - } -} - -void LdapApp::OnUpdateFileDisconnect(CCmdUI* pCmdUI) -{ - pCmdUI->Enable( IsConnected() ); -} - -// Search for and report distinguished names (no attributes) -void LdapApp::OnFileSearch() -{ - SearchDlg dlg; - dlg.m_searchBase = m_searchBase; - dlg.SetScope( m_scope ); - dlg.m_searchFilter = m_searchFilter; - // Get desired search parameters - if ( IDOK == dlg.DoModal() ) - { - m_searchBase = dlg.m_searchBase; - m_searchFilter = dlg.m_searchFilter; - m_scope = dlg.GetScope(); - // Clear the result list - LdapView *view = (LdapView *)((CFrameWnd *)AfxGetMainWnd())->GetActiveView(); - if ( view ) - view->ClearLines(); - char *attrs[2]; - // "dn" is a pseudo-attribute; it is always returned anyway, but not as - // an attribute - attrs[0] = "dn"; - attrs[1] = NULL; - if ( ldap_search( m_ld, m_searchBase, m_scope, m_searchFilter, - attrs, FALSE ) == -1 ) - { - AfxMessageBox( "Failed to start asynchronous search" ); - return; - } - LDAPMessage *res; - int rc; - // Fetch all results as they become available - while ( (rc = ldap_result( m_ld, LDAP_RES_ANY, 0, NULL, &res )) - == LDAP_RES_SEARCH_ENTRY ) - { - LDAPMessage *e = ldap_first_entry( m_ld, res ); - // Get the distinguished name and show it - char *dn = ldap_get_dn( m_ld, e ); - if ( view ) - view->AddLine( dn, dn ); - ldap_memfree( dn ); - ldap_msgfree( res ); - // Let the view be updated -#ifdef _WIN32 - Sleep( 0 ); -#else - Yield(); -#endif - } - if ( rc == -1 ) - { - AfxMessageBox( "Error on ldap_result" ); - return; - } - else if (( rc = ldap_result2error( m_ld, res, 0 )) != LDAP_SUCCESS ) - { - char *errString = ldap_err2string( rc ); - AfxMessageBox( errString ); - } - ldap_msgfree( res ); - } -} - -void LdapApp::OnUpdateFileSearch(CCmdUI* pCmdUI) -{ - pCmdUI->Enable( IsConnected() ); -} - -int LdapApp::ExitInstance() -{ - WriteProfileString( "Connection", "host", m_dirHost ); - WriteProfileInt( "Connection", "port", m_dirPort ); - WriteProfileString( "Search", "base", m_searchBase ); - WriteProfileInt( "Search", "scope", m_scope ); - WriteProfileString( "Search", "filter", m_searchFilter ); - - return CWinApp::ExitInstance(); -} diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.h b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.h deleted file mode 100644 index a6a141e5b9f..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.h +++ /dev/null @@ -1,61 +0,0 @@ -// winldap.h : main header file for the WINLDAP application -// - -#ifndef __AFXWIN_H__ - #error include 'stdafx.h' before including this file for PCH -#endif - -#include "resource.h" // main symbols - -#ifndef _LDAP_H -struct LDAP; -#endif - -///////////////////////////////////////////////////////////////////////////// -// LdapApp: -// See winldap.cpp for the implementation of this class -// - -class LdapApp : public CWinApp -{ -public: - LdapApp(); - -public: - BOOL IsConnected() { return m_connected; } - LDAP *GetConnection() { return m_ld; } - -private: - BOOL m_connected; - CString m_dirHost; - int m_dirPort; - CString m_searchBase; - CString m_searchFilter; - int m_scope; - LDAP *m_ld; - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(LdapApp) - public: - virtual BOOL InitInstance(); - virtual int ExitInstance(); - //}}AFX_VIRTUAL - -// Implementation - - //{{AFX_MSG(LdapApp) - afx_msg void OnAppAbout(); - afx_msg void OnFileConnect(); - afx_msg void OnUpdateFileConnect(CCmdUI* pCmdUI); - afx_msg void OnFileDisconnect(); - afx_msg void OnUpdateFileDisconnect(CCmdUI* pCmdUI); - afx_msg void OnFileSearch(); - afx_msg void OnUpdateFileSearch(CCmdUI* pCmdUI); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - - -///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.mak b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.mak deleted file mode 100644 index 01ec9f5e49c..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.mak +++ /dev/null @@ -1,404 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -!IF "$(CFG)" == "" -CFG=winldap - Win32 Debug -!MESSAGE No configuration specified. Defaulting to winldap - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "winldap - Win32 Release" && "$(CFG)" !=\ - "winldap - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "winldap.mak" CFG="winldap - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "winldap - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "winldap - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "winldap - Win32 Debug" -MTL=mktyplib.exe -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "winldap - Win32 Release" - -# PROP BASE Use_MFC 6 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 6 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\winldap.exe" - -CLEAN : - -@erase "$(INTDIR)\ConnDlg.obj" - -@erase "$(INTDIR)\LdapDoc.obj" - -@erase "$(INTDIR)\LdapView.obj" - -@erase "$(INTDIR)\MainFrm.obj" - -@erase "$(INTDIR)\PropDlg.obj" - -@erase "$(INTDIR)\SrchDlg.obj" - -@erase "$(INTDIR)\StdAfx.obj" - -@erase "$(INTDIR)\winldap.obj" - -@erase "$(INTDIR)\winldap.pch" - -@erase "$(INTDIR)\winldap.res" - -@erase "$(OUTDIR)\winldap.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c -# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c -CPP_PROJ=/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\ - "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/winldap.pch" /Yu"stdafx.h" /Fo"$(INTDIR)/"\ - /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -MTL_PROJ=/nologo /D "NDEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" -# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/winldap.res" /d "NDEBUG" /d "_AFXDLL" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/winldap.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 -# ADD LINK32 nsldapssl32v30.lib /nologo /subsystem:windows /machine:I386 -LINK32_FLAGS=nsldapssl32v30.lib /nologo /subsystem:windows /incremental:no\ - /pdb:"$(OUTDIR)/winldap.pdb" /machine:I386 /out:"$(OUTDIR)/winldap.exe" -LINK32_OBJS= \ - "$(INTDIR)\ConnDlg.obj" \ - "$(INTDIR)\LdapDoc.obj" \ - "$(INTDIR)\LdapView.obj" \ - "$(INTDIR)\MainFrm.obj" \ - "$(INTDIR)\PropDlg.obj" \ - "$(INTDIR)\SrchDlg.obj" \ - "$(INTDIR)\StdAfx.obj" \ - "$(INTDIR)\winldap.obj" \ - "$(INTDIR)\winldap.res" - -"$(OUTDIR)\winldap.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "winldap - Win32 Debug" - -# PROP BASE Use_MFC 6 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 6 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\winldap.exe" - -CLEAN : - -@erase "$(INTDIR)\ConnDlg.obj" - -@erase "$(INTDIR)\LdapDoc.obj" - -@erase "$(INTDIR)\LdapView.obj" - -@erase "$(INTDIR)\MainFrm.obj" - -@erase "$(INTDIR)\PropDlg.obj" - -@erase "$(INTDIR)\SrchDlg.obj" - -@erase "$(INTDIR)\StdAfx.obj" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(INTDIR)\winldap.obj" - -@erase "$(INTDIR)\winldap.pch" - -@erase "$(INTDIR)\winldap.res" - -@erase "$(OUTDIR)\winldap.exe" - -@erase "$(OUTDIR)\winldap.ilk" - -@erase "$(OUTDIR)\winldap.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\ - /D "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/winldap.pch" /Yu"stdafx.h"\ - /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\. -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -MTL_PROJ=/nologo /D "_DEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" -# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/winldap.res" /d "_DEBUG" /d "_AFXDLL" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/winldap.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 -# ADD LINK32 nsldapssl32v30.lib /nologo /subsystem:windows /debug /machine:I386 -LINK32_FLAGS=nsldapssl32v30.lib /nologo /subsystem:windows /incremental:yes\ - /pdb:"$(OUTDIR)/winldap.pdb" /debug /machine:I386 /out:"$(OUTDIR)/winldap.exe" -LINK32_OBJS= \ - "$(INTDIR)\ConnDlg.obj" \ - "$(INTDIR)\LdapDoc.obj" \ - "$(INTDIR)\LdapView.obj" \ - "$(INTDIR)\MainFrm.obj" \ - "$(INTDIR)\PropDlg.obj" \ - "$(INTDIR)\SrchDlg.obj" \ - "$(INTDIR)\StdAfx.obj" \ - "$(INTDIR)\winldap.obj" \ - "$(INTDIR)\winldap.res" - -"$(OUTDIR)\winldap.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "winldap - Win32 Release" -# Name "winldap - Win32 Debug" - -!IF "$(CFG)" == "winldap - Win32 Release" - -!ELSEIF "$(CFG)" == "winldap - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\winldap.cpp -DEP_CPP_WINLD=\ - ".\ConnDlg.h"\ - ".\LdapDoc.h"\ - ".\LdapView.h"\ - ".\MainFrm.h"\ - ".\SrchDlg.h"\ - ".\StdAfx.h"\ - ".\winldap.h"\ - "d:\projects\ldapsdk\include\lber.h"\ - {$(INCLUDE)}"\ldap.h"\ - {$(INCLUDE)}"\sys\time.h"\ - {$(INCLUDE)}"\sys\types.h"\ - - -"$(INTDIR)\winldap.obj" : $(SOURCE) $(DEP_CPP_WINLD) "$(INTDIR)"\ - "$(INTDIR)\winldap.pch" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\StdAfx.cpp -DEP_CPP_STDAF=\ - ".\StdAfx.h"\ - - -!IF "$(CFG)" == "winldap - Win32 Release" - -# ADD CPP /Yc"stdafx.h" - -BuildCmds= \ - $(CPP) /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\ - "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/winldap.pch" /Yc"stdafx.h" /Fo"$(INTDIR)/"\ - /c $(SOURCE) \ - - -"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\winldap.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" - $(BuildCmds) - -!ELSEIF "$(CFG)" == "winldap - Win32 Debug" - -# ADD CPP /Yc"stdafx.h" - -BuildCmds= \ - $(CPP) /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\ - /D "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/winldap.pch" /Yc"stdafx.h"\ - /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c $(SOURCE) \ - - -"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\winldap.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\MainFrm.cpp -DEP_CPP_MAINF=\ - ".\MainFrm.h"\ - ".\StdAfx.h"\ - ".\winldap.h"\ - - -"$(INTDIR)\MainFrm.obj" : $(SOURCE) $(DEP_CPP_MAINF) "$(INTDIR)"\ - "$(INTDIR)\winldap.pch" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\LdapDoc.cpp -DEP_CPP_LDAPD=\ - ".\LdapDoc.h"\ - ".\StdAfx.h"\ - ".\winldap.h"\ - - -"$(INTDIR)\LdapDoc.obj" : $(SOURCE) $(DEP_CPP_LDAPD) "$(INTDIR)"\ - "$(INTDIR)\winldap.pch" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\LdapView.cpp -DEP_CPP_LDAPV=\ - ".\LdapDoc.h"\ - ".\LdapView.h"\ - ".\PropDlg.h"\ - ".\StdAfx.h"\ - ".\winldap.h"\ - "d:\projects\ldapsdk\include\lber.h"\ - {$(INCLUDE)}"\ldap.h"\ - {$(INCLUDE)}"\sys\time.h"\ - {$(INCLUDE)}"\sys\types.h"\ - - -"$(INTDIR)\LdapView.obj" : $(SOURCE) $(DEP_CPP_LDAPV) "$(INTDIR)"\ - "$(INTDIR)\winldap.pch" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\winldap.rc -DEP_RSC_WINLDA=\ - ".\res\LdapDoc.ico"\ - ".\res\winldap.ico"\ - ".\res\winldap.rc2"\ - - -"$(INTDIR)\winldap.res" : $(SOURCE) $(DEP_RSC_WINLDA) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ConnDlg.cpp -DEP_CPP_CONND=\ - ".\ConnDlg.h"\ - ".\StdAfx.h"\ - ".\winldap.h"\ - - -"$(INTDIR)\ConnDlg.obj" : $(SOURCE) $(DEP_CPP_CONND) "$(INTDIR)"\ - "$(INTDIR)\winldap.pch" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\SrchDlg.cpp -DEP_CPP_SRCHD=\ - ".\SrchDlg.h"\ - ".\StdAfx.h"\ - ".\winldap.h"\ - "d:\projects\ldapsdk\include\lber.h"\ - {$(INCLUDE)}"\ldap.h"\ - {$(INCLUDE)}"\sys\time.h"\ - {$(INCLUDE)}"\sys\types.h"\ - - -"$(INTDIR)\SrchDlg.obj" : $(SOURCE) $(DEP_CPP_SRCHD) "$(INTDIR)"\ - "$(INTDIR)\winldap.pch" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\PropDlg.cpp -DEP_CPP_PROPD=\ - ".\PropDlg.h"\ - ".\StdAfx.h"\ - ".\winldap.h"\ - - -"$(INTDIR)\PropDlg.obj" : $(SOURCE) $(DEP_CPP_PROPD) "$(INTDIR)"\ - "$(INTDIR)\winldap.pch" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.rc b/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.rc deleted file mode 100644 index 32c686b00b0..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/windows/winldap/winldap.rc +++ /dev/null @@ -1,406 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif\r\n" - "#include ""res\\winldap.rc2"" // non-Microsoft Visual C++ edited resources\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "res\\winldap.ico" -IDR_WINLDATYPE ICON DISCARDABLE "res\\LdapDoc.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU PRELOAD DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&Connect...\tCtrl+N", ID_FILE_CONNECT - MENUITEM "&Disconnect\tCtrl+D", ID_FILE_DISCONNECT - MENUITEM "&Search...\tCtrl+S", ID_FILE_SEARCH - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Help" - BEGIN - MENUITEM "&About winldap...", ID_APP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE -BEGIN - "N", ID_FILE_NEW, VIRTKEY, CONTROL - "O", ID_FILE_OPEN, VIRTKEY, CONTROL - "S", ID_FILE_SAVE, VIRTKEY, CONTROL - "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL - "X", ID_EDIT_CUT, VIRTKEY, CONTROL - "C", ID_EDIT_COPY, VIRTKEY, CONTROL - "V", ID_EDIT_PASTE, VIRTKEY, CONTROL - VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT - VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT - VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL - VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT - VK_F6, ID_NEXT_PANE, VIRTKEY - VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 217, 55 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About winldap" -FONT 8, "MS Sans Serif" -BEGIN - ICON IDR_MAINFRAME,IDC_STATIC,11,17,21,20 - LTEXT "WinLdap - sample LDAP client",IDC_STATIC,40,10,119,8, - SS_NOPREFIX - LTEXT "Copyright © 1997",IDC_STATIC,40,25,119,8 - DEFPUSHBUTTON "OK",IDOK,178,7,32,14,WS_GROUP -END - -IDD_CONNECT_DIALOG DIALOG DISCARDABLE 0, 0, 186, 76 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Connect to Directory Server" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,35,55,50,14 - PUSHBUTTON "Cancel",IDCANCEL,103,55,50,14 - RTEXT "Host name:",IDC_STATIC,21,17,52,12 - EDITTEXT IDC_DIR_PORT,79,33,92,14,ES_AUTOHSCROLL - RTEXT "Port number:",IDC_STATIC,28,36,45,12 - EDITTEXT IDC_DIR_HOST,79,14,92,14,ES_AUTOHSCROLL -END - -IDD_SEARCH_DIALOG DIALOG DISCARDABLE 0, 0, 186, 103 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Search parameters" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,39,82,50,14 - PUSHBUTTON "Cancel",IDCANCEL,105,82,50,14 - RTEXT "Directory base:",IDC_STATIC,7,16,54,12 - EDITTEXT IDC_SEARCH_BASE,65,13,106,14,ES_AUTOHSCROLL - RTEXT "Search filter:",IDC_STATIC,10,34,51,12 - EDITTEXT IDC_SEARCH_FILTER,65,31,105,14,ES_AUTOHSCROLL - CONTROL "Base",IDC_SCOPE_BASE,"Button",BS_AUTORADIOBUTTON,23,60, - 32,10 - CONTROL "One level",IDC_SCOPE_ONE,"Button",BS_AUTORADIOBUTTON,69, - 60,46,10 - CONTROL "Subtree",IDC_SCOPE_SUB,"Button",BS_AUTORADIOBUTTON,121, - 60,41,10 - GROUPBOX "Scope",IDC_STATIC,13,49,159,24 -END - -IDD_ENTRY_PROPERTIES DIALOG DISCARDABLE 0, 0, 273, 202 -STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Properties" -FONT 8, "MS Sans Serif" -BEGIN -END - - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "\0" - VALUE "FileDescription", "WINLDAP MFC Application\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "WINLDAP\0" - VALUE "LegalCopyright", "Copyright © 1997\0" - VALUE "OriginalFilename", "WINLDAP.EXE\0" - VALUE "ProductName", "WINLDAP Application\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_ABOUTBOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 210 - TOPMARGIN, 7 - BOTTOMMARGIN, 48 - END - - IDD_CONNECT_DIALOG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 69 - END - - IDD_SEARCH_DIALOG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END - - IDD_ENTRY_PROPERTIES, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 266 - TOPMARGIN, 7 - BOTTOMMARGIN, 195 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE PRELOAD DISCARDABLE -BEGIN - IDR_MAINFRAME "winldap\n\nWinlda\n\n\nWinldap.Document\nWinlda Document" -END - -STRINGTABLE PRELOAD DISCARDABLE -BEGIN - AFX_IDS_APP_TITLE "winldap" - AFX_IDS_IDLEMESSAGE "Ready" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_INDICATOR_EXT "EXT" - ID_INDICATOR_CAPS "CAP" - ID_INDICATOR_NUM "NUM" - ID_INDICATOR_SCRL "SCRL" - ID_INDICATOR_OVR "OVR" - ID_INDICATOR_REC "REC" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_FILE_NEW "Create a new document\nNew" - ID_FILE_OPEN "Open an existing document\nOpen" - ID_FILE_CLOSE "Close the active document\nClose" - ID_FILE_SAVE "Save the active document\nSave" - ID_FILE_SAVE_AS "Save the active document with a new name\nSave As" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_APP_ABOUT "Display program information, version number and copyright\nAbout" - ID_APP_EXIT "Quit the application; prompts to save documents\nExit" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_FILE_MRU_FILE1 "Open this document" - ID_FILE_MRU_FILE2 "Open this document" - ID_FILE_MRU_FILE3 "Open this document" - ID_FILE_MRU_FILE4 "Open this document" - ID_FILE_MRU_FILE5 "Open this document" - ID_FILE_MRU_FILE6 "Open this document" - ID_FILE_MRU_FILE7 "Open this document" - ID_FILE_MRU_FILE8 "Open this document" - ID_FILE_MRU_FILE9 "Open this document" - ID_FILE_MRU_FILE10 "Open this document" - ID_FILE_MRU_FILE11 "Open this document" - ID_FILE_MRU_FILE12 "Open this document" - ID_FILE_MRU_FILE13 "Open this document" - ID_FILE_MRU_FILE14 "Open this document" - ID_FILE_MRU_FILE15 "Open this document" - ID_FILE_MRU_FILE16 "Open this document" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_NEXT_PANE "Switch to the next window pane\nNext Pane" - ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_WINDOW_SPLIT "Split the active window into panes\nSplit" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_EDIT_CLEAR "Erase the selection\nErase" - ID_EDIT_CLEAR_ALL "Erase everything\nErase All" - ID_EDIT_COPY "Copy the selection and put it on the Clipboard\nCopy" - ID_EDIT_CUT "Cut the selection and put it on the Clipboard\nCut" - ID_EDIT_FIND "Find the specified text\nFind" - ID_EDIT_PASTE "Insert Clipboard contents\nPaste" - ID_EDIT_REPEAT "Repeat the last action\nRepeat" - ID_EDIT_REPLACE "Replace specific text with different text\nReplace" - ID_EDIT_SELECT_ALL "Select the entire document\nSelect All" - ID_EDIT_UNDO "Undo the last action\nUndo" - ID_EDIT_REDO "Redo the previously undone action\nRedo" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" - ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" -END - -STRINGTABLE DISCARDABLE -BEGIN - AFX_IDS_SCSIZE "Change the window size" - AFX_IDS_SCMOVE "Change the window position" - AFX_IDS_SCMINIMIZE "Reduce the window to an icon" - AFX_IDS_SCMAXIMIZE "Enlarge the window to full size" - AFX_IDS_SCNEXTWINDOW "Switch to the next document window" - AFX_IDS_SCPREVWINDOW "Switch to the previous document window" - AFX_IDS_SCCLOSE "Close the active window and prompts to save the documents" -END - -STRINGTABLE DISCARDABLE -BEGIN - AFX_IDS_SCRESTORE "Restore the window to normal size" - AFX_IDS_SCTASKLIST "Activate Task List" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_FILE_CONNECT "Connect to Directory Server" - ID_FILE_DISCONNECT "Disconnect from Directory Server" - ID_FILE_SEARCH "Search in Directory" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif -#include "res\winldap.rc2" // non-Microsoft Visual C++ edited resources -#include "afxres.rc" // Standard components -#endif -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/mozilla/directory/c-sdk/ldap/examples/xmplflt.conf b/mozilla/directory/c-sdk/ldap/examples/xmplflt.conf deleted file mode 100644 index 3ebfb35387d..00000000000 --- a/mozilla/directory/c-sdk/ldap/examples/xmplflt.conf +++ /dev/null @@ -1,43 +0,0 @@ -# example ldap filter file -# -# lines like this that start with # or empty lines are ignored -# -# syntax: -# -# -# [ ] -# [ ] -# -# [ ] ... -# -# The "desc" should describe the filter and it should correctly complete -# both of the following phrases: -# -# One match was found for... -# Three matches were found for... -# -# The scope is optional, and should be one of: -# "base" -# "onelevel" -# "subtree" -# if it is included. -# - -"ldap-example" - "=" " " "%v" "arbitrary filter" - - "^[+]*[0-9][ 0-9-]*$" " " "(telephoneNumber=*%v)" "phone number" - - "@" " " "(mail=%v)" "email address" - "(mail=%v*)" "start of email address" - - "^.[. _].*" ". _" "(cn=%v1* %v2-)" "first initial" - - ".*[. _].$" ". _" "(cn=%v1-*)" "last initial" - - "[. _]" ". _" "(|(sn=%v1-)(cn=%v1-))" "exact" - "(|(sn~=%v1-)(cn~=%v1-))" "approximate" - - ".*" ". " "(|(cn=%v1)(sn=%v1)(uid=%v1))" "exact" - "(|(cn~=%v1)(sn~=%v1))" "approximate" - diff --git a/mozilla/directory/c-sdk/ldap/include/MANIFEST b/mozilla/directory/c-sdk/ldap/include/MANIFEST deleted file mode 100644 index 3e327684d5d..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/MANIFEST +++ /dev/null @@ -1,4 +0,0 @@ -disptmpl.h -lber.h -ldap.h -srchpref.h diff --git a/mozilla/directory/c-sdk/ldap/include/Makefile.client b/mozilla/directory/c-sdk/ldap/include/Makefile.client deleted file mode 100644 index 8495f630d5f..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/Makefile.client +++ /dev/null @@ -1,96 +0,0 @@ -# -# The contents of this file are subject to the Netscape Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/NPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is Mozilla Communicator client code, released -# March 31, 1998. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-1999 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -DEPTH = ../../../.. -MOD_DEPTH = ../.. -NSPR_TREE = ../.. -XPDIST = ../../../../dist - -CHMOD = chmod -RM = rm -f -SED = sed - -HEADERS = \ - disptmpl.h \ - lber.h \ - ldap.h \ - ldap-extension.h \ - ldap-platform.h \ - ldap-to-be-deprecated.h \ - ldap-deprecated.h \ - ldap_ssl.h \ - ldappr.h \ - iutil.h \ - srchpref.h \ - $(NULL) - -PRIVATEHEADERS = \ - ../libraries/libldap/ldap-int.h \ - ../libraries/liblber/lber-int.h \ - portable.h \ - ldaprot.h \ - ldaplog.h \ - $(NULL) - -GENERATED_HEADERS = ldap-standard.h - -include $(NSPR_TREE)/config/rules.mk -include ../../build.mk - -ETCDIR = $(DIST)/etc -INCLUDEDIR = $(XPDIST)/public/ldap -PRIVATEINCDIR = $(XPDIST)/public/ldap-private -DELHEADERS = $(addprefix $(INCLUDEDIR)/, $(HEADERS)) -GENHEADERS = $(addprefix $(INCLUDEDIR)/, $(GENERATED_HEADERS)) - -ifeq ($(OS_ARCH), WINNT) -# Is this correct? -DIRVER_PATH = $(DEPTH)/netsite/ldap/build -else -DIRVER_PATH = ../$(DIST)/bin -endif - -DIRVER_PROG = $(DIRVER_PATH)/dirver$(BIN_SUFFIX) - - -########################################################################### - -all export:: $(INCLUDEDIR) $(GENHEADERS) - $(NSINSTALL) -D $(PRIVATEINCDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 $(HEADERS) $(INCLUDEDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 $(PRIVATEHEADERS) $(PRIVATEINCDIR) - -$(INCLUDEDIR): FORCE - $(NSINSTALL) -D $(INCLUDEDIR) - -$(INCLUDEDIR)/ldap-standard.h: ldap-standard-tmpl.h - perl ../build/replace.pl \ - LDAP_VENDOR_NAME="$(VENDOR_NAME)" \ - LDAP_VENDOR_VERSION="$(VENDOR_VERSION)" \ - < $< > $@ - -install:: export - -clean:: FORCE - -$(RM) $(GENHEADERS) - -FORCE: diff --git a/mozilla/directory/c-sdk/ldap/include/Makefile.in b/mozilla/directory/c-sdk/ldap/include/Makefile.in deleted file mode 100644 index 563308373a5..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/Makefile.in +++ /dev/null @@ -1,51 +0,0 @@ -DEPTH = ../../../.. -srcdir = @srcdir@ -ldaptopsrcdir = @top_srcdir@ - -CHMOD = chmod -RM = rm -f -SED = sed - -HEADERS = \ - disptmpl.h \ - lber.h \ - ldap.h \ - srchpref.h \ - $(NULL) -HEADERS := $(addprefix $(srcdir)/, $(HEADERS)) - -include ../build/autoconf.mk -include $(NSPR_TREE)/config/rules.mk - -GARBAGE += sdkver.h dirver.h - -ETCDIR = $(DIST)/etc - -DIR_VERSION := 2.0 -DIRSDK_VERSION := 1.0 - -ifeq ($(OS_ARCH), WINNT) -# Is this correct? -DIRVER_PATH = $(DEPTH)/netsite/ldap/build -else -DIRVER_PATH = $(DIST)/bin -endif - -DIRVER_PROG = $(DIRVER_PATH)/dirver$(BIN_SUFFIX) - -########################################################################### - -all export:: sdkver.h dirver.h FORCE - $(INSTALL) $(INSTALLFLAGS) -m 644 $(HEADERS) $(DIST)/include - -sdkver.h: $(DIRVER_PROG) - @$< $(DIRSDK_VERSION) UseSystemDate $@ - -dirver.h: $(DIRVER_PROG) - @$< $(DIR_VERSION) UseSystemDate $@ - -install:: export - -clean:: - -FORCE: diff --git a/mozilla/directory/c-sdk/ldap/include/avl.h b/mozilla/directory/c-sdk/ldap/include/avl.h deleted file mode 100755 index a73ae31bee3..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/avl.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* avl.h - avl tree definitions */ -/* - * Copyright (c) 1993 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - - -#ifndef _AVL -#define _AVL - -/* - * this structure represents a generic avl tree node. - */ - -typedef struct avlnode { - caddr_t avl_data; - signed char avl_bf; - struct avlnode *avl_left; - struct avlnode *avl_right; -} Avlnode; - -#define NULLAVL ((Avlnode *) NULL) - -/* balance factor values */ -#define LH -1 -#define EH 0 -#define RH 1 - -/* avl routines */ -#define avl_getone(x) (x == 0 ? 0 : (x)->avl_data) -#define avl_onenode(x) (x == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0)) -extern int avl_insert(); -extern caddr_t avl_delete(); -extern caddr_t avl_find(); -extern caddr_t avl_getfirst(); -extern caddr_t avl_getnext(); -extern int avl_dup_error(); -extern int avl_apply(); -extern int avl_free(); - -/* apply traversal types */ -#define AVL_PREORDER 1 -#define AVL_INORDER 2 -#define AVL_POSTORDER 3 -/* what apply returns if it ran out of nodes */ -#define AVL_NOMORE -6 - -#ifndef _IFP -#define _IFP -typedef int (*IFP)(); -#endif - -caddr_t avl_find_lin( Avlnode *root, caddr_t data, IFP fcmp ); - -#endif /* _AVL */ diff --git a/mozilla/directory/c-sdk/ldap/include/dblayer.h b/mozilla/directory/c-sdk/ldap/include/dblayer.h deleted file mode 100755 index bff23c5194d..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/dblayer.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* This file is no longer used */ diff --git a/mozilla/directory/c-sdk/ldap/include/disptmpl.h b/mozilla/directory/c-sdk/ldap/include/disptmpl.h deleted file mode 100644 index b1ef6d73a6d..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/disptmpl.h +++ /dev/null @@ -1,364 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1993, 1994 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - * - * disptmpl.h: display template library defines - */ - -#ifndef _DISPTMPL_H -#define _DISPTMPL_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* calling conventions used by library */ -#ifndef LDAP_CALL -#if defined( _WINDOWS ) || defined( _WIN32 ) -#define LDAP_C __cdecl -#ifndef _WIN32 -#define __stdcall _far _pascal -#define LDAP_CALLBACK _loadds -#else -#define LDAP_CALLBACK -#endif /* _WIN32 */ -#define LDAP_PASCAL __stdcall -#define LDAP_CALL LDAP_PASCAL -#else /* _WINDOWS */ -#define LDAP_C -#define LDAP_CALLBACK -#define LDAP_PASCAL -#define LDAP_CALL -#endif /* _WINDOWS */ -#endif /* LDAP_CALL */ - -#define LDAP_TEMPLATE_VERSION 1 - -/* - * general types of items (confined to most significant byte) - */ -#define LDAP_SYN_TYPE_TEXT 0x01000000L -#define LDAP_SYN_TYPE_IMAGE 0x02000000L -#define LDAP_SYN_TYPE_BOOLEAN 0x04000000L -#define LDAP_SYN_TYPE_BUTTON 0x08000000L -#define LDAP_SYN_TYPE_ACTION 0x10000000L - - -/* - * syntax options (confined to second most significant byte) - */ -#define LDAP_SYN_OPT_DEFER 0x00010000L - - -/* - * display template item syntax ids (defined by common agreement) - * these are the valid values for the ti_syntaxid of the tmplitem - * struct (defined below). A general type is encoded in the - * most-significant 8 bits, and some options are encoded in the next - * 8 bits. The lower 16 bits are reserved for the distinct types. - */ -#define LDAP_SYN_CASEIGNORESTR ( 1 | LDAP_SYN_TYPE_TEXT ) -#define LDAP_SYN_MULTILINESTR ( 2 | LDAP_SYN_TYPE_TEXT ) -#define LDAP_SYN_DN ( 3 | LDAP_SYN_TYPE_TEXT ) -#define LDAP_SYN_BOOLEAN ( 4 | LDAP_SYN_TYPE_BOOLEAN ) -#define LDAP_SYN_JPEGIMAGE ( 5 | LDAP_SYN_TYPE_IMAGE ) -#define LDAP_SYN_JPEGBUTTON ( 6 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER ) -#define LDAP_SYN_FAXIMAGE ( 7 | LDAP_SYN_TYPE_IMAGE ) -#define LDAP_SYN_FAXBUTTON ( 8 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER ) -#define LDAP_SYN_AUDIOBUTTON ( 9 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER ) -#define LDAP_SYN_TIME ( 10 | LDAP_SYN_TYPE_TEXT ) -#define LDAP_SYN_DATE ( 11 | LDAP_SYN_TYPE_TEXT ) -#define LDAP_SYN_LABELEDURL ( 12 | LDAP_SYN_TYPE_TEXT ) -#define LDAP_SYN_SEARCHACTION ( 13 | LDAP_SYN_TYPE_ACTION ) -#define LDAP_SYN_LINKACTION ( 14 | LDAP_SYN_TYPE_ACTION ) -#define LDAP_SYN_ADDDNACTION ( 15 | LDAP_SYN_TYPE_ACTION ) -#define LDAP_SYN_VERIFYDNACTION ( 16 | LDAP_SYN_TYPE_ACTION ) -#define LDAP_SYN_RFC822ADDR ( 17 | LDAP_SYN_TYPE_TEXT ) - - -/* - * handy macros - */ -#define LDAP_GET_SYN_TYPE( syid ) ((syid) & 0xFF000000UL ) -#define LDAP_GET_SYN_OPTIONS( syid ) ((syid) & 0x00FF0000UL ) - - -/* - * display options for output routines (used by entry2text and friends) - */ -/* - * use calculated label width (based on length of longest label in - * template) instead of contant width - */ -#define LDAP_DISP_OPT_AUTOLABELWIDTH 0x00000001L -#define LDAP_DISP_OPT_HTMLBODYONLY 0x00000002L - -/* - * perform search actions (applies to ldap_entry2text_search only) - */ -#define LDAP_DISP_OPT_DOSEARCHACTIONS 0x00000002L - -/* - * include additional info. relevant to "non leaf" entries only - * used by ldap_entry2html and ldap_entry2html_search to include "Browse" - * and "Move Up" HREFs - */ -#define LDAP_DISP_OPT_NONLEAF 0x00000004L - - -/* - * display template item options (may not apply to all types) - * if this bit is set in ti_options, it applies. - */ -#define LDAP_DITEM_OPT_READONLY 0x00000001L -#define LDAP_DITEM_OPT_SORTVALUES 0x00000002L -#define LDAP_DITEM_OPT_SINGLEVALUED 0x00000004L -#define LDAP_DITEM_OPT_HIDEIFEMPTY 0x00000008L -#define LDAP_DITEM_OPT_VALUEREQUIRED 0x00000010L -#define LDAP_DITEM_OPT_HIDEIFFALSE 0x00000020L /* booleans only */ - - - -/* - * display template item structure - */ -struct ldap_tmplitem { - unsigned long ti_syntaxid; - unsigned long ti_options; - char *ti_attrname; - char *ti_label; - char **ti_args; - struct ldap_tmplitem *ti_next_in_row; - struct ldap_tmplitem *ti_next_in_col; - void *ti_appdata; -}; - - -#define NULLTMPLITEM ((struct ldap_tmplitem *)0) - -#define LDAP_SET_TMPLITEM_APPDATA( ti, datap ) \ - (ti)->ti_appdata = (void *)(datap) - -#define LDAP_GET_TMPLITEM_APPDATA( ti, type ) \ - (type)((ti)->ti_appdata) - -#define LDAP_IS_TMPLITEM_OPTION_SET( ti, option ) \ - (((ti)->ti_options & option ) != 0 ) - - -/* - * object class array structure - */ -struct ldap_oclist { - char **oc_objclasses; - struct ldap_oclist *oc_next; -}; - -#define NULLOCLIST ((struct ldap_oclist *)0) - - -/* - * add defaults list - */ -struct ldap_adddeflist { - int ad_source; -#define LDAP_ADSRC_CONSTANTVALUE 1 -#define LDAP_ADSRC_ADDERSDN 2 - char *ad_attrname; - char *ad_value; - struct ldap_adddeflist *ad_next; -}; - -#define NULLADLIST ((struct ldap_adddeflist *)0) - - -/* - * display template global options - * if this bit is set in dt_options, it applies. - */ -/* - * users should be allowed to try to add objects of these entries - */ -#define LDAP_DTMPL_OPT_ADDABLE 0x00000001L - -/* - * users should be allowed to do "modify RDN" operation of these entries - */ -#define LDAP_DTMPL_OPT_ALLOWMODRDN 0x00000002L - -/* - * this template is an alternate view, not a primary view - */ -#define LDAP_DTMPL_OPT_ALTVIEW 0x00000004L - - -/* - * display template structure - */ -struct ldap_disptmpl { - char *dt_name; - char *dt_pluralname; - char *dt_iconname; - unsigned long dt_options; - char *dt_authattrname; - char *dt_defrdnattrname; - char *dt_defaddlocation; - struct ldap_oclist *dt_oclist; - struct ldap_adddeflist *dt_adddeflist; - struct ldap_tmplitem *dt_items; - void *dt_appdata; - struct ldap_disptmpl *dt_next; -}; - -#define NULLDISPTMPL ((struct ldap_disptmpl *)0) - -#define LDAP_SET_DISPTMPL_APPDATA( dt, datap ) \ - (dt)->dt_appdata = (void *)(datap) - -#define LDAP_GET_DISPTMPL_APPDATA( dt, type ) \ - (type)((dt)->dt_appdata) - -#define LDAP_IS_DISPTMPL_OPTION_SET( dt, option ) \ - (((dt)->dt_options & option ) != 0 ) - -#define LDAP_TMPL_ERR_VERSION 1 -#define LDAP_TMPL_ERR_MEM 2 -#define LDAP_TMPL_ERR_SYNTAX 3 -#define LDAP_TMPL_ERR_FILE 4 - -/* - * buffer size needed for entry2text and vals2text - */ -#define LDAP_DTMPL_BUFSIZ 8192 - -typedef int (*writeptype)( void *writeparm, char *p, int len ); - -LDAP_API(int) -LDAP_CALL -ldap_init_templates( char *file, struct ldap_disptmpl **tmpllistp ); - -LDAP_API(int) -LDAP_CALL -ldap_init_templates_buf( char *buf, long buflen, - struct ldap_disptmpl **tmpllistp ); - -LDAP_API(void) -LDAP_CALL -ldap_free_templates( struct ldap_disptmpl *tmpllist ); - -LDAP_API(struct ldap_disptmpl *) -LDAP_CALL -ldap_first_disptmpl( struct ldap_disptmpl *tmpllist ); - -LDAP_API(struct ldap_disptmpl *) -LDAP_CALL -ldap_next_disptmpl( struct ldap_disptmpl *tmpllist, - struct ldap_disptmpl *tmpl ); - -LDAP_API(struct ldap_disptmpl *) -LDAP_CALL -ldap_name2template( char *name, struct ldap_disptmpl *tmpllist ); - -LDAP_API(struct ldap_disptmpl *) -LDAP_CALL -ldap_oc2template( char **oclist, struct ldap_disptmpl *tmpllist ); - -LDAP_API(char **) -LDAP_CALL -ldap_tmplattrs( struct ldap_disptmpl *tmpl, char **includeattrs, int exclude, - unsigned long syntaxmask ); - -LDAP_API(struct ldap_tmplitem *) -LDAP_CALL -ldap_first_tmplrow( struct ldap_disptmpl *tmpl ); - -LDAP_API(struct ldap_tmplitem *) -LDAP_CALL -ldap_next_tmplrow( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row ); - -LDAP_API(struct ldap_tmplitem *) -LDAP_CALL -ldap_first_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row ); - -LDAP_API(struct ldap_tmplitem *) -LDAP_CALL -ldap_next_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row, - struct ldap_tmplitem *col ); - -LDAP_API(int) -LDAP_CALL -ldap_entry2text( LDAP *ld, char *buf, LDAPMessage *entry, - struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, - writeptype writeproc, void *writeparm, char *eol, int rdncount, - unsigned long opts ); - -LDAP_API(int) -LDAP_CALL -ldap_vals2text( LDAP *ld, char *buf, char **vals, char *label, int labelwidth, - unsigned long syntaxid, writeptype writeproc, void *writeparm, - char *eol, int rdncount ); - -LDAP_API(int) -LDAP_CALL -ldap_entry2text_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry, - struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals, - writeptype writeproc, void *writeparm, char *eol, int rdncount, - unsigned long opts ); - -LDAP_API(int) -LDAP_CALL -ldap_entry2html( LDAP *ld, char *buf, LDAPMessage *entry, - struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, - writeptype writeproc, void *writeparm, char *eol, int rdncount, - unsigned long opts, char *urlprefix, char *base ); - -LDAP_API(int) -LDAP_CALL -ldap_vals2html( LDAP *ld, char *buf, char **vals, char *label, int labelwidth, - unsigned long syntaxid, writeptype writeproc, void *writeparm, - char *eol, int rdncount, char *urlprefix ); - -LDAP_API(int) -LDAP_CALL -ldap_entry2html_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry, - struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals, - writeptype writeproc, void *writeparm, char *eol, int rdncount, - unsigned long opts, char *urlprefix ); - -LDAP_API(char *) -LDAP_CALL -ldap_tmplerr2string( int err ); - -#ifdef __cplusplus -} -#endif -#endif /* _DISPTMPL_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/iutil.h b/mozilla/directory/c-sdk/ldap/include/iutil.h deleted file mode 100644 index 69b5432359a..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/iutil.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Interface for libiutil the innosoft migration library - * - */ - -#ifndef _IUTIL_H -#define _IUTIL_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* from iutil-lock.c */ - -#ifdef _WINDOWS -#define LDAP_MUTEX_T HANDLE - -extern char *ldap_strdup(); -extern unsigned char *ldap_utf8_nextchar(); -extern char **ldap_explode_ava(); -extern int ldap_utf8_toupper(); - -int pthread_mutex_init( LDAP_MUTEX_T *mp, void *attr); -static void * pthread_mutex_alloc( void ); -int pthread_mutex_destroy( LDAP_MUTEX_T *mp ); -static void pthread_mutex_free( void *mutexp ); -int pthread_mutex_lock( LDAP_MUTEX_T *mp ); -int pthread_mutex_unlock( LDAP_MUTEX_T *mp ); - -#endif /* _WINDOWS */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* _IUTIL_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/lber.h b/mozilla/directory/c-sdk/ldap/include/lber.h deleted file mode 100644 index fb24507d70d..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/lber.h +++ /dev/null @@ -1,310 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* lber.h - header file for ber_* functions */ -#ifndef _LBER_H -#define _LBER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include /* to pick up size_t typedef */ - -/* - * Note that LBER_ERROR and LBER_DEFAULT are values that can never appear - * as valid BER tags, and so it is safe to use them to report errors. In - * fact, any tag for which the following is true is invalid: - * (( tag & 0x00000080 ) != 0 ) && (( tag & 0xFFFFFF00 ) != 0 ) - */ -#define LBER_ERROR 0xffffffffUL -#define LBER_DEFAULT 0xffffffffUL -#define LBER_END_OF_SEQORSET 0xfffffffeUL - -/* BER classes and mask */ -#define LBER_CLASS_UNIVERSAL 0x00 -#define LBER_CLASS_APPLICATION 0x40 -#define LBER_CLASS_CONTEXT 0x80 -#define LBER_CLASS_PRIVATE 0xc0 -#define LBER_CLASS_MASK 0xc0 - -/* BER encoding type and mask */ -#define LBER_PRIMITIVE 0x00 -#define LBER_CONSTRUCTED 0x20 -#define LBER_ENCODING_MASK 0x20 - -#define LBER_BIG_TAG_MASK 0x1f -#define LBER_MORE_TAG_MASK 0x80 - -/* general BER types we know about */ -#define LBER_BOOLEAN 0x01L -#define LBER_INTEGER 0x02L -#define LBER_BITSTRING 0x03L -#define LBER_OCTETSTRING 0x04L -#define LBER_NULL 0x05L -#define LBER_ENUMERATED 0x0aL -#define LBER_SEQUENCE 0x30L -#define LBER_SET 0x31L - -/* BerElement set/get options */ -#define LBER_OPT_REMAINING_BYTES 0x01 -#define LBER_OPT_TOTAL_BYTES 0x02 -#define LBER_OPT_USE_DER 0x04 -#define LBER_OPT_TRANSLATE_STRINGS 0x08 -#define LBER_OPT_BYTES_TO_WRITE 0x10 -#define LBER_OPT_MEMALLOC_FN_PTRS 0x20 -#define LBER_OPT_DEBUG_LEVEL 0x40 -/* - * LBER_USE_DER is defined for compatibility with the C LDAP API RFC. - * In our implementation, we recognize it (instead of the numerically - * identical LBER_OPT_REMAINING_BYTES) in calls to ber_alloc_t() and - * ber_init_w_nullchar() only. Callers of ber_set_option() or - * ber_get_option() must use LBER_OPT_USE_DER instead. Sorry! - */ -#define LBER_USE_DER 0x01 - - -/* Sockbuf set/get options */ -#define LBER_SOCKBUF_OPT_TO_FILE 0x001 -#define LBER_SOCKBUF_OPT_TO_FILE_ONLY 0x002 -#define LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE 0x004 -#define LBER_SOCKBUF_OPT_NO_READ_AHEAD 0x008 -#define LBER_SOCKBUF_OPT_DESC 0x010 -#define LBER_SOCKBUF_OPT_COPYDESC 0x020 -#define LBER_SOCKBUF_OPT_READ_FN 0x040 -#define LBER_SOCKBUF_OPT_WRITE_FN 0x080 -#define LBER_SOCKBUF_OPT_EXT_IO_FNS 0x100 -#define LBER_SOCKBUF_OPT_VALID_TAG 0x200 - -#define LBER_OPT_ON ((void *) 1) -#define LBER_OPT_OFF ((void *) 0) - - -typedef struct berval { - unsigned long bv_len; - char *bv_val; -} BerValue; - -typedef struct berelement BerElement; -typedef struct sockbuf Sockbuf; -typedef int (*BERTranslateProc)( char **bufp, unsigned long *buflenp, - int free_input ); -#ifndef macintosh -#if defined( _WINDOWS ) || defined( _WIN32) || defined( _CONSOLE ) -#include /* for SOCKET */ -typedef SOCKET LBER_SOCKET; -#else -typedef int LBER_SOCKET; -#endif /* _WINDOWS */ -#else /* macintosh */ -typedef void *LBER_SOCKET; -#endif /* macintosh */ - -/* calling conventions used by library */ -#ifndef LDAP_CALL -#if defined( _WINDOWS ) || defined( _WIN32 ) -#define LDAP_C __cdecl -#ifndef _WIN32 -#define __stdcall _far _pascal -#define LDAP_CALLBACK _loadds -#else -#define LDAP_CALLBACK -#endif /* _WIN32 */ -#define LDAP_PASCAL __stdcall -#define LDAP_CALL LDAP_PASCAL -#else /* _WINDOWS */ -#define LDAP_C -#define LDAP_CALLBACK -#define LDAP_PASCAL -#define LDAP_CALL -#endif /* _WINDOWS */ -#endif /* LDAP_CALL */ - -/* - * function prototypes for lber library - */ - -#ifndef LDAP_API -#if defined( _WINDOWS ) || defined( _WIN32 ) -#define LDAP_API(rt) rt -#else /* _WINDOWS */ -#define LDAP_API(rt) rt -#endif /* _WINDOWS */ -#endif /* LDAP_API */ - -struct lextiof_socket_private; /* Defined by the extended I/O */ - /* callback functions */ -struct lextiof_session_private; /* Defined by the extended I/O */ - /* callback functions */ - -/* This is modeled after the PRIOVec that is passed to the NSPR - writev function! The void* is a char* in that struct */ -typedef struct ldap_x_iovec { - char *ldapiov_base; - int ldapiov_len; -} ldap_x_iovec; - -/* - * libldap read and write I/O function callbacks. The rest of the I/O callback - * types are defined in ldap.h - */ -typedef int (LDAP_C LDAP_CALLBACK LDAP_IOF_READ_CALLBACK)( LBER_SOCKET s, - void *buf, int bufsize ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_IOF_WRITE_CALLBACK)( LBER_SOCKET s, - const void *buf, int len ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_READ_CALLBACK)( int s, - void *buf, int bufsize, struct lextiof_socket_private *socketarg ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_WRITE_CALLBACK)( int s, - const void *buf, int len, struct lextiof_socket_private *socketarg ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_WRITEV_CALLBACK)(int s, - const ldap_x_iovec iov[], int iovcnt, struct lextiof_socket_private *socketarg); - - -/* - * Structure for use with LBER_SOCKBUF_OPT_EXT_IO_FNS: - */ -struct lber_x_ext_io_fns { - /* lbextiofn_size should always be set to LBER_X_EXTIO_FNS_SIZE */ - int lbextiofn_size; - LDAP_X_EXTIOF_READ_CALLBACK *lbextiofn_read; - LDAP_X_EXTIOF_WRITE_CALLBACK *lbextiofn_write; - struct lextiof_socket_private *lbextiofn_socket_arg; - LDAP_X_EXTIOF_WRITEV_CALLBACK *lbextiofn_writev; -}; -#define LBER_X_EXTIO_FNS_SIZE sizeof(struct lber_x_ext_io_fns) - -/* - * liblber memory allocation callback functions. These are global to all - * Sockbufs and BerElements. Install your own functions by using a call - * like this: ber_set_option( NULL, LBER_OPT_MEMALLOC_FN_PTRS, &memalloc_fns ); - */ -typedef void * (LDAP_C LDAP_CALLBACK LDAP_MALLOC_CALLBACK)( size_t size ); -typedef void * (LDAP_C LDAP_CALLBACK LDAP_CALLOC_CALLBACK)( size_t nelem, - size_t elsize ); -typedef void * (LDAP_C LDAP_CALLBACK LDAP_REALLOC_CALLBACK)( void *ptr, - size_t size ); -typedef void (LDAP_C LDAP_CALLBACK LDAP_FREE_CALLBACK)( void *ptr ); - -struct lber_memalloc_fns { - LDAP_MALLOC_CALLBACK *lbermem_malloc; - LDAP_CALLOC_CALLBACK *lbermem_calloc; - LDAP_REALLOC_CALLBACK *lbermem_realloc; - LDAP_FREE_CALLBACK *lbermem_free; -}; - -/* - * decode routines - */ -LDAP_API(unsigned long) LDAP_CALL ber_get_tag( BerElement *ber ); -LDAP_API(unsigned long) LDAP_CALL ber_skip_tag( BerElement *ber, - unsigned long *len ); -LDAP_API(unsigned long) LDAP_CALL ber_peek_tag( BerElement *ber, - unsigned long *len ); -LDAP_API(unsigned long) LDAP_CALL ber_get_int( BerElement *ber, long *num ); -LDAP_API(unsigned long) LDAP_CALL ber_get_stringb( BerElement *ber, char *buf, - unsigned long *len ); -LDAP_API(unsigned long) LDAP_CALL ber_get_stringa( BerElement *ber, - char **buf ); -LDAP_API(unsigned long) LDAP_CALL ber_get_stringal( BerElement *ber, - struct berval **bv ); -LDAP_API(unsigned long) LDAP_CALL ber_get_bitstringa( BerElement *ber, - char **buf, unsigned long *len ); -LDAP_API(unsigned long) LDAP_CALL ber_get_null( BerElement *ber ); -LDAP_API(unsigned long) LDAP_CALL ber_get_boolean( BerElement *ber, - int *boolval ); -LDAP_API(unsigned long) LDAP_CALL ber_first_element( BerElement *ber, - unsigned long *len, char **last ); -LDAP_API(unsigned long) LDAP_CALL ber_next_element( BerElement *ber, - unsigned long *len, char *last ); -LDAP_API(unsigned long) LDAP_C ber_scanf( BerElement *ber, const char *fmt, - ... ); -LDAP_API(void) LDAP_CALL ber_bvfree( struct berval *bv ); -LDAP_API(void) LDAP_CALL ber_bvecfree( struct berval **bv ); -LDAP_API(void) LDAP_CALL ber_svecfree( char **vals ); -LDAP_API(struct berval *) LDAP_CALL ber_bvdup( const struct berval *bv ); -LDAP_API(void) LDAP_CALL ber_set_string_translators( BerElement *ber, - BERTranslateProc encode_proc, BERTranslateProc decode_proc ); -LDAP_API(BerElement *) LDAP_CALL ber_init( const struct berval *bv ); - -/* - * encoding routines - */ -LDAP_API(int) LDAP_CALL ber_put_enum( BerElement *ber, long num, - unsigned long tag ); -LDAP_API(int) LDAP_CALL ber_put_int( BerElement *ber, long num, - unsigned long tag ); -LDAP_API(int) LDAP_CALL ber_put_ostring( BerElement *ber, char *str, - unsigned long len, unsigned long tag ); -LDAP_API(int) LDAP_CALL ber_put_string( BerElement *ber, char *str, - unsigned long tag ); -LDAP_API(int) LDAP_CALL ber_put_bitstring( BerElement *ber, char *str, - unsigned long bitlen, unsigned long tag ); -LDAP_API(int) LDAP_CALL ber_put_null( BerElement *ber, unsigned long tag ); -LDAP_API(int) LDAP_CALL ber_put_boolean( BerElement *ber, int boolval, - unsigned long tag ); -LDAP_API(int) LDAP_CALL ber_start_seq( BerElement *ber, unsigned long tag ); -LDAP_API(int) LDAP_CALL ber_start_set( BerElement *ber, unsigned long tag ); -LDAP_API(int) LDAP_CALL ber_put_seq( BerElement *ber ); -LDAP_API(int) LDAP_CALL ber_put_set( BerElement *ber ); -LDAP_API(int) LDAP_C ber_printf( BerElement *ber, const char *fmt, ... ); -LDAP_API(int) LDAP_CALL ber_flatten( BerElement *ber, - struct berval **bvPtr ); - -/* - * miscellaneous routines - */ -LDAP_API(void) LDAP_CALL ber_free( BerElement *ber, int freebuf ); -LDAP_API(void) LDAP_CALL ber_special_free(void* buf, BerElement *ber); -LDAP_API(int) LDAP_CALL ber_flush( Sockbuf *sb, BerElement *ber, int freeit ); -LDAP_API(BerElement*) LDAP_CALL ber_alloc( void ); -LDAP_API(BerElement*) LDAP_CALL der_alloc( void ); -LDAP_API(BerElement*) LDAP_CALL ber_alloc_t( int options ); -LDAP_API(void*) LDAP_CALL ber_special_alloc(size_t size, BerElement **ppBer); -LDAP_API(BerElement*) LDAP_CALL ber_dup( BerElement *ber ); -LDAP_API(unsigned long) LDAP_CALL ber_get_next( Sockbuf *sb, unsigned long *len, - BerElement *ber ); -LDAP_API(unsigned long) LDAP_CALL ber_get_next_buffer( void *buffer, - size_t buffer_size, unsigned long *len, BerElement *ber, - unsigned long *Bytes_Scanned ); -LDAP_API(unsigned long) LDAP_CALL ber_get_next_buffer_ext( void *buffer, - size_t buffer_size, unsigned long *len, BerElement *ber, - unsigned long *Bytes_Scanned, Sockbuf *sb ); -LDAP_API(long) LDAP_CALL ber_read( BerElement *ber, char *buf, - unsigned long len ); -LDAP_API(long) LDAP_CALL ber_write( BerElement *ber, char *buf, - unsigned long len, int nosos ); -LDAP_API(void) LDAP_CALL ber_init_w_nullchar( BerElement *ber, int options ); -LDAP_API(void) LDAP_CALL ber_reset( BerElement *ber, int was_writing ); -LDAP_API(int) LDAP_CALL ber_set_option( BerElement *ber, int option, - void *value ); -LDAP_API(int) LDAP_CALL ber_get_option( BerElement *ber, int option, - void *value ); -LDAP_API(Sockbuf*) LDAP_CALL ber_sockbuf_alloc( void ); -LDAP_API(void) LDAP_CALL ber_sockbuf_free( Sockbuf* p ); -LDAP_API(int) LDAP_CALL ber_sockbuf_set_option( Sockbuf *sb, int option, - void *value ); -LDAP_API(int) LDAP_CALL ber_sockbuf_get_option( Sockbuf *sb, int option, - void *value ); - -#ifdef __cplusplus -} -#endif -#endif /* _LBER_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/lcache.h b/mozilla/directory/c-sdk/ldap/include/lcache.h deleted file mode 100644 index 2a968d068b0..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/lcache.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* lcache.h - ldap persistent cache */ -#ifndef _LCACHE_H -#define _LCACHE_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* calling conventions used by library */ -#ifndef LDAP_CALL -#if defined( _WINDOWS ) || defined( _WIN32 ) -#define LDAP_C __cdecl -#ifndef _WIN32 -#define __stdcall _far _pascal -#define LDAP_CALLBACK _loadds -#else -#define LDAP_CALLBACK -#endif /* _WIN32 */ -#define LDAP_PASCAL __stdcall -#define LDAP_CALL LDAP_PASCAL -#else /* _WINDOWS */ -#define LDAP_C -#define LDAP_CALLBACK -#define LDAP_PASCAL -#define LDAP_CALL -#endif /* _WINDOWS */ -#endif /* LDAP_CALL */ - -LDAP_API(int) LDAP_C lcache_init( LDAP *ld, void *arg ); -LDAP_API(int) LDAP_C lcache_bind( LDAP *ld, int msgid, unsigned long tag, - const char *dn, struct berval *cred, int method ); -LDAP_API(int) LDAP_C lcache_unbind( LDAP *ld, int msgid, unsigned long tag ); -LDAP_API(int) LDAP_C lcache_search( LDAP *ld, int msgid, unsigned long tag, - const char *dn, int scope, const char *filter, char **attrs, - int attrsonly ); -LDAP_API(int) LDAP_C lcache_compare( LDAP *ld, int msgid, unsigned long tag, - const char *dn, const char *attr, struct berval *val ); -LDAP_API(int) LDAP_C lcache_add( LDAP *ld, int msgid, unsigned long tag, - const char *dn, LDAPMod **entry ); -LDAP_API(int) LDAP_C lcache_delete( LDAP *ld, int msgid, unsigned long tag, - const char *dn ); -LDAP_API(int) LDAP_C lcache_rename( LDAP *ld, int msgid, unsigned long tag, - const char *dn, const char *newrdn, const char *newparent, - int deleteoldrdn ); -LDAP_API(int) LDAP_C lcache_modify( LDAP *ld, int msgid, unsigned long tag, - const char *dn, LDAPMod **mods ); -LDAP_API(int) LDAP_C lcache_modrdn( LDAP *ld, int msgid, unsigned long tag, - const char *dn, const char *newrdn, int deleteoldrdn ); -LDAP_API(int) LDAP_C lcache_result( LDAP *ld, int msgid, int all, - struct timeval *timeout, LDAPMessage **result ); -LDAP_API(int) LDAP_C lcache_flush( LDAP *ld, char *dn, char *filter ); - -#ifdef __cplusplus -} -#endif - -#endif /* _LCACHE_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/ldap-deprecated.h b/mozilla/directory/c-sdk/ldap/include/ldap-deprecated.h deleted file mode 100644 index 95ed62ff2b0..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldap-deprecated.h +++ /dev/null @@ -1,186 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* ldap-deprecated.h - deprecated functions and declarations - * - * A deprecated API is an API that we recommend you no longer use, - * due to improvements in the LDAP C SDK. While deprecated APIs are - * currently still implemented, they may be removed in future - * implementations, and we recommend using other APIs. - * - * This file contain functions and declarations which have - * outlived their usefullness and have been deprecated. In many - * cases functions and declarations have been replaced with newer - * extended functions. In no way should applications rely on the - * declarations and defines within this files as they can and will - * disappear without any notice. - */ - -#ifndef _LDAP_DEPRECATED_H -#define _LDAP_DEPRECATED_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * establish an ldap session - */ -LDAP_API(LDAP *) LDAP_CALL ldap_open( const char *host, int port ); - -/* - * Authentication methods: - */ -#define LDAP_AUTH_NONE 0x00L -#define LDAP_AUTH_SIMPLE 0x80L -#define LDAP_AUTH_SASL 0xa3L -LDAP_API(int) LDAP_CALL ldap_bind( LDAP *ld, const char *who, - const char *passwd, int authmethod ); -LDAP_API(int) LDAP_CALL ldap_bind_s( LDAP *ld, const char *who, - const char *cred, int method ); - -LDAP_API(int) LDAP_CALL ldap_modrdn( LDAP *ld, const char *dn, - const char *newrdn ); -LDAP_API(int) LDAP_CALL ldap_modrdn_s( LDAP *ld, const char *dn, - const char *newrdn ); -LDAP_API(int) LDAP_CALL ldap_modrdn2( LDAP *ld, const char *dn, - const char *newrdn, int deleteoldrdn ); -LDAP_API(int) LDAP_CALL ldap_modrdn2_s( LDAP *ld, const char *dn, - const char *newrdn, int deleteoldrdn); - -LDAP_API(void) LDAP_CALL ldap_perror( LDAP *ld, const char *s ); -LDAP_API(int) LDAP_CALL ldap_result2error( LDAP *ld, LDAPMessage *r, - int freeit ); - -/* - * Preferred language and get_lang_values (an API extension -- - * LDAP_API_FEATURE_X_GETLANGVALUES) - * - * The following two APIs are deprecated - */ - -#define LDAP_OPT_PREFERRED_LANGUAGE 0x14 /* 20 - API extension */ -LDAP_API(char **) LDAP_CALL ldap_get_lang_values( LDAP *ld, LDAPMessage *entry, - const char *target, char **type ); -LDAP_API(struct berval **) LDAP_CALL ldap_get_lang_values_len( LDAP *ld, - LDAPMessage *entry, const char *target, char **type ); - -/* - * Asynchronous I/O (an API extension). - */ -/* - * This option enables completely asynchronous IO. It works by using ioctl() - * on the fd, (or tlook()) - */ -#define LDAP_OPT_ASYNC_CONNECT 0x63 /* 99 - API extension */ - -/* - * functions and definitions that have been replaced by new improved ones - */ -/* - * Use ldap_get_option() with LDAP_OPT_API_INFO and an LDAPAPIInfo structure - * instead of ldap_version(). - */ -typedef struct _LDAPVersion { - int sdk_version; /* Version of the SDK, * 100 */ - int protocol_version; /* Highest protocol version supported, * 100 */ - int SSL_version; /* SSL version if this SDK supports it, * 100 */ - int security_level; /* highest level available */ - int reserved[4]; -} LDAPVersion; -#define LDAP_SECURITY_NONE 0 -LDAP_API(int) LDAP_CALL ldap_version( LDAPVersion *ver ); - -/* use ldap_create_filter() instead of ldap_build_filter() */ -LDAP_API(void) LDAP_CALL ldap_build_filter( char *buf, unsigned long buflen, - char *pattern, char *prefix, char *suffix, char *attr, - char *value, char **valwords ); -/* use ldap_set_filter_additions() instead of ldap_setfilteraffixes() */ -LDAP_API(void) LDAP_CALL ldap_setfilteraffixes( LDAPFiltDesc *lfdp, - char *prefix, char *suffix ); - -/* older result types a server can return -- use LDAP_RES_MODDN instead */ -#define LDAP_RES_MODRDN LDAP_RES_MODDN -#define LDAP_RES_RENAME LDAP_RES_MODDN - -/* older error messages */ -#define LDAP_AUTH_METHOD_NOT_SUPPORTED LDAP_STRONG_AUTH_NOT_SUPPORTED - -/* - * Generalized cache callback interface: - */ -#define LDAP_OPT_CACHE_FN_PTRS 0x0D /* 13 - API extension */ -#define LDAP_OPT_CACHE_STRATEGY 0x0E /* 14 - API extension */ -#define LDAP_OPT_CACHE_ENABLE 0x0F /* 15 - API extension */ - -/* cache strategies */ -#define LDAP_CACHE_CHECK 0 -#define LDAP_CACHE_POPULATE 1 -#define LDAP_CACHE_LOCALDB 2 - -typedef int (LDAP_C LDAP_CALLBACK LDAP_CF_BIND_CALLBACK)( LDAP *ld, int msgid, - unsigned long tag, const char *dn, const struct berval *creds, - int method); -typedef int (LDAP_C LDAP_CALLBACK LDAP_CF_UNBIND_CALLBACK)( LDAP *ld, - int unused0, unsigned long unused1 ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_CF_SEARCH_CALLBACK)( LDAP *ld, - int msgid, unsigned long tag, const char *base, int scope, - const char LDAP_CALLBACK *filter, char **attrs, int attrsonly ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_CF_COMPARE_CALLBACK)( LDAP *ld, - int msgid, unsigned long tag, const char *dn, const char *attr, - const struct berval *value ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_CF_ADD_CALLBACK)( LDAP *ld, - int msgid, unsigned long tag, const char *dn, LDAPMod **attrs ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_CF_DELETE_CALLBACK)( LDAP *ld, - int msgid, unsigned long tag, const char *dn ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_CF_MODIFY_CALLBACK)( LDAP *ld, - int msgid, unsigned long tag, const char *dn, LDAPMod **mods ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_CF_MODRDN_CALLBACK)( LDAP *ld, - int msgid, unsigned long tag, const char *dn, const char *newrdn, - int deleteoldrdn ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_CF_RESULT_CALLBACK)( LDAP *ld, - int msgid, int all, struct timeval *timeout, LDAPMessage **result ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_CF_FLUSH_CALLBACK)( LDAP *ld, - const char *dn, const char *filter ); - -struct ldap_cache_fns { - void *lcf_private; - LDAP_CF_BIND_CALLBACK *lcf_bind; - LDAP_CF_UNBIND_CALLBACK *lcf_unbind; - LDAP_CF_SEARCH_CALLBACK *lcf_search; - LDAP_CF_COMPARE_CALLBACK *lcf_compare; - LDAP_CF_ADD_CALLBACK *lcf_add; - LDAP_CF_DELETE_CALLBACK *lcf_delete; - LDAP_CF_MODIFY_CALLBACK *lcf_modify; - LDAP_CF_MODRDN_CALLBACK *lcf_modrdn; - LDAP_CF_RESULT_CALLBACK *lcf_result; - LDAP_CF_FLUSH_CALLBACK *lcf_flush; -}; - -LDAP_API(int) LDAP_CALL ldap_cache_flush( LDAP *ld, const char *dn, - const char *filter ); - - -#ifdef __cplusplus -} -#endif -#endif /* _LDAP_DEPRECATED_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/ldap-extension.h b/mozilla/directory/c-sdk/ldap/include/ldap-extension.h deleted file mode 100644 index ea089d538f9..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldap-extension.h +++ /dev/null @@ -1,654 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* ldap-extension.h - extensions to the ldap c api specification */ - -#ifndef _LDAP_EXTENSION_H -#define _LDAP_EXTENSION_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define LDAP_PORT_MAX 65535 /* API extension */ -#define LDAP_VERSION1 1 /* API extension */ -#define LDAP_VERSION LDAP_VERSION2 /* API extension */ - - -/* - * C LDAP features we support that are not (yet) part of the LDAP C API - * Internet Draft. Use the ldap_get_option() call with an option value of - * LDAP_OPT_API_FEATURE_INFO to retrieve information about a feature. - * - * Note that this list is incomplete; it includes only the most widely - * used extensions. Also, the version is 1 for all of these for now. - */ -#define LDAP_API_FEATURE_SERVER_SIDE_SORT 1 -#define LDAP_API_FEATURE_VIRTUAL_LIST_VIEW 1 -#define LDAP_API_FEATURE_PERSISTENT_SEARCH 1 -#define LDAP_API_FEATURE_PROXY_AUTHORIZATION 1 -#define LDAP_API_FEATURE_X_LDERRNO 1 -#define LDAP_API_FEATURE_X_MEMCACHE 1 -#define LDAP_API_FEATURE_X_IO_FUNCTIONS 1 -#define LDAP_API_FEATURE_X_EXTIO_FUNCTIONS 1 -#define LDAP_API_FEATURE_X_DNS_FUNCTIONS 1 -#define LDAP_API_FEATURE_X_MEMALLOC_FUNCTIONS 1 -#define LDAP_API_FEATURE_X_THREAD_FUNCTIONS 1 -#define LDAP_API_FEATURE_X_EXTHREAD_FUNCTIONS 1 -#define LDAP_API_FEATURE_X_GETLANGVALUES 1 -#define LDAP_API_FEATURE_X_CLIENT_SIDE_SORT 1 -#define LDAP_API_FEATURE_X_URL_FUNCTIONS 1 -#define LDAP_API_FEATURE_X_FILTER_FUNCTIONS 1 - -#define LDAP_ROOT_DSE "" /* API extension */ - -#define LDAP_OPT_DESC 0x01 /* 1 */ - -#define NULLMSG ((LDAPMessage *)0) - -/*built-in SASL methods */ -#define LDAP_SASL_EXTERNAL "EXTERNAL" /* TLS/SSL extension */ - -/* possible error codes we can be returned */ -#define LDAP_PARTIAL_RESULTS 0x09 /* 9 (UMich LDAPv2 extn) */ -#define NAME_ERROR(n) ((n & 0xf0) == 0x20) - -#define LDAP_SORT_CONTROL_MISSING 0x3C /* 60 (server side sort extn) */ -#define LDAP_INDEX_RANGE_ERROR 0x3D /* 61 (VLV extn) */ - -/* - * LDAPv3 server controls we know about - */ -#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2" -#define LDAP_CONTROL_SORTREQUEST "1.2.840.113556.1.4.473" -#define LDAP_CONTROL_SORTRESPONSE "1.2.840.113556.1.4.474" -#define LDAP_CONTROL_PERSISTENTSEARCH "2.16.840.1.113730.3.4.3" -#define LDAP_CONTROL_ENTRYCHANGE "2.16.840.1.113730.3.4.7" -#define LDAP_CONTROL_VLVREQUEST "2.16.840.1.113730.3.4.9" -#define LDAP_CONTROL_VLVRESPONSE "2.16.840.1.113730.3.4.10" -#define LDAP_CONTROL_PROXYAUTH "2.16.840.1.113730.3.4.12" /* version 1 -*/ -#define LDAP_CONTROL_PROXIEDAUTH "2.16.840.1.113730.3.4.18" /* version 2 -*/ - -/* Authentication request and response controls */ -#define LDAP_CONTROL_AUTH_REQUEST "2.16.840.1.113730.3.4.16" -#define LDAP_CONTROL_AUTH_RESPONSE "2.16.840.1.113730.3.4.15" - -/* Password information sent back to client */ -#define LDAP_CONTROL_PWEXPIRED "2.16.840.1.113730.3.4.4" -#define LDAP_CONTROL_PWEXPIRING "2.16.840.1.113730.3.4.5" - -/* Suppress virtual/inherited attribute values */ -#define LDAP_CONTROL_REAL_ATTRS_ONLY "2.16.840.1.113730.3.4.17" - -/* Only return virtual/inherited attribute values */ -#define LDAP_CONTROL_VIRTUAL_ATTRS_ONLY "2.16.840.1.113730.3.4.19" - - -LDAP_API(void) LDAP_CALL ldap_ber_free( BerElement *ber, int freebuf ); - -/* - * Server side sorting of search results (an LDAPv3 extension -- - * LDAP_API_FEATURE_SERVER_SIDE_SORT) - */ -typedef struct LDAPsortkey { /* structure for a sort-key */ - char * sk_attrtype; - char * sk_matchruleoid; - int sk_reverseorder; -} LDAPsortkey; - -LDAP_API(int) LDAP_CALL ldap_create_sort_control( LDAP *ld, - LDAPsortkey **sortKeyList, const char ctl_iscritical, - LDAPControl **ctrlp ); -LDAP_API(int) LDAP_CALL ldap_parse_sort_control( LDAP *ld, - LDAPControl **ctrls, unsigned long *result, char **attribute ); - -LDAP_API(void) LDAP_CALL ldap_free_sort_keylist( LDAPsortkey **sortKeyList ); -LDAP_API(int) LDAP_CALL ldap_create_sort_keylist( LDAPsortkey ***sortKeyList, - const char *string_rep ); - - -/* - * Virtual list view (an LDAPv3 extension -- LDAP_API_FEATURE_VIRTUAL_LIST_VIEW) - */ -/* - * structure that describes a VirtualListViewRequest control. - * note that ldvlist_index and ldvlist_size are only relevant to - * ldap_create_virtuallist_control() if ldvlist_attrvalue is NULL. - */ -typedef struct ldapvirtuallist { - unsigned long ldvlist_before_count; /* # entries before target */ - unsigned long ldvlist_after_count; /* # entries after target */ - char *ldvlist_attrvalue; /* jump to this value */ - unsigned long ldvlist_index; /* list offset */ - unsigned long ldvlist_size; /* number of items in vlist */ - void *ldvlist_extradata; /* for use by application */ -} LDAPVirtualList; - -/* - * VLV functions: - */ -LDAP_API(int) LDAP_CALL ldap_create_virtuallist_control( LDAP *ld, - LDAPVirtualList *ldvlistp, LDAPControl **ctrlp ); - -LDAP_API(int) LDAP_CALL ldap_parse_virtuallist_control( LDAP *ld, - LDAPControl **ctrls, unsigned long *target_posp, - unsigned long *list_sizep, int *errcodep ); - -/* - * Routines for creating persistent search controls and for handling - * "entry changed notification" controls (an LDAPv3 extension -- - * LDAP_API_FEATURE_PERSISTENT_SEARCH) - */ -#define LDAP_CHANGETYPE_ADD 1 -#define LDAP_CHANGETYPE_DELETE 2 -#define LDAP_CHANGETYPE_MODIFY 4 -#define LDAP_CHANGETYPE_MODDN 8 -#define LDAP_CHANGETYPE_ANY (1|2|4|8) -LDAP_API(int) LDAP_CALL ldap_create_persistentsearch_control( LDAP *ld, - int changetypes, int changesonly, int return_echg_ctls, - char ctl_iscritical, LDAPControl **ctrlp ); -LDAP_API(int) LDAP_CALL ldap_parse_entrychange_control( LDAP *ld, - LDAPControl **ctrls, int *chgtypep, char **prevdnp, - int *chgnumpresentp, long *chgnump ); - -/* - * Routines for creating Proxied Authorization controls (an LDAPv3 - * extension -- LDAP_API_FEATURE_PROXY_AUTHORIZATION) - * ldap_create_proxyauth_control() is for the old (version 1) control. - * ldap_create_proxiedauth_control() is for the newer (version 2) control. - */ -LDAP_API(int) LDAP_CALL ldap_create_proxyauth_control( LDAP *ld, - const char *dn, const char ctl_iscritical, LDAPControl **ctrlp ); -LDAP_API(int) LDAP_CALL ldap_create_proxiedauth_control( LDAP *ld, - const char *authzid, LDAPControl **ctrlp ); - -/* - * Functions to get and set LDAP error information (API extension -- - * LDAP_API_FEATURE_X_LDERRNO ) - * - * By using LDAP_OPT_THREAD_FN_PTRS, you can arrange for the error info. to - * be thread-specific. - */ -LDAP_API(int) LDAP_CALL ldap_get_lderrno( LDAP *ld, char **m, char **s ); -LDAP_API(int) LDAP_CALL ldap_set_lderrno( LDAP *ld, int e, char *m, char *s ); - - -/* - * LDAP URL functions and definitions (an API extension -- - * LDAP_API_FEATURE_X_URL_FUNCTIONS) - */ -/* - * types for ldap URL handling - */ -typedef struct ldap_url_desc { - char *lud_host; - int lud_port; - char *lud_dn; - char **lud_attrs; - int lud_scope; - char *lud_filter; - unsigned long lud_options; -#define LDAP_URL_OPT_SECURE 0x01 - char *lud_string; /* for internal use only */ -} LDAPURLDesc; - -#define NULLLDAPURLDESC ((LDAPURLDesc *)NULL) - -/* - * possible errors returned by ldap_url_parse() - */ -#define LDAP_URL_ERR_NOTLDAP 1 /* URL doesn't begin with "ldap://" */ -#define LDAP_URL_ERR_NODN 2 /* URL has no DN (required) */ -#define LDAP_URL_ERR_BADSCOPE 3 /* URL scope string is invalid */ -#define LDAP_URL_ERR_MEM 4 /* can't allocate memory space */ -#define LDAP_URL_ERR_PARAM 5 /* bad parameter to an URL function */ -#define LDAP_URL_UNRECOGNIZED_CRITICAL_EXTENSION 6 - -/* - * URL functions: - */ -LDAP_API(int) LDAP_CALL ldap_is_ldap_url( const char *url ); -LDAP_API(int) LDAP_CALL ldap_url_parse( const char *url, LDAPURLDesc **ludpp ); -LDAP_API(void) LDAP_CALL ldap_free_urldesc( LDAPURLDesc *ludp ); -LDAP_API(int) LDAP_CALL ldap_url_search( LDAP *ld, const char *url, - int attrsonly ); -LDAP_API(int) LDAP_CALL ldap_url_search_s( LDAP *ld, const char *url, - int attrsonly, LDAPMessage **res ); -LDAP_API(int) LDAP_CALL ldap_url_search_st( LDAP *ld, const char *url, - int attrsonly, struct timeval *timeout, LDAPMessage **res ); - - -/* - * Function to dispose of an array of LDAPMod structures (an API extension). - * Warning: don't use this unless the mods array was allocated using the - * same memory allocator as is being used by libldap. - */ -LDAP_API(void) LDAP_CALL ldap_mods_free( LDAPMod **mods, int freemods ); - -/* - * SSL option (an API extension): - */ -#define LDAP_OPT_SSL 0x0A /* 10 - API extension */ - -/* - * Referral hop limit (an API extension): - */ -#define LDAP_OPT_REFERRAL_HOP_LIMIT 0x10 /* 16 - API extension */ - -/* - * Rebind callback function (an API extension) - */ -#define LDAP_OPT_REBIND_FN 0x06 /* 6 - API extension */ -#define LDAP_OPT_REBIND_ARG 0x07 /* 7 - API extension */ -typedef int (LDAP_CALL LDAP_CALLBACK LDAP_REBINDPROC_CALLBACK)( LDAP *ld, - char **dnp, char **passwdp, int *authmethodp, int freeit, void *arg); -LDAP_API(void) LDAP_CALL ldap_set_rebind_proc( LDAP *ld, - LDAP_REBINDPROC_CALLBACK *rebindproc, void *arg ); - -/* - * Thread function callbacks (an API extension -- - * LDAP_API_FEATURE_X_THREAD_FUNCTIONS). - */ -#define LDAP_OPT_THREAD_FN_PTRS 0x05 /* 5 - API extension */ - -/* - * Thread callback functions: - */ -typedef void *(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_ALLOC_CALLBACK)( void ); -typedef void (LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_FREE_CALLBACK)( void *m ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_LOCK_CALLBACK)( void *m ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_UNLOCK_CALLBACK)( void *m ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_TF_GET_ERRNO_CALLBACK)( void ); -typedef void (LDAP_C LDAP_CALLBACK LDAP_TF_SET_ERRNO_CALLBACK)( int e ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_TF_GET_LDERRNO_CALLBACK)( - char **matchedp, char **errmsgp, void *arg ); -typedef void (LDAP_C LDAP_CALLBACK LDAP_TF_SET_LDERRNO_CALLBACK)( int err, - char *matched, char *errmsg, void *arg ); - -/* - * Structure to hold thread function pointers: - */ -struct ldap_thread_fns { - LDAP_TF_MUTEX_ALLOC_CALLBACK *ltf_mutex_alloc; - LDAP_TF_MUTEX_FREE_CALLBACK *ltf_mutex_free; - LDAP_TF_MUTEX_LOCK_CALLBACK *ltf_mutex_lock; - LDAP_TF_MUTEX_UNLOCK_CALLBACK *ltf_mutex_unlock; - LDAP_TF_GET_ERRNO_CALLBACK *ltf_get_errno; - LDAP_TF_SET_ERRNO_CALLBACK *ltf_set_errno; - LDAP_TF_GET_LDERRNO_CALLBACK *ltf_get_lderrno; - LDAP_TF_SET_LDERRNO_CALLBACK *ltf_set_lderrno; - void *ltf_lderrno_arg; -}; - -/* - * Extended I/O function callbacks option (an API extension -- - * LDAP_API_FEATURE_X_EXTIO_FUNCTIONS). - */ -#define LDAP_X_OPT_EXTIO_FN_PTRS (LDAP_OPT_PRIVATE_EXTENSION_BASE + 0x0F00) - /* 0x4000 + 0x0F00 = 0x4F00 = 20224 - API extension */ - -/* - * These extended I/O function callbacks echo the BSD socket API but accept - * an extra pointer parameter at the end of their argument list that can - * be used by client applications for their own needs. For some of the calls, - * the pointer is a session argument of type struct lextiof_session_private * - * that is associated with the LDAP session handle (LDAP *). For others, the - * pointer is a socket specific struct lextiof_socket_private * argument that - * is associated with a particular socket (a TCP connection). - * - * The lextiof_session_private and lextiof_socket_private structures are not - * defined by the LDAP C API; users of this extended I/O interface should - * define these themselves. - * - * The combination of the integer socket number (i.e., lpoll_fd, which is - * the value returned by the CONNECT callback) and the application specific - * socket argument (i.e., lpoll_socketarg, which is the value set in *sockargpp - * by the CONNECT callback) must be unique. - * - * The types for the extended READ and WRITE callbacks are actually in lber.h. - * - * The CONNECT callback gets passed both the session argument (sessionarg) - * and a pointer to a socket argument (socketargp) so it has the - * opportunity to set the socket-specific argument. The CONNECT callback - * also takes a timeout parameter whose value can be set by calling - * ldap_set_option( ld, LDAP_X_OPT_..., &val ). The units used for the - * timeout parameter are milliseconds. - * - * A POLL interface is provided instead of a select() one. The timeout is - * in milliseconds. - * - * A NEWHANDLE callback function is also provided. It is called right - * after the LDAP session handle is created, e.g., during ldap_init(). - * If the NEWHANDLE callback returns anything other than LDAP_SUCCESS, - * the session handle allocation fails. - * - * A DISPOSEHANDLE callback function is also provided. It is called right - * before the LDAP session handle and its contents are destroyed, e.g., - * during ldap_unbind(). - */ - -/* - * Special timeout values for poll and connect: - */ -#define LDAP_X_IO_TIMEOUT_NO_WAIT 0 /* return immediately */ -#define LDAP_X_IO_TIMEOUT_NO_TIMEOUT (-1) /* block indefinitely */ - -/* LDAP poll()-like descriptor: - */ -typedef struct ldap_x_pollfd { /* used by LDAP_X_EXTIOF_POLL_CALLBACK */ - int lpoll_fd; /* integer file descriptor / socket */ - struct lextiof_socket_private - *lpoll_socketarg; - /* pointer socket and for use by */ - /* application */ - short lpoll_events; /* requested event */ - short lpoll_revents; /* returned event */ -} LDAP_X_PollFD; - -/* Event flags for lpoll_events and lpoll_revents: - */ -#define LDAP_X_POLLIN 0x01 /* regular data ready for reading */ -#define LDAP_X_POLLPRI 0x02 /* high priority data available */ -#define LDAP_X_POLLOUT 0x04 /* ready for writing */ -#define LDAP_X_POLLERR 0x08 /* error occurred -- only in lpoll_revents */ -#define LDAP_X_POLLHUP 0x10 /* connection closed -- only in lpoll_revents */ -#define LDAP_X_POLLNVAL 0x20 /* invalid lpoll_fd -- only in lpoll_revents */ - -/* Options passed to LDAP_X_EXTIOF_CONNECT_CALLBACK to modify socket behavior: - */ -#define LDAP_X_EXTIOF_OPT_NONBLOCKING 0x01 /* turn on non-blocking mode */ -#define LDAP_X_EXTIOF_OPT_SECURE 0x02 /* turn on 'secure' mode */ - - -/* extended I/O callback function prototypes: - */ -typedef int (LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_CONNECT_CALLBACK )( - const char *hostlist, int port, /* host byte order */ - int timeout /* milliseconds */, - unsigned long options, /* bitmapped options */ - struct lextiof_session_private *sessionarg, - struct lextiof_socket_private **socketargp ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_CLOSE_CALLBACK )( - int s, struct lextiof_socket_private *socketarg ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_POLL_CALLBACK)( - LDAP_X_PollFD fds[], int nfds, int timeout /* milliseconds */, - struct lextiof_session_private *sessionarg ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_NEWHANDLE_CALLBACK)( - LDAP *ld, struct lextiof_session_private *sessionarg ); -typedef void (LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_DISPOSEHANDLE_CALLBACK)( - LDAP *ld, struct lextiof_session_private *sessionarg ); - - -/* Structure to hold extended I/O function pointers: - */ -struct ldap_x_ext_io_fns { - /* lextiof_size should always be set to LDAP_X_EXTIO_FNS_SIZE */ - int lextiof_size; - LDAP_X_EXTIOF_CONNECT_CALLBACK *lextiof_connect; - LDAP_X_EXTIOF_CLOSE_CALLBACK *lextiof_close; - LDAP_X_EXTIOF_READ_CALLBACK *lextiof_read; - LDAP_X_EXTIOF_WRITE_CALLBACK *lextiof_write; - LDAP_X_EXTIOF_POLL_CALLBACK *lextiof_poll; - LDAP_X_EXTIOF_NEWHANDLE_CALLBACK *lextiof_newhandle; - LDAP_X_EXTIOF_DISPOSEHANDLE_CALLBACK *lextiof_disposehandle; - void *lextiof_session_arg; - LDAP_X_EXTIOF_WRITEV_CALLBACK *lextiof_writev; -}; -#define LDAP_X_EXTIO_FNS_SIZE sizeof(struct ldap_x_ext_io_fns) - -/* - * Utility functions for parsing space-separated host lists (useful for - * implementing an extended I/O CONNECT callback function). - */ -struct ldap_x_hostlist_status; -LDAP_API(int) LDAP_CALL ldap_x_hostlist_first( const char *hostlist, - int defport, char **hostp, int *portp /* host byte order */, - struct ldap_x_hostlist_status **statusp ); -LDAP_API(int) LDAP_CALL ldap_x_hostlist_next( char **hostp, - int *portp /* host byte order */, struct ldap_x_hostlist_status *status -); -LDAP_API(void) LDAP_CALL ldap_x_hostlist_statusfree( - struct ldap_x_hostlist_status *status ); - -/* - * Client side sorting of entries (an API extension -- - * LDAP_API_FEATURE_X_CLIENT_SIDE_SORT) - */ -/* - * Client side sorting callback functions: - */ -typedef const struct berval* (LDAP_C LDAP_CALLBACK - LDAP_KEYGEN_CALLBACK)( void *arg, LDAP *ld, LDAPMessage *entry ); -typedef int (LDAP_C LDAP_CALLBACK - LDAP_KEYCMP_CALLBACK)( void *arg, const struct berval*, - const struct berval* ); -typedef void (LDAP_C LDAP_CALLBACK - LDAP_KEYFREE_CALLBACK)( void *arg, const struct berval* ); -typedef int (LDAP_C LDAP_CALLBACK - LDAP_CMP_CALLBACK)(const char *val1, const char *val2); -typedef int (LDAP_C LDAP_CALLBACK - LDAP_VALCMP_CALLBACK)(const char **val1p, const char **val2p); - -/* - * Client side sorting functions: - */ -LDAP_API(int) LDAP_CALL ldap_keysort_entries( LDAP *ld, LDAPMessage **chain, - void *arg, LDAP_KEYGEN_CALLBACK *gen, LDAP_KEYCMP_CALLBACK *cmp, - LDAP_KEYFREE_CALLBACK *fre ); -LDAP_API(int) LDAP_CALL ldap_multisort_entries( LDAP *ld, LDAPMessage **chain, - char **attr, LDAP_CMP_CALLBACK *cmp ); -LDAP_API(int) LDAP_CALL ldap_sort_entries( LDAP *ld, LDAPMessage **chain, - char *attr, LDAP_CMP_CALLBACK *cmp ); -LDAP_API(int) LDAP_CALL ldap_sort_values( LDAP *ld, char **vals, - LDAP_VALCMP_CALLBACK *cmp ); -LDAP_API(int) LDAP_C LDAP_CALLBACK ldap_sort_strcasecmp( const char **a, - const char **b ); - - -/* - * Filter functions and definitions (an API extension -- - * LDAP_API_FEATURE_X_FILTER_FUNCTIONS) - */ -/* - * Structures, constants, and types for filter utility routines: - */ -typedef struct ldap_filt_info { - char *lfi_filter; - char *lfi_desc; - int lfi_scope; /* LDAP_SCOPE_BASE, etc */ - int lfi_isexact; /* exact match filter? */ - struct ldap_filt_info *lfi_next; -} LDAPFiltInfo; - -#define LDAP_FILT_MAXSIZ 1024 - -typedef struct ldap_filt_list LDAPFiltList; /* opaque filter list handle */ -typedef struct ldap_filt_desc LDAPFiltDesc; /* opaque filter desc handle */ - -/* - * Filter utility functions: - */ -LDAP_API(LDAPFiltDesc *) LDAP_CALL ldap_init_getfilter( char *fname ); -LDAP_API(LDAPFiltDesc *) LDAP_CALL ldap_init_getfilter_buf( char *buf, - long buflen ); -LDAP_API(LDAPFiltInfo *) LDAP_CALL ldap_getfirstfilter( LDAPFiltDesc *lfdp, - char *tagpat, char *value ); -LDAP_API(LDAPFiltInfo *) LDAP_CALL ldap_getnextfilter( LDAPFiltDesc *lfdp ); -LDAP_API(int) LDAP_CALL ldap_set_filter_additions( LDAPFiltDesc *lfdp, - char *prefix, char *suffix ); -LDAP_API(int) LDAP_CALL ldap_create_filter( char *buf, unsigned long buflen, - char *pattern, char *prefix, char *suffix, char *attr, - char *value, char **valwords ); -LDAP_API(void) LDAP_CALL ldap_getfilter_free( LDAPFiltDesc *lfdp ); - -/* - * Friendly mapping structure and routines (an API extension) - */ -typedef struct friendly { - char *f_unfriendly; - char *f_friendly; -} *FriendlyMap; -LDAP_API(char *) LDAP_CALL ldap_friendly_name( char *filename, char *name, - FriendlyMap *map ); -LDAP_API(void) LDAP_CALL ldap_free_friendlymap( FriendlyMap *map ); - -/* - * In Memory Cache (an API extension -- LDAP_API_FEATURE_X_MEMCACHE) - */ -typedef struct ldapmemcache LDAPMemCache; /* opaque in-memory cache handle */ - -LDAP_API(int) LDAP_CALL ldap_memcache_init( unsigned long ttl, - unsigned long size, char **baseDNs, struct ldap_thread_fns *thread_fns, - LDAPMemCache **cachep ); -LDAP_API(int) LDAP_CALL ldap_memcache_set( LDAP *ld, LDAPMemCache *cache ); -LDAP_API(int) LDAP_CALL ldap_memcache_get( LDAP *ld, LDAPMemCache **cachep ); -LDAP_API(void) LDAP_CALL ldap_memcache_flush( LDAPMemCache *cache, char *dn, - int scope ); -LDAP_API(void) LDAP_CALL ldap_memcache_destroy( LDAPMemCache *cache ); -LDAP_API(void) LDAP_CALL ldap_memcache_update( LDAPMemCache *cache ); - -/* - * Timeout value for nonblocking connect call - */ -#define LDAP_X_OPT_CONNECT_TIMEOUT (LDAP_OPT_PRIVATE_EXTENSION_BASE + 0x0F01) - /* 0x4000 + 0x0F01 = 0x4F01 = 20225 - API extension */ - -/* - * Memory allocation callback functions (an API extension -- - * LDAP_API_FEATURE_X_MEMALLOC_FUNCTIONS). These are global and can - * not be set on a per-LDAP session handle basis. Install your own - * functions by making a call like this: - * ldap_set_option( NULL, LDAP_OPT_MEMALLOC_FN_PTRS, &memalloc_fns ); - * - * look in lber.h for the function typedefs themselves. - */ -#define LDAP_OPT_MEMALLOC_FN_PTRS 0x61 /* 97 - API extension */ - -struct ldap_memalloc_fns { - LDAP_MALLOC_CALLBACK *ldapmem_malloc; - LDAP_CALLOC_CALLBACK *ldapmem_calloc; - LDAP_REALLOC_CALLBACK *ldapmem_realloc; - LDAP_FREE_CALLBACK *ldapmem_free; -}; - - -/* - * Memory allocation functions (an API extension) - */ -void *ldap_x_malloc( size_t size ); -void *ldap_x_calloc( size_t nelem, size_t elsize ); -void *ldap_x_realloc( void *ptr, size_t size ); -void ldap_x_free( void *ptr ); - -/* - * Server reconnect (an API extension). - */ -#define LDAP_OPT_RECONNECT 0x62 /* 98 - API extension */ - - -/* - * Extra thread callback functions (an API extension -- - * LDAP_API_FEATURE_X_EXTHREAD_FUNCTIONS) - */ -#define LDAP_OPT_EXTRA_THREAD_FN_PTRS 0x65 /* 101 - API extension */ - -typedef int (LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_TRYLOCK_CALLBACK)( void *m ); -typedef void *(LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_ALLOC_CALLBACK)( void ); -typedef void (LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_FREE_CALLBACK)( void *s ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_WAIT_CALLBACK)( void *s ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_POST_CALLBACK)( void *s ); -typedef void *(LDAP_C LDAP_CALLBACK LDAP_TF_THREADID_CALLBACK)(void); - -struct ldap_extra_thread_fns { - LDAP_TF_MUTEX_TRYLOCK_CALLBACK *ltf_mutex_trylock; - LDAP_TF_SEMA_ALLOC_CALLBACK *ltf_sema_alloc; - LDAP_TF_SEMA_FREE_CALLBACK *ltf_sema_free; - LDAP_TF_SEMA_WAIT_CALLBACK *ltf_sema_wait; - LDAP_TF_SEMA_POST_CALLBACK *ltf_sema_post; - LDAP_TF_THREADID_CALLBACK *ltf_threadid_fn; -}; - -/* - * Debugging level (an API extension) - */ -#define LDAP_OPT_DEBUG_LEVEL 0x6E /* 110 - API extension */ -/* On UNIX, there's only one copy of ldap_debug */ -/* On NT, each dll keeps its own module_ldap_debug, which */ -/* points to the process' ldap_debug and needs initializing after load */ -#ifdef _WIN32 -extern int *module_ldap_debug; -typedef void (*set_debug_level_fn_t)(int*); -#endif - -#ifdef LDAP_DNS -#define LDAP_OPT_DNS 0x0C /* 12 - API extension */ -#endif - -/* - * UTF-8 routines (should these move into libnls?) - */ -/* number of bytes in character */ -LDAP_API(int) LDAP_CALL ldap_utf8len( const char* ); -/* find next character */ -LDAP_API(char*) LDAP_CALL ldap_utf8next( char* ); -/* find previous character */ -LDAP_API(char*) LDAP_CALL ldap_utf8prev( char* ); -/* copy one character */ -LDAP_API(int) LDAP_CALL ldap_utf8copy( char* dst, const char* src ); -/* total number of characters */ -LDAP_API(size_t) LDAP_CALL ldap_utf8characters( const char* ); -/* get one UCS-4 character, and move *src to the next character */ -LDAP_API(unsigned long) LDAP_CALL ldap_utf8getcc( const char** src ); -/* UTF-8 aware strtok_r() */ -LDAP_API(char*) LDAP_CALL ldap_utf8strtok_r( char* src, const char* brk, char** -next); - -/* like isalnum(*s) in the C locale */ -LDAP_API(int) LDAP_CALL ldap_utf8isalnum( char* s ); -/* like isalpha(*s) in the C locale */ -LDAP_API(int) LDAP_CALL ldap_utf8isalpha( char* s ); -/* like isdigit(*s) in the C locale */ -LDAP_API(int) LDAP_CALL ldap_utf8isdigit( char* s ); -/* like isxdigit(*s) in the C locale */ -LDAP_API(int) LDAP_CALL ldap_utf8isxdigit(char* s ); -/* like isspace(*s) in the C locale */ -LDAP_API(int) LDAP_CALL ldap_utf8isspace( char* s ); - -#define LDAP_UTF8LEN(s) ((0x80 & *(unsigned char*)(s)) ? ldap_utf8len (s) : 1) -#define LDAP_UTF8NEXT(s) ((0x80 & *(unsigned char*)(s)) ? ldap_utf8next(s) : ( s)+1) -#define LDAP_UTF8INC(s) ((0x80 & *(unsigned char*)(s)) ? s=ldap_utf8next(s) : ++s) - -#define LDAP_UTF8PREV(s) ldap_utf8prev(s) -#define LDAP_UTF8DEC(s) (s=ldap_utf8prev(s)) - -#define LDAP_UTF8COPY(d,s) ((0x80 & *(unsigned char*)(s)) ? ldap_utf8copy(d,s) : ((*(d) = *(s)), 1)) -#define LDAP_UTF8GETCC(s) ((0x80 & *(unsigned char*)(s)) ? ldap_utf8getcc (&s) : *s++) -#define LDAP_UTF8GETC(s) ((0x80 & *(unsigned char*)(s)) ? ldap_utf8getcc ((const char**)&s) : *s++) - - -#ifdef __cplusplus -} -#endif -#endif /* _LDAP_EXTENSION_H */ - diff --git a/mozilla/directory/c-sdk/ldap/include/ldap-platform.h b/mozilla/directory/c-sdk/ldap/include/ldap-platform.h deleted file mode 100644 index 5d5ff6e1616..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldap-platform.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* ldap-platform.h - platform transparency */ - -#ifndef _LDAP_PLATFORM_H -#define _LDAP_PLATFORM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined( XP_OS2 ) -#include "os2sock.h" -#elif defined (WIN32) || defined (_WIN32) || defined( _CONSOLE ) -#include -# if defined( _WINDOWS ) -# include -# endif -#elif defined(macintosh) -#ifndef LDAP_TYPE_TIMEVAL_DEFINED -#include -#endif -#ifndef LDAP_TYPE_SOCKET_DEFINED /* API extension */ -#include "macsock.h" -#endif -#else /* everything else, e.g., Unix */ -#ifndef LDAP_TYPE_TIMEVAL_DEFINED -#include -#endif -#ifndef LDAP_TYPE_SOCKET_DEFINED /* API extension */ -#include -#include -#endif -#endif - -#ifdef _AIX -#include -#endif /* _AIX */ - -/* - * LDAP_API macro definition: - */ -#ifndef LDAP_API -#if defined( _WINDOWS ) || defined( _WIN32 ) -#define LDAP_API(rt) rt -#else /* _WINDOWS */ -#define LDAP_API(rt) rt -#endif /* _WINDOWS */ -#endif /* LDAP_API */ - -#ifdef __cplusplus -} -#endif -#endif /* _LDAP_PLATFORM_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/ldap-standard-tmpl.h b/mozilla/directory/c-sdk/ldap/include/ldap-standard-tmpl.h deleted file mode 100644 index e63aed33d8d..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldap-standard-tmpl.h +++ /dev/null @@ -1,438 +0,0 @@ -/* This file is a template. The generated file is ldap-standard.h> -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* ldap-standard.h - standards base header file for libldap */ -/* This file contain the defines and function prototypes matching */ -/* very closely to the latest LDAP C API draft */ - -#ifndef _LDAP_STANDARD_H -#define _LDAP_STANDARD_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "ldap-platform.h" - -#include "lber.h" - -#define LDAP_PORT 389 -#define LDAPS_PORT 636 -#define LDAP_VERSION2 2 -#define LDAP_VERSION3 3 -#define LDAP_VERSION_MIN LDAP_VERSION1 -#define LDAP_VERSION_MAX LDAP_VERSION3 - -#define LDAP_VENDOR_VERSION {{LDAP_VENDOR_VERSION}} /* version # * 100 */ -#define LDAP_VENDOR_NAME "{{LDAP_VENDOR_NAME}}" -/* - * The following will be an RFC number once the LDAP C API Internet Draft - * is published as a Proposed Standard RFC. For now we use 2000 + the - * draft revision number (currently 5) since we are close to compliance - * with revision 5 of the draft. - */ -#define LDAP_API_VERSION 2005 - - -#define LDAP_NO_ATTRS "1.1" -#define LDAP_ALL_USER_ATTRS "*" - -/* - * Standard options (used with ldap_set_option() and ldap_get_option): - */ -#define LDAP_OPT_API_INFO 0x00 /* 0 */ -#define LDAP_OPT_DEREF 0x02 /* 2 */ -#define LDAP_OPT_SIZELIMIT 0x03 /* 3 */ -#define LDAP_OPT_TIMELIMIT 0x04 /* 4 */ -#define LDAP_OPT_REFERRALS 0x08 /* 8 */ -#define LDAP_OPT_RESTART 0x09 /* 9 */ -#define LDAP_OPT_PROTOCOL_VERSION 0x11 /* 17 */ -#define LDAP_OPT_SERVER_CONTROLS 0x12 /* 18 */ -#define LDAP_OPT_CLIENT_CONTROLS 0x13 /* 19 */ -#define LDAP_OPT_API_FEATURE_INFO 0x15 /* 21 */ -#define LDAP_OPT_HOST_NAME 0x30 /* 48 */ -#define LDAP_OPT_ERROR_NUMBER 0x31 /* 49 */ -#define LDAP_OPT_ERROR_STRING 0x32 /* 50 */ -#define LDAP_OPT_MATCHED_DN 0x33 /* 51 */ - -/* - * Well-behaved private and experimental extensions will use option values - * between 0x4000 (16384) and 0x7FFF (32767) inclusive. - */ -#define LDAP_OPT_PRIVATE_EXTENSION_BASE 0x4000 /* to 0x7FFF inclusive */ - -/* for on/off options */ -#define LDAP_OPT_ON ((void *)1) -#define LDAP_OPT_OFF ((void *)0) - -typedef struct ldap LDAP; /* opaque connection handle */ -typedef struct ldapmsg LDAPMessage; /* opaque result/entry handle */ - -/* structure representing an LDAP modification */ -typedef struct ldapmod { - int mod_op; /* kind of mod + form of values*/ -#define LDAP_MOD_ADD 0x00 -#define LDAP_MOD_DELETE 0x01 -#define LDAP_MOD_REPLACE 0x02 -#define LDAP_MOD_BVALUES 0x80 - char *mod_type; /* attribute name to modify */ - union mod_vals_u { - char **modv_strvals; - struct berval **modv_bvals; - } mod_vals; /* values to add/delete/replace */ -#define mod_values mod_vals.modv_strvals -#define mod_bvalues mod_vals.modv_bvals -} LDAPMod; - - -/* - * structure for holding ldapv3 controls - */ -typedef struct ldapcontrol { - char *ldctl_oid; - struct berval ldctl_value; - char ldctl_iscritical; -} LDAPControl; - - -/* - * LDAP API information. Can be retrieved by using a sequence like: - * - * LDAPAPIInfo ldai; - * ldai.ldapai_info_version = LDAP_API_INFO_VERSION; - * if ( ldap_get_option( NULL, LDAP_OPT_API_INFO, &ldia ) == 0 ) ... - */ -#define LDAP_API_INFO_VERSION 1 -typedef struct ldapapiinfo { - int ldapai_info_version; /* version of this struct (1) */ - int ldapai_api_version; /* revision of API supported */ - int ldapai_protocol_version; /* highest LDAP version supported */ - char **ldapai_extensions; /* names of API extensions */ - char *ldapai_vendor_name; /* name of supplier */ - int ldapai_vendor_version; /* supplier-specific version times 100 */ -} LDAPAPIInfo; - - -/* - * LDAP API extended features info. Can be retrieved by using a sequence like: - * - * LDAPAPIFeatureInfo ldfi; - * ldfi.ldapaif_info_version = LDAP_FEATURE_INFO_VERSION; - * ldfi.ldapaif_name = "VIRTUAL_LIST_VIEW"; - * if ( ldap_get_option( NULL, LDAP_OPT_API_FEATURE_INFO, &ldfi ) == 0 ) ... - */ -#define LDAP_FEATURE_INFO_VERSION 1 -typedef struct ldap_apifeature_info { - int ldapaif_info_version; /* version of this struct (1) */ - char *ldapaif_name; /* name of supported feature */ - int ldapaif_version; /* revision of supported feature */ -} LDAPAPIFeatureInfo; - - -/* possible result types a server can return */ -#define LDAP_RES_BIND 0x61L /* 97 */ -#define LDAP_RES_SEARCH_ENTRY 0x64L /* 100 */ -#define LDAP_RES_SEARCH_RESULT 0x65L /* 101 */ -#define LDAP_RES_MODIFY 0x67L /* 103 */ -#define LDAP_RES_ADD 0x69L /* 105 */ -#define LDAP_RES_DELETE 0x6BL /* 107 */ -#define LDAP_RES_MODDN 0x6DL /* 109 */ -#define LDAP_RES_COMPARE 0x6FL /* 111 */ -#define LDAP_RES_SEARCH_REFERENCE 0x73L /* 115 */ -#define LDAP_RES_EXTENDED 0x78L /* 120 */ - -/* Special values for ldap_result() "msgid" parameter */ -#define LDAP_RES_ANY (-1) -#define LDAP_RES_UNSOLICITED 0 - -/* built-in SASL methods */ -#define LDAP_SASL_SIMPLE 0 /* special value used for simple bind */ - -/* search scopes */ -#define LDAP_SCOPE_BASE 0x00 -#define LDAP_SCOPE_ONELEVEL 0x01 -#define LDAP_SCOPE_SUBTREE 0x02 - -/* alias dereferencing */ -#define LDAP_DEREF_NEVER 0x00 -#define LDAP_DEREF_SEARCHING 0x01 -#define LDAP_DEREF_FINDING 0x02 -#define LDAP_DEREF_ALWAYS 0x03 - -/* predefined size/time limits */ -#define LDAP_NO_LIMIT 0 - -/* allowed values for "all" ldap_result() parameter */ -#define LDAP_MSG_ONE 0x00 -#define LDAP_MSG_ALL 0x01 -#define LDAP_MSG_RECEIVED 0x02 - -/* possible error codes we can be returned */ -#define LDAP_SUCCESS 0x00 /* 0 */ -#define LDAP_OPERATIONS_ERROR 0x01 /* 1 */ -#define LDAP_PROTOCOL_ERROR 0x02 /* 2 */ -#define LDAP_TIMELIMIT_EXCEEDED 0x03 /* 3 */ -#define LDAP_SIZELIMIT_EXCEEDED 0x04 /* 4 */ -#define LDAP_COMPARE_FALSE 0x05 /* 5 */ -#define LDAP_COMPARE_TRUE 0x06 /* 6 */ -#define LDAP_STRONG_AUTH_NOT_SUPPORTED 0x07 /* 7 */ -#define LDAP_STRONG_AUTH_REQUIRED 0x08 /* 8 */ -#define LDAP_REFERRAL 0x0a /* 10 - LDAPv3 */ -#define LDAP_ADMINLIMIT_EXCEEDED 0x0b /* 11 - LDAPv3 */ -#define LDAP_UNAVAILABLE_CRITICAL_EXTENSION 0x0c /* 12 - LDAPv3 */ -#define LDAP_CONFIDENTIALITY_REQUIRED 0x0d /* 13 */ -#define LDAP_SASL_BIND_IN_PROGRESS 0x0e /* 14 - LDAPv3 */ - -#define LDAP_NO_SUCH_ATTRIBUTE 0x10 /* 16 */ -#define LDAP_UNDEFINED_TYPE 0x11 /* 17 */ -#define LDAP_INAPPROPRIATE_MATCHING 0x12 /* 18 */ -#define LDAP_CONSTRAINT_VIOLATION 0x13 /* 19 */ -#define LDAP_TYPE_OR_VALUE_EXISTS 0x14 /* 20 */ -#define LDAP_INVALID_SYNTAX 0x15 /* 21 */ - -#define LDAP_NO_SUCH_OBJECT 0x20 /* 32 */ -#define LDAP_ALIAS_PROBLEM 0x21 /* 33 */ -#define LDAP_INVALID_DN_SYNTAX 0x22 /* 34 */ -#define LDAP_IS_LEAF 0x23 /* 35 (not used in LDAPv3) */ -#define LDAP_ALIAS_DEREF_PROBLEM 0x24 /* 36 */ - -#define LDAP_INAPPROPRIATE_AUTH 0x30 /* 48 */ -#define LDAP_INVALID_CREDENTIALS 0x31 /* 49 */ -#define LDAP_INSUFFICIENT_ACCESS 0x32 /* 50 */ -#define LDAP_BUSY 0x33 /* 51 */ -#define LDAP_UNAVAILABLE 0x34 /* 52 */ -#define LDAP_UNWILLING_TO_PERFORM 0x35 /* 53 */ -#define LDAP_LOOP_DETECT 0x36 /* 54 */ - -#define LDAP_NAMING_VIOLATION 0x40 /* 64 */ -#define LDAP_OBJECT_CLASS_VIOLATION 0x41 /* 65 */ -#define LDAP_NOT_ALLOWED_ON_NONLEAF 0x42 /* 66 */ -#define LDAP_NOT_ALLOWED_ON_RDN 0x43 /* 67 */ -#define LDAP_ALREADY_EXISTS 0x44 /* 68 */ -#define LDAP_NO_OBJECT_CLASS_MODS 0x45 /* 69 */ -#define LDAP_RESULTS_TOO_LARGE 0x46 /* 70 - CLDAP */ -#define LDAP_AFFECTS_MULTIPLE_DSAS 0x47 /* 71 */ - -#define LDAP_OTHER 0x50 /* 80 */ -#define LDAP_SERVER_DOWN 0x51 /* 81 */ -#define LDAP_LOCAL_ERROR 0x52 /* 82 */ -#define LDAP_ENCODING_ERROR 0x53 /* 83 */ -#define LDAP_DECODING_ERROR 0x54 /* 84 */ -#define LDAP_TIMEOUT 0x55 /* 85 */ -#define LDAP_AUTH_UNKNOWN 0x56 /* 86 */ -#define LDAP_FILTER_ERROR 0x57 /* 87 */ -#define LDAP_USER_CANCELLED 0x58 /* 88 */ -#define LDAP_PARAM_ERROR 0x59 /* 89 */ -#define LDAP_NO_MEMORY 0x5a /* 90 */ -#define LDAP_CONNECT_ERROR 0x5b /* 91 */ -#define LDAP_NOT_SUPPORTED 0x5c /* 92 - LDAPv3 */ -#define LDAP_CONTROL_NOT_FOUND 0x5d /* 93 - LDAPv3 */ -#define LDAP_NO_RESULTS_RETURNED 0x5e /* 94 - LDAPv3 */ -#define LDAP_MORE_RESULTS_TO_RETURN 0x5f /* 95 - LDAPv3 */ -#define LDAP_CLIENT_LOOP 0x60 /* 96 - LDAPv3 */ -#define LDAP_REFERRAL_LIMIT_EXCEEDED 0x61 /* 97 - LDAPv3 */ - -/* - * LDAPv3 unsolicited notification messages we know about - */ -#define LDAP_NOTICE_OF_DISCONNECTION "1.3.6.1.4.1.1466.20036" - -/* - * Client controls we know about - */ -#define LDAP_CONTROL_REFERRALS "1.2.840.113556.1.4.616" - -/* - * Initializing an ldap sesssion, set session handle options, and - * closing an ldap session functions - */ -LDAP_API(LDAP *) LDAP_CALL ldap_init( const char *defhost, int defport ); -LDAP_API(int) LDAP_CALL ldap_set_option( LDAP *ld, int option, - const void *optdata ); -LDAP_API(int) LDAP_CALL ldap_get_option( LDAP *ld, int option, void *optdata ); -LDAP_API(int) LDAP_CALL ldap_unbind( LDAP *ld ); -LDAP_API(int) LDAP_CALL ldap_unbind_s( LDAP *ld ); - -/* - * perform ldap operations - */ -LDAP_API(int) LDAP_CALL ldap_abandon( LDAP *ld, int msgid ); -LDAP_API(int) LDAP_CALL ldap_add( LDAP *ld, const char *dn, LDAPMod **attrs ); -LDAP_API(int) LDAP_CALL ldap_add_s( LDAP *ld, const char *dn, LDAPMod **attrs ); -LDAP_API(int) LDAP_CALL ldap_simple_bind( LDAP *ld, const char *who, - const char *passwd ); -LDAP_API(int) LDAP_CALL ldap_simple_bind_s( LDAP *ld, const char *who, - const char *passwd ); -LDAP_API(int) LDAP_CALL ldap_modify( LDAP *ld, const char *dn, LDAPMod **mods ); -LDAP_API(int) LDAP_CALL ldap_modify_s( LDAP *ld, const char *dn, - LDAPMod **mods ); -LDAP_API(int) LDAP_CALL ldap_compare( LDAP *ld, const char *dn, - const char *attr, const char *value ); -LDAP_API(int) LDAP_CALL ldap_compare_s( LDAP *ld, const char *dn, - const char *attr, const char *value ); -LDAP_API(int) LDAP_CALL ldap_delete( LDAP *ld, const char *dn ); -LDAP_API(int) LDAP_CALL ldap_delete_s( LDAP *ld, const char *dn ); -LDAP_API(int) LDAP_CALL ldap_search( LDAP *ld, const char *base, int scope, - const char *filter, char **attrs, int attrsonly ); -LDAP_API(int) LDAP_CALL ldap_search_s( LDAP *ld, const char *base, int scope, - const char *filter, char **attrs, int attrsonly, LDAPMessage **res ); -LDAP_API(int) LDAP_CALL ldap_search_st( LDAP *ld, const char *base, int scope, - const char *filter, char **attrs, int attrsonly, - struct timeval *timeout, LDAPMessage **res ); - -/* - * obtain result from ldap operation - */ -LDAP_API(int) LDAP_CALL ldap_result( LDAP *ld, int msgid, int all, - struct timeval *timeout, LDAPMessage **result ); - -/* - * peeking inside LDAP Messages and deallocating LDAP Messages - */ -LDAP_API(int) LDAP_CALL ldap_msgfree( LDAPMessage *lm ); -LDAP_API(int) LDAP_CALL ldap_msgid( LDAPMessage *lm ); -LDAP_API(int) LDAP_CALL ldap_msgtype( LDAPMessage *lm ); - - -/* - * Routines to parse/deal with results and errors returned - */ -LDAP_API(char *) LDAP_CALL ldap_err2string( int err ); -LDAP_API(LDAPMessage *) LDAP_CALL ldap_first_entry( LDAP *ld, - LDAPMessage *chain ); -LDAP_API(LDAPMessage *) LDAP_CALL ldap_next_entry( LDAP *ld, - LDAPMessage *entry ); -LDAP_API(int) LDAP_CALL ldap_count_entries( LDAP *ld, LDAPMessage *chain ); -LDAP_API(char *) LDAP_CALL ldap_get_dn( LDAP *ld, LDAPMessage *entry ); -LDAP_API(char *) LDAP_CALL ldap_dn2ufn( const char *dn ); -LDAP_API(char **) LDAP_CALL ldap_explode_dn( const char *dn, - const int notypes ); -LDAP_API(char **) LDAP_CALL ldap_explode_rdn( const char *rdn, - const int notypes ); -LDAP_API(char *) LDAP_CALL ldap_first_attribute( LDAP *ld, LDAPMessage *entry, - BerElement **ber ); -LDAP_API(char *) LDAP_CALL ldap_next_attribute( LDAP *ld, LDAPMessage *entry, - BerElement *ber ); -LDAP_API(char **) LDAP_CALL ldap_get_values( LDAP *ld, LDAPMessage *entry, - const char *target ); -LDAP_API(struct berval **) LDAP_CALL ldap_get_values_len( LDAP *ld, - LDAPMessage *entry, const char *target ); -LDAP_API(int) LDAP_CALL ldap_count_values( char **vals ); -LDAP_API(int) LDAP_CALL ldap_count_values_len( struct berval **vals ); -LDAP_API(void) LDAP_CALL ldap_value_free( char **vals ); -LDAP_API(void) LDAP_CALL ldap_value_free_len( struct berval **vals ); -LDAP_API(void) LDAP_CALL ldap_memfree( void *p ); - - -/* - * LDAPv3 extended operation calls - */ -/* - * Note: all of the new asynchronous calls return an LDAP error code, - * not a message id. A message id is returned via the int *msgidp - * parameter (usually the last parameter) if appropriate. - */ -LDAP_API(int) LDAP_CALL ldap_abandon_ext( LDAP *ld, int msgid, - LDAPControl **serverctrls, LDAPControl **clientctrls ); -LDAP_API(int) LDAP_CALL ldap_add_ext( LDAP *ld, const char *dn, LDAPMod **attrs, - LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp ); -LDAP_API(int) LDAP_CALL ldap_add_ext_s( LDAP *ld, const char *dn, - LDAPMod **attrs, LDAPControl **serverctrls, LDAPControl **clientctrls ); -LDAP_API(int) LDAP_CALL ldap_sasl_bind( LDAP *ld, const char *dn, - const char *mechanism, const struct berval *cred, - LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp ); -LDAP_API(int) LDAP_CALL ldap_sasl_bind_s( LDAP *ld, const char *dn, - const char *mechanism, const struct berval *cred, - LDAPControl **serverctrls, LDAPControl **clientctrls, - struct berval **servercredp ); -LDAP_API(int) LDAP_CALL ldap_modify_ext( LDAP *ld, const char *dn, - LDAPMod **mods, LDAPControl **serverctrls, LDAPControl **clientctrls, - int *msgidp ); -LDAP_API(int) LDAP_CALL ldap_modify_ext_s( LDAP *ld, const char *dn, - LDAPMod **mods, LDAPControl **serverctrls, LDAPControl **clientctrls ); -LDAP_API(int) LDAP_CALL ldap_rename( LDAP *ld, const char *dn, - const char *newrdn, const char *newparent, int deleteoldrdn, - LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp ); -LDAP_API(int) LDAP_CALL ldap_rename_s( LDAP *ld, const char *dn, - const char *newrdn, const char *newparent, int deleteoldrdn, - LDAPControl **serverctrls, LDAPControl **clientctrls ); -LDAP_API(int) LDAP_CALL ldap_compare_ext( LDAP *ld, const char *dn, - const char *attr, const struct berval *bvalue, - LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp ); -LDAP_API(int) LDAP_CALL ldap_compare_ext_s( LDAP *ld, const char *dn, - const char *attr, const struct berval *bvalue, - LDAPControl **serverctrls, LDAPControl **clientctrls ); -LDAP_API(int) LDAP_CALL ldap_delete_ext( LDAP *ld, const char *dn, - LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp ); -LDAP_API(int) LDAP_CALL ldap_delete_ext_s( LDAP *ld, const char *dn, - LDAPControl **serverctrls, LDAPControl **clientctrls ); -LDAP_API(int) LDAP_CALL ldap_search_ext( LDAP *ld, const char *base, - int scope, const char *filter, char **attrs, int attrsonly, - LDAPControl **serverctrls, LDAPControl **clientctrls, - struct timeval *timeoutp, int sizelimit, int *msgidp ); -LDAP_API(int) LDAP_CALL ldap_search_ext_s( LDAP *ld, const char *base, - int scope, const char *filter, char **attrs, int attrsonly, - LDAPControl **serverctrls, LDAPControl **clientctrls, - struct timeval *timeoutp, int sizelimit, LDAPMessage **res ); -LDAP_API(int) LDAP_CALL ldap_extended_operation( LDAP *ld, - const char *requestoid, const struct berval *requestdata, - LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp ); -LDAP_API(int) LDAP_CALL ldap_extended_operation_s( LDAP *ld, - const char *requestoid, const struct berval *requestdata, - LDAPControl **serverctrls, LDAPControl **clientctrls, - char **retoidp, struct berval **retdatap ); -LDAP_API(int) LDAP_CALL ldap_unbind_ext( LDAP *ld, LDAPControl **serverctrls, - LDAPControl **clientctrls ); - - -/* - * LDAPv3 extended parsing / result handling calls - */ -LDAP_API(int) LDAP_CALL ldap_parse_sasl_bind_result( LDAP *ld, - LDAPMessage *res, struct berval **servercredp, int freeit ); -LDAP_API(int) LDAP_CALL ldap_parse_result( LDAP *ld, LDAPMessage *res, - int *errcodep, char **matcheddnp, char **errmsgp, char ***referralsp, - LDAPControl ***serverctrlsp, int freeit ); -LDAP_API(int) LDAP_CALL ldap_parse_extended_result( LDAP *ld, LDAPMessage *res, - char **retoidp, struct berval **retdatap, int freeit ); -LDAP_API(LDAPMessage *) LDAP_CALL ldap_first_message( LDAP *ld, - LDAPMessage *res ); -LDAP_API(LDAPMessage *) LDAP_CALL ldap_next_message( LDAP *ld, - LDAPMessage *msg ); -LDAP_API(int) LDAP_CALL ldap_count_messages( LDAP *ld, LDAPMessage *res ); -LDAP_API(LDAPMessage *) LDAP_CALL ldap_first_reference( LDAP *ld, - LDAPMessage *res ); -LDAP_API(LDAPMessage *) LDAP_CALL ldap_next_reference( LDAP *ld, - LDAPMessage *ref ); -LDAP_API(int) LDAP_CALL ldap_count_references( LDAP *ld, LDAPMessage *res ); -LDAP_API(int) LDAP_CALL ldap_parse_reference( LDAP *ld, LDAPMessage *ref, - char ***referralsp, LDAPControl ***serverctrlsp, int freeit ); -LDAP_API(int) LDAP_CALL ldap_get_entry_controls( LDAP *ld, LDAPMessage *entry, - LDAPControl ***serverctrlsp ); -LDAP_API(void) LDAP_CALL ldap_control_free( LDAPControl *ctrl ); -LDAP_API(void) LDAP_CALL ldap_controls_free( LDAPControl **ctrls ); - -#ifdef __cplusplus -} -#endif -#endif /* _LDAP_STANDARD_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/ldap-to-be-deprecated.h b/mozilla/directory/c-sdk/ldap/include/ldap-to-be-deprecated.h deleted file mode 100644 index 11746ffc2dd..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldap-to-be-deprecated.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* ldap-to-be-deprecated.h - functions and declaration which will be - * deprecated in a future release. - * - * A deprecated API is an API that we recommend you no longer use, - * due to improvements in the LDAP C SDK. While deprecated APIs are - * currently still implemented, they may be removed in future - * implementations, and we recommend using other APIs. - * - * This header file will act as a first warning before moving functions - * into an unsupported/deprecated state. If your favorite application - * depend on any declaration and defines, and there is a good reason - * for not porting to new functions, Speak up now or they may disappear - * in a future release - */ - -#ifndef _LDAP_TOBE_DEPRECATED_H -#define _LDAP_TOBE_DEPRECATED_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * I/O function callbacks option (an API extension -- - * LDAP_API_FEATURE_X_IO_FUNCTIONS). - * Use of the extended I/O functions instead is recommended - */ -#define LDAP_OPT_IO_FN_PTRS 0x0B /* 11 - API extension */ - -/* - * I/O callback functions (note that types for the read and write callbacks - * are actually in lber.h): - */ -typedef int (LDAP_C LDAP_CALLBACK LDAP_IOF_SELECT_CALLBACK)( int nfds, - fd_set *readfds, fd_set *writefds, fd_set *errorfds, - struct timeval *timeout ); -typedef LBER_SOCKET (LDAP_C LDAP_CALLBACK LDAP_IOF_SOCKET_CALLBACK)( - int domain, int type, int protocol ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_IOF_IOCTL_CALLBACK)( LBER_SOCKET s, - int option, ... ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_IOF_CONNECT_CALLBACK )( - LBER_SOCKET s, struct sockaddr *name, int namelen ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_IOF_CLOSE_CALLBACK )( - LBER_SOCKET s ); -typedef int (LDAP_C LDAP_CALLBACK LDAP_IOF_SSL_ENABLE_CALLBACK )( - LBER_SOCKET s ); - -/* - * Structure to hold I/O function pointers: - */ -struct ldap_io_fns { - LDAP_IOF_READ_CALLBACK *liof_read; - LDAP_IOF_WRITE_CALLBACK *liof_write; - LDAP_IOF_SELECT_CALLBACK *liof_select; - LDAP_IOF_SOCKET_CALLBACK *liof_socket; - LDAP_IOF_IOCTL_CALLBACK *liof_ioctl; - LDAP_IOF_CONNECT_CALLBACK *liof_connect; - LDAP_IOF_CLOSE_CALLBACK *liof_close; - LDAP_IOF_SSL_ENABLE_CALLBACK *liof_ssl_enable; -}; - -/* - * DNS resolver callbacks (an API extension --LDAP_API_FEATURE_X_DNS_FUNCTIONS). - * Note that gethostbyaddr() is not currently used. - */ -#define LDAP_OPT_DNS_FN_PTRS 0x60 /* 96 - API extension */ - -typedef struct LDAPHostEnt { - char *ldaphe_name; /* official name of host */ - char **ldaphe_aliases; /* alias list */ - int ldaphe_addrtype; /* host address type */ - int ldaphe_length; /* length of address */ - char **ldaphe_addr_list; /* list of addresses from name server */ -} LDAPHostEnt; - -typedef LDAPHostEnt * (LDAP_C LDAP_CALLBACK LDAP_DNSFN_GETHOSTBYNAME)( - const char *name, LDAPHostEnt *result, char *buffer, - int buflen, int *statusp, void *extradata ); -typedef LDAPHostEnt * (LDAP_C LDAP_CALLBACK LDAP_DNSFN_GETHOSTBYADDR)( - const char *addr, int length, int type, LDAPHostEnt *result, - char *buffer, int buflen, int *statusp, void *extradata ); - -struct ldap_dns_fns { - void *lddnsfn_extradata; - int lddnsfn_bufsize; - LDAP_DNSFN_GETHOSTBYNAME *lddnsfn_gethostbyname; - LDAP_DNSFN_GETHOSTBYADDR *lddnsfn_gethostbyaddr; -}; - -/* - * experimental DN format support - */ -LDAP_API(char **) LDAP_CALL ldap_explode_dns( const char *dn ); -LDAP_API(int) LDAP_CALL ldap_is_dns_dn( const char *dn ); - - -/* - * user friendly naming/searching routines - */ -typedef int (LDAP_C LDAP_CALLBACK LDAP_CANCELPROC_CALLBACK)( void *cl ); -LDAP_API(int) LDAP_CALL ldap_ufn_search_c( LDAP *ld, char *ufn, - char **attrs, int attrsonly, LDAPMessage **res, - LDAP_CANCELPROC_CALLBACK *cancelproc, void *cancelparm ); -LDAP_API(int) LDAP_CALL ldap_ufn_search_ct( LDAP *ld, char *ufn, - char **attrs, int attrsonly, LDAPMessage **res, - LDAP_CANCELPROC_CALLBACK *cancelproc, void *cancelparm, - char *tag1, char *tag2, char *tag3 ); -LDAP_API(int) LDAP_CALL ldap_ufn_search_s( LDAP *ld, char *ufn, - char **attrs, int attrsonly, LDAPMessage **res ); -LDAP_API(LDAPFiltDesc *) LDAP_CALL ldap_ufn_setfilter( LDAP *ld, char *fname ); -LDAP_API(void) LDAP_CALL ldap_ufn_setprefix( LDAP *ld, char *prefix ); -LDAP_API(int) LDAP_C ldap_ufn_timeout( void *tvparam ); - -/* - * utility routines - */ -LDAP_API(int) LDAP_CALL ldap_charray_add( char ***a, char *s ); -LDAP_API(int) LDAP_CALL ldap_charray_merge( char ***a, char **s ); -LDAP_API(void) LDAP_CALL ldap_charray_free( char **array ); -LDAP_API(int) LDAP_CALL ldap_charray_inlist( char **a, char *s ); -LDAP_API(char **) LDAP_CALL ldap_charray_dup( char **a ); -LDAP_API(char **) LDAP_CALL ldap_str2charray( char *str, char *brkstr ); -LDAP_API(int) LDAP_CALL ldap_charray_position( char **a, char *s ); - -/* from ldap_ssl.h - the pkcs function and declaration */ -typedef int (LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_TOKEN_CALLBACK)(void *context, char **tokenname); -typedef int (LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_PIN_CALLBACK)(void *context, const char *tokenname, char **tokenpin); -typedef int (LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_CERTPATH_CALLBACK)(void *context, char **certpath); -typedef int (LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_KEYPATH_CALLBACK)(void *context,char **keypath); -typedef int (LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_MODPATH_CALLBACK)(void *context, char **modulepath); -typedef int (LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_CERTNAME_CALLBACK)(void *context, char **certname); -typedef int (LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_DONGLEFILENAME_CALLBACK)(void *context, char **filename); - -#define PKCS_STRUCTURE_ID 1 -struct ldapssl_pkcs_fns { - int local_structure_id; - void *local_data; - LDAP_PKCS_GET_CERTPATH_CALLBACK *pkcs_getcertpath; - LDAP_PKCS_GET_CERTNAME_CALLBACK *pkcs_getcertname; - LDAP_PKCS_GET_KEYPATH_CALLBACK *pkcs_getkeypath; - LDAP_PKCS_GET_MODPATH_CALLBACK *pkcs_getmodpath; - LDAP_PKCS_GET_PIN_CALLBACK *pkcs_getpin; - LDAP_PKCS_GET_TOKEN_CALLBACK *pkcs_gettokenname; - LDAP_PKCS_GET_DONGLEFILENAME_CALLBACK *pkcs_getdonglefilename; - -}; - -LDAP_API(int) LDAP_CALL ldapssl_pkcs_init( const struct ldapssl_pkcs_fns *pfns); - -#ifdef __cplusplus -} -#endif -#endif /* _LDAP_TOBE_DEPRECATED_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/ldap.h b/mozilla/directory/c-sdk/ldap/include/ldap.h deleted file mode 100644 index c00a7cba811..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldap.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* ldap.h - general header file for libldap */ - -#ifndef _LDAP_H -#define _LDAP_H - -/* Standard LDAP API functions and declarations */ -#include "ldap-standard.h" - -/* Extensions to the LDAP standard */ -#include "ldap-extension.h" - -/* A deprecated API is an API that we recommend you no longer use, - * due to improvements in the LDAP C SDK. While deprecated APIs are - * currently still implemented, they may be removed in future - * implementations, and we recommend using other APIs. - */ - -/* Soon-to-be deprecated functions and declarations */ -#include "ldap-to-be-deprecated.h" - -/* Deprecated functions and declarations */ -#include "ldap-deprecated.h" - -#endif /* _LDAP_H */ - diff --git a/mozilla/directory/c-sdk/ldap/include/ldap_ssl.h b/mozilla/directory/c-sdk/ldap/include/ldap_ssl.h deleted file mode 100755 index 4455c66b4e8..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldap_ssl.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#if !defined(LDAP_SSL_H) -#define LDAP_SSL_H - -/* ldap_ssl.h - prototypes for LDAP over SSL functions */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * these three defines resolve the SSL strength - * setting auth weak, diables all cert checking - * the CNCHECK tests for the man in the middle hack - */ -#define LDAPSSL_AUTH_WEAK 0 -#define LDAPSSL_AUTH_CERT 1 -#define LDAPSSL_AUTH_CNCHECK 2 - - -/* - * Initialize LDAP library for SSL - */ -LDAP * LDAP_CALL ldapssl_init( const char *defhost, int defport, - int defsecure ); - -/* - * Install I/O routines to make SSL over LDAP possible. - * Use this after ldap_init() or just use ldapssl_init() instead. - */ -int LDAP_CALL ldapssl_install_routines( LDAP *ld ); - - -/* The next three functions initialize the security code for SSL - * The first one ldapssl_client_init() does initialization for SSL only - * The next one supports ldapssl_clientauth_init() intializes security - * for SSL for client authentication. The third function initializes - * security for doing SSL with client authentication, and PKCS, that is, - * the third function initializes the security module database (secmod.db). - * The parameters are as follows: - * const char *certdbpath - path to the cert file. This can be a shortcut - * to the directory name, if so cert7.db will be postfixed to the string. - * void *certdbhandle - Normally this is NULL. This memory will need - * to be freed. - * int needkeydb - boolean. Must be !=0 if client Authentification - * is required - * char *keydbpath - path to the key database. This can be a shortcut - * to the directory name, if so key3.db will be postfixed to the string. - * void *keydbhandle - Normally this is NULL, This memory will need - * to be freed - * int needsecmoddb - boolean. Must be !=0 to assure that the correct - * security module is loaded into memory - * char *secmodpath - path to the secmod. This can be a shortcut to the - * directory name, if so secmod.db will be postfixed to the string. - * - * These three functions are mutually exclusive. You can only call - * one. This means that, for a given process, you must call the - * appropriate initialization function for the life of the process. - */ - - -/* - * Initialize the secure parts (Security and SSL) of the runtime for use - * by a client application. This is only called once. - */ -int LDAP_CALL ldapssl_client_init( - const char *certdbpath, void *certdbhandle ); -/* - * Initialize the secure parts (Security and SSL) of the runtime for use - * by a client application that may want to do SSL client authentication. - */ -int LDAP_CALL ldapssl_clientauth_init( - const char *certdbpath, void *certdbhandle, - const int needkeydb, const char *keydbpath, void *keydbhandle ); - -/* - * Initialize the secure parts (Security and SSL) of the runtime for use - * by a client application that may want to do SSL client authentication. - */ -int LDAP_CALL ldapssl_advclientauth_init( - const char *certdbpath, void *certdbhandle, - const int needkeydb, const char *keydbpath, void *keydbhandle, - const int needsecmoddb, const char *secmoddbpath, - const int sslstrength ); - - - -/* - * get a meaningful error string back from the security library - * this function should be called, if ldap_err2string doesn't - * identify the error code. - */ -const char * LDAP_CALL ldapssl_err2string( const int prerrno ); - - -/* - * Enable SSL client authentication on the given ld. - */ -int LDAP_CALL ldapssl_enable_clientauth( LDAP *ld, char *keynickname, - char *keypasswd, char *certnickname ); - -#ifdef __cplusplus -} -#endif -#endif /* !defined(LDAP_SSL_H) */ - - - - - diff --git a/mozilla/directory/c-sdk/ldap/include/ldaplog.h b/mozilla/directory/c-sdk/ldap/include/ldaplog.h deleted file mode 100644 index 1b365b4f82e..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldaplog.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef _LDAPLOG_H -#define _LDAPLOG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define LDAP_DEBUG_TRACE 0x00001 -#define LDAP_DEBUG_PACKETS 0x00002 -#define LDAP_DEBUG_ARGS 0x00004 -#define LDAP_DEBUG_CONNS 0x00008 -#define LDAP_DEBUG_BER 0x00010 -#define LDAP_DEBUG_FILTER 0x00020 -#define LDAP_DEBUG_CONFIG 0x00040 -#define LDAP_DEBUG_ACL 0x00080 -#define LDAP_DEBUG_STATS 0x00100 -#define LDAP_DEBUG_STATS2 0x00200 -#define LDAP_DEBUG_SHELL 0x00400 -#define LDAP_DEBUG_PARSE 0x00800 -#define LDAP_DEBUG_HOUSE 0x01000 -#define LDAP_DEBUG_REPL 0x02000 -#define LDAP_DEBUG_ANY 0x04000 -#define LDAP_DEBUG_CACHE 0x08000 -#define LDAP_DEBUG_PLUGIN 0x10000 - -/* debugging stuff */ -/* Disable by default */ -#define LDAPDebug( level, fmt, arg1, arg2, arg3 ) - -#ifdef LDAP_DEBUG -# undef LDAPDebug - -/* SLAPD_LOGGING should not be on for WINSOCK (16-bit Windows) */ -# if defined(SLAPD_LOGGING) -# ifdef _WIN32 - extern int *module_ldap_debug; -# define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \ - { \ - if ( *module_ldap_debug & level ) { \ - slapd_log_error_proc( NULL, fmt, arg1, arg2, arg3 ); \ - } \ - } -# else /* _WIN32 */ - extern int ldap_debug; -# define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \ - { \ - if ( ldap_debug & level ) { \ - slapd_log_error_proc( NULL, fmt, arg1, arg2, arg3 ); \ - } \ - } -# endif /* Win32 */ -# else /* no SLAPD_LOGGING */ - extern void ber_err_print( char * ); - extern int ldap_debug; -# define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \ - if ( ldap_debug & level ) { \ - char msg[256]; \ - sprintf( msg, fmt, arg1, arg2, arg3 ); \ - ber_err_print( msg ); \ - } -# endif /* SLAPD_LOGGING */ -#endif /* LDAP_DEBUG */ - -#ifdef __cplusplus -} -#endif - -#endif /* _LDAP_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/ldappr.h b/mozilla/directory/c-sdk/ldap/include/ldappr.h deleted file mode 100755 index e30d0aa3dfa..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldappr.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef LDAP_PR_H -#define LDAP_PR_H - -#include "nspr.h" - -/* - * ldappr.h - prototypes for functions that tie libldap into NSPR (Netscape - * Portable Runtime). - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Function: prldap_init(). - * - * Create a new LDAP session handle, but with NSPR I/O, threading, and DNS - * functions installed. - * - * Pass a non-zero value for the 'shared' parameter if you plan to use - * this LDAP * handle from more than one thread. - * - * Returns an LDAP session handle (or NULL if an error occurs). - */ -LDAP * LDAP_CALL prldap_init( const char *defhost, int defport, int shared ); - - -/* - * Function: prldap_install_routines(). - * - * Install NSPR I/O, threading, and DNS functions so they will be used by - * 'ld'. - * - * If 'ld' is NULL, the functions are installed as the default functions - * for all new LDAP * handles). - * - * Pass a non-zero value for the 'shared' parameter if you plan to use - * this LDAP * handle from more than one thread. - * - * Returns an LDAP API error code (LDAP_SUCCESS if all goes well). - */ -int LDAP_CALL prldap_install_routines( LDAP *ld, int shared ); - - -/** - ** Note: the types and functions below are only useful for developers - ** who need to layer one or more custom extended I/O functions on top of - ** the standard NSPR I/O functions installed by a call to prldap_init() - ** or prldap_install_routines(). Layering can be accomplished after - ** prldap_init() or prldap_install_routines() has completed successfully - ** by: - ** - ** 1) Calling ldap_get_option( ..., LDAP_X_OPT_EXTIO_FN_PTRS, ... ). - ** - ** 2) Saving the function pointer of one or more of the standard functions. - ** - ** 3) Replacing one or more standard functions in the ldap_x_ext_io_fns - ** struct with new functions that optionally do some preliminary work, - ** call the standard function (via the function pointer saved in step 2), - ** and optionally do some followup work. - */ - -/* - * Data structure for session information. - * seinfo_size should be set to PRLDAP_SESSIONINFO_SIZE before use. - */ -struct prldap_session_private; - -typedef struct prldap_session_info { - int seinfo_size; - struct prldap_session_private *seinfo_appdata; -} PRLDAPSessionInfo; -#define PRLDAP_SESSIONINFO_SIZE sizeof( PRLDAPSessionInfo ) - - -/* - * Function: prldap_set_session_info(). - * - * Given an LDAP session handle or a session argument such is passed to - * SOCKET, POLL, NEWHANDLE, or DISPOSEHANDLE extended I/O callbacks, - * set some application-specific data. If ld is NULL, arg is used. If - * both ld and arg are NULL, LDAP_PARAM_ERROR is returned. - * - * Returns an LDAP API error code (LDAP_SUCCESS if all goes well). - */ -int LDAP_CALL prldap_set_session_info( LDAP *ld, void *sessionarg, - PRLDAPSessionInfo *seip ); - - -/* - * Function: prldap_get_session_info(). - * - * Given an LDAP session handle or a session argument such is passed to - * SOCKET, POLL, NEWHANDLE, or DISPOSEHANDLE extended I/O callbacks, - * retrieve some application-specific data. If ld is NULL, arg is used. If - * both ld and arg are NULL, LDAP_PARAM_ERROR is returned. - * - * Returns an LDAP API error code (LDAP_SUCCESS if all goes well, in - * which case the fields in the structure that seip points to are filled in). - */ -int LDAP_CALL prldap_get_session_info( LDAP *ld, void *sessionarg, - PRLDAPSessionInfo *seip ); - - -/* - * Data structure for socket specific information. - * Note: soinfo_size should be set to PRLDAP_SOCKETINFO_SIZE before use. - */ -struct prldap_socket_private; -typedef struct prldap_socket_info { - int soinfo_size; - PRFileDesc *soinfo_prfd; - struct prldap_socket_private *soinfo_appdata; -} PRLDAPSocketInfo; -#define PRLDAP_SOCKETINFO_SIZE sizeof( PRLDAPSocketInfo ) - - -/* - * Function: prldap_set_socket_info(). - * - * Given an integer fd and a socket argument such as those passed to the - * extended I/O callback functions, set socket specific information. - * - * Returns an LDAP API error code (LDAP_SUCCESS if all goes well). - * - * Note: it is only safe to change soinfo_prfd from within the SOCKET - * extended I/O callback function. - */ -int LDAP_CALL prldap_set_socket_info( int fd, void *socketarg, - PRLDAPSocketInfo *soip ); - -/* - * Function: prldap_get_socket_info(). - * - * Given an integer fd and a socket argument such as those passed to the - * extended I/O callback functions, retrieve socket specific information. - * - * Returns an LDAP API error code (LDAP_SUCCESS if all goes well, in - * which case the fields in the structure that soip points to are filled in). - */ -int LDAP_CALL prldap_get_socket_info( int fd, void *socketarg, - PRLDAPSocketInfo *soip ); - -#ifdef __cplusplus -} -#endif -#endif /* !defined(LDAP_PR_H) */ diff --git a/mozilla/directory/c-sdk/ldap/include/ldaprot.h b/mozilla/directory/c-sdk/ldap/include/ldaprot.h deleted file mode 100644 index f22fc4ff3c7..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldaprot.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef _LDAPROT_H -#define _LDAPROT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define LDAP_VERSION1 1 -#define LDAP_VERSION2 2 -#define LDAP_VERSION3 3 -#define LDAP_VERSION LDAP_VERSION2 - -#define COMPAT20 -#define COMPAT30 -#if defined(COMPAT20) || defined(COMPAT30) -#define COMPAT -#endif - -#define LDAP_URL_PREFIX "ldap://" -#define LDAP_URL_PREFIX_LEN 7 -#define LDAPS_URL_PREFIX "ldaps://" -#define LDAPS_URL_PREFIX_LEN 8 -#define LDAP_REF_STR "Referral:\n" -#define LDAP_REF_STR_LEN 10 - -/* - * specific LDAP instantiations of BER types we know about - */ - -/* general stuff */ -#define LDAP_TAG_MESSAGE 0x30L /* tag is 16 + constructed bit */ -#define OLD_LDAP_TAG_MESSAGE 0x10L /* forgot the constructed bit */ -#define LDAP_TAG_MSGID 0x02L /* INTEGER */ -#define LDAP_TAG_LDAPDN 0x04L /* OCTET STRING */ -#define LDAP_TAG_CONTROLS 0xa0L /* context specific + constructed + 0 */ -#define LDAP_TAG_REFERRAL 0xa3L /* context specific + constructed + 3 */ -#define LDAP_TAG_NEWSUPERIOR 0x80L /* context specific + primitive + 0 */ -#define LDAP_TAG_MRA_OID 0x81L /* context specific + primitive + 1 */ -#define LDAP_TAG_MRA_TYPE 0x82L /* context specific + primitive + 2 */ -#define LDAP_TAG_MRA_VALUE 0x83L /* context specific + primitive + 3 */ -#define LDAP_TAG_MRA_DNATTRS 0x84L /* context specific + primitive + 4 */ -#define LDAP_TAG_EXOP_REQ_OID 0x80L /* context specific + primitive + 0 */ -#define LDAP_TAG_EXOP_REQ_VALUE 0x81L /* context specific + primitive + 1 */ -#define LDAP_TAG_EXOP_RES_OID 0x8aL /* context specific + primitive + 10 */ -#define LDAP_TAG_EXOP_RES_VALUE 0x8bL /* context specific + primitive + 11 */ -#define LDAP_TAG_SK_MATCHRULE 0x80L /* context specific + primitive + 0 */ -#define LDAP_TAG_SK_REVERSE 0x81L /* context specific + primitive + 1 */ -#define LDAP_TAG_SR_ATTRTYPE 0x80L /* context specific + primitive + 0 */ -#define LDAP_TAG_SASL_RES_CREDS 0x87L /* context specific + primitive + 7 */ -#define LDAP_TAG_VLV_BY_INDEX 0xa0L /* context specific + constructed + 0 */ -#define LDAP_TAG_VLV_BY_VALUE 0x81L /* context specific + primitive + 1 */ - -/* possible operations a client can invoke */ -#define LDAP_REQ_BIND 0x60L /* application + constructed + 0 */ -#define LDAP_REQ_UNBIND 0x42L /* application + primitive + 2 */ -#define LDAP_REQ_SEARCH 0x63L /* application + constructed + 3 */ -#define LDAP_REQ_MODIFY 0x66L /* application + constructed + 6 */ -#define LDAP_REQ_ADD 0x68L /* application + constructed + 8 */ -#define LDAP_REQ_DELETE 0x4aL /* application + primitive + 10 */ -#define LDAP_REQ_MODRDN 0x6cL /* application + constructed + 12 */ -#define LDAP_REQ_MODDN 0x6cL /* application + constructed + 12 */ -#define LDAP_REQ_RENAME 0x6cL /* application + constructed + 12 */ -#define LDAP_REQ_COMPARE 0x6eL /* application + constructed + 14 */ -#define LDAP_REQ_ABANDON 0x50L /* application + primitive + 16 */ -#define LDAP_REQ_EXTENDED 0x77L /* application + constructed + 23 */ - -/* U-M LDAP release 3.0 compatibility stuff */ -#define LDAP_REQ_UNBIND_30 0x62L -#define LDAP_REQ_DELETE_30 0x6aL -#define LDAP_REQ_ABANDON_30 0x70L - -/* - * old broken stuff for backwards compatibility - forgot application tag - * and constructed/primitive bit - */ -#define OLD_LDAP_REQ_BIND 0x00L -#define OLD_LDAP_REQ_UNBIND 0x02L -#define OLD_LDAP_REQ_SEARCH 0x03L -#define OLD_LDAP_REQ_MODIFY 0x06L -#define OLD_LDAP_REQ_ADD 0x08L -#define OLD_LDAP_REQ_DELETE 0x0aL -#define OLD_LDAP_REQ_MODRDN 0x0cL -#define OLD_LDAP_REQ_MODDN 0x0cL -#define OLD_LDAP_REQ_COMPARE 0x0eL -#define OLD_LDAP_REQ_ABANDON 0x10L - -/* old broken stuff for backwards compatibility */ -#define OLD_LDAP_RES_BIND 0x01L -#define OLD_LDAP_RES_SEARCH_ENTRY 0x04L -#define OLD_LDAP_RES_SEARCH_RESULT 0x05L -#define OLD_LDAP_RES_MODIFY 0x07L -#define OLD_LDAP_RES_ADD 0x09L -#define OLD_LDAP_RES_DELETE 0x0bL -#define OLD_LDAP_RES_MODRDN 0x0dL -#define OLD_LDAP_RES_MODDN 0x0dL -#define OLD_LDAP_RES_COMPARE 0x0fL - -/* U-M LDAP 3.0 compatibility auth methods */ -#define LDAP_AUTH_SIMPLE_30 0xa0L /* context specific + constructed */ -#define LDAP_AUTH_KRBV41_30 0xa1L /* context specific + constructed */ -#define LDAP_AUTH_KRBV42_30 0xa2L /* context specific + constructed */ - -/* old broken stuff */ -#define OLD_LDAP_AUTH_SIMPLE 0x00L -#define OLD_LDAP_AUTH_KRBV4 0x01L -#define OLD_LDAP_AUTH_KRBV42 0x02L - -/* U-M LDAP 3.0 compatibility filter types */ -#define LDAP_FILTER_PRESENT_30 0xa7L /* context specific + constructed */ - -/* filter types */ -#define LDAP_FILTER_AND 0xa0L /* context specific + constructed + 0 */ -#define LDAP_FILTER_OR 0xa1L /* context specific + constructed + 1 */ -#define LDAP_FILTER_NOT 0xa2L /* context specific + constructed + 2 */ -#define LDAP_FILTER_EQUALITY 0xa3L /* context specific + constructed + 3 */ -#define LDAP_FILTER_SUBSTRINGS 0xa4L /* context specific + constructed + 4 */ -#define LDAP_FILTER_GE 0xa5L /* context specific + constructed + 5 */ -#define LDAP_FILTER_LE 0xa6L /* context specific + constructed + 6 */ -#define LDAP_FILTER_PRESENT 0x87L /* context specific + primitive + 7 */ -#define LDAP_FILTER_APPROX 0xa8L /* context specific + constructed + 8 */ -#define LDAP_FILTER_EXTENDED 0xa9L /* context specific + constructed + 0 */ - -/* old broken stuff */ -#define OLD_LDAP_FILTER_AND 0x00L -#define OLD_LDAP_FILTER_OR 0x01L -#define OLD_LDAP_FILTER_NOT 0x02L -#define OLD_LDAP_FILTER_EQUALITY 0x03L -#define OLD_LDAP_FILTER_SUBSTRINGS 0x04L -#define OLD_LDAP_FILTER_GE 0x05L -#define OLD_LDAP_FILTER_LE 0x06L -#define OLD_LDAP_FILTER_PRESENT 0x07L -#define OLD_LDAP_FILTER_APPROX 0x08L - -/* substring filter component types */ -#define LDAP_SUBSTRING_INITIAL 0x80L /* context specific + primitive + 0 */ -#define LDAP_SUBSTRING_ANY 0x81L /* context specific + primitive + 1 */ -#define LDAP_SUBSTRING_FINAL 0x82L /* context specific + primitive + 2 */ - -/* extended filter component types */ -#define LDAP_FILTER_EXTENDED_OID 0x81L /* context spec. + prim. + 1 */ -#define LDAP_FILTER_EXTENDED_TYPE 0x82L /* context spec. + prim. + 2 */ -#define LDAP_FILTER_EXTENDED_VALUE 0x83L /* context spec. + prim. + 3 */ -#define LDAP_FILTER_EXTENDED_DNATTRS 0x84L /* context spec. + prim. + 4 */ - -/* U-M LDAP 3.0 compatibility substring filter component types */ -#define LDAP_SUBSTRING_INITIAL_30 0xa0L /* context specific */ -#define LDAP_SUBSTRING_ANY_30 0xa1L /* context specific */ -#define LDAP_SUBSTRING_FINAL_30 0xa2L /* context specific */ - -/* old broken stuff */ -#define OLD_LDAP_SUBSTRING_INITIAL 0x00L -#define OLD_LDAP_SUBSTRING_ANY 0x01L -#define OLD_LDAP_SUBSTRING_FINAL 0x02L - -#ifdef __cplusplus -} -#endif -#endif /* _LDAPROT_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/ldbm.h b/mozilla/directory/c-sdk/ldap/include/ldbm.h deleted file mode 100755 index 366b821abe4..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldbm.h +++ /dev/null @@ -1,384 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* ldbm.h - ldap dbm compatibility routine header file */ - -#ifndef _LDBM_H_ -#define _LDBM_H_ - -/* define LDAP_USE_DB185 to get the old db library, otherwise, use db2.0 */ -#ifndef LDAP_USE_DB185 -#define LDAP_USE_DB20 -#endif - -#ifdef LDBM_USE_GDBM - -/***************************************************************** - * * - * use gdbm if possible * - * * - *****************************************************************/ - -#include - -typedef datum Datum; - -typedef GDBM_FILE LDBM; - -extern gdbm_error gdbm_errno; - -/* for ldbm_open */ -#define LDBM_READER GDBM_READER -#define LDBM_WRITER GDBM_WRITER -#define LDBM_WRCREAT GDBM_WRCREAT -#define LDBM_NEWDB GDBM_NEWDB -#define LDBM_FAST GDBM_FAST - -#define LDBM_SUFFIX ".gdbm" - -/* for ldbm_insert */ -#define LDBM_INSERT GDBM_INSERT -#define LDBM_REPLACE GDBM_REPLACE -#define LDBM_SYNC 0x80000000 - -#else /* end of gdbm */ - -#ifdef LDBM_USE_DBHASH - -/***************************************************************** - * * - * use berkeley db hash package * - * * - *****************************************************************/ - -#include -#include -#include -#include -#include - -typedef DBT Datum; -#define dsize size -#define dptr data - -typedef DB *LDBM; - -#define DB_TYPE DB_HASH - -/* for ldbm_open */ -#define LDBM_READER O_RDONLY -#define LDBM_WRITER O_RDWR -#define LDBM_WRCREAT (O_RDWR|O_CREAT) -#define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT) -#define LDBM_FAST 0 - -#define LDBM_SUFFIX ".dbh" - -/* for ldbm_insert */ -#define LDBM_INSERT R_NOOVERWRITE -#define LDBM_REPLACE 0 -#define LDBM_SYNC 0x80000000 - -#else /* end of db hash */ - -#ifdef LDBM_USE_DBBTREE - -/***************************************************************** - * * - * use berkeley db btree package * - * * - *****************************************************************/ - -#ifndef LDAP_USE_DB20 /* old-db needed us to include these system headers first */ -#include -#include -#include -#include -#endif - -#include - -#define DB_TYPE DB_BTREE - -#define LDBM_ORDERED 1 - -#ifdef LDAP_USE_DB20 - -/* pull in parts of the new interface , this comes from dblayer.h */ - -typedef struct _tag_dblayer_session{ - DB_ENV db_env; -} *dblayer_session, dblayer_session_struct; - - -/* for ldbm_insert */ -#define LDBM_INSERT DB_NOOVERWRITE -#define LDBM_REPLACE 0 /* Db2.0 default is to replace */ -#define LDBM_SYNC 0x80000000 - -typedef DBT Datum; -#define dsize size -#define dptr data - -typedef struct _ldbm { - DB *pReal_DB; - DBC *pCursor; -} _ldbmstruct, *LDBM; - -/* for ldbm_open */ -#define LDBM_READER DB_RDONLY -#define LDBM_WRITER 0 -#define LDBM_WRCREAT DB_CREATE -#define LDBM_NEWDB (DB_TRUNCATE | DB_CREATE) -#define LDBM_FAST 0 - -#define LDBM_SUFFIX ".db2" -#else /* DB 1.85 */ - -/* for ldbm_insert */ -#define LDBM_INSERT R_NOOVERWRITE -#define LDBM_REPLACE 0 -#define LDBM_SYNC 0x80000000 - -typedef DBT Datum; -#define dsize size -#define dptr data - -typedef DB *LDBM; -/* for ldbm_open */ -#define LDBM_READER O_RDONLY -#define LDBM_WRITER O_RDWR -#define LDBM_WRCREAT (O_RDWR|O_CREAT) -#define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT) -#define LDBM_FAST 0 - -#define LDBM_SUFFIX ".dbb" -#endif /* LDAP_USE_DB20 */ - -#else /* end of db btree */ - -#ifdef LDBM_USE_NDBM - -/***************************************************************** - * * - * if none of the above use ndbm, the standard unix thing * - * * - *****************************************************************/ - -#include -#ifndef O_RDONLY -#include -#endif - -typedef datum Datum; - -typedef DBM *LDBM; - -/* for ldbm_open */ -#define LDBM_READER O_RDONLY -#define LDBM_WRITER O_WRONLY -#define LDBM_WRCREAT (O_RDWR|O_CREAT) -#define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT) -#define LDBM_FAST 0 - -#define LDBM_SUFFIX ".ndbm" - -/* for ldbm_insert */ -#define LDBM_INSERT DBM_INSERT -#define LDBM_REPLACE DBM_REPLACE -#define LDBM_SYNC 0 - -#else /* end of ndbm */ - -#ifdef LDBM_USE_CISAM - -/***************************************************************** - * * - * use CISAM db package * - * * - *****************************************************************/ - -#include -#include -#include -#include -#include "isam.h" - -extern int errno; - -struct datum { - void *dptr; /* data */ - size_t dsize; /* data length */ -}; - -typedef struct datum Datum; - -struct ldbm { - int fd; /* all callers expect a ptr */ - int cur_recnum; /* for reading sequentially */ -}; - -typedef struct ldbm *LDBM; - -/* for ldbm_open */ -#define LDBM_READER (ISINPUT | ISVARLEN | ISMANULOCK) -#define LDBM_WRITER (ISINOUT | ISVARLEN | ISMANULOCK) -#define LDBM_WRCREAT (ISINOUT | ISVARLEN | ISMANULOCK | ISEXCLLOCK) -#define LDBM_NEWDB (ISINOUT | ISVARLEN | ISMANULOCK | ISEXCLLOCK) -#define LDBM_FAST 0 - -#define LDBM_SUFFIX "" -#define LDBM_ORDERED 1 - -/* for ldbm_insert */ -#define LDBM_INSERT 1 -#define LDBM_REPLACE 0 -#define LDBM_SYNC 0x80000000 - -#else /* end of cisam */ - -#ifdef LDBM_USE_TRIO - -/***************************************************************** - * * - * use C-Index/II from Trio * - * * - *****************************************************************/ - -#include -#include -#include -#include -#include "cndx.h" - -#define CRDCREAT 0x100 - -extern int errno; - -struct datum { - void *dptr; /* data */ - size_t dsize; /* data length */ -}; - -typedef struct datum Datum; - -typedef CFILE *LDBM; - -/* for ldbm_open */ -#define LDBM_READER (CRDONLY) -#define LDBM_WRITER (CRDWRITE) -#define LDBM_WRCREAT (CRDWRITE | CRDCREAT) -#define LDBM_NEWDB (CRDWRITE | CRDCREAT) -#define LDBM_FAST 0 - -#define LDBM_SUFFIX ".c2i" -#define LDBM_ORDERED 1 - -/* for ldbm_insert */ -#define LDBM_INSERT 1 -#define LDBM_REPLACE 0 -#define LDBM_SYNC 0x80000000 - - -#else /* end of trio */ - -#ifdef LDBM_USE_CTREE - -/***************************************************************** - * * - * use Faircom Ctree db package * - * * - *****************************************************************/ - -#include -#include -#include -#include - -#include "ctstdr.h" -#include "ctoptn.h" -#include "ctaerr.h" -#include "ctdecl.h" -#include "cterrc.h" - -extern int errno; - -struct datum { - void *dptr; /* data */ - size_t dsize; /* data length */ -}; - -typedef struct datum Datum; -typedef IFIL *LDBM; - -/* for ldbm_open */ -#define LDBM_READER 0 -#define LDBM_WRITER 0 -#define LDBM_WRCREAT 1 -#define LDBM_NEWDB 1 -#define LDBM_FAST 0 - -#define LDBM_SUFFIX "" -#define LDBM_ORDERED 1 - -/* for ldbm_insert */ -#define LDBM_INSERT 1 -#define LDBM_REPLACE 0 -#define LDBM_SYNC 0x80000000 - -#endif /* ctree */ -#endif /* trio */ -#endif /* cisam */ -#endif /* ndbm */ -#endif /* db hash */ -#endif /* db btree */ -#endif /* gdbm */ - -/* - * name: file name without the suffix - * rw: read/write flags - * mode: this has the desired permissions mode on the file - * dbcachesize: advisory cache size in bytes - */ -LDBM ldbm_open( char *name, int rw, int mode, int dbcachesize ); -#ifdef LDAP_USE_DB20 -/* This is a stopgap measure to allow us to associate a session with ldbm_ calls */ -LDBM ldbm_open2( dblayer_session session, char *name, int rw, int mode); -/* These are stolen from beta2's dblayer.h */ -int dblayer_session_open(char *home_dir, char* log_dir, char* temp_dir, int cachesize, dblayer_session session) ; -int dblayer_session_terminate(dblayer_session session) ; -#endif -int ldbm_close( LDBM ldbm ); -void ldbm_sync( LDBM ldbm ); -void ldbm_datum_free( LDBM ldbm, Datum data ); -Datum ldbm_datum_dup( LDBM ldbm, Datum data ); -Datum ldbm_fetch( LDBM ldbm, Datum key ); -int ldbm_store( LDBM ldbm, Datum key, Datum data, int flags ); -int ldbm_delete( LDBM ldbm, Datum key ); -Datum ldbm_firstkey( LDBM ldbm ); -Datum ldbm_nextkey( LDBM ldbm, Datum key ); -Datum ldbm_prevkey( LDBM ldbm, Datum key ); -Datum ldbm_lastkey( LDBM ldbm ); -Datum ldbm_cursorkey( LDBM ldbm, Datum key ); -int ldbm_errno( LDBM ldbm ); - -#endif /* _ldbm_h_ */ diff --git a/mozilla/directory/c-sdk/ldap/include/ldif.h b/mozilla/directory/c-sdk/ldap/include/ldif.h deleted file mode 100644 index 3d0769e0ad7..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ldif.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1996 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -#ifndef _LDIF_H -#define _LDIF_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define LDIF_VERSION_ONE 1 /* LDIF standard version */ - -#define LDIF_MAX_LINE_WIDTH 76 /* maximum length of LDIF lines */ - -/* - * Macro to calculate maximum number of bytes that the base64 equivalent - * of an item that is "vlen" bytes long will take up. Base64 encoding - * uses one byte for every six bits in the value plus up to two pad bytes. - */ -#define LDIF_BASE64_LEN(vlen) (((vlen) * 4 / 3 ) + 3) - -/* - * Macro to calculate maximum size that an LDIF-encoded type (length - * tlen) and value (length vlen) will take up: room for type + ":: " + - * first newline + base64 value + continued lines. Each continued line - * needs room for a newline and a leading space character. - */ -#define LDIF_SIZE_NEEDED(tlen,vlen) \ - ((tlen) + 4 + LDIF_BASE64_LEN(vlen) \ - + ((LDIF_BASE64_LEN(vlen) + tlen + 3) / LDIF_MAX_LINE_WIDTH * 2 )) - -/* - * Options for ldif_put_type_and_value_with_options() and - * ldif_type_and_value_with_options(). - */ -#define LDIF_OPT_NOWRAP 0x01UL -#define LDIF_OPT_VALUE_IS_URL 0x02UL -#define LDIF_OPT_MINIMAL_ENCODING 0x04UL - -int ldif_parse_line( char *line, char **type, char **value, int *vlen); -char * ldif_getline( char **next ); -void ldif_put_type_and_value( char **out, char *t, char *val, int vlen ); -void ldif_put_type_and_value_nowrap( char **out, char *t, char *val, int vlen ); -void ldif_put_type_and_value_with_options( char **out, char *t, char *val, - int vlen, unsigned long options ); -char *ldif_type_and_value( char *type, char *val, int vlen ); -char *ldif_type_and_value_nowrap( char *type, char *val, int vlen ); -char *ldif_type_and_value_with_options( char *type, char *val, int vlen, - unsigned long options ); -int ldif_base64_decode( char *src, unsigned char *dst ); -int ldif_base64_encode( unsigned char *src, char *dst, int srclen, - int lenused ); -int ldif_base64_encode_nowrap( unsigned char *src, char *dst, int srclen, - int lenused ); -char *ldif_get_entry( FILE *fp, int *lineno ); - -#ifdef __cplusplus -} -#endif - -#endif /* _LDIF_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/lthread.h b/mozilla/directory/c-sdk/ldap/include/lthread.h deleted file mode 100755 index b1cf9fcf776..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/lthread.h +++ /dev/null @@ -1,440 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* lthread.h - ldap threads header file */ - -#ifndef _LTHREAD_H -#define _LTHREAD_H - -#if defined( THREAD_SUNOS4_LWP ) -/*********************************** - * * - * thread definitions for sunos4 * - * * - ***********************************/ - -#define _THREAD - -#include -#include - -typedef void *(*VFP)(); - -/* thread attributes and thread type */ -typedef int pthread_attr_t; -typedef thread_t pthread_t; - -/* default attr states */ -#define pthread_mutexattr_default NULL -#define pthread_condattr_default NULL - -/* thread state - joinable or not */ -#define PTHREAD_CREATE_JOINABLE 0 -#define PTHREAD_CREATE_DETACHED 1 -/* thread scope - who is in scheduling pool */ -#define PTHREAD_SCOPE_PROCESS 0 -#define PTHREAD_SCOPE_SYSTEM 1 - -/* mutex attributes and mutex type */ -typedef int pthread_mutexattr_t; -typedef mon_t pthread_mutex_t; - -/* mutex and condition variable scope - process or system */ -#define PTHREAD_SHARE_PRIVATE 0 -#define PTHREAD_SHARE_PROCESS 1 - -/* condition variable attributes and condition variable type */ -typedef int pthread_condattr_t; -typedef struct lwpcv { - int lcv_created; - cv_t lcv_cv; -} pthread_cond_t; - -#else /* end sunos4 */ - -#if defined( THREAD_SUNOS5_LWP ) -/*********************************** - * * - * thread definitions for sunos5 * - * * - ***********************************/ - -#define _THREAD - -#include -#include - -typedef void *(*VFP)(); - -/* sunos5 threads are preemptive */ -#define PTHREAD_PREEMPTIVE 1 - -/* thread attributes and thread type */ -typedef int pthread_attr_t; -typedef thread_t pthread_t; - -/* default attr states */ -#define pthread_mutexattr_default NULL -#define pthread_condattr_default NULL - -/* thread state - joinable or not */ -#define PTHREAD_CREATE_JOINABLE 0 -#define PTHREAD_CREATE_DETACHED THR_DETACHED -/* thread scope - who is in scheduling pool */ -#define PTHREAD_SCOPE_PROCESS 0 -#define PTHREAD_SCOPE_SYSTEM THR_BOUND - -/* mutex attributes and mutex type */ -typedef int pthread_mutexattr_t; -typedef mutex_t pthread_mutex_t; - -/* mutex and condition variable scope - process or system */ -#define PTHREAD_SHARE_PRIVATE USYNC_THREAD -#define PTHREAD_SHARE_PROCESS USYNC_PROCESS - -/* condition variable attributes and condition variable type */ -typedef int pthread_condattr_t; -typedef cond_t pthread_cond_t; - -#else /* end sunos5 */ - -#if defined( THREAD_MIT_PTHREADS ) -/*********************************** - * * - * definitions for mit pthreads * - * * - ***********************************/ - -#define _THREAD - -#include - -#else /* end mit pthreads */ - -#if defined( THREAD_AIX_PTHREADS ) -/*********************************** - * * - * definitions for aix pthreads * - * * - ***********************************/ - -#define _THREAD - -#include - -typedef void *(*VFP)(void *); - -/* thread state - joinable or not */ -#define PTHREAD_CREATE_JOINABLE 0 - -/* default attr states */ -#define pthread_mutexattr_default NULL -#define pthread_condattr_default NULL - -#else /* aix pthreads */ - -#if defined( THREAD_HP_DCE_PTHREADS ) -/************************************** - * * - * definitions for HP dce pthreads * - * * - **************************************/ - -#define _THREAD -typedef void *(*VFP)(); - -#include - -/* dce threads are preemptive */ -#define PTHREAD_PREEMPTIVE 1 - -/* pthread_kill() is a noop on HP */ -#define PTHREAD_KILL_IS_NOOP 1 - -/* thread state - joinable or not */ -#define PTHREAD_CREATE_JOINABLE 0 -#define PTHREAD_CREATE_DETACHED 1 - -#define pthread_attr_init( a ) pthread_attr_create( a ) -#define pthread_attr_destroy( a ) pthread_attr_delete( a ) -#define pthread_attr_setdetachstate( a, b ) \ - pthread_attr_setdetach_np( a, b ) -/* - * HP's DCE threads implementation passes a (pthread_attr_t *) - * for the second argument. So, we need to fake things a bit. - * hpdce_pthread_create_detached() is in thread.c. Note that we - * create threads and detach them. If you need to create a joinable - * thread, you need to call hpdce_pthread_create_joinable() directly. - */ -#define pthread_create( a, b, c, d ) \ - hpdce_pthread_create_detached( a, b, c, d ) - -int -hpdce_pthread_create_joinable( pthread_t *tid, pthread_attr_t *attr, - VFP func, void *arg ); -int hpdce_pthread_create_detached( pthread_t *tid, pthread_attr_t *attr, - VFP func, void *arg ); -#else /* HP dce pthreads */ - -#if defined( THREAD_DCE_PTHREADS ) -/*********************************** - * * - * definitions for dce pthreads * - * * - ***********************************/ - -#define _THREAD -typedef void *(*VFP)(); - -#include - -/* dce threads are preemptive */ -#define PTHREAD_PREEMPTIVE 1 - -/* thread state - joinable or not */ -#ifndef PTHREAD_CREATE_JOINABLE -#define PTHREAD_CREATE_JOINABLE 0 -#endif -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif - -#define pthread_attr_init( a ) pthread_attr_create( a ) -#define pthread_attr_destroy( a ) pthread_attr_delete( a ) -#define pthread_attr_setdetachstate( a, b ) \ - pthread_attr_setdetach_np( a, b ) -#if defined( OSF1 ) -/* pthread_create's second parameter is passed by value, not by reference. - * To work around this, call another function instead: - */ -#define pthread_create( a, b, c, d ) std_pthread_create( a, b, c, d ) -extern int -std_pthread_create (pthread_t *tid, - pthread_attr_t *attr, - pthread_startroutine_t func, - pthread_addr_t arg); /* defined in thread.c */ - -/* OSF1 doesn't support pthread_kill() */ -#define PTHREAD_KILL_IS_NOOP 1 - -#endif /* OSF1 */ - -#else /* dce pthreads */ - -#if defined( THREAD_SGI_SPROC ) -/*********************************** - * * - * thread definitions for sgi irix * - * * - ***********************************/ - -#define _THREAD - -#include -#include -#include -#include -#include - -typedef void *(*VFP)(void *); - -/* sgi threads are preemptive */ -#define PTHREAD_PREEMPTIVE 1 - -/* thread attributes and thread type */ -typedef int pthread_attr_t; -typedef pid_t pthread_t; - -/* default attr states */ -#define pthread_mutexattr_default 0 -#define pthread_condattr_default 0 - -/* thread state - joinable or not */ -#define PTHREAD_CREATE_JOINABLE 0 -#define PTHREAD_CREATE_DETACHED 1 -/* thread scope - who is in scheduling pool */ -#define PTHREAD_SCOPE_PROCESS 0 -#define PTHREAD_SCOPE_SYSTEM 1 - -/* mutex attributes and mutex type */ -typedef int pthread_mutexattr_t; -typedef int pthread_mutex_t; - -/* mutex and condition variable scope - process or system */ -#define PTHREAD_SHARE_PRIVATE 0 -#define PTHREAD_SHARE_PROCESS 1 - -/* condition variable attributes and condition variable type */ -typedef int pthread_condattr_t; -struct irix_cv_waiter { - pid_t icvw_pid; - struct irix_cv_waiter *icvw_next; -}; -typedef struct irix_cv { - pthread_mutex_t icv_mutex; - pthread_mutex_t *icv_waitermutex; - struct irix_cv_waiter *icv_waiterq; -} pthread_cond_t; - -#else - -#if defined( WIN32_KERNEL_THREADS ) - -/*********************************** - * * - * thread definitions for Win32 * - * * - ***********************************/ - -#define _THREAD - -#include -#include -#include "ldap.h" -#include "ldaplog.h" - -typedef void (*VFP)(void *); - -/* Win32 threads are preemptive */ -#define PTHREAD_PREEMPTIVE 1 - -/* thread attributes and thread type */ -typedef int pthread_attr_t; -typedef HANDLE pthread_t; - -/* default attr states */ -#define pthread_mutexattr_default 0 -#define pthread_condattr_default 0 - -/* thread state - joinable or not */ -#define PTHREAD_CREATE_JOINABLE 0 -#define PTHREAD_CREATE_DETACHED 1 -/* thread scope - who is in scheduling pool */ -#define PTHREAD_SCOPE_PROCESS 0 -#define PTHREAD_SCOPE_SYSTEM 1 - -/* mutex attributes and mutex type */ -typedef int pthread_mutexattr_t; -typedef HANDLE pthread_mutex_t; - -/* mutex and condition variable scope - process or system */ -#define PTHREAD_SHARE_PRIVATE 0 -#define PTHREAD_SHARE_PROCESS 1 - -/* condition variable attributes and condition variable type */ -typedef int pthread_condattr_t; - -/* simulated condition variable */ -struct win32_cv_waiter { - pthread_t icvw_pthread; - struct win32_cv_waiter *icvw_next; -}; -typedef struct win32_cv { - pthread_mutex_t icv_mutex; - pthread_mutex_t *icv_waitermutex; - struct win32_cv_waiter *icv_waiterq; -} pthread_cond_t; - -#endif /* NATIVE_WIN32_THREADS */ -#endif /* sgi sproc */ -#endif /* dce pthreads */ -#endif /* hp dce pthreads */ -#endif /* aix pthreads */ -#endif /* mit pthreads */ -#endif /* sunos5 */ -#endif /* sunos4 */ - -#ifndef _THREAD - -/*********************************** - * * - * thread definitions for no * - * underlying library support * - * * - ***********************************/ - -typedef void *(*VFP)(); - -/* thread attributes and thread type */ -typedef int pthread_attr_t; -typedef int pthread_t; - -/* default attr states */ -#define pthread_mutexattr_default NULL -#define pthread_condattr_default NULL - -/* thread state - joinable or not */ -#define PTHREAD_CREATE_JOINABLE 0 -#define PTHREAD_CREATE_DETACHED 0 -/* thread scope - who is in scheduling pool */ -#define PTHREAD_SCOPE_PROCESS 0 -#define PTHREAD_SCOPE_SYSTEM 0 - -/* mutex attributes and mutex type */ -typedef int pthread_mutexattr_t; -typedef int pthread_mutex_t; - -/* mutex and condition variable scope - process or system */ -#define PTHREAD_SHARE_PRIVATE 0 -#define PTHREAD_SHARE_PROCESS 0 - -/* condition variable attributes and condition variable type */ -typedef int pthread_condattr_t; -typedef int pthread_cond_t; - -#endif /* no threads support */ - -/* POSIX standard pthread function declarations: */ - -int pthread_attr_init( pthread_attr_t *attr ); -int pthread_attr_destroy( pthread_attr_t *attr ); -int pthread_attr_getdetachstate( pthread_attr_t *attr, int *detachstate ); -int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ); - -int pthread_create( pthread_t *tid, pthread_attr_t *attr, VFP func, void *arg ); -void pthread_yield(); -void pthread_exit(); -int pthread_kill( pthread_t tid, int sig ); -#if defined( hpux ) || defined( OSF1 ) || defined( AIXV4 ) /* declares pthread_join */ -#else -int pthread_join( pthread_t tid, int *status ); -#endif - -#if defined( hpux ) || defined( OSF1 ) /* declares pthread_mutex_init */ -#else -int pthread_mutex_init( pthread_mutex_t *mp, pthread_mutexattr_t *attr ); -#endif -int pthread_mutex_destroy( pthread_mutex_t *mp ); -int pthread_mutex_lock( pthread_mutex_t *mp ); -int pthread_mutex_unlock( pthread_mutex_t *mp ); -int pthread_mutex_trylock( pthread_mutex_t *mp ); - -#if defined( hpux ) || defined( OSF1 ) /* declares pthread_cond_init */ -#else -int pthread_cond_init( pthread_cond_t *cv, pthread_condattr_t *attr ); -#endif -int pthread_cond_destroy( pthread_cond_t *cv ); -int pthread_cond_wait( pthread_cond_t *cv, pthread_mutex_t *mp ); -int pthread_cond_signal( pthread_cond_t *cv ); -int pthread_cond_broadcast( pthread_cond_t *cv ); - -#endif /* _LTHREAD_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/ntslapdregparms.h b/mozilla/directory/c-sdk/ldap/include/ntslapdregparms.h deleted file mode 100755 index 58db7f979eb..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ntslapdregparms.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/****************************************************** - * - * ntslapdregparms.h - NT Registry keys for Slapd. - * - ******************************************************/ - -#if defined( _WIN32 ) - -#if !defined( _NTSLAPDREGPARMS_H_ ) -#define _NTSLAPDREGPARMS_H_ - -#define COMPANY_KEY "SOFTWARE\\Netscape" -#define COMPANY_NAME "Netscape" -#define PROGRAM_GROUP_NAME "Netscape" -#define PRODUCT_NAME "slapd" -#define PRODUCT_BIN "ns-slapd" -#define SLAPD_EXE "slapd.exe" -#define SERVICE_EXE SLAPD_EXE -#define SLAPD_CONF "slapd.conf" -#define MAGNUS_CONF SLAPD_CONF -#define SLAPD_DONGLE_FILE "password.dng" -#define DONGLE_FILE_NAME SLAPD_DONGLE_FILE -#define PRODUCT_VERSION "1.0" -#define EVENTLOG_APPNAME "NetscapeSlapd" -#define DIRECTORY_SERVICE_PREFIX "Netscape Directory Server " -#define SERVICE_PREFIX DIRECTORY_SERVICE_PREFIX -#define CONFIG_PATH_KEY "ConfigurationPath" -#define EVENTLOG_MESSAGES_KEY "EventMessageFile" -#define EVENT_LOG_KEY "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application" -#define ADMIN_REGISTRY_ROOT_KEY "Admin Server" -#define SLAPD_REGISTRY_ROOT_KEY "Slapd Server" -#define PRODUCT_KEY SLAPD_REGISTRY_ROOT_KEY -#endif /* _NTSLAPDREGPARMS_H_ */ - -#endif /* _WIN32 */ diff --git a/mozilla/directory/c-sdk/ldap/include/ntwatchdog.h b/mozilla/directory/c-sdk/ldap/include/ntwatchdog.h deleted file mode 100755 index 315e95ee366..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/ntwatchdog.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/****************************************************** - * - * ntwatchdog.h - Defs for NT Watchdog Service. - * - ******************************************************/ - -#if defined( _WIN32 ) - -#if !defined( _NTWATCHDOG_H_ ) -#define _NTWATCHDOG_H_ - -#define FILE_PATHSEP '/' - -#define SLAPD_ROOT "SLAPD_ROOT" // environment variable holding server root path -#define MORTALITY_KEY "MortalityTimeSecs" -#define MINRAMFREE_KEY "MinRamFree" -#define MINRAMTOTAL_KEY "MinRamTotal" -#define MINRAMPERSERVER_KEY "MinRamPerServer" -#define DEFAULT_MORTALITY_TIME 60 // seconds after startup up until server will NOT be restarted -#define DEFAULT_KILL_TIME 60 // seconds to wait for httpd.exe to shutdown -#define DEFAULT_CRON_TIME 60 // seconds to wait before rechecking cron.conf -#define DEFAULT_RESTART_TIME 10 // seconds to wait before restarting server -#define DEFAULT_MINRAMFREE 0 // KB free physical memory remaining -#define DEFAULT_MINRAMTOTAL (30 * 1024) // KB free physical memory installed -#define DEFAULT_MINRAMPERSERVER (15 * 1024) // KB free physical memory per server - -#define MSG_RESOURCES "Not enough physical memory to start server." - -// offsets for extra window bytes, used in Set/GetWindowLong() -#define GWL_PROCESS_HANDLE (sizeof(LONG) * 0) -#define GWL_PASSWORD_ADDR (sizeof(LONG) * 1) -#define GWL_PASSWORD_LENGTH (sizeof(LONG) * 2) - -#define MAX_LINE 512 -#define MAX_PASSWORD 256 - -#define CLOSEHANDLE(X) \ -{ \ - if(X) \ - { \ - CloseHandle(X); \ - X = 0; \ - } \ -} - -// in ntcron.c -LPTHREAD_START_ROUTINE CRON_ThreadProc(HANDLE hevWatchDogExit); - -// in watchdog.c -BOOL WD_SysLog(WORD fwEventType, DWORD IDEvent, char *szData); - -#endif /* _NTWATCHDOG_H_ */ -#endif /* _WIN32 */ diff --git a/mozilla/directory/c-sdk/ldap/include/portable.h b/mozilla/directory/c-sdk/ldap/include/portable.h deleted file mode 100644 index 766b2122156..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/portable.h +++ /dev/null @@ -1,420 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1994 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -#ifndef _PORTABLE_H -#define _PORTABLE_H - -/* - * portable.h for LDAP -- this is where we define common stuff to make - * life easier on various Unix systems. - * - * Unless you are porting LDAP to a new platform, you should not need to - * edit this file. - */ - -#ifndef SYSV -#if defined( hpux ) || defined( sunos5 ) || defined ( sgi ) || defined( SVR4 ) -#define SYSV -#endif -#endif - -/* - * under System V, use sysconf() instead of getdtablesize - */ -#if !defined( USE_SYSCONF ) && defined( SYSV ) -#define USE_SYSCONF -#endif - -/* - * under System V, daemons should use setsid() instead of detaching from their - * tty themselves - */ -#if !defined( USE_SETSID ) && defined( SYSV ) -#define USE_SETSID -#endif - -/* - * System V has socket options in filio.h - */ -#if !defined( NEED_FILIO ) && defined( SYSV ) && !defined( hpux ) && !defined( AIX ) -#define NEED_FILIO -#endif - -/* - * use lockf() under System V - */ -#if !defined( USE_LOCKF ) && ( defined( SYSV ) || defined( aix )) -#define USE_LOCKF -#endif - -/* - * on many systems, we should use waitpid() instead of waitN() - */ -#if !defined( USE_WAITPID ) && ( defined( SYSV ) || defined( sunos4 ) || defined( ultrix ) || defined( aix )) -#define USE_WAITPID -#endif - -/* - * define the wait status argument type - */ -#if ( defined( SunOS ) && SunOS < 40 ) || defined( nextstep ) -#define WAITSTATUSTYPE union wait -#else -#define WAITSTATUSTYPE int -#endif - -/* - * define the flags for wait - */ -#ifdef sunos5 -#define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED ) -#else -#define WAIT_FLAGS ( WNOHANG | WUNTRACED ) -#endif - -/* - * defined the options for openlog (syslog) - */ -#ifdef ultrix -#define OPENLOG_OPTIONS LOG_PID -#else -#define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT ) -#endif - -/* - * some systems don't have the BSD re_comp and re_exec routines - */ -#ifndef NEED_BSDREGEX -#if ( defined( SYSV ) || defined( VMS ) || defined( netbsd ) || defined( freebsd ) || defined( linux )) && !defined(sgi) -#define NEED_BSDREGEX -#endif -#endif - -/* - * many systems do not have the setpwfile() library routine... we just - * enable use for those systems we know have it. - */ -#ifndef HAVE_SETPWFILE -#if defined( sunos4 ) || defined( ultrix ) || defined( OSF1 ) -#define HAVE_SETPWFILE -#endif -#endif - -/* - * Are sys_errlist and sys_nerr declared in stdio.h? - */ -#ifndef SYSERRLIST_IN_STDIO -#if defined( freebsd ) -#define SYSERRLIST_IN_STDIO -#endif -#endif - - -/* - * Is snprintf() part of the standard C runtime library? - */ -#if !defined(HAVE_SNPRINTF) -#if defined(SOLARIS) || defined(LINUX) || defined(HPUX) -#define HAVE_SNPRINTF -#endif -#endif - - -/* - * Async IO. Use a non blocking implementation of connect() and - * dns functions - */ -#if !defined(LDAP_ASYNC_IO) -#if !defined(_WINDOWS) && !defined(macintosh) -#define LDAP_ASYNC_IO -#endif /* _WINDOWS */ -#endif - -/* - * for select() - */ -#if !defined(WINSOCK) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2) -#if defined(hpux) || defined(LINUX) || defined(SUNOS4) -#include -#else -#include -#endif -#if !defined(FD_SET) -#define NFDBITS 32 -#define FD_SETSIZE 32 -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) -#endif /* !FD_SET */ -#endif /* !WINSOCK && !_WINDOWS && !macintosh */ - - -/* - * for connect() -- must we block signals when calling connect()? This - * is necessary on some buggy UNIXes. - */ -#if !defined(LDAP_CONNECT_MUST_NOT_BE_INTERRUPTED) && \ - ( defined(AIX) || defined(IRIX) || defined(HPUX) || defined(SUNOS4) \ - || defined(SOLARIS) || defined(OSF1) ||defined(freebsd)) -#define LDAP_CONNECT_MUST_NOT_BE_INTERRUPTED -#endif - - -/* - * for signal() -- what do signal handling functions return? - */ -#ifndef SIG_FN -#ifdef sunos5 -# define SIG_FN void /* signal-catching functions return void */ -#else /* sunos5 */ -# ifdef BSD -# if (BSD >= 199006) || defined(NeXT) || defined(OSF1) || defined(sun) || defined(ultrix) || defined(apollo) || defined(POSIX_SIGNALS) -# define SIG_FN void /* signal-catching functions return void */ -# else -# define SIG_FN int /* signal-catching functions return int */ -# endif -# else /* BSD */ -# define SIG_FN void /* signal-catching functions return void */ -# endif /* BSD */ -#endif /* sunos5 */ -#endif /* SIG_FN */ - -/* - * toupper and tolower macros are different under bsd and sys v - */ -#if defined( SYSV ) && !defined( hpux ) -#define TOUPPER(c) (isascii(c) && islower(c) ? _toupper(c) : c) -#define TOLOWER(c) (isascii(c) && isupper(c) ? _tolower(c) : c) -#else -#define TOUPPER(c) (isascii(c) && islower(c) ? toupper(c) : c) -#define TOLOWER(c) (isascii(c) && isupper(c) ? tolower(c) : c) -#endif - -/* - * put a cover on the tty-related ioctl calls we need to use - */ -#if defined( NeXT ) || (defined(SunOS) && SunOS < 40) -#define TERMIO_TYPE struct sgttyb -#define TERMFLAG_TYPE int -#define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop)) -#define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop)) -#define GETFLAGS( tio ) (tio).sg_flags -#define SETFLAGS( tio, flags ) (tio).sg_flags = (flags) -#else -#define USE_TERMIOS -#define TERMIO_TYPE struct termios -#define TERMFLAG_TYPE tcflag_t -#define GETATTR( fd, tiop ) tcgetattr((fd), (tiop)) -#define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop)) -#define GETFLAGS( tio ) (tio).c_lflag -#define SETFLAGS( tio, flags ) (tio).c_lflag = (flags) -#endif - -#if ( !defined( HPUX9 )) && ( !defined( sunos4 )) && ( !defined( SNI )) && \ - ( !defined( HAVE_TIME_R )) -#define HAVE_TIME_R -#endif - -#if defined( sunos5 ) || defined( aix ) -#define HAVE_GETPWNAM_R -#define HAVE_GETGRNAM_R -#endif - -#if defined(SNI) || defined(LINUX1_2) -int strcasecmp(const char *, const char *); -#ifdef SNI -int strncasecmp(const char *, const char *, int); -#endif /* SNI */ -#ifdef LINUX1_2 -int strncasecmp(const char *, const char *, size_t); -#endif /* LINUX1_2 */ -#endif /* SNI || LINUX1_2 */ - -#if defined(_WINDOWS) || defined(macintosh) || defined(XP_OS2) -#define GETHOSTBYNAME( n, r, b, l, e ) gethostbyname( n ) -#define NSLDAPI_CTIME( c, b, l ) ctime( c ) -#define STRTOK( s1, s2, l ) strtok( s1, s2 ) -#else /* UNIX */ -#if defined(sgi) || defined(HPUX9) || defined(LINUX1_2) || defined(SCOOS) || \ - defined(UNIXWARE) || defined(SUNOS4) || defined(SNI) || defined(BSDI) || \ - defined(NCR) || defined(OSF1) || defined(NEC) || \ - ( defined(HPUX10) && !defined(_REENTRANT)) || defined(HPUX11) || \ - defined(UnixWare) || defined(LINUX) || (defined(AIX) && !defined(USE_REENTRANT_LIBC)) -#define GETHOSTBYNAME( n, r, b, l, e ) gethostbyname( n ) -#elif defined(AIX) -/* Maybe this is for another version of AIX? - Commenting out for AIX 4.1 for Nova - Replaced with following to lines, stolen from the #else below -#define GETHOSTBYNAME_BUF_T struct hostent_data -*/ -typedef char GETHOSTBYNAME_buf_t [BUFSIZ /* XXX might be too small */]; -#define GETHOSTBYNAME_BUF_T GETHOSTBYNAME_buf_t -#define GETHOSTBYNAME( n, r, b, l, e ) \ - (memset (&b, 0, l), gethostbyname_r (n, r, &b) ? NULL : r) -#elif defined(HPUX10) -#define GETHOSTBYNAME_BUF_T struct hostent_data -#define GETHOSTBYNAME( n, r, b, l, e ) nsldapi_compat_gethostbyname_r( n, r, (char *)&b, l, e ) -#else -#include /* BUFSIZ */ -typedef char GETHOSTBYNAME_buf_t [BUFSIZ /* XXX might be too small */]; -#define GETHOSTBYNAME_BUF_T GETHOSTBYNAME_buf_t -#define GETHOSTBYNAME( n, r, b, l, e ) gethostbyname_r( n, r, b, l, e ) -#endif -#if defined(HPUX9) || defined(LINUX1_2) || defined(LINUX2_0) || \ - defined(LINUX2_1) || defined(SUNOS4) || defined(SNI) || \ - defined(SCOOS) || defined(BSDI) || defined(NCR) || \ - defined(NEC) || ( defined(HPUX10) && !defined(_REENTRANT)) || \ - (defined(AIX) && !defined(USE_REENTRANT_LIBC)) -#define NSLDAPI_CTIME( c, b, l ) ctime( c ) -#elif defined(HPUX10) && defined(_REENTRANT) && !defined(HPUX11) -#define NSLDAPI_CTIME( c, b, l ) nsldapi_compat_ctime_r( c, b, l ) -#elif defined( IRIX6_2 ) || defined( IRIX6_3 ) || defined(UNIXWARE) \ - || defined(OSF1V4) || defined(AIX) || defined(UnixWare) || defined(hpux) || defined(HPUX11) -#define NSLDAPI_CTIME( c, b, l ) ctime_r( c, b ) -#elif defined( OSF1V3 ) -#define NSLDAPI_CTIME( c, b, l ) (ctime_r( c, b, l ) ? NULL : b) -#else -#define NSLDAPI_CTIME( c, b, l ) ctime_r( c, b, l ) -#endif -#if defined(hpux9) || defined(LINUX1_2) || defined(SUNOS4) || defined(SNI) || \ - defined(SCOOS) || defined(BSDI) || defined(NCR) || \ - defined(NEC) || defined(LINUX) || (defined(AIX) && !defined(USE_REENTRANT_LIBC)) -#define STRTOK( s1, s2, l ) strtok( s1, s2 ) -#else -#define HAVE_STRTOK_R -char *strtok_r(char *, const char *, char **); -#define STRTOK( s1, s2, l ) (char *)strtok_r( s1, s2, l ) -#endif /* STRTOK */ -#endif /* UNIX */ - -#if defined( ultrix ) || defined( nextstep ) -extern char *strdup(); -#endif /* ultrix || nextstep */ - -#if defined( sunos4 ) || defined( OSF1 ) -#define BSD_TIME 1 /* for servers/slapd/log.h */ -#endif /* sunos4 || osf */ - -#if !defined(_WINDOWS) && !defined(macintosh) -#include -#include /* for inet_addr() */ -#endif - -/* - * Define a portable type for IPv4 style Internet addresses (32 bits): - */ -#if ( defined(sunos5) && defined(_IN_ADDR_T)) || \ - defined(aix) || defined(HPUX11) || defined(OSF1) -typedef in_addr_t nsldapi_in_addr_t; -#else -typedef unsigned long nsldapi_in_addr_t; -#endif - -#ifdef SUNOS4 -#include /* for toupper() */ -int fprintf(FILE *, char *, ...); -int fseek(FILE *, long, int); -int fread(char *, int, int, FILE *); -int fclose(FILE *); -int fflush(FILE *); -int rewind(FILE *); -void *memmove(void *, const void *, size_t); -int strcasecmp(char *, char *); -int strncasecmp(char *, char *, int); -time_t time(time_t *); -void perror(char *); -int fputc(char, FILE *); -int fputs(char *, FILE *); -int re_exec(char *); -int socket(int, int, int); -void bzero(char *, int); -unsigned long inet_addr(char *); -char * inet_ntoa(struct in_addr); -int getdtablesize(); -int connect(int, struct sockaddr *, int); -#endif /* SUNOS4 */ - -/* #if defined(SUNOS4) || defined(SNI) */ -#if defined(SUNOS4) -int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); -#endif /* SUNOS4 || SNI */ - -/* - * SAFEMEMCPY is an overlap-safe copy from s to d of n bytes - */ -#ifdef macintosh -#define SAFEMEMCPY( d, s, n ) BlockMoveData( (Ptr)s, (Ptr)d, n ) -#else /* macintosh */ -#ifdef sunos4 -#define SAFEMEMCPY( d, s, n ) bcopy( s, d, n ) -#else /* sunos4 */ -#define SAFEMEMCPY( d, s, n ) memmove( d, s, n ) -#endif /* sunos4 */ -#endif /* macintosh */ - -#ifdef _WINDOWS - -#define strcasecmp strcmpi -#define strncasecmp _strnicmp -#define bzero(a, b) memset( a, 0, b ) -#define getpid _getpid -#define ioctl ioctlsocket -#define sleep(a) Sleep( a*1000 ) - -#define EMSGSIZE WSAEMSGSIZE -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EHOSTUNREACH WSAEHOSTUNREACH - -#ifndef MAXPATHLEN -#define MAXPATHLEN _MAX_PATH -#endif - -/* We'd like this number to be prime for the hash - * into the Connection table */ -#define DS_MAX_NT_SOCKET_CONNECTIONS 2003 - -#elif defined(XP_OS2) - -#define strcasecmp strcmpi -#define strncasecmp strnicmp -#define bzero(a, b) memset( a, 0, b ) -#include "dirent.h" -#include /*for strcmpi()*/ -#include /*for ctime()*/ - -#endif /* XP_OS2 */ - - -#endif /* _PORTABLE_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/proto-ntutil.h b/mozilla/directory/c-sdk/ldap/include/proto-ntutil.h deleted file mode 100755 index 87dd187a6ef..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/proto-ntutil.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/****************************************************** - * - * proto-ntutil.h - Prototypes for utility functions used - * throughout slapd on NT. - * - ******************************************************/ -#if defined( _WINDOWS ) - -#ifndef _PROTO_NTUTIL -#define _PROTO_NTUTIL - -/* - * - * ntreg.c - * - */ -extern int SlapdGetRegSZ( LPTSTR lpszRegKey, LPSTR lpszValueName, LPTSTR lpszValue ); - -/* - * - * getopt.c - * - */ -extern int getopt (int argc, char *const *argv, const char *optstring); - -/* - * - * ntevent.c - * - */ -extern BOOL MultipleInstances(); -extern BOOL SlapdIsAService(); -extern void InitializeSlapdLogging( LPTSTR lpszRegLocation, LPTSTR lpszEventLogName, LPTSTR lpszMessageFile ); -extern void ReportSlapdEvent(WORD wEventType, DWORD dwIdEvent, WORD wNumInsertStrings, - char *pszStrings); -extern BOOL ReportSlapdStatusToSCMgr( - SERVICE_STATUS *serviceStatus, - SERVICE_STATUS_HANDLE serviceStatusHandle, - HANDLE Event, - DWORD dwCurrentState, - DWORD dwWin32ExitCode, - DWORD dwCheckPoint, - DWORD dwWaitHint); -extern void WINAPI SlapdServiceCtrlHandler(DWORD dwOpcode); -extern BOOL SlapdGetServerNameFromCmdline(char *szServerName, char *szCmdLine); - -/* - * - * ntgetpassword.c - * - */ -#ifdef NET_SSL -extern char *Slapd_GetPassword(); -#ifdef FORTEZZA -extern char *Slapd_GetFortezzaPIN(); -#endif -extern void CenterDialog(HWND hwndParent, HWND hwndDialog); -#endif /* NET_SSL */ - -#endif /* _PROTO_NTUTIL */ - -#endif /* _WINDOWS */ diff --git a/mozilla/directory/c-sdk/ldap/include/regex.h b/mozilla/directory/c-sdk/ldap/include/regex.h deleted file mode 100644 index 8bc5a18ef50..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/regex.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#if defined( macintosh ) || defined( DOS ) || defined( _WINDOWS ) || defined( NEED_BSDREGEX ) || defined( XP_OS2 ) -/* - * Copyright (c) 1993 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ -/* - * regex.h -- includes for regular expression matching routines - * 13 August 1993 Mark C Smith - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "ldap.h" - -#if !defined( NEEDPROTOS ) && defined( __STDC__ ) -#define NEEDPROTOS -#endif - -#ifdef _SLDAPD_H_ /* server build: no need to use LDAP_CALL stuff */ -#ifdef LDAP_CALL -#undef LDAP_CALL -#define LDAP_CALL -#endif -#endif - -#ifdef NEEDPROTOS -int re_init( void ); -void re_lock( void ); -int re_unlock( void ); -char * LDAP_CALL re_comp( char *pat ); -int LDAP_CALL re_exec( char *lp ); -void LDAP_CALL re_modw( char *s ); -int LDAP_CALL re_subs( char *src, char *dst ); -#else /* NEEDPROTOS */ -int re_init(); -void re_lock(); -int re_unlock(); -char * LDAP_CALL re_comp(); -int LDAP_CALL re_exec(); -void LDAP_CALL re_modw(); -int LDAP_CALL re_subs(); -#endif /* NEEDPROTOS */ - -#define re_fail( m, p ) - -#ifdef __cplusplus -} -#endif -#endif /* macintosh or DOS or or _WIN32 or NEED_BSDREGEX */ diff --git a/mozilla/directory/c-sdk/ldap/include/srchpref.h b/mozilla/directory/c-sdk/ldap/include/srchpref.h deleted file mode 100644 index 98319bb2ea9..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/srchpref.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1993, 1994 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - * - * searchpref.h: display template library defines - */ - - -#ifndef _SRCHPREF_H -#define _SRCHPREF_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* calling conventions used by library */ -#ifndef LDAP_CALL -#if defined( _WINDOWS ) || defined( _WIN32 ) -#define LDAP_C __cdecl -#ifndef _WIN32 -#define __stdcall _far _pascal -#define LDAP_CALLBACK _loadds -#else -#define LDAP_CALLBACK -#endif /* _WIN32 */ -#define LDAP_PASCAL __stdcall -#define LDAP_CALL LDAP_PASCAL -#else /* _WINDOWS */ -#define LDAP_C -#define LDAP_CALLBACK -#define LDAP_PASCAL -#define LDAP_CALL -#endif /* _WINDOWS */ -#endif /* LDAP_CALL */ - -struct ldap_searchattr { - char *sa_attrlabel; - char *sa_attr; - /* max 32 matchtypes for now */ - unsigned long sa_matchtypebitmap; - char *sa_selectattr; - char *sa_selecttext; - struct ldap_searchattr *sa_next; -}; - -struct ldap_searchmatch { - char *sm_matchprompt; - char *sm_filter; - struct ldap_searchmatch *sm_next; -}; - -struct ldap_searchobj { - char *so_objtypeprompt; - unsigned long so_options; - char *so_prompt; - short so_defaultscope; - char *so_filterprefix; - char *so_filtertag; - char *so_defaultselectattr; - char *so_defaultselecttext; - struct ldap_searchattr *so_salist; - struct ldap_searchmatch *so_smlist; - struct ldap_searchobj *so_next; -}; - -#define NULLSEARCHOBJ ((struct ldap_searchobj *)0) - -/* - * global search object options - */ -#define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001 - -#define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \ - (((so)->so_options & option ) != 0 ) - -#define LDAP_SEARCHPREF_VERSION_ZERO 0 -#define LDAP_SEARCHPREF_VERSION 1 - -#define LDAP_SEARCHPREF_ERR_VERSION 1 -#define LDAP_SEARCHPREF_ERR_MEM 2 -#define LDAP_SEARCHPREF_ERR_SYNTAX 3 -#define LDAP_SEARCHPREF_ERR_FILE 4 - - -LDAP_API(int) -LDAP_CALL -ldap_init_searchprefs( char *file, struct ldap_searchobj **solistp ); - -LDAP_API(int) -LDAP_CALL -ldap_init_searchprefs_buf( char *buf, long buflen, - struct ldap_searchobj **solistp ); - -LDAP_API(void) -LDAP_CALL -ldap_free_searchprefs( struct ldap_searchobj *solist ); - -LDAP_API(struct ldap_searchobj *) -LDAP_CALL -ldap_first_searchobj( struct ldap_searchobj *solist ); - -LDAP_API(struct ldap_searchobj *) -LDAP_CALL -ldap_next_searchobj( struct ldap_searchobj *sollist, - struct ldap_searchobj *so ); - -#ifdef __cplusplus -} -#endif -#endif /* _SRCHPREF_H */ diff --git a/mozilla/directory/c-sdk/ldap/include/sysexit-compat.h b/mozilla/directory/c-sdk/ldap/include/sysexit-compat.h deleted file mode 100755 index 241768dee3c..00000000000 --- a/mozilla/directory/c-sdk/ldap/include/sysexit-compat.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1987 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * @(#)sysexits.h 4.5 (Berkeley) 7/6/88 - */ - -/* -** SYSEXITS.H -- Exit status codes for system programs. -** -** This include file attempts to categorize possible error -** exit statuses for system programs, notably delivermail -** and the Berkeley network. -** -** Error numbers begin at EX__BASE to reduce the possibility of -** clashing with other exit statuses that random programs may -** already return. The meaning of the codes is approximately -** as follows: -** -** EX_USAGE -- The command was used incorrectly, e.g., with -** the wrong number of arguments, a bad flag, a bad -** syntax in a parameter, or whatever. -** EX_DATAERR -- The input data was incorrect in some way. -** This should only be used for user's data & not -** system files. -** EX_NOINPUT -- An input file (not a system file) did not -** exist or was not readable. This could also include -** errors like "No message" to a mailer (if it cared -** to catch it). -** EX_NOUSER -- The user specified did not exist. This might -** be used for mail addresses or remote logins. -** EX_NOHOST -- The host specified did not exist. This is used -** in mail addresses or network requests. -** EX_UNAVAILABLE -- A service is unavailable. This can occur -** if a support program or file does not exist. This -** can also be used as a catchall message when something -** you wanted to do doesn't work, but you don't know -** why. -** EX_SOFTWARE -- An internal software error has been detected. -** This should be limited to non-operating system related -** errors as possible. -** EX_OSERR -- An operating system error has been detected. -** This is intended to be used for such things as "cannot -** fork", "cannot create pipe", or the like. It includes -** things like getuid returning a user that does not -** exist in the passwd file. -** EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, -** etc.) does not exist, cannot be opened, or has some -** sort of error (e.g., syntax error). -** EX_CANTCREAT -- A (user specified) output file cannot be -** created. -** EX_IOERR -- An error occurred while doing I/O on some file. -** EX_TEMPFAIL -- temporary failure, indicating something that -** is not really an error. In sendmail, this means -** that a mailer (e.g.) could not create a connection, -** and the request should be reattempted later. -** EX_PROTOCOL -- the remote system returned something that -** was "not possible" during a protocol exchange. -** EX_NOPERM -- You did not have sufficient permission to -** perform the operation. This is not intended for -** file system problems, which should use NOINPUT or -** CANTCREAT, but rather for higher level permissions. -** For example, kre uses this to restrict who students -** can send mail to. -** -** Maintained by Eric Allman (eric@berkeley, ucbvax!eric) -- -** please mail changes to me. -** -** @(#)sysexits.h 4.5 7/6/88 -*/ - -# define EX_OK 0 /* successful termination */ - -# define EX__BASE 64 /* base value for error messages */ - -# define EX_USAGE 64 /* command line usage error */ -# define EX_DATAERR 65 /* data format error */ -# define EX_NOINPUT 66 /* cannot open input */ -# define EX_NOUSER 67 /* addressee unknown */ -# define EX_NOHOST 68 /* host name unknown */ -# define EX_UNAVAILABLE 69 /* service unavailable */ -# define EX_SOFTWARE 70 /* internal software error */ -# define EX_OSERR 71 /* system error (e.g., can't fork) */ -# define EX_OSFILE 72 /* critical OS file missing */ -# define EX_CANTCREAT 73 /* can't create (user) output file */ -# define EX_IOERR 74 /* input/output error */ -# define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ -# define EX_PROTOCOL 76 /* remote error in protocol */ -# define EX_NOPERM 77 /* permission denied */ -# define EX_CONFIG 78 /* configuration error */ diff --git a/mozilla/directory/c-sdk/ldap/libraries/Makefile.client b/mozilla/directory/c-sdk/ldap/libraries/Makefile.client deleted file mode 100644 index 88a1178df3b..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/Makefile.client +++ /dev/null @@ -1,59 +0,0 @@ -# -# The contents of this file are subject to the Netscape Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/NPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is Mozilla Communicator client code, released -# March 31, 1998. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-1999 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -DEPTH = ../../../.. -NSPR_TREE = ../.. -MOD_DEPTH = ../.. - -include ../../config/arch.mk - -UNIXDIRLIST = liblber libldif libiutil libldap libprldap libssldap - -ifeq ($(OS_ARCH), WINNT) -UNIXDIRLIST += libutil -endif - -all export:: FORCE - @for i in $(UNIXDIRLIST); do \ - echo " cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) export"; \ - ( cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) export ); \ - done - -libs install:: FORCE - @for i in $(UNIXDIRLIST); do \ - echo " cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) install"; \ - ( cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) install ); \ - done - -clean clobber:: FORCE - @for i in $(UNIXDIRLIST); do \ - echo " cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) clean"; \ - ( cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) clean ); \ - done - -realclean clobber_all:: FORCE - @for i in $(UNIXDIRLIST); do \ - echo " cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) realclean"; \ - ( cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) realclean ); \ - done - -FORCE: diff --git a/mozilla/directory/c-sdk/ldap/libraries/Makefile.in b/mozilla/directory/c-sdk/ldap/libraries/Makefile.in deleted file mode 100644 index 02806f903f0..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/Makefile.in +++ /dev/null @@ -1,34 +0,0 @@ -DEPTH = ../../../.. -srcdir = @srcdir -ldaptopsrcdir = @top_srcdir@ - -UNIXDIRLIST = liblber libldap libprldap - -include ../build/autoconf.mk -include $(NSPR_TREE)/config/rules.mk - -all export:: FORCE - @for i in $(UNIXDIRLIST); do \ - echo " cd $$i; $(MAKE) $(MFLAGS) export"; \ - ( cd $$i; $(MAKE) $(MFLAGS) export ); \ - done - -libs install:: FORCE - @for i in $(UNIXDIRLIST); do \ - echo " cd $$i; $(MAKE) $(MFLAGS) install"; \ - ( cd $$i; $(MAKE) $(MFLAGS) install ); \ - done - -clean clobber:: FORCE - @for i in $(UNIXDIRLIST); do \ - echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ - done - -realclean clobber_all:: FORCE - @for i in $(UNIXDIRLIST); do \ - echo " cd $$i; $(MAKE) $(MFLAGS) realclean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) realclean ); \ - done - -FORCE: diff --git a/mozilla/directory/c-sdk/ldap/libraries/genMakefile.client b/mozilla/directory/c-sdk/ldap/libraries/genMakefile.client deleted file mode 100644 index 4f165c3ce6a..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/genMakefile.client +++ /dev/null @@ -1,128 +0,0 @@ -# -# The contents of this file are subject to the Netscape Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/NPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is Mozilla Communicator client code, released -# March 31, 1998. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-1999 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -LDAP_SRC =.. -include ../../build.mk - -WINDEFDIR =msdos/winsock - -DEFLDAPW32 =$(WINDEFDIR)/nsldap32 -DEFNSSLDAPW32 =$(WINDEFDIR)/nssldap32 -DEFLDAPSSLW32 =$(WINDEFDIR)/nsldapssl32 -DEFLDAPW32CLIENT=$(WINDEFDIR)/ldap32 -DEFLDAPW16REV =$(WINDEFDIR)/nsldap -DEFLDAPW16 =$(WINDEFDIR)/libldap -DEFLDSSLW32 =$(WINDEFDIR)/ldapssl -DEFLCHW32 =$(WINDEFDIR)/nslch32 -DEFLDPRW32 =$(WINDEFDIR)/nsldappr32 -DEFLDPRINCL =$(WINDEFDIR)/nsldappr-incl - -FILES = $(DEFLDAPW32) $(DEFNSSLDAPW32) $(DEFLDAPSSLW32) \ - $(DEFLDAPW32CLIENT) $(DEFLDAPW16REV) $(DEFLDAPW16) \ - $(DEFLDSSLW32) $(DEFLCHW32) $(DEFLDPRW32) \ - $(DEFLDPRINCL) - -TDFFILES = $(addsuffix .tdf, $(FILES)) -DEFFILES = $(addsuffix .def, $(FILES)) - -ifeq ($(BUILD_OPT), 1) -GENEXPARGS=OPTIMIZE $(LDAPVERS) $(LDAPVERS_SUFFIX) -else -GENEXPARGS=DEBUG $(LDAPVERS) $(LDAPVERS_SUFFIX) -endif - -all: - @echo - @echo "This Makefile is intended to be run on a Unix box" - @echo "and will generated the necessary .def files for " - @echo "a Windows build. There is probably no reason why" - @echo "it has been run on Unix other than a long and" - @echo "glorius history :-)" - @echo - @echo "The valid options are:" - @echo "exportfiles - generate exportfiles - @echo "forceall - touch all of the tdf files - @echo "clean - clean up generated files - @echo - - -exportfiles: $(DEFLDAPW32).def $(DEFLDAPSSLW32).def \ - $(DEFLDAPW32CLIENT).def \ - $(DEFLDAPW16).def $(DEFLDAPW16REV).def \ - $(DEFLDSSLW32).def \ - $(DEFLDPRW32).def $(DEFLDPRINCL).def \ - $(DEFNSSLDAPW32).def - -PRLDAPEX =libprldap/libprldap.ex -LDAPSSLEX =libldap_ssl.ex -LDAPEX =libldap.ex - -# -# All the various flavors of Windows: -# - -$(DEFLDAPW32).def: $(DEFLDAPW32).tdf $(LDAPEX) $(OTHERDEFDEPS) - $(GENEXPORTS) Win32 $< $(LDAPEX) $(GENEXPARGS) > $@ - -$(DEFLDAPSSLW32).def: $(DEFLDAPSSLW32).tdf $(LDAPSSLEX) $(OTHERDEFDEPS) - $(GENEXPORTS) Win32 $< $(LDAPSSLEX) $(GENEXPARGS) > $@ - -$(DEFNSSLDAPW32).def: $(DEFNSSLDAPW32).tdf $(LDAPSSLEX) $(OTHERDEFDEPS) - $(GENEXPORTS) Win32 $< $(LDAPSSLEX) $(GENEXPARGS) > $@ - -$(DEFLDAPW32CLIENT).def: $(DEFLDAPW32CLIENT).tdf $(LDAPEX) $(OTHERDEFDEPS) - $(GENEXPORTS) Win32 $< $(LDAPEX) $(GENEXPARGS) > $@ - -$(DEFLDAPW16).def: $(DEFLDAPW16).tdf $(LDAPEX) $(OTHERDEFDEPS) - $(GENEXPORTS) Win16 $< $(LDAPEX) $(GENEXPARGS) > $@ - -$(DEFLDAPW16REV).def: $(DEFLDAPW16REV).tdf $(LDAPEX) $(OTHERDEFDEPS) - $(GENEXPORTS) Win16Rev $< $(LDAPEX) $(GENEXPARGS) > $@ - -$(DEFLDSSLW32).def: $(DEFLDSSLW32).tdf $(LDAPSSLEX) $(OTHERDEFDEPS) - $(GENEXPORTS) Win32 $< $(LDAPSSLEX) $(GENEXPARGS) > $@ - -$(DEFLDPRW32).def: $(DEFLDPRW32).tdf $(PRLDAPEX) $(OTHERDEFDEPS) - $(GENEXPORTS) Win32 $< $(PRLDAPEX) $(GENEXPARGS) > $@ - -$(DEFLDPRINCL).def: $(DEFLDPRINCL).tdf $(PRLDAPEX) $(OTHERDEFDEPS) - $(GENEXPORTS) Win32 $< $(PRLDAPEX) $(GENEXPARGS) > $@ - -ifeq ($(USE_DLL_EXPORTS_FILE), 1) -# generic rules to create standard export/map files -$(OBJDEST)/$(EXPLDAP).exp: $(LDAPEX) $(OTHERDEFDEPS) - $(GENEXPORTS) $(ARCH) Standard $< $(GENEXPARGS) > $@ - -$(OBJDEST)/$(EXPLDSSL).exp: $(LDAPSSLEX) $(OTHERDEFDEPS) - $(GENEXPORTS) $(ARCH) Standard $< $(GENEXPARGS) > $@ - -$(OBJDEST)/$(EXPLDPR).exp: $(PRLDAPEX) $(OTHERDEFDEPS) - $(GENEXPORTS) $(ARCH) Standard $< $(GENEXPARGS) > $@ -endif - -forceall: FORCE - touch $(TDFFILES) - -clean: FORCE - $(RM) $(DEFFILES) - -FORCE: diff --git a/mozilla/directory/c-sdk/ldap/libraries/libiutil/Makefile b/mozilla/directory/c-sdk/ldap/libraries/libiutil/Makefile deleted file mode 100644 index d6f041c96f6..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libiutil/Makefile +++ /dev/null @@ -1,46 +0,0 @@ - -# -# GNU Makefile for libiutil -# - -LDAP_SRC = ../.. -MCOM_ROOT = ../../../.. - -NOSTDCLEAN=true # don't let nsconfig.mk define target clean -NOSTDSTRIP=true # don't let nsconfig.mk define target strip -NSPR20=true # probably should be defined somewhere else (not sure where) - -OBJDEST = $(OBJDIR)/lib/libiutil -LIBDIR = $(LDAP_LIBDIR) - -include $(MCOM_ROOT)/netsite/nsdefs.mk -include $(MCOM_ROOT)/netsite/nsconfig.mk -include $(LDAP_SRC)/nsldap.mk - -CFLAGS += $(SLCFLAGS) - -LIBIUTIL_OBJS= iutil-lock.o - -OBJS = $(addprefix $(OBJDEST)/, $(LIBIUTIL_OBJS)) - -LIBIUTIL= $(addprefix $(LIBDIR)/, libiutil.$(LIB_SUFFIX)) - -clientSDK: all - -all: $(OBJDEST) $(LIBDIR) $(LIBIUTIL) - -$(LIBDIR): - $(MKDIR) $(LIBDIR) - -$(LIBIUTIL): $(OBJS) - $(LINK_LIB) - -veryclean: clean - -clean: - $(RM) $(OBJS) - $(RM) $(LIBIUTIL) - -$(OBJDEST): - $(MKDIR) $(OBJDEST) - diff --git a/mozilla/directory/c-sdk/ldap/libraries/libiutil/Makefile.client b/mozilla/directory/c-sdk/ldap/libraries/libiutil/Makefile.client deleted file mode 100644 index 3aceb1fa484..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libiutil/Makefile.client +++ /dev/null @@ -1,103 +0,0 @@ -# -# The contents of this file are subject to the Netscape Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/NPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is Mozilla Communicator client code, released -# March 31, 1998. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-1999 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -DEPTH = ../../../../.. -NS_DEPTH = ../../../.. -LDAP_SRC = ../.. -NSCP_DISTDIR = ../../../../../dist -NSPR_TREE = ../../.. -MOD_DEPTH = ../../.. - -include $(NSPR_TREE)/config/rules.mk -include ../../../build.mk - -ifeq ($(HAVE_CCONF), 1) -SRCS = iutil-lock.c -else -SRCS = iutil-lock.c -endif - -ifeq ($(OS_ARCH), WINNT) -REALOBJS = $(SRCS:.c=.obj) -else -REALOBJS = $(SRCS:.c=.o) -endif - -IUTILOBJDEST = $(OBJDIR_NAME) -OBJS = $(addprefix $(IUTILOBJDEST)/, $(REALOBJS)) - -DISTHDIR = $(NSCP_DISTDIR)/public/ldap -HDIR = $(LDAP_SRC)/include - -ifeq ($(OS_ARCH), WINNT) -LIBIUTIL = $(addprefix $(IUTILOBJDEST)/, $(IUTIL_LIBNAME).$(LIB_SUFFIX)) -else -LIBIUTIL = $(addprefix $(IUTILOBJDEST)/, \ - lib$(IUTIL_LIBNAME).$(LIB_SUFFIX)) -endif -INSTALLDIR = $(DEPTH)/dist/$(OBJDIR_NAME) - -LOCAL_INCLUDES = -I$(PUBLIC)/nspr -INCLUDES += -I$(DISTHDIR) -I$(HDIR) -I$(INSTALLDIR)/include -I../../../../../dist/include -ifeq ($(HAVE_CCONF), 1) -INCLUDES += -I../libldap/ -endif -DEFINES += $(DEFS) - -PLATFORMCFLAGS = -DUSE_WAITPID -DNEEDPROTOS -PLATFORMLIBS = -THREADS = -THREADSLIB = - -########################################################################### - -versiont.c: Makefile.client Version.c - @$(RM) $@ - @(u="$${USER-root}" v="$(shell cat ../../build/version)" d="$(shell pwd)" \ - h="$(shell hostname)" t="$(shell date)"; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -all:: $(OBJDEST) $(LIBDIR) $(OBJS) $(LIBIUTIL) - -$(LIBDIR): - $(MKDIR) $(LIBDIR) - -$(LIBIUTIL): $(OBJS) $(LIBDIR) - @echo ======= making $(LIBIUTIL) -ifdef SO_FILES_TO_REMOVE - -$(RM) $(SO_FILES_TO_REMOVE) -endif - $(LINK_LIB) - -veryclean:: clean - -clean:: - $(RM) $(OBJS) $(LIBIUTIL) - $(RM) -r $(IUTILOBJDEST) - -$(OBJDEST): - $(MKDIR) $(OBJDEST) - -install:: $(LIBIUTIL) - $(INSTALL) -m 444 $(LIBIUTIL) $(INSTALLDIR)/lib diff --git a/mozilla/directory/c-sdk/ldap/libraries/libiutil/README b/mozilla/directory/c-sdk/ldap/libraries/libiutil/README deleted file mode 100644 index 608cca33b3e..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libiutil/README +++ /dev/null @@ -1,3 +0,0 @@ -There should be no reason for anyone to be using the -library which is produced in this directory.....it is -for mhein@netscape.com's use only diff --git a/mozilla/directory/c-sdk/ldap/libraries/libiutil/iutil-lock.c b/mozilla/directory/c-sdk/ldap/libraries/libiutil/iutil-lock.c deleted file mode 100644 index 0fdae2495eb..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libiutil/iutil-lock.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Public interface for libiutil the innosoft migration library - * - */ - -#ifdef _WINDOWS - -#include "ldap.h" - -#define LDAP_MUTEX_T HANDLE - -int -pthread_mutex_init( LDAP_MUTEX_T *mp, void *attr) -{ - if ( (*mp = CreateMutex(NULL, FALSE, NULL)) == NULL ) - return( 1 ); - else - return( 0 ); -} - -static void * -pthread_mutex_alloc( void ) -{ - LDAP_MUTEX_T *mutexp; - - if ( (mutexp = malloc( sizeof(LDAP_MUTEX_T) )) != NULL ) { - pthread_mutex_init( mutexp, NULL ); - } - return( mutexp ); -} - -int -pthread_mutex_destroy( LDAP_MUTEX_T *mp ) -{ - if ( !(CloseHandle(*mp)) ) - return( 1 ); - else - return( 0 ); -} - -static void -pthread_mutex_free( void *mutexp ) -{ - pthread_mutex_destroy( (LDAP_MUTEX_T *) mutexp ); - free( mutexp ); -} - -int -pthread_mutex_lock( LDAP_MUTEX_T *mp ) -{ - if ( (WaitForSingleObject(*mp, INFINITE) != WAIT_OBJECT_0) ) - return( 1 ); - else - return( 0 ); -} - - -int -pthread_mutex_unlock( LDAP_MUTEX_T *mp ) -{ - if ( !(ReleaseMutex(*mp)) ) - return( 1 ); - else - return( 0 ); -} -#endif /* WINDOWS */ diff --git a/mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.client b/mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.client deleted file mode 100644 index 5f8aec95800..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.client +++ /dev/null @@ -1,97 +0,0 @@ -# -# The contents of this file are subject to the Netscape Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/NPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is Mozilla Communicator client code, released -# March 31, 1998. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-1999 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -DEPTH = ../../../../.. -NS_DEPTH = ../../../.. -LDAP_SRC = ../.. -NSCP_DISTDIR = ../../../../../dist -NSPR_TREE = ../../.. -MOD_DEPTH = ../../.. - -include $(NSPR_TREE)/config/rules.mk -include ../../../build.mk - -SRCS = decode.c \ - encode.c \ - io.c \ - bprint.c - -ifeq ($(OS_ARCH), WINNT) -REALOBJS = $(SRCS:.c=.obj) -else -REALOBJS = $(SRCS:.c=.o) -endif - -LBEROBJDEST = $(OBJDIR_NAME) -OBJS = $(addprefix $(LBEROBJDEST)/, $(REALOBJS)) - -HDIR = $(LDAP_SRC)/include - -ifeq ($(OS_ARCH), WINNT) -LIBLBER = $(addprefix $(LBEROBJDEST)/, $(LBER_LIBNAME).$(LIB_SUFFIX)) -else -LIBLBER = $(addprefix $(LBEROBJDEST)/, lib$(LBER_LIBNAME).$(LIB_SUFFIX)) -endif -INSTALLDIR = $(DEPTH)/dist/$(OBJDIR_NAME) - -LOCAL_INCLUDES = -INCLUDES += -I$(HDIR) -I$(INSTALLDIR)/include -I../../../../../dist/include -DEFINES += $(DEFS) - -PLATFORMCFLAGS = -DUSE_WAITPID -DNEEDPROTOS -PLATFORMLIBS = -THREADS = -THREADSLIB = - -########################################################################### - -versiont.c: Makefile.client Version.c - @$(RM) $@ - @(u="$${USER-root}" v="$(shell cat ../../build/version)" d="$(shell pwd)" \ - h="$(shell hostname)" t="$(shell date)"; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -all:: $(OBJDEST) $(LIBDIR) $(OBJS) $(LIBLBER) - -$(LIBDIR): - $(MKDIR) $(LIBDIR) - -$(LIBLBER): $(OBJS) $(LIBDIR) - @echo ======= making $(LIBLBER) -ifdef SO_FILES_TO_REMOVE - -$(RM) $(SO_FILES_TO_REMOVE) -endif - $(LINK_LIB) - -veryclean:: clean - -clean:: - $(RM) $(OBJS) $(LIBLBER) - $(RM) -r $(LBEROBJDEST) - -$(OBJDEST): - $(MKDIR) $(OBJDEST) - -install:: $(LIBLBER) - $(INSTALL) -m 444 $(LIBLBER) $(INSTALLDIR)/lib diff --git a/mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.in b/mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.in deleted file mode 100644 index 0c7d67de219..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.in +++ /dev/null @@ -1,80 +0,0 @@ -DEPTH = ../../../../.. -NS_DEPTH = ../../../.. -srcdir = @srcdir@ -ldaptopsrcdir = @top_srcdir@ - -RM = rm -f -SED = sed - -SRCS = decode.c \ - encode.c \ - io.c \ - bprint.c - -REALOBJS = $(SRCS:.c=.o) - -#OBJS = $(REALOBJS) versiont.o -OBJS = $(REALOBJS) - -HDIR = $(ldaptopsrcdir)/include - -LIBRARY_NAME = lber41 - -# -# DEFS are included in CFLAGS -# -DEFS = $(PLATFORMCFLAGS) $(LDAP_DEBUG) $(KERBEROS) $(AFSKERBEROS) \ - $(UOFM) $(UOFA) $(NO_USERINTERFACE) $(CLDAP) $(NO_CACHE) \ - $(LDAP_REFERRALS) $(LDAP_DNS) $(STR_TRANSLATION) \ - $(LIBLDAP_CHARSETS) $(LIBLDAP_DEF_CHARSET) \ - $(SLAPD_BACKENDS) $(LDBMBACKEND) $(LDBMINCLUDE) $(PHONETIC) - -include ../../build/autoconf.mk -include $(NSPR_TREE)/config/rules.mk - -LOCAL_INCLUDES = -I$(PUBLIC)/nspr -INCLUDES += -I$(HDIR) -DEFINES += $(DEFS) - -PLATFORMCFLAGS = -DUSE_WAITPID -DNEEDPROTOS -PLATFORMLIBS = -THREADS = -THREADSLIB = - -# -# To build slapd (the stand-alone ldap daemon), uncomment the MAKESLAPD -# line and select the SLAPD_BACKENDS you want to use. If you enable the -# LDBM backend, also select one of the LDBM backends. -# -MAKESLAPD = yes -SLAPD_BACKENDS = -DLDAP_LDBM -DLDAP_SHELL -DLDAP_PASSWD -LDBMBACKEND = -DLDBM_USE_NDBM - -# -# uncomment this line to enable debugging code (a good idea) -# -ifndef BUILD_OPT -LDAP_DEBUG = -DLDAP_DEBUG -endif - -# -# uncomment this line to enable support for LDAP referrals in libldap -# -LDAP_REFERRALS = -DLDAP_REFERRALS - -########################################################################### - -versiont.c: Makefile.client Version.c - @$(RM) $@ - @(u="$${USER-root}" v="$(shell cat ../../build/version)" d="$(shell pwd)" \ - h="$(shell hostname)" t="$(shell date)"; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install:: $(LIBRARY) $(SHARED_LIBRARY) - $(INSTALL) -m 444 $(LIBRARY) $(DIST)/lib -ifdef MKSHLIB - $(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/lib - $(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/bin -endif diff --git a/mozilla/directory/c-sdk/ldap/libraries/liblber/bprint.c b/mozilla/directory/c-sdk/ldap/libraries/liblber/bprint.c deleted file mode 100644 index 34b648456bd..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/liblber/bprint.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* bprint.c - a printing utility for debuging output */ -#include -#include "lber-int.h" - -#ifdef LDAP_DEBUG -/* - * Print arbitrary stuff, for debugging. - */ - -#define BPLEN 48 - -void -lber_bprint( char *data, int len ) -{ - static char hexdig[] = "0123456789abcdef"; - char out[ BPLEN ]; - int i = 0; - - memset( out, 0, BPLEN ); - for ( ;; ) { - if ( len < 1 ) { - char msg[BPLEN + 80]; - sprintf( msg, "\t%s\n", ( i == 0 ) ? "(end)" : out ); - ber_err_print( msg ); - break; - } - -#ifndef HEX - if ( isgraph( (unsigned char)*data )) { - out[ i ] = ' '; - out[ i+1 ] = *data; - } else { -#endif - out[ i ] = hexdig[ ( *data & 0xf0 ) >> 4 ]; - out[ i+1 ] = hexdig[ *data & 0x0f ]; -#ifndef HEX - } -#endif - i += 2; - len--; - data++; - - if ( i > BPLEN - 2 ) { - char msg[BPLEN + 80]; - sprintf( msg, "\t%s\n", out ); - ber_err_print( msg ); - memset( out, 0, BPLEN ); - i = 0; - continue; - } - out[ i++ ] = ' '; - } -} - -#endif - -void ber_err_print( char *data ) -{ -#ifdef USE_DEBUG_WIN - OutputDebugString( data ); -#else - fputs( data, stderr ); - fflush( stderr ); -#endif -} diff --git a/mozilla/directory/c-sdk/ldap/libraries/liblber/decode.c b/mozilla/directory/c-sdk/ldap/libraries/liblber/decode.c deleted file mode 100644 index 2d6c4f618c9..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/liblber/decode.c +++ /dev/null @@ -1,759 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1990 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -/* decode.c - ber input decoding routines */ - -#include "lber-int.h" - -/* - * Note: ber_get_tag() only uses the ber_end and ber_ptr elements of ber. - * If that changes, the ber_peek_tag() and/or ber_skip_tag() implementations - * will need to be changed. - */ -/* return the tag - LBER_DEFAULT returned means trouble */ -unsigned long -LDAP_CALL -ber_get_tag( BerElement *ber ) -{ - unsigned char xbyte; - unsigned long tag; - char *tagp; - int i; - - if ( ber_read( ber, (char *) &xbyte, 1 ) != 1 ) - return( LBER_DEFAULT ); - - if ( (xbyte & LBER_BIG_TAG_MASK) != LBER_BIG_TAG_MASK ) - return( (unsigned long) xbyte ); - - tagp = (char *) &tag; - tagp[0] = xbyte; - for ( i = 1; i < sizeof(long); i++ ) { - if ( ber_read( ber, (char *) &xbyte, 1 ) != 1 ) - return( LBER_DEFAULT ); - - tagp[i] = xbyte; - - if ( ! (xbyte & LBER_MORE_TAG_MASK) ) - break; - } - - /* tag too big! */ - if ( i == sizeof(long) ) - return( LBER_DEFAULT ); - - /* want leading, not trailing 0's */ - return( tag >> (sizeof(long) - i - 1) ); -} - -/* - * Note: ber_skip_tag() only uses the ber_end and ber_ptr elements of ber. - * If that changes, the implementation of ber_peek_tag() will need to - * be changed. - */ -unsigned long -LDAP_CALL -ber_skip_tag( BerElement *ber, unsigned long *len ) -{ - unsigned long tag; - unsigned char lc; - int noctets, diff; - unsigned long netlen; - - /* - * Any ber element looks like this: tag length contents. - * Assuming everything's ok, we return the tag byte (we - * can assume a single byte), and return the length in len. - * - * Assumptions: - * 1) definite lengths - * 2) primitive encodings used whenever possible - */ - - /* - * First, we read the tag. - */ - - if ( (tag = ber_get_tag( ber )) == LBER_DEFAULT ) - return( LBER_DEFAULT ); - - /* - * Next, read the length. The first byte contains the length of - * the length. If bit 8 is set, the length is the long form, - * otherwise it's the short form. We don't allow a length that's - * greater than what we can hold in an unsigned long. - */ - - *len = netlen = 0; - if ( ber_read( ber, (char *) &lc, 1 ) != 1 ) - return( LBER_DEFAULT ); - if ( lc & 0x80 ) { - noctets = (lc & 0x7f); - if ( noctets > sizeof(unsigned long) ) - return( LBER_DEFAULT ); - diff = sizeof(unsigned long) - noctets; - if ( ber_read( ber, (char *) &netlen + diff, noctets ) - != noctets ) - return( LBER_DEFAULT ); - *len = LBER_NTOHL( netlen ); - } else { - *len = lc; - } - - return( tag ); -} - - -/* - * Note: Previously, we passed the "ber" parameter directly to ber_skip_tag(), - * saving and restoring the ber_ptr element only. We now take advantage - * of the fact that the only ber structure elements touched by ber_skip_tag() - * are ber_end and ber_ptr. If that changes, this code must change too. - */ -unsigned long -LDAP_CALL -ber_peek_tag( BerElement *ber, unsigned long *len ) -{ - BerElement bercopy; - - bercopy.ber_end = ber->ber_end; - bercopy.ber_ptr = ber->ber_ptr; - return( ber_skip_tag( &bercopy, len )); -} - -static int -ber_getnint( BerElement *ber, long *num, int len ) -{ - int i; - long value; - unsigned char buffer[sizeof(long)]; - /* - * The tag and length have already been stripped off. We should - * be sitting right before len bytes of 2's complement integer, - * ready to be read straight into an int. We may have to sign - * extend after we read it in. - */ - - if ( len > sizeof(long) ) - return( -1 ); - - /* read into the low-order bytes of netnum */ - if ( ber_read( ber, (char *) buffer, len ) != len ) - return( -1 ); - - /* This sets the required sign extension */ - if ( len != 0) { - value = 0x80 & buffer[0] ? (-1L) : 0; - } else { - value = 0; - } - - for ( i = 0; i < len; i++ ) - value = (value << 8) | buffer[i]; - - *num = value; - - return( len ); -} - -unsigned long -LDAP_CALL -ber_get_int( BerElement *ber, long *num ) -{ - unsigned long tag, len; - - if ( (tag = ber_skip_tag( ber, &len )) == LBER_DEFAULT ) - return( LBER_DEFAULT ); - - /* - * len is being demoted to a long here -- possible conversion error - */ - - if ( ber_getnint( ber, num, (int)len ) != (long)len ) - return( LBER_DEFAULT ); - else - return( tag ); -} - -unsigned long -LDAP_CALL -ber_get_stringb( BerElement *ber, char *buf, unsigned long *len ) -{ - unsigned long datalen, tag; -#ifdef STR_TRANSLATION - char *transbuf; -#endif /* STR_TRANSLATION */ - - if ( (tag = ber_skip_tag( ber, &datalen )) == LBER_DEFAULT ) - return( LBER_DEFAULT ); - if ( datalen > (*len - 1) ) - return( LBER_DEFAULT ); - - /* - * datalen is being demoted to a long here -- possible conversion error - */ - - if ( ber_read( ber, buf, datalen ) != (long) datalen ) - return( LBER_DEFAULT ); - - buf[datalen] = '\0'; - -#ifdef STR_TRANSLATION - if ( datalen > 0 && ( ber->ber_options & LBER_OPT_TRANSLATE_STRINGS ) - != 0 && ber->ber_decode_translate_proc != NULL ) { - transbuf = buf; - ++datalen; - if ( (*(ber->ber_decode_translate_proc))( &transbuf, &datalen, - 0 ) != 0 ) { - return( LBER_DEFAULT ); - } - if ( datalen > *len ) { - NSLBERI_FREE( transbuf ); - return( LBER_DEFAULT ); - } - SAFEMEMCPY( buf, transbuf, datalen ); - NSLBERI_FREE( transbuf ); - --datalen; - } -#endif /* STR_TRANSLATION */ - - *len = datalen; - return( tag ); -} - -unsigned long -LDAP_CALL -ber_get_stringa( BerElement *ber, char **buf ) -{ - unsigned long datalen, ndatalen, tag; - - if ( (tag = ber_skip_tag( ber, &datalen )) == LBER_DEFAULT ) - return( LBER_DEFAULT ); - - if ( ((ndatalen = (size_t)datalen + 1) < (size_t) datalen) || - ( (*buf = (char *)NSLBERI_MALLOC( (size_t)ndatalen )) == NULL )) - return( LBER_DEFAULT ); - - /* - * datalen is being demoted to a long here -- possible conversion error - */ - if ( ber_read( ber, *buf, datalen ) != (long) datalen ) - return( LBER_DEFAULT ); - (*buf)[datalen] = '\0'; - -#ifdef STR_TRANSLATION - if ( datalen > 0 && ( ber->ber_options & LBER_OPT_TRANSLATE_STRINGS ) - != 0 && ber->ber_decode_translate_proc != NULL ) { - ++datalen; - if ( (*(ber->ber_decode_translate_proc))( buf, &datalen, 1 ) - != 0 ) { - NSLBERI_FREE( *buf ); - return( LBER_DEFAULT ); - } - } -#endif /* STR_TRANSLATION */ - - return( tag ); -} - -unsigned long -LDAP_CALL -ber_get_stringal( BerElement *ber, struct berval **bv ) -{ - unsigned long len, nlen, tag; - - if ( (*bv = (struct berval *)NSLBERI_MALLOC( sizeof(struct berval) )) - == NULL ) { - return( LBER_DEFAULT ); - } - - if ( (tag = ber_skip_tag( ber, &len )) == LBER_DEFAULT ) { - return( LBER_DEFAULT ); - } - - if ( ((nlen = (size_t) len + 1) < (size_t)len) || - (((*bv)->bv_val = (char *)NSLBERI_MALLOC( (size_t)nlen )) - == NULL )) { - return( LBER_DEFAULT ); - } - - /* - * len is being demoted to a long here -- possible conversion error - */ - if ( ber_read( ber, (*bv)->bv_val, len ) != (int) len ) - return( LBER_DEFAULT ); - ((*bv)->bv_val)[len] = '\0'; - (*bv)->bv_len = len; - -#ifdef STR_TRANSLATION - if ( len > 0 && ( ber->ber_options & LBER_OPT_TRANSLATE_STRINGS ) != 0 - && ber->ber_decode_translate_proc != NULL ) { - ++len; - if ( (*(ber->ber_decode_translate_proc))( &((*bv)->bv_val), - &len, 1 ) != 0 ) { - NSLBERI_FREE( (*bv)->bv_val ); - return( LBER_DEFAULT ); - } - (*bv)->bv_len = len - 1; - } -#endif /* STR_TRANSLATION */ - - return( tag ); -} - -unsigned long -LDAP_CALL -ber_get_bitstringa( BerElement *ber, char **buf, unsigned long *blen ) -{ - unsigned long datalen, tag; - unsigned char unusedbits; - - if ( (tag = ber_skip_tag( ber, &datalen )) == LBER_DEFAULT ) - return( LBER_DEFAULT ); - --datalen; - - if ( (*buf = (char *)NSLBERI_MALLOC( (size_t)datalen )) == NULL ) - return( LBER_DEFAULT ); - - if ( ber_read( ber, (char *)&unusedbits, 1 ) != 1 ) - return( LBER_DEFAULT ); - - /* - * datalen is being demoted to a long here -- possible conversion error - */ - if ( ber_read( ber, *buf, datalen ) != (long) datalen ) - return( LBER_DEFAULT ); - - *blen = datalen * 8 - unusedbits; - return( tag ); -} - -unsigned long -LDAP_CALL -ber_get_null( BerElement *ber ) -{ - unsigned long len, tag; - - if ( (tag = ber_skip_tag( ber, &len )) == LBER_DEFAULT ) - return( LBER_DEFAULT ); - - if ( len != 0 ) - return( LBER_DEFAULT ); - - return( tag ); -} - -unsigned long -LDAP_CALL -ber_get_boolean( BerElement *ber, int *boolval ) -{ - long longbool; - int rc; - - rc = ber_get_int( ber, &longbool ); - *boolval = longbool; - - return( rc ); -} - -unsigned long -LDAP_CALL -ber_first_element( BerElement *ber, unsigned long *len, char **last ) -{ - /* skip the sequence header, use the len to mark where to stop */ - if ( ber_skip_tag( ber, len ) == LBER_DEFAULT ) { - return( LBER_ERROR ); - } - - *last = ber->ber_ptr + *len; - - if ( *last == ber->ber_ptr ) { - return( LBER_END_OF_SEQORSET ); - } - - return( ber_peek_tag( ber, len ) ); -} - -unsigned long -LDAP_CALL -ber_next_element( BerElement *ber, unsigned long *len, char *last ) -{ - if ( ber->ber_ptr == last ) { - return( LBER_END_OF_SEQORSET ); - } - - return( ber_peek_tag( ber, len ) ); -} - -/* VARARGS */ -unsigned long -LDAP_C -ber_scanf( BerElement *ber, const char *fmt, ... ) -{ - va_list ap; - char *last, *p; - char *s, **ss, ***sss; - struct berval ***bv, **bvp, *bval; - int *i, j; - long *l, rc, tag; - unsigned long *t; - unsigned long len; - size_t array_size; - - va_start( ap, fmt ); - -#ifdef LDAP_DEBUG - if ( lber_debug & 64 ) { - char msg[80]; - sprintf( msg, "ber_scanf fmt (%s) ber:\n", fmt ); - ber_err_print( msg ); - ber_dump( ber, 1 ); - } -#endif - for ( rc = 0, p = (char *) fmt; *p && rc != LBER_DEFAULT; p++ ) { - switch ( *p ) { - case 'a': /* octet string - allocate storage as needed */ - ss = va_arg( ap, char ** ); - rc = ber_get_stringa( ber, ss ); - break; - - case 'b': /* boolean */ - i = va_arg( ap, int * ); - rc = ber_get_boolean( ber, i ); - break; - - case 'e': /* enumerated */ - case 'i': /* int */ - l = va_arg( ap, long * ); - rc = ber_get_int( ber, l ); - break; - - case 'l': /* length of next item */ - l = va_arg( ap, long * ); - rc = ber_peek_tag( ber, (unsigned long *)l ); - break; - - case 'n': /* null */ - rc = ber_get_null( ber ); - break; - - case 's': /* octet string - in a buffer */ - s = va_arg( ap, char * ); - l = va_arg( ap, long * ); - rc = ber_get_stringb( ber, s, (unsigned long *)l ); - break; - - case 'o': /* octet string in a supplied berval */ - bval = va_arg( ap, struct berval * ); - ber_peek_tag( ber, &bval->bv_len ); - rc = ber_get_stringa( ber, &bval->bv_val ); - break; - - case 'O': /* octet string - allocate & include length */ - bvp = va_arg( ap, struct berval ** ); - rc = ber_get_stringal( ber, bvp ); - break; - - case 'B': /* bit string - allocate storage as needed */ - ss = va_arg( ap, char ** ); - l = va_arg( ap, long * ); /* for length, in bits */ - rc = ber_get_bitstringa( ber, ss, (unsigned long *)l ); - break; - - case 't': /* tag of next item */ - t = va_arg( ap, unsigned long * ); - *t = rc = ber_peek_tag( ber, &len ); - break; - - case 'T': /* skip tag of next item */ - t = va_arg( ap, unsigned long * ); - *t = rc = ber_skip_tag( ber, &len ); - break; - - case 'v': /* sequence of strings */ - sss = va_arg( ap, char *** ); - *sss = NULL; - j = 0; - array_size = 0; - for ( tag = ber_first_element( ber, &len, &last ); - tag != LBER_DEFAULT && tag != LBER_END_OF_SEQORSET - && rc != LBER_DEFAULT; - tag = ber_next_element( ber, &len, last ) ) { - if ( *sss == NULL ) { - /* Make room for at least 15 strings */ - *sss = (char **)NSLBERI_MALLOC(16 * sizeof(char *) ); - array_size = 16; - } else { - if ( (size_t)(j+2) > array_size) { - /* We'v overflowed our buffer */ - *sss = (char **)NSLBERI_REALLOC( *sss, (array_size * 2) * sizeof(char *) ); - array_size = array_size * 2; - } - } - rc = ber_get_stringa( ber, &((*sss)[j]) ); - j++; - } - if ( rc != LBER_DEFAULT && - tag != LBER_END_OF_SEQORSET ) { - rc = LBER_DEFAULT; - } - if ( j > 0 ) - (*sss)[j] = NULL; - break; - - case 'V': /* sequence of strings + lengths */ - bv = va_arg( ap, struct berval *** ); - *bv = NULL; - j = 0; - for ( tag = ber_first_element( ber, &len, &last ); - tag != LBER_DEFAULT && tag != LBER_END_OF_SEQORSET - && rc != LBER_DEFAULT; - tag = ber_next_element( ber, &len, last ) ) { - if ( *bv == NULL ) { - *bv = (struct berval **)NSLBERI_MALLOC( - 2 * sizeof(struct berval *) ); - } else { - *bv = (struct berval **)NSLBERI_REALLOC( - *bv, - (j + 2) * sizeof(struct berval *) ); - } - rc = ber_get_stringal( ber, &((*bv)[j]) ); - j++; - } - if ( rc != LBER_DEFAULT && - tag != LBER_END_OF_SEQORSET ) { - rc = LBER_DEFAULT; - } - if ( j > 0 ) - (*bv)[j] = NULL; - break; - - case 'x': /* skip the next element - whatever it is */ - if ( (rc = ber_skip_tag( ber, &len )) == LBER_DEFAULT ) - break; - ber->ber_ptr += len; - break; - - case '{': /* begin sequence */ - case '[': /* begin set */ - if ( *(p + 1) != 'v' && *(p + 1) != 'V' ) - rc = ber_skip_tag( ber, &len ); - break; - - case '}': /* end sequence */ - case ']': /* end set */ - break; - - default: - { - char msg[80]; - sprintf( msg, "unknown fmt %c\n", *p ); - ber_err_print( msg ); - } - rc = LBER_DEFAULT; - break; - } - } - - va_end( ap ); - - if (rc == LBER_DEFAULT) { - va_start( ap, fmt ); - for ( p--; fmt < p && *fmt; fmt++ ) { - switch ( *fmt ) { - case 'a': /* octet string - allocate storage as needed */ - ss = va_arg( ap, char ** ); - NSLBERI_FREE(*ss); - *ss = NULL; - break; - - case 'b': /* boolean */ - i = va_arg( ap, int * ); - break; - - case 'e': /* enumerated */ - case 'i': /* int */ - l = va_arg( ap, long * ); - break; - - case 'l': /* length of next item */ - l = va_arg( ap, long * ); - break; - - case 'n': /* null */ - break; - - case 's': /* octet string - in a buffer */ - s = va_arg( ap, char * ); - l = va_arg( ap, long * ); - break; - - case 'o': /* octet string in a supplied berval */ - bval = va_arg( ap, struct berval * ); - if (bval->bv_val) NSLBERI_FREE(bval->bv_val); - memset(bval, 0, sizeof(struct berval)); - break; - - case 'O': /* octet string - allocate & include length */ - bvp = va_arg( ap, struct berval ** ); - ber_bvfree(*bvp); - bvp = NULL; - break; - - case 'B': /* bit string - allocate storage as needed */ - ss = va_arg( ap, char ** ); - l = va_arg( ap, long * ); /* for length, in bits */ - if (*ss) NSLBERI_FREE(*ss); - *ss = NULL; - break; - - case 't': /* tag of next item */ - t = va_arg( ap, unsigned long * ); - break; - - case 'T': /* skip tag of next item */ - t = va_arg( ap, unsigned long * ); - break; - - case 'v': /* sequence of strings */ - sss = va_arg( ap, char *** ); - ber_svecfree(*sss); - *sss = NULL; - break; - - case 'V': /* sequence of strings + lengths */ - bv = va_arg( ap, struct berval *** ); - ber_bvecfree(*bv); - *bv = NULL; - break; - - case 'x': /* skip the next element - whatever it is */ - break; - - case '{': /* begin sequence */ - case '[': /* begin set */ - break; - - case '}': /* end sequence */ - case ']': /* end set */ - break; - - default: - break; - } - } /* for */ - va_end( ap ); - } /* if */ - - return( rc ); -} - -void -LDAP_CALL -ber_bvfree( struct berval *bv ) -{ - if ( bv != NULL ) { - if ( bv->bv_val != NULL ) { - NSLBERI_FREE( bv->bv_val ); - } - NSLBERI_FREE( (char *) bv ); - } -} - -void -LDAP_CALL -ber_bvecfree( struct berval **bv ) -{ - int i; - - if ( bv != NULL ) { - for ( i = 0; bv[i] != NULL; i++ ) { - ber_bvfree( bv[i] ); - } - NSLBERI_FREE( (char *) bv ); - } -} - -struct berval * -LDAP_CALL -ber_bvdup( const struct berval *bv ) -{ - struct berval *new; - - if ( (new = (struct berval *)NSLBERI_MALLOC( sizeof(struct berval) )) - == NULL ) { - return( NULL ); - } - if ( bv->bv_val == NULL ) { - new->bv_val = NULL; - new->bv_len = 0; - } else { - if ( (new->bv_val = (char *)NSLBERI_MALLOC( bv->bv_len + 1 )) - == NULL ) { - return( NULL ); - } - SAFEMEMCPY( new->bv_val, bv->bv_val, (size_t) bv->bv_len ); - new->bv_val[bv->bv_len] = '\0'; - new->bv_len = bv->bv_len; - } - - return( new ); -} - -void -LDAP_CALL -ber_svecfree( char **vals ) -{ - int i; - - if ( vals == NULL ) - return; - for ( i = 0; vals[i] != NULL; i++ ) - NSLBERI_FREE( vals[i] ); - NSLBERI_FREE( (char *) vals ); -} - -#ifdef STR_TRANSLATION -void -LDAP_CALL -ber_set_string_translators( - BerElement *ber, - BERTranslateProc encode_proc, - BERTranslateProc decode_proc -) -{ - ber->ber_encode_translate_proc = encode_proc; - ber->ber_decode_translate_proc = decode_proc; -} -#endif /* STR_TRANSLATION */ diff --git a/mozilla/directory/c-sdk/ldap/libraries/liblber/dtest.c b/mozilla/directory/c-sdk/ldap/libraries/liblber/dtest.c deleted file mode 100644 index 31173e72bad..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/liblber/dtest.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1990 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ -/* dtest.c - lber decoding test program */ - -#include -#include -#ifdef MACOS -#include -#include -#else /* MACOS */ -#ifdef _WIN32 -#include -#else -#include -#include -#endif /* _WIN32 */ -#endif /* MACOS */ -#include "lber.h" - -int -SSL_Recv( int s, char *b, unsigned l, int dummy ) -{ - return( read( s, b, l ) ); -} - -SSL_Send( int s, char *b, unsigned l, int dummy ) -{ - return( write( s, b, l ) ); -} - -static void usage( char *name ) -{ - fprintf( stderr, "usage: %s < berfile\n", name ); -} - -main( int argc, char **argv ) -{ - long i, fd; - unsigned long len; - int tag; - BerElement *ber; - Sockbuf *sb; - extern int lber_debug; - - lber_debug = 255; - if ( argc > 1 ) { - usage( argv[0] ); - exit( 1 ); - } - - sb = ber_sockbuf_alloc(); - fd = 0; - ber_sockbuf_set_option( sb, LBER_SOCKBUF_OPT_DESC, &fd ); - - if ( (ber = der_alloc()) == NULL ) { - perror( "ber_alloc" ); - exit( 1 ); - } - - if ( (tag = ber_get_next( sb, &len, ber )) == LBER_ERROR ) { - perror( "ber_get_next" ); - exit( 1 ); - } - printf( "message has tag 0x%x and length %ld\n", tag, len ); - - return( 0 ); -} diff --git a/mozilla/directory/c-sdk/ldap/libraries/liblber/encode.c b/mozilla/directory/c-sdk/ldap/libraries/liblber/encode.c deleted file mode 100644 index 0fe2e752413..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/liblber/encode.c +++ /dev/null @@ -1,668 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1990 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -/* encode.c - ber output encoding routines */ - -#include "lber-int.h" - -static int -ber_calc_taglen( unsigned long tag ) -{ - int i; - long mask; - - /* find the first non-all-zero byte in the tag */ - for ( i = sizeof(long) - 1; i > 0; i-- ) { - mask = (0xffL << (i * 8)); - /* not all zero */ - if ( tag & mask ) - break; - } - - return( i + 1 ); -} - -static int -ber_put_tag( BerElement *ber, unsigned long tag, int nosos ) -{ - int taglen; - unsigned long ntag; - - taglen = ber_calc_taglen( tag ); - - ntag = LBER_HTONL( tag ); - - return( ber_write( ber, ((char *) &ntag) + sizeof(long) - taglen, - taglen, nosos ) ); -} - -static int -ber_calc_lenlen( unsigned long len ) -{ - /* - * short len if it's less than 128 - one byte giving the len, - * with bit 8 0. - */ - - if ( len <= 0x7F ) - return( 1 ); - - /* - * long len otherwise - one byte with bit 8 set, giving the - * length of the length, followed by the length itself. - */ - - if ( len <= 0xFF ) - return( 2 ); - if ( len <= 0xFFFFL ) - return( 3 ); - if ( len <= 0xFFFFFFL ) - return( 4 ); - - return( 5 ); -} - -static int -ber_put_len( BerElement *ber, unsigned long len, int nosos ) -{ - int i; - char lenlen; - long mask; - unsigned long netlen; - - /* - * short len if it's less than 128 - one byte giving the len, - * with bit 8 0. - */ - - if ( len <= 127 ) { - netlen = LBER_HTONL( len ); - return( ber_write( ber, (char *) &netlen + sizeof(long) - 1, - 1, nosos ) ); - } - - /* - * long len otherwise - one byte with bit 8 set, giving the - * length of the length, followed by the length itself. - */ - - /* find the first non-all-zero byte */ - for ( i = sizeof(long) - 1; i > 0; i-- ) { - mask = (0xffL << (i * 8)); - /* not all zero */ - if ( len & mask ) - break; - } - lenlen = ++i; - if ( lenlen > 4 ) - return( -1 ); - lenlen |= 0x80; - - /* write the length of the length */ - if ( ber_write( ber, &lenlen, 1, nosos ) != 1 ) - return( -1 ); - - /* write the length itself */ - netlen = LBER_HTONL( len ); - if ( ber_write( ber, (char *) &netlen + (sizeof(long) - i), i, nosos ) - != i ) - return( -1 ); - - return( i + 1 ); -} - -static int -ber_put_int_or_enum( BerElement *ber, long num, unsigned long tag ) -{ - int i, sign, taglen; - int len, lenlen; - long netnum, mask; - - sign = (num < 0); - - /* - * high bit is set - look for first non-all-one byte - * high bit is clear - look for first non-all-zero byte - */ - for ( i = sizeof(long) - 1; i > 0; i-- ) { - mask = (0xffL << (i * 8)); - - if ( sign ) { - /* not all ones */ - if ( (num & mask) != mask ) - break; - } else { - /* not all zero */ - if ( num & mask ) - break; - } - } - - /* - * we now have the "leading byte". if the high bit on this - * byte matches the sign bit, we need to "back up" a byte. - */ - mask = (num & (0x80L << (i * 8))); - if ( (mask && !sign) || (sign && !mask) ) - i++; - - len = i + 1; - - if ( (taglen = ber_put_tag( ber, tag, 0 )) == -1 ) - return( -1 ); - - if ( (lenlen = ber_put_len( ber, len, 0 )) == -1 ) - return( -1 ); - i++; - netnum = LBER_HTONL( num ); - if ( ber_write( ber, (char *) &netnum + (sizeof(long) - i), i, 0 ) - == i) - /* length of tag + length + contents */ - return( taglen + lenlen + i ); - - return( -1 ); -} - -int -LDAP_CALL -ber_put_enum( BerElement *ber, long num, unsigned long tag ) -{ - if ( tag == LBER_DEFAULT ) - tag = LBER_ENUMERATED; - - return( ber_put_int_or_enum( ber, num, tag ) ); -} - -int -LDAP_CALL -ber_put_int( BerElement *ber, long num, unsigned long tag ) -{ - if ( tag == LBER_DEFAULT ) - tag = LBER_INTEGER; - - return( ber_put_int_or_enum( ber, num, tag ) ); -} - -int -LDAP_CALL -ber_put_ostring( BerElement *ber, char *str, unsigned long len, - unsigned long tag ) -{ - int taglen, lenlen, rc; -#ifdef STR_TRANSLATION - int free_str; -#endif /* STR_TRANSLATION */ - - if ( tag == LBER_DEFAULT ) - tag = LBER_OCTETSTRING; - - if ( (taglen = ber_put_tag( ber, tag, 0 )) == -1 ) - return( -1 ); - -#ifdef STR_TRANSLATION - if ( len > 0 && ( ber->ber_options & LBER_OPT_TRANSLATE_STRINGS ) != 0 - && ber->ber_encode_translate_proc != NULL ) { - if ( (*(ber->ber_encode_translate_proc))( &str, &len, 0 ) - != 0 ) { - return( -1 ); - } - free_str = 1; - } else { - free_str = 0; - } -#endif /* STR_TRANSLATION */ - - /* - * Note: below is a spot where we limit ber_write - * to signed long (instead of unsigned long) - */ - - if ( (lenlen = ber_put_len( ber, len, 0 )) == -1 || - ber_write( ber, str, len, 0 ) != (long) len ) { - rc = -1; - } else { - /* return length of tag + length + contents */ - rc = taglen + lenlen + len; - } - -#ifdef STR_TRANSLATION - if ( free_str ) { - NSLBERI_FREE( str ); - } -#endif /* STR_TRANSLATION */ - - return( rc ); -} - -int -LDAP_CALL -ber_put_string( BerElement *ber, char *str, unsigned long tag ) -{ - return( ber_put_ostring( ber, str, strlen( str ), tag )); -} - -int -LDAP_CALL -ber_put_bitstring( BerElement *ber, char *str, - unsigned long blen /* in bits */, unsigned long tag ) -{ - int taglen, lenlen, len; - unsigned char unusedbits; - - if ( tag == LBER_DEFAULT ) - tag = LBER_BITSTRING; - - if ( (taglen = ber_put_tag( ber, tag, 0 )) == -1 ) - return( -1 ); - - len = ( blen + 7 ) / 8; - unusedbits = (unsigned char) (len * 8 - blen); - if ( (lenlen = ber_put_len( ber, len + 1, 0 )) == -1 ) - return( -1 ); - - if ( ber_write( ber, (char *)&unusedbits, 1, 0 ) != 1 ) - return( -1 ); - - if ( ber_write( ber, str, len, 0 ) != len ) - return( -1 ); - - /* return length of tag + length + unused bit count + contents */ - return( taglen + 1 + lenlen + len ); -} - -int -LDAP_CALL -ber_put_null( BerElement *ber, unsigned long tag ) -{ - int taglen; - - if ( tag == LBER_DEFAULT ) - tag = LBER_NULL; - - if ( (taglen = ber_put_tag( ber, tag, 0 )) == -1 ) - return( -1 ); - - if ( ber_put_len( ber, 0, 0 ) != 1 ) - return( -1 ); - - return( taglen + 1 ); -} - -int -LDAP_CALL -ber_put_boolean( BerElement *ber, int boolval, unsigned long tag ) -{ - int taglen; - unsigned char trueval = 0xff; - unsigned char falseval = 0x00; - - if ( tag == LBER_DEFAULT ) - tag = LBER_BOOLEAN; - - if ( (taglen = ber_put_tag( ber, tag, 0 )) == -1 ) - return( -1 ); - - if ( ber_put_len( ber, 1, 0 ) != 1 ) - return( -1 ); - - if ( ber_write( ber, (char *)(boolval ? &trueval : &falseval), 1, 0 ) - != 1 ) - return( -1 ); - - return( taglen + 2 ); -} - -#define FOUR_BYTE_LEN 5 - - -/* the idea here is roughly this: we maintain a stack of these Seqorset - * structures. This is pushed when we see the beginning of a new set or - * sequence. It is popped when we see the end of a set or sequence. - * Since we don't want to malloc and free these structures all the time, - * we pre-allocate a small set of them within the ber element structure. - * thus we need to spot when we've overflowed this stack and fall back to - * malloc'ing instead. - */ -static int -ber_start_seqorset( BerElement *ber, unsigned long tag ) -{ - Seqorset *new_sos; - - /* can we fit into the local stack ? */ - if (ber->ber_sos_stack_posn < SOS_STACK_SIZE) { - /* yes */ - new_sos = &ber->ber_sos_stack[ber->ber_sos_stack_posn]; - } else { - /* no */ - if ( (new_sos = (Seqorset *)NSLBERI_MALLOC( sizeof(Seqorset))) - == NULLSEQORSET ) { - return( -1 ); - } - } - ber->ber_sos_stack_posn++; - - if ( ber->ber_sos == NULLSEQORSET ) - new_sos->sos_first = ber->ber_ptr; - else - new_sos->sos_first = ber->ber_sos->sos_ptr; - - /* Set aside room for a 4 byte length field */ - new_sos->sos_ptr = new_sos->sos_first + ber_calc_taglen( tag ) + FOUR_BYTE_LEN; - new_sos->sos_tag = tag; - - new_sos->sos_next = ber->ber_sos; - new_sos->sos_clen = 0; - - ber->ber_sos = new_sos; - if (ber->ber_sos->sos_ptr > ber->ber_end) { - nslberi_ber_realloc(ber, ber->ber_sos->sos_ptr - ber->ber_end); - } - return( 0 ); -} - -int -LDAP_CALL -ber_start_seq( BerElement *ber, unsigned long tag ) -{ - if ( tag == LBER_DEFAULT ) - tag = LBER_SEQUENCE; - - return( ber_start_seqorset( ber, tag ) ); -} - -int -LDAP_CALL -ber_start_set( BerElement *ber, unsigned long tag ) -{ - if ( tag == LBER_DEFAULT ) - tag = LBER_SET; - - return( ber_start_seqorset( ber, tag ) ); -} - -static int -ber_put_seqorset( BerElement *ber ) -{ - unsigned long len, netlen; - int taglen, lenlen; - unsigned char ltag = 0x80 + FOUR_BYTE_LEN - 1; - Seqorset *next; - Seqorset **sos = &ber->ber_sos; - - /* - * If this is the toplevel sequence or set, we need to actually - * write the stuff out. Otherwise, it's already been put in - * the appropriate buffer and will be written when the toplevel - * one is written. In this case all we need to do is update the - * length and tag. - */ - - len = (*sos)->sos_clen; - netlen = LBER_HTONL( len ); - if ( sizeof(long) > 4 && len > 0xFFFFFFFFUL ) - return( -1 ); - - if ( ber->ber_options & LBER_OPT_USE_DER ) { - lenlen = ber_calc_lenlen( len ); - } else { - lenlen = FOUR_BYTE_LEN; - } - - if ( (next = (*sos)->sos_next) == NULLSEQORSET ) { - /* write the tag */ - if ( (taglen = ber_put_tag( ber, (*sos)->sos_tag, 1 )) == -1 ) - return( -1 ); - - if ( ber->ber_options & LBER_OPT_USE_DER ) { - /* Write the length in the minimum # of octets */ - if ( ber_put_len( ber, len, 1 ) == -1 ) - return( -1 ); - - if (lenlen != FOUR_BYTE_LEN) { - /* - * We set aside FOUR_BYTE_LEN bytes for - * the length field. Move the data if - * we don't actually need that much - */ - SAFEMEMCPY( (*sos)->sos_first + taglen + - lenlen, (*sos)->sos_first + taglen + - FOUR_BYTE_LEN, len ); - } - } else { - /* Fill FOUR_BYTE_LEN bytes for length field */ - /* one byte of length length */ - if ( ber_write( ber, (char *)<ag, 1, 1 ) != 1 ) - return( -1 ); - - /* the length itself */ - if ( ber_write( ber, (char *) &netlen + sizeof(long) - - (FOUR_BYTE_LEN - 1), FOUR_BYTE_LEN - 1, 1 ) - != FOUR_BYTE_LEN - 1 ) - return( -1 ); - } - /* The ber_ptr is at the set/seq start - move it to the end */ - ber->ber_ptr += len; - } else { - unsigned long ntag; - - /* the tag */ - taglen = ber_calc_taglen( (*sos)->sos_tag ); - ntag = LBER_HTONL( (*sos)->sos_tag ); - SAFEMEMCPY( (*sos)->sos_first, (char *) &ntag + - sizeof(long) - taglen, taglen ); - - if ( ber->ber_options & LBER_OPT_USE_DER ) { - ltag = (lenlen == 1) ? (unsigned char)len : - (unsigned char) (0x80 + (lenlen - 1)); - } - - /* one byte of length length */ - SAFEMEMCPY( (*sos)->sos_first + 1, <ag, 1 ); - - if ( ber->ber_options & LBER_OPT_USE_DER ) { - if (lenlen > 1) { - /* Write the length itself */ - SAFEMEMCPY( (*sos)->sos_first + 2, - (char *)&netlen + sizeof(unsigned long) - - (lenlen - 1), - lenlen - 1 ); - } - if (lenlen != FOUR_BYTE_LEN) { - /* - * We set aside FOUR_BYTE_LEN bytes for - * the length field. Move the data if - * we don't actually need that much - */ - SAFEMEMCPY( (*sos)->sos_first + taglen + - lenlen, (*sos)->sos_first + taglen + - FOUR_BYTE_LEN, len ); - } - } else { - /* the length itself */ - SAFEMEMCPY( (*sos)->sos_first + taglen + 1, - (char *) &netlen + sizeof(long) - - (FOUR_BYTE_LEN - 1), FOUR_BYTE_LEN - 1 ); - } - - next->sos_clen += (taglen + lenlen + len); - next->sos_ptr += (taglen + lenlen + len); - } - - /* we're done with this seqorset, so free it up */ - /* was this one from the local stack ? */ - if (ber->ber_sos_stack_posn <= SOS_STACK_SIZE) { - /* yes */ - } else { - /* no */ - NSLBERI_FREE( (char *) (*sos) ); - } - ber->ber_sos_stack_posn--; - *sos = next; - - return( taglen + lenlen + len ); -} - -int -LDAP_CALL -ber_put_seq( BerElement *ber ) -{ - return( ber_put_seqorset( ber ) ); -} - -int -LDAP_CALL -ber_put_set( BerElement *ber ) -{ - return( ber_put_seqorset( ber ) ); -} - -/* VARARGS */ -int -LDAP_C -ber_printf( BerElement *ber, const char *fmt, ... ) -{ - va_list ap; - char *s, **ss; - struct berval **bv; - int rc, i; - unsigned long len; - - va_start( ap, fmt ); - -#ifdef LDAP_DEBUG - if ( lber_debug & 64 ) { - char msg[80]; - sprintf( msg, "ber_printf fmt (%s)\n", fmt ); - ber_err_print( msg ); - } -#endif - - for ( rc = 0; *fmt && rc != -1; fmt++ ) { - switch ( *fmt ) { - case 'b': /* boolean */ - i = va_arg( ap, int ); - rc = ber_put_boolean( ber, i, ber->ber_tag ); - break; - - case 'i': /* int */ - i = va_arg( ap, int ); - rc = ber_put_int( ber, (long)i, ber->ber_tag ); - break; - - case 'e': /* enumeration */ - i = va_arg( ap, int ); - rc = ber_put_enum( ber, (long)i, ber->ber_tag ); - break; - - case 'n': /* null */ - rc = ber_put_null( ber, ber->ber_tag ); - break; - - case 'o': /* octet string (non-null terminated) */ - s = va_arg( ap, char * ); - len = va_arg( ap, int ); - rc = ber_put_ostring( ber, s, len, ber->ber_tag ); - break; - - case 's': /* string */ - s = va_arg( ap, char * ); - rc = ber_put_string( ber, s, ber->ber_tag ); - break; - - case 'B': /* bit string */ - s = va_arg( ap, char * ); - len = va_arg( ap, int ); /* in bits */ - rc = ber_put_bitstring( ber, s, len, ber->ber_tag ); - break; - - case 't': /* tag for the next element */ - ber->ber_tag = va_arg( ap, unsigned long ); - ber->ber_usertag = 1; - break; - - case 'v': /* vector of strings */ - if ( (ss = va_arg( ap, char ** )) == NULL ) - break; - for ( i = 0; ss[i] != NULL; i++ ) { - if ( (rc = ber_put_string( ber, ss[i], - ber->ber_tag )) == -1 ) - break; - } - break; - - case 'V': /* sequences of strings + lengths */ - if ( (bv = va_arg( ap, struct berval ** )) == NULL ) - break; - for ( i = 0; bv[i] != NULL; i++ ) { - if ( (rc = ber_put_ostring( ber, bv[i]->bv_val, - bv[i]->bv_len, ber->ber_tag )) == -1 ) - break; - } - break; - - case '{': /* begin sequence */ - rc = ber_start_seq( ber, ber->ber_tag ); - break; - - case '}': /* end sequence */ - rc = ber_put_seqorset( ber ); - break; - - case '[': /* begin set */ - rc = ber_start_set( ber, ber->ber_tag ); - break; - - case ']': /* end set */ - rc = ber_put_seqorset( ber ); - break; - - default: { - char msg[80]; - sprintf( msg, "unknown fmt %c\n", *fmt ); - ber_err_print( msg ); - rc = -1; - break; - } - } - - if ( ber->ber_usertag == 0 ) - ber->ber_tag = LBER_DEFAULT; - else - ber->ber_usertag = 0; - } - - va_end( ap ); - - return( rc ); -} diff --git a/mozilla/directory/c-sdk/ldap/libraries/liblber/etest.c b/mozilla/directory/c-sdk/ldap/libraries/liblber/etest.c deleted file mode 100644 index a64c2602812..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/liblber/etest.c +++ /dev/null @@ -1,178 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1990 Regents of the University of Michigan. - * All rights reserved. - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -/* test.c - lber encoding test program */ - -#include -#include -#ifdef MACOS -#include -#include -#include -#include -#else /* MACOS */ -#include -#ifdef _WIN32 -#include -#else -#include -#endif /* _WIN32 */ -#endif /* MACOS */ -#include "lber.h" - -int -SSL_Recv( int s, char *b, unsigned l, int dummy ) -{ - return( read( s, b, l ) ); -} - -SSL_Send( int s, char *b, unsigned l, int dummy ) -{ - return( write( s, b, l ) ); -} - -int -getline( char *prompt, char c, char *buf, int bsize ) -{ - char *p; - - if ( prompt != NULL ) { - fprintf( stderr, "%s: ", prompt ); - } else { - fprintf( stderr, "enter value for '%c': ", c ); - } - if ( fgets( buf, bsize, stdin ) == NULL ) { - return( -1 ); - } - if ( (p = strchr( buf, '\n' )) != NULL ) { - *p = '\0'; - } - - return( 0 ); -} - - -static void usage( char *name ) -{ - fprintf( stderr, "usage: %s fmtstring\n", name ); -} - -main( int argc, char **argv ) -{ - int rc, fd; - char *s, *p; - void *arg1, *arg2; - Sockbuf *sb; - BerElement *ber; - char fmt[2]; - char buf[BUFSIZ]; - extern int lber_debug; - - lber_debug = 255; - if ( argc < 2 ) { - usage( argv[0] ); - exit( 1 ); - } - - sb = ber_sockbuf_alloc(); - fd = 1; - ber_sockbuf_set_option( sb, LBER_SOCKBUF_OPT_DESC, &fd ); - - if ( (ber = der_alloc()) == NULL ) { - perror( "ber_alloc" ); - exit( 1 ); - } - - rc = 0; - fmt[1] = '\0'; - for ( s = argv[1]; *s; s++ ) { - switch ( *s ) { - case 'i': /* int */ - case 'b': /* boolean */ - case 'e': /* enumeration */ - getline( NULL, *s, buf, sizeof(buf) ); - arg1 = (void *) atoi( buf ); - break; - - case 'n': /* null */ - arg1 = NULL; - break; - - case 'o': /* octet string (non-null terminated) */ - getline( NULL, *s, buf, sizeof(buf) ); - arg1 = (void *) buf; - arg2 = (void *) strlen( buf ); - break; - - case 's': /* string */ - getline( NULL, *s, buf, sizeof(buf) ); - arg1 = (void *) buf; - break; - - case 'B': /* bit string */ - getline( NULL, *s, buf, sizeof(buf) ); - arg1 = (void *) buf; - arg2 = (void *) strlen( buf ); - break; - - case 't': /* tag for the next element */ - getline( NULL, *s, buf, sizeof(buf) ); - arg1 = (void *) buf; - break; - - case '{': /* begin sequence */ - case '}': /* end sequence */ - case '[': /* begin set */ - case ']': /* end set */ - break; - - default: - fprintf( stderr, "unknown fmt %c\n", *s ); - rc = -1; - break; - } - - fmt[0] = *s; - if ( ber_printf( ber, fmt, arg1, arg2 ) == -1 ) { - fprintf( stderr, "ber_printf\n" ); - exit( 1 ); - } - } - - if ( ber_flush( sb, ber, 1 ) != 0 ) { - perror( "ber_flush" ); - rc = -1; - } - - return( rc ); -} diff --git a/mozilla/directory/c-sdk/ldap/libraries/liblber/idtest.c b/mozilla/directory/c-sdk/ldap/libraries/liblber/idtest.c deleted file mode 100644 index 12d5aea9bdf..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/liblber/idtest.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1990 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -/* idtest.c - ber decoding test program using isode libraries */ - -#include -#include -#include - -static usage( char *name ) -{ - fprintf( stderr, "usage: %s\n", name ); -} - -main( int argc, char **argv ) -{ - PE pe; - PS psin, psout, pserr; - - /* read the pe from standard in */ - if ( (psin = ps_alloc( std_open )) == NULLPS ) { - perror( "ps_alloc" ); - exit( 1 ); - } - if ( std_setup( psin, stdin ) == NOTOK ) { - perror( "std_setup" ); - exit( 1 ); - } - /* write the pe to standard out */ - if ( (psout = ps_alloc( std_open )) == NULLPS ) { - perror( "ps_alloc" ); - exit( 1 ); - } - if ( std_setup( psout, stdout ) == NOTOK ) { - perror( "std_setup" ); - exit( 1 ); - } - /* pretty print it to standard error */ - if ( (pserr = ps_alloc( std_open )) == NULLPS ) { - perror( "ps_alloc" ); - exit( 1 ); - } - if ( std_setup( pserr, stderr ) == NOTOK ) { - perror( "std_setup" ); - exit( 1 ); - } - - while ( (pe = ps2pe( psin )) != NULLPE ) { - pe2pl( pserr, pe ); - pe2ps( psout, pe ); - } - - exit( 0 ); -} diff --git a/mozilla/directory/c-sdk/ldap/libraries/liblber/io.c b/mozilla/directory/c-sdk/ldap/libraries/liblber/io.c deleted file mode 100644 index 49ca3ed98d3..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/liblber/io.c +++ /dev/null @@ -1,1484 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1990 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ -/* io.c - ber general i/o routines */ - -#include "lber-int.h" - -#define bergetc( sb, len ) ( sb->sb_ber.ber_end > sb->sb_ber.ber_ptr ? \ - (unsigned char)*sb->sb_ber.ber_ptr++ : \ - ber_filbuf( sb, len )) - -# ifdef macintosh -/* - * MacTCP/OpenTransport - */ -# define read( s, b, l ) tcpread( s, 0, (unsigned char *)b, l, NULL ) -# define MAX_WRITE 65535 -# define BerWrite( sb, b, l ) tcpwrite( sb->sb_sd, (unsigned char *)(b), (l sb_sd, b, l, 0 ) -# else /* _WIN32 */ -/* - * everything else (Unix/BSD 4.3 socket API) - */ -# define BerWrite( sb, b, l ) write( sb->sb_sd, b, l ) -# define udp_read( sb, b, l, al ) recvfrom(sb->sb_sd, (char *)b, l, 0, \ - (struct sockaddr *)sb->sb_fromaddr, \ - (al = sizeof(struct sockaddr), &al)) -# define udp_write( sb, b, l ) sendto(sb->sb_sd, (char *)(b), l, 0, \ - (struct sockaddr *)sb->sb_useaddr, sizeof(struct sockaddr)) -# endif /* _WIN32 */ -# endif /* macintosh */ - -#ifndef udp_read -#define udp_read( sb, b, l, al ) CLDAP NOT SUPPORTED -#define udp_write( sb, b, l ) CLDAP NOT SUPPORTED -#endif /* udp_read */ - -#define EXBUFSIZ 1024 - -#ifdef LDAP_DEBUG -int lber_debug; -#endif - -/* - * function prototypes - */ -static void nslberi_install_compat_io_fns( Sockbuf *sb ); -static int nslberi_extread_compat( int s, void *buf, int len, - struct lextiof_socket_private *arg ); -static int nslberi_extwrite_compat( int s, const void *buf, int len, - struct lextiof_socket_private *arg ); -static unsigned long get_tag( Sockbuf *sb, BerElement *ber); -static unsigned long get_ber_len( BerElement *ber); -static unsigned long read_len_in_ber( Sockbuf *sb, BerElement *ber); - -/* - * internal global structure for memory allocation callback functions - */ -static struct lber_memalloc_fns nslberi_memalloc_fns; - - -/* - * buffered read from "sb". - * returns value of first character read on success and -1 on error. - */ -static int -ber_filbuf( Sockbuf *sb, long len ) -{ - short rc; -#ifdef CLDAP - int addrlen; -#endif /* CLDAP */ - - if ( sb->sb_ber.ber_buf == NULL ) { - if ( (sb->sb_ber.ber_buf = (char *)NSLBERI_MALLOC( - READBUFSIZ )) == NULL ) { - return( -1 ); - } - sb->sb_ber.ber_flags &= ~LBER_FLAG_NO_FREE_BUFFER; - sb->sb_ber.ber_ptr = sb->sb_ber.ber_buf; - sb->sb_ber.ber_end = sb->sb_ber.ber_buf; - } - - if ( sb->sb_naddr > 0 ) { -#ifdef CLDAP - rc = udp_read(sb, sb->sb_ber.ber_buf, READBUFSIZ, addrlen ); -#ifdef LDAP_DEBUG - if ( lber_debug ) { - char msg[80]; - sprintf( msg, "ber_filbuf udp_read %d bytes\n", - rc ); - ber_err_print( msg ); - if ( lber_debug > 1 && rc > 0 ) - lber_bprint( sb->sb_ber.ber_buf, rc ); - } -#endif /* LDAP_DEBUG */ -#else /* CLDAP */ - rc = -1; -#endif /* CLDAP */ - } else { - if ( sb->sb_ext_io_fns.lbextiofn_read != NULL ) { - rc = sb->sb_ext_io_fns.lbextiofn_read( - sb->sb_sd, sb->sb_ber.ber_buf, - ((sb->sb_options & LBER_SOCKBUF_OPT_NO_READ_AHEAD) - && (len < READBUFSIZ)) ? len : READBUFSIZ, - sb->sb_ext_io_fns.lbextiofn_socket_arg ); - } else { - rc = read( sb->sb_sd, sb->sb_ber.ber_buf, - ((sb->sb_options & LBER_SOCKBUF_OPT_NO_READ_AHEAD) - && (len < READBUFSIZ)) ? len : READBUFSIZ ); - } - } - - if ( rc > 0 ) { - sb->sb_ber.ber_ptr = sb->sb_ber.ber_buf + 1; - sb->sb_ber.ber_end = sb->sb_ber.ber_buf + rc; - return( (unsigned char)*sb->sb_ber.ber_buf ); - } - - return( -1 ); -} - - -static long -BerRead( Sockbuf *sb, char *buf, long len ) -{ - int c; - long nread = 0; - - while ( len > 0 ) { - if ( (c = bergetc( sb, len )) < 0 ) { - if ( nread > 0 ) - break; - return( c ); - } - *buf++ = c; - nread++; - len--; - } - - return( nread ); -} - - -/* - * Note: ber_read() only uses the ber_end and ber_ptr elements of ber. - * Functions like ber_get_tag(), ber_skip_tag, and ber_peek_tag() rely on - * that fact, so if this code is changed to use any additional elements of - * the ber structure, those functions will need to be changed as well. - */ -long -LDAP_CALL -ber_read( BerElement *ber, char *buf, unsigned long len ) -{ - unsigned long actuallen, nleft; - - nleft = ber->ber_end - ber->ber_ptr; - actuallen = nleft < len ? nleft : len; - - SAFEMEMCPY( buf, ber->ber_ptr, (size_t)actuallen ); - - ber->ber_ptr += actuallen; - - return( (long)actuallen ); -} - -/* - * enlarge the ber buffer. - * return 0 on success, -1 on error. - */ -int -nslberi_ber_realloc( BerElement *ber, unsigned long len ) -{ - unsigned long need, have, total; - size_t have_bytes; - Seqorset *s; - long off; - char *oldbuf; - - have_bytes = ber->ber_end - ber->ber_buf; - have = have_bytes / EXBUFSIZ; - need = (len < EXBUFSIZ ? 1 : (len + (EXBUFSIZ - 1)) / EXBUFSIZ); - total = have * EXBUFSIZ + need * EXBUFSIZ; - - oldbuf = ber->ber_buf; - - if (ber->ber_buf == NULL) { - if ( (ber->ber_buf = (char *)NSLBERI_MALLOC( (size_t)total )) - == NULL ) { - return( -1 ); - } - ber->ber_flags &= ~LBER_FLAG_NO_FREE_BUFFER; - } else { - if ( ber->ber_flags & LBER_FLAG_NO_FREE_BUFFER ) { - /* transition to malloc'd buffer */ - if ( (ber->ber_buf = (char *)NSLBERI_MALLOC( - (size_t)total )) == NULL ) { - return( -1 ); - } - ber->ber_flags &= ~LBER_FLAG_NO_FREE_BUFFER; - /* copy existing data into new malloc'd buffer */ - SAFEMEMCPY( ber->ber_buf, oldbuf, have_bytes ); - } else { - if ( (ber->ber_buf = (char *)NSLBERI_REALLOC( - ber->ber_buf,(size_t)total )) == NULL ) { - return( -1 ); - } - } - } - - ber->ber_end = ber->ber_buf + total; - - /* - * If the stinking thing was moved, we need to go through and - * reset all the sos and ber pointers. Offsets would've been - * a better idea... oh well. - */ - - if ( ber->ber_buf != oldbuf ) { - ber->ber_ptr = ber->ber_buf + (ber->ber_ptr - oldbuf); - - for ( s = ber->ber_sos; s != NULLSEQORSET; s = s->sos_next ) { - off = s->sos_first - oldbuf; - s->sos_first = ber->ber_buf + off; - - off = s->sos_ptr - oldbuf; - s->sos_ptr = ber->ber_buf + off; - } - } - - return( 0 ); -} - -/* - * returns "len" on success and -1 on failure. - */ -long -LDAP_CALL -ber_write( BerElement *ber, char *buf, unsigned long len, int nosos ) -{ - if ( nosos || ber->ber_sos == NULL ) { - if ( ber->ber_ptr + len > ber->ber_end ) { - if ( nslberi_ber_realloc( ber, len ) != 0 ) - return( -1 ); - } - SAFEMEMCPY( ber->ber_ptr, buf, (size_t)len ); - ber->ber_ptr += len; - return( len ); - } else { - if ( ber->ber_sos->sos_ptr + len > ber->ber_end ) { - if ( nslberi_ber_realloc( ber, len ) != 0 ) - return( -1 ); - } - SAFEMEMCPY( ber->ber_sos->sos_ptr, buf, (size_t)len ); - ber->ber_sos->sos_ptr += len; - ber->ber_sos->sos_clen += len; - return( len ); - } -} - -void -LDAP_CALL -ber_free( BerElement *ber, int freebuf ) -{ - if ( ber != NULL ) { - if ( freebuf && - !(ber->ber_flags & LBER_FLAG_NO_FREE_BUFFER)) { - NSLBERI_FREE(ber->ber_buf); - } - NSLBERI_FREE( (char *) ber ); - } -} - -/* - * return >= 0 on success, -1 on failure. - */ -int -LDAP_CALL -ber_flush( Sockbuf *sb, BerElement *ber, int freeit ) -{ - long nwritten = 0, towrite, rc, total; - int i = 0; - ldap_x_iovec ber_struct_copy[BER_ARRAY_QUANTITY]; - - if (ber->ber_rwptr == NULL) { - ber->ber_rwptr = ber->ber_buf; - } - - /* loop until it's all written */ - if (sb->sb_ext_io_fns.lbextiofn_writev != NULL) { - - /* build the copy of the ber_struct */ - memcpy(&(ber_struct_copy), &(ber->ber_struct), sizeof(ber_struct_copy)); - ber_struct_copy[BER_STRUCT_TAG].ldapiov_base = &(ber->ber_tag_contents[0]); - ber_struct_copy[BER_STRUCT_LEN].ldapiov_base = &(ber->ber_len_contents[0]); - ber_struct_copy[BER_STRUCT_PRE].ldapiov_base = &(ber->ber_pre_contents[0]); - if (ber->ber_rwptr > ber->ber_buf) { - ber_struct_copy[BER_STRUCT_VAL].ldapiov_base = ber->ber_rwptr; - } else { - ber_struct_copy[BER_STRUCT_VAL].ldapiov_base = ber->ber_buf; - } - ber_struct_copy[BER_STRUCT_VAL].ldapiov_len = ber->ber_ptr - ber->ber_rwptr; - - /* add the sizes of the different buffers to write with writev */ - for(total = 0, i = 0; i < BER_ARRAY_QUANTITY; ++i) { - total += ber_struct_copy[i].ldapiov_len; - } - towrite = total; - - /* begin loop here */ - while (1) { - if ((rc = sb->sb_ext_io_fns.lbextiofn_writev - (sb->sb_sd, ber_struct_copy, BER_ARRAY_QUANTITY, - sb->sb_ext_io_fns.lbextiofn_socket_arg)) == 0) { - return(towrite); - } else if (rc < 0) { - return(rc); - } else { - towrite -= rc; - if (towrite > 0) { - nwritten = towrite; - /* go backwards through the buffers finding the place you stopped... */ - for (i = BER_ARRAY_QUANTITY - 1; i >= 0; --i) { - if (ber_struct_copy[i].ldapiov_len >= nwritten) { - ber_struct_copy[i].ldapiov_base = ber_struct_copy[i].ldapiov_base + ber_struct_copy[i].ldapiov_len - nwritten; - ber_struct_copy[i].ldapiov_len = nwritten; - /* ... then set all of the other buffers to 0 size because they've already been written */ - for (--i; i >= 0; --i) { - ber_struct_copy[i].ldapiov_len = 0; - } - break; /* Not necessary */ - } - else { - nwritten -= ber_struct_copy[i].ldapiov_len; - } - } - } - else { - ber->ber_rwptr = NULL; - if( freeit ) { - ber_free( ber, 1 ); - } - return(0); - } - } - } - } - - towrite = ber->ber_ptr - ber->ber_rwptr; - -#ifdef LDAP_DEBUG - if ( lber_debug ) { - char msg[80]; - sprintf( msg, "ber_flush: %ld bytes to sd %ld%s\n", towrite, - sb->sb_sd, ber->ber_rwptr != ber->ber_buf ? " (re-flush)" - : "" ); - ber_err_print( msg ); - if ( lber_debug > 1 ) - lber_bprint( ber->ber_rwptr, towrite ); - } -#endif -#if !defined(macintosh) && !defined(DOS) - if ( sb->sb_options & (LBER_SOCKBUF_OPT_TO_FILE | LBER_SOCKBUF_OPT_TO_FILE_ONLY) ) { - rc = write( sb->sb_copyfd, ber->ber_buf, towrite ); - if ( sb->sb_options & LBER_SOCKBUF_OPT_TO_FILE_ONLY ) { - return( (int)rc ); - } - } -#endif - - nwritten = 0; - do { - if (sb->sb_naddr > 0) { -#ifdef CLDAP - rc = udp_write( sb, ber->ber_buf + nwritten, - (size_t)towrite ); -#else /* CLDAP */ - rc = -1; -#endif /* CLDAP */ - if ( rc <= 0 ) - return( -1 ); - /* fake error if write was not atomic */ - if (rc < towrite) { -#if !defined( macintosh ) && !defined( DOS ) - errno = EMSGSIZE; /* For Win32, see portable.h */ -#endif - return( -1 ); - } - } else { - if ( sb->sb_ext_io_fns.lbextiofn_write != NULL ) { - if ( (rc = sb->sb_ext_io_fns.lbextiofn_write( - sb->sb_sd, ber->ber_rwptr, (size_t)towrite, - sb->sb_ext_io_fns.lbextiofn_socket_arg )) - <= 0 ) { - return( -1 ); - } - } else { - if ( (rc = BerWrite( sb, ber->ber_rwptr, - (size_t) towrite )) <= 0 ) { - return( -1 ); - } - } - } - towrite -= rc; - nwritten += rc; - ber->ber_rwptr += rc; - } while ( towrite > 0 ); - - if ( freeit ) - ber_free( ber, 1 ); - - return( 0 ); -} - - -/* we pre-allocate a buffer to save the extra malloc later */ -BerElement * -LDAP_CALL -ber_alloc_t( int options ) -{ - BerElement *ber; - - if ( (ber = (BerElement*)NSLBERI_CALLOC( 1, - sizeof(struct berelement) + EXBUFSIZ )) == NULL ) { - return( NULL ); - } - - /* - * for compatibility with the C LDAP API standard, we recognize - * LBER_USE_DER as LBER_OPT_USE_DER. See lber.h for a bit more info. - */ - if ( options & LBER_USE_DER ) { - options &= ~LBER_USE_DER; - options |= LBER_OPT_USE_DER; - } - - ber->ber_tag = LBER_DEFAULT; - ber->ber_options = options; - ber->ber_buf = (char*)ber + sizeof(struct berelement); - ber->ber_ptr = ber->ber_buf; - ber->ber_end = ber->ber_buf + EXBUFSIZ; - ber->ber_flags = LBER_FLAG_NO_FREE_BUFFER; - - return( ber ); -} - - -BerElement * -LDAP_CALL -ber_alloc() -{ - return( ber_alloc_t( 0 ) ); -} - -BerElement * -LDAP_CALL -der_alloc() -{ - return( ber_alloc_t( LBER_OPT_USE_DER ) ); -} - -BerElement * -LDAP_CALL -ber_dup( BerElement *ber ) -{ - BerElement *new; - - if ( (new = ber_alloc()) == NULL ) - return( NULL ); - - *new = *ber; - - return( new ); -} - - -void -LDAP_CALL -ber_init_w_nullchar( BerElement *ber, int options ) -{ - (void) memset( (char *)ber, '\0', sizeof(struct berelement) ); - ber->ber_tag = LBER_DEFAULT; - - /* - * For compatibility with the C LDAP API standard, we recognize - * LBER_USE_DER as LBER_OPT_USE_DER. See lber.h for a bit more info. - */ - if ( options & LBER_USE_DER ) { - options &= ~LBER_USE_DER; - options |= LBER_OPT_USE_DER; - } - - ber->ber_options = options; -} - -void -LDAP_CALL -ber_reset( BerElement *ber, int was_writing ) -{ - if ( was_writing ) { - ber->ber_end = ber->ber_ptr; - ber->ber_ptr = ber->ber_buf; - } else { - ber->ber_ptr = ber->ber_end; - } - - ber->ber_rwptr = NULL; - - memset(ber->ber_struct, 0, BER_CONTENTS_STRUCT_SIZE); -} - - -#ifdef LDAP_DEBUG - -void -ber_dump( BerElement *ber, int inout ) -{ - char msg[128]; - sprintf( msg, "ber_dump: buf 0x%lx, ptr 0x%lx, rwptr 0x%lx, end 0x%lx\n", - ber->ber_buf, ber->ber_ptr, ber->ber_rwptr, ber->ber_end ); - ber_err_print( msg ); - if ( inout == 1 ) { - sprintf( msg, " current len %ld, contents:\n", - ber->ber_end - ber->ber_ptr ); - ber_err_print( msg ); - lber_bprint( ber->ber_ptr, ber->ber_end - ber->ber_ptr ); - } else { - sprintf( msg, " current len %ld, contents:\n", - ber->ber_ptr - ber->ber_buf ); - ber_err_print( msg ); - lber_bprint( ber->ber_buf, ber->ber_ptr - ber->ber_buf ); - } -} - -void -ber_sos_dump( Seqorset *sos ) -{ - char msg[80]; - ber_err_print ( "*** sos dump ***\n" ); - while ( sos != NULLSEQORSET ) { - sprintf( msg, "ber_sos_dump: clen %ld first 0x%lx ptr 0x%lx\n", - sos->sos_clen, sos->sos_first, sos->sos_ptr ); - ber_err_print( msg ); - sprintf( msg, " current len %ld contents:\n", - sos->sos_ptr - sos->sos_first ); - ber_err_print( msg ); - lber_bprint( sos->sos_first, sos->sos_ptr - sos->sos_first ); - - sos = sos->sos_next; - } - ber_err_print( "*** end dump ***\n" ); -} - -#endif - -/* return the tag - LBER_DEFAULT returned means trouble - * assumes the tag is only one byte! */ -static unsigned long -get_tag( Sockbuf *sb, BerElement *ber) -{ - unsigned char xbyte; - - if ( (BerRead( sb, (char *) &xbyte, 1 )) != 1 ) { - return( LBER_DEFAULT ); - } - - if ( (xbyte & LBER_BIG_TAG_MASK) == LBER_BIG_TAG_MASK ) { - return( LBER_DEFAULT ); - } - - ber->ber_tag_contents[0] = xbyte; - ber->ber_struct[BER_STRUCT_TAG].ldapiov_len = 1; - return((unsigned long)xbyte); -} - - -/* Error checking? */ -/* Takes a ber and returns the actual length in a long */ -static unsigned long -get_ber_len( BerElement *ber) -{ - int noctets; - unsigned long len = 0; - char xbyte; - - xbyte = ber->ber_len_contents[0]; - - /* long form */ - if (xbyte & 0x80) { - noctets = (int) (xbyte & 0x7f); - if (noctets >= MAX_LEN_SIZE) { - return(LBER_DEFAULT); - } - memcpy((char*) &len + sizeof(unsigned long) - noctets, &ber->ber_len_contents[1], noctets); - len = LBER_NTOHL(len); - return(len); - } else { - return((unsigned long)(xbyte)); - } -} - -/* LBER_DEFAULT means trouble - reads in the length, stores it in ber->ber_struct, and returns get_ber_len */ -static unsigned long -read_len_in_ber( Sockbuf *sb, BerElement *ber) -{ - unsigned char xbyte; - int noctets; - int rc = 0; - - /* - * Next, read the length. The first byte contains the length - * of the length. If bit 8 is set, the length is the long - * form, otherwise it's the short form. We don't allow a - * length that's greater than what we can hold in a long (2GB) - */ - - if ( BerRead( sb, (char *) &xbyte, 1 ) != 1 ) { - return( LBER_DEFAULT ); - } - - ber->ber_len_contents[0] = xbyte; - - /* long form of the length value */ - if ( xbyte & 0x80 ) { - noctets = (xbyte & 0x7f); - if ( noctets >= MAX_LEN_SIZE ) - return( LBER_DEFAULT ); - while (rc < noctets) { - if ( (rc += BerRead( sb, &(ber->ber_len_contents[1]) + rc, noctets - rc )) <= 0) { - return( LBER_DEFAULT ); - } - } - ber->ber_struct[BER_STRUCT_LEN].ldapiov_len = 1 + noctets; - } else { /* short form of the length value */ - ber->ber_struct[BER_STRUCT_LEN].ldapiov_len = 1; - } - return(get_ber_len(ber)); -} - - -unsigned long -LDAP_CALL -ber_get_next( Sockbuf *sb, unsigned long *len, BerElement *ber ) -{ - unsigned long tag, toread, newlen; - long rc; - -#ifdef LDAP_DEBUG - if ( lber_debug ) - ber_err_print( "ber_get_next\n" ); -#endif - - /* - * first time through - malloc the buffer, set up ptrs, and - * read the tag and the length and as much of the rest as we can - */ - - if ( ber->ber_rwptr == NULL ) { - /* read the tag */ - if ((tag = get_tag(sb, ber)) == LBER_DEFAULT ) { - return( LBER_DEFAULT ); - } - - if((sb->sb_options & LBER_SOCKBUF_OPT_VALID_TAG) && - (tag != sb->sb_valid_tag)) { - return( LBER_DEFAULT); - } - - ber->ber_tag_contents[0] = (char)tag; /* we only handle 1 byte tags */ - - /* read the length */ - if ((newlen = read_len_in_ber(sb, ber)) == LBER_DEFAULT ) { - return( LBER_DEFAULT ); - } - - /* - * Finally, malloc a buffer for the contents and read it in. - * It's this buffer that's passed to all the other ber decoding - * routines. - */ - -#if defined( DOS ) && !( defined( _WIN32 ) || defined(XP_OS2) ) - if ( newlen > 65535 ) { /* DOS can't allocate > 64K */ - return( LBER_DEFAULT ); - } -#endif /* DOS && !_WIN32 */ - - if ( ( sb->sb_options & LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE ) - && newlen > sb->sb_max_incoming ) { - return( LBER_DEFAULT ); - } - - if ( (ber->ber_buf = (char *)NSLBERI_CALLOC( 1,(size_t)newlen )) - == NULL ) { - return( LBER_DEFAULT ); - } - - ber->ber_len = newlen; - ber->ber_flags &= ~LBER_FLAG_NO_FREE_BUFFER; - ber->ber_ptr = ber->ber_buf; - ber->ber_end = ber->ber_buf + newlen; - ber->ber_rwptr = ber->ber_buf; - } - - /* OK, we've malloc-ed the buffer; now read the rest of the expected length */ - toread = (unsigned long)ber->ber_end - (unsigned long)ber->ber_rwptr; - do { - if ( (rc = BerRead( sb, ber->ber_rwptr, (long)toread )) <= 0 ) { - return( LBER_DEFAULT ); - } - - toread -= rc; - ber->ber_rwptr += rc; - } while ( toread > 0 ); - -#ifdef LDAP_DEBUG - if ( lber_debug ) { - char msg[80]; - sprintf( msg, "ber_get_next: tag 0x%lx len %ld contents:\n", - tag, ber->ber_len ); - ber_err_print( msg ); - if ( lber_debug > 1 ) - ber_dump( ber, 1 ); - } -#endif - - ber->ber_rwptr = NULL; - *len = newlen; - ber->ber_struct[BER_STRUCT_VAL].ldapiov_len = newlen; - return(tag); -} - -Sockbuf * -LDAP_CALL -ber_sockbuf_alloc() -{ - return( (Sockbuf *)NSLBERI_CALLOC( 1, sizeof(struct sockbuf) ) ); -} - -void -LDAP_CALL -ber_sockbuf_free(Sockbuf *p) -{ - if ( p != NULL ) { - if ( p->sb_ber.ber_buf != NULL && - !(p->sb_ber.ber_flags & LBER_FLAG_NO_FREE_BUFFER) ) { - NSLBERI_FREE( p->sb_ber.ber_buf ); - } - NSLBERI_FREE(p); - } -} - -/* - * return 0 on success and -1 on error - */ -int -LDAP_CALL -ber_set_option( struct berelement *ber, int option, void *value ) -{ - - /* - * memory allocation callbacks are global, so it is OK to pass - * NULL for ber. Handle this as a special case. - */ - if ( option == LBER_OPT_MEMALLOC_FN_PTRS ) { - /* struct copy */ - nslberi_memalloc_fns = *((struct lber_memalloc_fns *)value); - return( 0 ); - } - - /* - * lber_debug is global, so it is OK to pass - * NULL for ber. Handle this as a special case. - */ - if ( option == LBER_OPT_DEBUG_LEVEL ) { -#ifdef LDAP_DEBUG - lber_debug = *(int *)value; -#endif - return( 0 ); - } - - /* - * all the rest require a non-NULL ber - */ - if ( !NSLBERI_VALID_BERELEMENT_POINTER( ber )) { - return( -1 ); - } - - switch ( option ) { - case LBER_OPT_USE_DER: - case LBER_OPT_TRANSLATE_STRINGS: - if ( value != NULL ) { - ber->ber_options |= option; - } else { - ber->ber_options &= ~option; - } - break; - case LBER_OPT_REMAINING_BYTES: - ber->ber_end = ber->ber_ptr + *((unsigned long *)value); - break; - case LBER_OPT_TOTAL_BYTES: - ber->ber_end = ber->ber_buf + *((unsigned long *)value); - break; - case LBER_OPT_BYTES_TO_WRITE: - ber->ber_ptr = ber->ber_buf + *((unsigned long *)value); - break; - default: - return( -1 ); - } - - return( 0 ); -} - -/* - * return 0 on success and -1 on error - */ -int -LDAP_CALL -ber_get_option( struct berelement *ber, int option, void *value ) -{ - /* - * memory callocation callbacks are global, so it is OK to pass - * NULL for ber. Handle this as a special case - */ - if ( option == LBER_OPT_MEMALLOC_FN_PTRS ) { - /* struct copy */ - *((struct lber_memalloc_fns *)value) = nslberi_memalloc_fns; - return( 0 ); - } - - /* - * lber_debug is global, so it is OK to pass - * NULL for ber. Handle this as a special case. - */ - if ( option == LBER_OPT_DEBUG_LEVEL ) { -#ifdef LDAP_DEBUG - *(int *)value = lber_debug; -#endif - return( 0 ); - } - /* - * all the rest require a non-NULL ber - */ - if ( !NSLBERI_VALID_BERELEMENT_POINTER( ber )) { - return( -1 ); - } - - switch ( option ) { - case LBER_OPT_USE_DER: - case LBER_OPT_TRANSLATE_STRINGS: - *((int *) value) = (ber->ber_options & option); - break; - case LBER_OPT_REMAINING_BYTES: - *((unsigned long *) value) = ber->ber_end - ber->ber_ptr; - break; - case LBER_OPT_TOTAL_BYTES: - *((unsigned long *) value) = ber->ber_end - ber->ber_buf; - break; - case LBER_OPT_BYTES_TO_WRITE: - *((unsigned long *) value) = ber->ber_ptr - ber->ber_buf; - break; - default: - return( -1 ); - } - - return( 0 ); -} - -/* - * return 0 on success and -1 on error - */ -int -LDAP_CALL -ber_sockbuf_set_option( Sockbuf *sb, int option, void *value ) -{ - struct lber_x_ext_io_fns *extiofns; - - if ( !NSLBERI_VALID_SOCKBUF_POINTER( sb )) { - return( -1 ); - } - - switch ( option ) { - case LBER_SOCKBUF_OPT_VALID_TAG: - sb->sb_valid_tag= *((unsigned long *) value); - if ( value != NULL ) { - sb->sb_options |= option; - } else { - sb->sb_options &= ~option; - } - break; - case LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE: - sb->sb_max_incoming = *((unsigned long *) value); - /* FALL */ - case LBER_SOCKBUF_OPT_TO_FILE: - case LBER_SOCKBUF_OPT_TO_FILE_ONLY: - case LBER_SOCKBUF_OPT_NO_READ_AHEAD: - if ( value != NULL ) { - sb->sb_options |= option; - } else { - sb->sb_options &= ~option; - } - break; - case LBER_SOCKBUF_OPT_DESC: - sb->sb_sd = *((LBER_SOCKET *) value); - break; - case LBER_SOCKBUF_OPT_COPYDESC: - sb->sb_copyfd = *((LBER_SOCKET *) value); - break; - case LBER_SOCKBUF_OPT_READ_FN: - sb->sb_io_fns.lbiof_read = (LDAP_IOF_READ_CALLBACK *) value; - nslberi_install_compat_io_fns( sb ); - break; - case LBER_SOCKBUF_OPT_WRITE_FN: - sb->sb_io_fns.lbiof_write = (LDAP_IOF_WRITE_CALLBACK *) value; - nslberi_install_compat_io_fns( sb ); - break; - case LBER_SOCKBUF_OPT_EXT_IO_FNS: - extiofns = (struct lber_x_ext_io_fns *) value; - if ( extiofns == NULL ) { /* remove */ - (void)memset( (char *)&sb->sb_ext_io_fns, '\0', - sizeof(sb->sb_ext_io_fns )); - } else if ( extiofns->lbextiofn_size - == LBER_X_EXTIO_FNS_SIZE ) { - /* struct copy */ - sb->sb_ext_io_fns = *extiofns; - } else if ( extiofns->lbextiofn_size - == LBER_X_EXTIO_FNS_SIZE_REV0 ) { - /* backwards compatiblity for older struct */ - sb->sb_ext_io_fns.lbextiofn_size = - LBER_X_EXTIO_FNS_SIZE; - sb->sb_ext_io_fns.lbextiofn_read = - extiofns->lbextiofn_read; - sb->sb_ext_io_fns.lbextiofn_write = - extiofns->lbextiofn_write; - sb->sb_ext_io_fns.lbextiofn_writev = NULL; - sb->sb_ext_io_fns.lbextiofn_socket_arg = - extiofns->lbextiofn_socket_arg; - } else { - return( -1 ); - } - break; - default: - return( -1 ); - } - - return( 0 ); -} - -/* - * return 0 on success and -1 on error - */ -int -LDAP_CALL -ber_sockbuf_get_option( Sockbuf *sb, int option, void *value ) -{ - struct lber_x_ext_io_fns *extiofns; - - if ( !NSLBERI_VALID_SOCKBUF_POINTER( sb )) { - return( -1 ); - } - - switch ( option ) { - case LBER_SOCKBUF_OPT_VALID_TAG: - *((unsigned long *) value) = sb->sb_valid_tag; - break; - case LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE: - *((unsigned long *) value) = sb->sb_max_incoming; - break; - case LBER_SOCKBUF_OPT_TO_FILE: - case LBER_SOCKBUF_OPT_TO_FILE_ONLY: - case LBER_SOCKBUF_OPT_NO_READ_AHEAD: - *((int *) value) = (sb->sb_options & option); - break; - case LBER_SOCKBUF_OPT_DESC: - *((LBER_SOCKET *) value) = sb->sb_sd; - break; - case LBER_SOCKBUF_OPT_COPYDESC: - *((LBER_SOCKET *) value) = sb->sb_copyfd; - break; - case LBER_SOCKBUF_OPT_READ_FN: - *((LDAP_IOF_READ_CALLBACK **) value) - = sb->sb_io_fns.lbiof_read; - break; - case LBER_SOCKBUF_OPT_WRITE_FN: - *((LDAP_IOF_WRITE_CALLBACK **) value) - = sb->sb_io_fns.lbiof_write; - break; - case LBER_SOCKBUF_OPT_EXT_IO_FNS: - extiofns = (struct lber_x_ext_io_fns *) value; - if ( extiofns == NULL ) { - return( -1 ); - } else if ( extiofns->lbextiofn_size - == LBER_X_EXTIO_FNS_SIZE ) { - /* struct copy */ - *extiofns = sb->sb_ext_io_fns; - } else if ( extiofns->lbextiofn_size - == LBER_X_EXTIO_FNS_SIZE_REV0 ) { - /* backwards compatiblity for older struct */ - extiofns->lbextiofn_read = sb->sb_ext_io_fns.lbextiofn_read; - extiofns->lbextiofn_write = sb->sb_ext_io_fns.lbextiofn_write; - extiofns->lbextiofn_socket_arg = sb->sb_ext_io_fns.lbextiofn_socket_arg; - } else { - return( -1 ); - } - break; - default: - return( -1 ); - } - - return( 0 ); -} - - -/* new dboreham code below: */ - -struct byte_buffer { - unsigned char *p; - int offset; - int length; -}; -typedef struct byte_buffer byte_buffer; - - -/* This call allocates us a BerElement structure plus some extra memory. - * It returns a pointer to the BerElement, plus a pointer to the extra memory. - * This routine also allocates a ber data buffer within the same block, thus - * saving a call to calloc later when we read data. - */ -void* -LDAP_CALL -ber_special_alloc(size_t size, BerElement **ppBer) -{ - char *mem = NULL; - - /* Make sure mem size requested is aligned */ - if (0 != ( size & 0x03 )) { - size += (sizeof(long) - (size & 0x03)); - } - - mem = NSLBERI_MALLOC(sizeof(struct berelement) + EXBUFSIZ + size ); - if (NULL == mem) { - return NULL; - } - *ppBer = (BerElement*) (mem + size); - memset(*ppBer,0,sizeof(struct berelement)); - (*ppBer)->ber_tag = LBER_DEFAULT; - (*ppBer)->ber_buf = mem + size + sizeof(struct berelement); - (*ppBer)->ber_ptr = (*ppBer)->ber_buf; - (*ppBer)->ber_end = (*ppBer)->ber_buf + EXBUFSIZ; - (*ppBer)->ber_flags = LBER_FLAG_NO_FREE_BUFFER; - return (void*)mem; -} - -void -LDAP_CALL -ber_special_free(void* buf, BerElement *ber) -{ - if (!(ber->ber_flags & LBER_FLAG_NO_FREE_BUFFER)) { - NSLBERI_FREE(ber->ber_buf); - } - NSLBERI_FREE( buf ); -} - -static int -read_bytes(byte_buffer *b, unsigned char *return_buffer, int bytes_to_read) -{ - /* copy up to bytes_to_read bytes into the caller's buffer, return the number of bytes copied */ - int bytes_to_copy = 0; - - if (bytes_to_read <= (b->length - b->offset) ) { - bytes_to_copy = bytes_to_read; - } else { - bytes_to_copy = (b->length - b->offset); - } - if (1 == bytes_to_copy) { - *return_buffer = *(b->p+b->offset++); - } else - if (0 == bytes_to_copy) { - ; - } else - { - memcpy(return_buffer,b->p+b->offset,bytes_to_copy); - b->offset += bytes_to_copy; - } - return bytes_to_copy; -} - -/* return the tag - LBER_DEFAULT returned means trouble */ -static unsigned long -get_buffer_tag(byte_buffer *sb ) -{ - unsigned char xbyte; - unsigned long tag; - char *tagp; - int i; - - if ( (i = read_bytes( sb, &xbyte, 1 )) != 1 ) { - return( LBER_DEFAULT ); - } - - if ( (xbyte & LBER_BIG_TAG_MASK) != LBER_BIG_TAG_MASK ) { - return( (unsigned long) xbyte ); - } - - tagp = (char *) &tag; - tagp[0] = xbyte; - for ( i = 1; i < sizeof(long); i++ ) { - if ( read_bytes( sb, &xbyte, 1 ) != 1 ) - return( LBER_DEFAULT ); - - tagp[i] = xbyte; - - if ( ! (xbyte & LBER_MORE_TAG_MASK) ) - break; - } - - /* tag too big! */ - if ( i == sizeof(long) ) - return( LBER_DEFAULT ); - - /* want leading, not trailing 0's */ - return( tag >> (sizeof(long) - i - 1) ); -} - -/* Like ber_get_next, but from a byte buffer the caller already has. */ -/* Bytes_Scanned returns the number of bytes we actually looked at in the buffer. */ -/* ber_get_next_buffer is now implemented in terms of ber_get_next_buffer_ext */ -/* and is here for backward compatibility. This new function allows us to pass */ -/* the Sockbuf structure along */ - -unsigned long -LDAP_CALL -ber_get_next_buffer( void *buffer, size_t buffer_size, unsigned long *len, - BerElement *ber, unsigned long *Bytes_Scanned ) -{ - return (ber_get_next_buffer_ext( buffer, buffer_size, len, ber, - Bytes_Scanned, NULL)); -} - -unsigned long -LDAP_CALL -ber_get_next_buffer_ext( void *buffer, size_t buffer_size, unsigned long *len, - BerElement *ber, unsigned long *Bytes_Scanned, Sockbuf *sock ) -{ - unsigned long tag = 0, netlen, toread; - unsigned char lc; - long rc; - int noctets, diff; - byte_buffer sb = {0}; - - - /* - * Any ber element looks like this: tag length contents. - * Assuming everything's ok, we return the tag byte (we - * can assume a single byte), return the length in len, - * and the rest of the undecoded element in buf. - * - * Assumptions: - * 1) small tags (less than 128) - * 2) definite lengths - * 3) primitive encodings used whenever possible - */ - - /* - * first time through - malloc the buffer, set up ptrs, and - * read the tag and the length and as much of the rest as we can - */ - - sb.p = buffer; - sb.length = buffer_size; - - if ( ber->ber_rwptr == NULL ) { - /* - * First, we read the tag. - */ - - /* if we have been called before with a fragment not - * containing a comlete length, we have no rwptr but - * a tag already - */ - if ( ber->ber_tag == LBER_DEFAULT ) { - if ( (tag = get_buffer_tag( &sb )) == LBER_DEFAULT ) { - goto premature_exit; - } - ber->ber_tag = tag; - } - - if((sock->sb_options & LBER_SOCKBUF_OPT_VALID_TAG) && - (tag != sock->sb_valid_tag)) { - *Bytes_Scanned=0; - return( LBER_DEFAULT); - } - - /* - * Next, read the length. The first byte contains the length - * of the length. If bit 8 is set, the length is the long - * form, otherwise it's the short form. We don't allow a - * length that's greater than what we can hold in an unsigned - * long. - */ - - /* if the length is in long form and we don't get it in one - * fragment, we should handle this (TBD). - */ - - *len = netlen = 0; - if ( read_bytes( &sb, &lc, 1 ) != 1 ) { - goto premature_exit; - } - if ( lc & 0x80 ) { - noctets = (lc & 0x7f); - if ( noctets > sizeof(unsigned long) ) - goto premature_exit; - diff = sizeof(unsigned long) - noctets; - if ( read_bytes( &sb, (unsigned char *)&netlen + diff, - noctets ) != noctets ) { - goto premature_exit; - } - *len = LBER_NTOHL( netlen ); - } else { - *len = lc; - } - ber->ber_len = *len; - - /* - * Finally, malloc a buffer for the contents and read it in. - * It's this buffer that's passed to all the other ber decoding - * routines. - */ - -#if defined( DOS ) && !defined( _WIN32 ) - if ( *len > 65535 ) { /* DOS can't allocate > 64K */ - goto premature_exit; - } -#endif /* DOS && !_WIN32 */ - - if ( (sock != NULL) && - ( sock->sb_options & LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE ) - && (*len > sock->sb_max_incoming) ) { - return( LBER_DEFAULT ); - } - - if ( ber->ber_buf + *len > ber->ber_end ) { - if ( nslberi_ber_realloc( ber, *len ) != 0 ) - goto premature_exit; - } - ber->ber_ptr = ber->ber_buf; - ber->ber_end = ber->ber_buf + *len; - ber->ber_rwptr = ber->ber_buf; - } - - toread = (unsigned long)ber->ber_end - (unsigned long)ber->ber_rwptr; - do { - if ( (rc = read_bytes( &sb, (unsigned char *)ber->ber_rwptr, - (long)toread )) <= 0 ) { - goto premature_exit; - } - - toread -= rc; - ber->ber_rwptr += rc; - } while ( toread > 0 ); - - *len = ber->ber_len; - *Bytes_Scanned = sb.offset; - return( ber->ber_tag ); - -premature_exit: - /* - * we're here because we hit the end of the buffer before seeing - * all of the PDU - */ - *Bytes_Scanned = sb.offset; - return(LBER_DEFAULT); -} - - -/* The ber_flatten routine allocates a struct berval whose contents - * are a BER encoding taken from the ber argument. The bvPtr pointer - * points to the returned berval, which must be freed using - * ber_bvfree(). This routine returns 0 on success and -1 on error. - * The use of ber_flatten on a BerElement in which all '{' and '}' - * format modifiers have not been properly matched can result in a - * berval whose contents are not a valid BER encoding. - * Note that the ber_ptr is not modified. - */ -int -LDAP_CALL -ber_flatten( BerElement *ber, struct berval **bvPtr ) -{ - struct berval *new; - unsigned long len; - - /* allocate a struct berval */ - if ( (new = (struct berval *)NSLBERI_MALLOC( sizeof(struct berval) )) - == NULL ) { - return( -1 ); - } - - /* - * Copy everything from the BerElement's ber_buf to ber_ptr - * into the berval structure. - */ - if ( ber == NULL ) { - new->bv_val = NULL; - new->bv_len = 0; - } else { - len = ber->ber_ptr - ber->ber_buf; - if ( ( new->bv_val = (char *)NSLBERI_MALLOC( len + 1 )) == NULL ) { - ber_bvfree( new ); - return( -1 ); - } - SAFEMEMCPY( new->bv_val, ber->ber_buf, (size_t)len ); - new->bv_val[len] = '\0'; - new->bv_len = len; - } - - /* set bvPtr pointer to point to the returned berval */ - *bvPtr = new; - - return( 0 ); -} - - -/* - * The ber_init function constructs and returns a new BerElement - * containing a copy of the data in the bv argument. ber_init - * returns the null pointer on error. - */ -BerElement * -LDAP_CALL -ber_init( const struct berval *bv ) -{ - BerElement *ber; - - /* construct BerElement */ - if (( ber = ber_alloc_t( 0 )) != NULLBER ) { - /* copy data from the bv argument into BerElement */ - /* XXXmcs: had to cast unsigned long bv_len to long */ - if ( (ber_write ( ber, bv->bv_val, bv->bv_len, 0 )) - != (long)bv->bv_len ) { - ber_free( ber, 1 ); - return( NULL ); - } - } - - /* - * reset ber_ptr back to the beginning of buffer so that this new - * and initialized ber element can be READ - */ - ber_reset( ber, 1); - - /* - * return a ptr to a new BerElement containing a copy of the data - * in the bv argument or a null pointer on error - */ - return( ber ); -} - - -/* - * memory allocation functions. - */ -void * -nslberi_malloc( size_t size ) -{ - return( nslberi_memalloc_fns.lbermem_malloc == NULL ? - malloc( size ) : - nslberi_memalloc_fns.lbermem_malloc( size )); -} - - -void * -nslberi_calloc( size_t nelem, size_t elsize ) -{ - return( nslberi_memalloc_fns.lbermem_calloc == NULL ? - calloc( nelem, elsize ) : - nslberi_memalloc_fns.lbermem_calloc( nelem, elsize )); -} - - -void * -nslberi_realloc( void *ptr, size_t size ) -{ - return( nslberi_memalloc_fns.lbermem_realloc == NULL ? - realloc( ptr, size ) : - nslberi_memalloc_fns.lbermem_realloc( ptr, size )); -} - - -void -nslberi_free( void *ptr ) -{ - if ( nslberi_memalloc_fns.lbermem_free == NULL ) { - free( ptr ); - } else { - nslberi_memalloc_fns.lbermem_free( ptr ); - } -} - - -/* - ****************************************************************************** - * functions to bridge the gap between new extended I/O functions that are - * installed using ber_sockbuf_set_option( ..., LBER_SOCKBUF_OPT_EXT_IO_FNS, - * ... ). - * - * the basic strategy is to use the new extended arg to hold a pointer to the - * Sockbuf itself so we can find the old functions and call them. - * note that the integer socket s passed in is not used. we use the sb_sd - * from the Sockbuf itself because it is the correct type. - */ -static int -nslberi_extread_compat( int s, void *buf, int len, - struct lextiof_socket_private *arg ) -{ - Sockbuf *sb = (Sockbuf *)arg; - - return( sb->sb_io_fns.lbiof_read( sb->sb_sd, buf, len )); -} - - -static int -nslberi_extwrite_compat( int s, const void *buf, int len, - struct lextiof_socket_private *arg ) -{ - Sockbuf *sb = (Sockbuf *)arg; - - return( sb->sb_io_fns.lbiof_write( sb->sb_sd, buf, len )); -} - - -/* - * Install I/O compatiblity functions. This can't fail. - */ -static void -nslberi_install_compat_io_fns( Sockbuf *sb ) -{ - sb->sb_ext_io_fns.lbextiofn_size = LBER_X_EXTIO_FNS_SIZE; - sb->sb_ext_io_fns.lbextiofn_read = nslberi_extread_compat; - sb->sb_ext_io_fns.lbextiofn_write = nslberi_extwrite_compat; - sb->sb_ext_io_fns.lbextiofn_writev = NULL; - sb->sb_ext_io_fns.lbextiofn_socket_arg = (void *)sb; -} -/* - * end of compat I/O functions - ****************************************************************************** - */ diff --git a/mozilla/directory/c-sdk/ldap/libraries/liblber/lber-int.h b/mozilla/directory/c-sdk/ldap/libraries/liblber/lber-int.h deleted file mode 100644 index a2b3278b8e8..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/liblber/lber-int.h +++ /dev/null @@ -1,306 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1990 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ -/* lbet-int.h - internal header file for liblber */ - -#ifndef _LBERINT_H -#define _LBERINT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -#ifdef macintosh -# include "ldap-macos.h" -#else /* macintosh */ -#if !defined(BSDI) -# include -#endif -# include -# include -#if defined(SUNOS4) || defined(SCOOS) -# include -#endif -#if defined( _WINDOWS ) -# define WIN32_LEAN_AND_MEAN -# include -# include -/* No stderr in a 16-bit Windows DLL */ -# if defined(_WINDLL) && !defined(_WIN32) -# define USE_DBG_WIN -# endif -# else -#if !defined(XP_OS2) -/* # include */ -# include -# include -# include -#endif -# endif /* defined( _WINDOWS ) */ -#endif /* macintosh */ - -#include -#include -#include "portable.h" - -#ifdef _WINDOWS -#include -#include -#endif /* _WINDOWS */ - -#ifdef XP_OS2 -#include -#include -#endif /* XP_OS2 */ - -/* No stderr in a 16-bit Windows DLL */ -#if defined(_WINDLL) && !defined(_WIN32) -#define stderr NULL -#endif - -#include "lber.h" - -#ifdef macintosh -#define NSLDAPI_LBER_SOCKET_IS_PTR -#endif - -#define OLD_LBER_SEQUENCE 0x10L /* w/o constructed bit - broken */ -#define OLD_LBER_SET 0x11L /* w/o constructed bit - broken */ - -#ifndef _IFP -#define _IFP -typedef int (LDAP_C LDAP_CALLBACK *IFP)(); -#endif - -typedef struct seqorset { - unsigned long sos_clen; - unsigned long sos_tag; - char *sos_first; - char *sos_ptr; - struct seqorset *sos_next; -} Seqorset; -#define NULLSEQORSET ((Seqorset *) 0) - -#define SOS_STACK_SIZE 8 /* depth of the pre-allocated sos structure stack */ - - -#define MAX_TAG_SIZE (1 + sizeof(long)) /* One byte for the length of the tag */ -#define MAX_LEN_SIZE (1 + sizeof(long)) /* One byte for the length of the length */ -#define MAX_VALUE_PREFIX_SIZE 4 -#define BER_ARRAY_QUANTITY 5 /* 0:Tag 1:Length 2:Value-prefix 3:Value 4:Value-suffix */ -#define BER_STRUCT_TAG 0 -#define BER_STRUCT_LEN 1 -#define BER_STRUCT_PRE 2 -#define BER_STRUCT_VAL 3 -#define BER_STRUCT_SUF 4 - -struct berelement { - ldap_x_iovec ber_struct[BER_ARRAY_QUANTITY]; /* See above */ - - char ber_tag_contents[MAX_TAG_SIZE]; - char ber_len_contents[MAX_LEN_SIZE]; - char ber_pre_contents[MAX_VALUE_PREFIX_SIZE]; - - char *ber_buf; /* update the value value when writing in case realloc is called */ - char *ber_ptr; - char *ber_end; - struct seqorset *ber_sos; - unsigned long ber_tag; /* Remove me someday */ - unsigned long ber_len; /* Remove me someday */ - int ber_usertag; - char ber_options; - char *ber_rwptr; - BERTranslateProc ber_encode_translate_proc; - BERTranslateProc ber_decode_translate_proc; - int ber_flags; -#define LBER_FLAG_NO_FREE_BUFFER 1 /* don't free ber_buf */ - int ber_sos_stack_posn; - Seqorset ber_sos_stack[SOS_STACK_SIZE]; -}; - -#define BER_CONTENTS_STRUCT_SIZE (sizeof(ldap_x_iovec) * BER_ARRAY_QUANTITY) - - - -#define NULLBER ((BerElement *)NULL) - -#ifdef LDAP_DEBUG -void ber_dump( BerElement *ber, int inout ); -#endif - - - -/* - * structure for read/write I/O callback functions. - */ -struct nslberi_io_fns { - LDAP_IOF_READ_CALLBACK *lbiof_read; - LDAP_IOF_WRITE_CALLBACK *lbiof_write; -}; - - -/* - * Old structure for use with LBER_SOCKBUF_OPT_EXT_IO_FNS: - */ -struct lber_x_ext_io_fns_rev0 { - /* lbextiofn_size should always be set to LBER_X_EXTIO_FNS_SIZE */ - int lbextiofn_size; - LDAP_X_EXTIOF_READ_CALLBACK *lbextiofn_read; - LDAP_X_EXTIOF_WRITE_CALLBACK *lbextiofn_write; - struct lextiof_socket_private *lbextiofn_socket_arg; -}; -#define LBER_X_EXTIO_FNS_SIZE_REV0 sizeof(struct lber_x_ext_io_fns_rev0) - - - -struct sockbuf { - LBER_SOCKET sb_sd; - BerElement sb_ber; - int sb_naddr; /* > 0 implies using CLDAP (UDP) */ - void *sb_useaddr; /* pointer to sockaddr to use next */ - void *sb_fromaddr; /* pointer to message source sockaddr */ - void **sb_addrs; /* actually an array of pointers to - sockaddrs */ - - int sb_options; /* to support copying ber elements */ - LBER_SOCKET sb_copyfd; /* for LBER_SOCKBUF_OPT_TO_FILE* opts */ - unsigned long sb_max_incoming; - unsigned long sb_valid_tag; /* valid tag to accept */ - struct nslberi_io_fns - sb_io_fns; /* classic I/O callback functions */ - - struct lber_x_ext_io_fns - sb_ext_io_fns; /* extended I/O callback functions */ -}; -#define NULLSOCKBUF ((Sockbuf *)NULL) - - -#ifndef NSLBERI_LBER_INT_FRIEND -/* - * Everything from this point on is excluded if NSLBERI_LBER_INT_FRIEND is - * defined. The code under ../libraries/libldap defines this. - */ - -#define READBUFSIZ 8192 - -/* - * macros used to check validity of data structures and parameters - */ -#define NSLBERI_VALID_BERELEMENT_POINTER( ber ) \ - ( (ber) != NULLBER ) - -#define NSLBERI_VALID_SOCKBUF_POINTER( sb ) \ - ( (sb) != NULLSOCKBUF ) - - -#if defined(_WIN32) && defined(_ALPHA) -#define LBER_HTONL( _l ) \ - ((((_l)&0xff)<<24) + (((_l)&0xff00)<<8) + \ - (((_l)&0xff0000)>>8) + (((_l)&0xff000000)>>24)) -#define LBER_NTOHL(_l) LBER_HTONL(_l) - -#elif !defined(__alpha) || defined(VMS) - -#define LBER_HTONL( l ) htonl( l ) -#define LBER_NTOHL( l ) ntohl( l ) - -#else /* __alpha */ -/* - * htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the - * lower-order 32-bits of a (64-bit) long, so we define correct versions - * here. - */ -#define LBER_HTONL( l ) (((long)htonl( (l) & 0x00000000FFFFFFFF )) << 32 \ - | htonl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 )) - -#define LBER_NTOHL( l ) (((long)ntohl( (l) & 0x00000000FFFFFFFF )) << 32 \ - | ntohl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 )) -#endif /* __alpha */ - - -/* function prototypes */ -#ifdef LDAP_DEBUG -void lber_bprint( char *data, int len ); -#endif -void ber_err_print( char *data ); -void *nslberi_malloc( size_t size ); -void *nslberi_calloc( size_t nelem, size_t elsize ); -void *nslberi_realloc( void *ptr, size_t size ); -void nslberi_free( void *ptr ); -int nslberi_ber_realloc( BerElement *ber, unsigned long len ); - - - -/* blame: dboreham - * slapd spends much of its time doing memcpy's for the ber code. - * Most of these are single-byte, so we special-case those and speed - * things up considerably. - */ - -#ifdef sunos4 -#define THEMEMCPY( d, s, n ) bcopy( s, d, n ) -#else /* sunos4 */ -#define THEMEMCPY( d, s, n ) memmove( d, s, n ) -#endif /* sunos4 */ - -#ifdef SAFEMEMCPY -#undef SAFEMEMCPY -#define SAFEMEMCPY(d,s,n) if (1 == n) *((char*)d) = *((char*)s); else THEMEMCPY(d,s,n); -#endif - -/* - * Memory allocation done in liblber should all go through one of the - * following macros. This is so we can plug-in alternative memory - * allocators, etc. as the need arises. - */ -#define NSLBERI_MALLOC( size ) nslberi_malloc( size ) -#define NSLBERI_CALLOC( nelem, elsize ) nslberi_calloc( nelem, elsize ) -#define NSLBERI_REALLOC( ptr, size ) nslberi_realloc( ptr, size ) -#define NSLBERI_FREE( ptr ) nslberi_free( ptr ) - -/* allow the library to access the debug variable */ - -extern int lber_debug; - -#endif /* !NSLBERI_LBER_INT_FRIEND */ - - -#ifdef __cplusplus -} -#endif -#endif /* _LBERINT_H */ diff --git a/mozilla/directory/c-sdk/ldap/libraries/libldap.ex b/mozilla/directory/c-sdk/ldap/libraries/libldap.ex deleted file mode 100644 index b1edd30bf6a..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libldap.ex +++ /dev/null @@ -1,271 +0,0 @@ -10 ldap_abandon -11 ldap_add -13 ldap_unbind - -#14 ldap_enable_cache -#15 ldap_disable_cache -#16 ldap_destroy_cache -#17 ldap_flush_cache -#18 ldap_uncache_entry - -19 ldap_compare -20 ldap_delete -21 ldap_result2error -22 ldap_err2string -23 ldap_modify -24 ldap_modrdn -25 ldap_open -26 ldap_first_entry -27 ldap_next_entry -30 ldap_get_dn -31 ldap_dn2ufn -32 ldap_first_attribute -33 ldap_next_attribute -34 ldap_get_values -35 ldap_get_values_len -36 ldap_count_entries -37 ldap_count_values -38 ldap_value_free -39 ldap_explode_dn -40 ldap_result -41 ldap_msgfree -43 ldap_search -44 ldap_add_s -45 ldap_bind_s -46 ldap_unbind_s -47 ldap_delete_s -48 ldap_modify_s -49 ldap_modrdn_s -50 ldap_search_s -51 ldap_search_st -52 ldap_compare_s -53 ldap_ufn_search_c -54 ldap_ufn_search_s -55 ldap_init_getfilter -56 ldap_getfilter_free -57 ldap_getfirstfilter -58 ldap_getnextfilter -59 ldap_simple_bind -60 ldap_simple_bind_s -61 ldap_bind -62 ldap_friendly_name -63 ldap_free_friendlymap -64 ldap_ufn_search_ct - -#65 ldap_set_cache_options -#66 ldap_uncache_request - -67 ldap_modrdn2 -68 ldap_modrdn2_s -69 ldap_ufn_setfilter -70 ldap_ufn_setprefix -71 ldap_ufn_timeout C -72 ldap_init_getfilter_buf -73 ldap_setfilteraffixes -74 ldap_sort_entries -75 ldap_sort_values -76 ldap_sort_strcasecmp C -77 ldap_count_values_len -78 ldap_name2template -79 ldap_value_free_len - -# manually comment and uncomment these five as necessary -#80 ldap_kerberos_bind1 -#81 ldap_kerberos_bind2 -#82 ldap_kerberos_bind_s -#83 ldap_kerberos_bind1_s -#84 ldap_kerberos_bind2_s - -85 ldap_init -86 ldap_is_dns_dn -87 ldap_explode_dns -88 ldap_mods_free - -89 ldap_is_ldap_url -90 ldap_free_urldesc -91 ldap_url_parse -92 ldap_url_search -93 ldap_url_search_s -94 ldap_url_search_st -95 ldap_set_rebind_proc -100 ber_skip_tag -101 ber_peek_tag -102 ber_get_int -103 ber_get_stringb -104 ber_get_stringa -105 ber_get_stringal -106 ber_get_bitstringa -107 ber_get_null -108 ber_get_boolean -109 ber_first_element -110 ber_next_element -111 ber_scanf C -112 ber_bvfree -113 ber_bvecfree -114 ber_put_int -115 ber_put_ostring -116 ber_put_string -117 ber_put_bitstring -118 ber_put_null -119 ber_put_boolean -120 ber_start_seq -121 ber_start_set -122 ber_put_seq -123 ber_put_set -124 ber_printf C -125 ber_read -126 ber_write -127 ber_free -128 ber_flush -129 ber_alloc -130 ber_dup -131 ber_get_next -132 ber_get_tag -133 ber_put_enum -134 der_alloc -135 ber_alloc_t -136 ber_bvdup -137 ber_init_w_nullchar -138 ber_reset -139 ber_get_option -140 ber_set_option -141 ber_sockbuf_alloc -142 ber_sockbuf_get_option -143 ber_sockbuf_set_option -144 ber_init -145 ber_flatten -146 ber_special_alloc -147 ber_special_free -148 ber_get_next_buffer -149 ber_err_print C -150 ber_sockbuf_free -151 ber_get_next_buffer_ext -152 ber_svecfree - -200 ldap_memfree -201 ldap_ber_free - -300 ldap_init_searchprefs -301 ldap_init_searchprefs_buf -302 ldap_free_searchprefs -303 ldap_first_searchobj -304 ldap_next_searchobj -305 ldap_build_filter - -400 ldap_init_templates -401 ldap_init_templates_buf -402 ldap_free_templates -403 ldap_first_disptmpl -404 ldap_next_disptmpl -405 ldap_oc2template -406 ldap_tmplattrs -407 ldap_first_tmplrow -408 ldap_next_tmplrow -409 ldap_first_tmplcol -410 ldap_next_tmplcol -411 ldap_entry2text_search -412 ldap_entry2text -413 ldap_vals2text -414 ldap_entry2html -415 ldap_entry2html_search -416 ldap_vals2html -417 ldap_tmplerr2string -418 ldap_set_option -419 ldap_get_option -420 ldap_charray_merge -430 ldap_get_lderrno -431 ldap_set_lderrno -432 ldap_perror -433 ldap_set_filter_additions -434 ldap_create_filter -440 ldap_version -441 ldap_multisort_entries -442 ldap_msgid -443 ldap_explode_rdn -444 ldap_msgtype -445 ldap_cache_flush -446 ldap_str2charray -447 ldap_charray_add -448 ldap_charray_dup -449 ldap_charray_free - -# Windows ordinals 450-469 are reserved for SSL routines - -470 ldap_charray_inlist -471 ldap_charray_position -472 ldap_rename -473 ldap_rename_s -474 ldap_utf8len -475 ldap_utf8next -476 ldap_utf8prev -477 ldap_utf8copy -478 ldap_utf8characters -479 ldap_utf8strtok_r -480 ldap_utf8isalnum -481 ldap_utf8isalpha -482 ldap_utf8isdigit -483 ldap_utf8isxdigit -484 ldap_utf8isspace -485 ldap_control_free -486 ldap_controls_free -487 ldap_sasl_bind -488 ldap_sasl_bind_s -489 ldap_parse_sasl_bind_result -# LDAPv3 simple paging controls are not supported by Netscape at this time. -# 490 ldap_create_page_control -# 491 ldap_parse_page_control -492 ldap_create_sort_control -493 ldap_parse_sort_control -# an LDAPv3 language control was proposed but then retracted. -# 494 ldap_create_language_control -495 ldap_get_lang_values -496 ldap_get_lang_values_len -497 ldap_free_sort_keylist -498 ldap_create_sort_keylist -499 ldap_utf8getcc -500 ldap_get_entry_controls -501 ldap_create_persistentsearch_control -502 ldap_parse_entrychange_control -503 ldap_parse_result -504 ldap_parse_extended_result -505 ldap_parse_reference -506 ldap_abandon_ext -507 ldap_add_ext -508 ldap_add_ext_s -509 ldap_modify_ext -510 ldap_modify_ext_s -511 ldap_first_message -512 ldap_next_message -513 ldap_compare_ext -514 ldap_compare_ext_s -515 ldap_delete_ext -516 ldap_delete_ext_s -517 ldap_search_ext -518 ldap_search_ext_s -519 ldap_extended_operation -520 ldap_extended_operation_s -521 ldap_first_reference -522 ldap_next_reference -523 ldap_count_references -524 ldap_count_messages -525 ldap_create_virtuallist_control -526 ldap_parse_virtuallist_control -527 ldap_create_proxyauth_control -528 ldap_unbind_ext -529 ldap_x_hostlist_first -530 ldap_x_hostlist_next -531 ldap_x_hostlist_statusfree -532 ldap_x_malloc -533 ldap_x_calloc -534 ldap_x_realloc -535 ldap_x_free -536 ldap_create_proxiedauth_control -1000 ldap_memcache_init -1001 ldap_memcache_set -1002 ldap_memcache_get -1003 ldap_memcache_flush -1004 ldap_memcache_destroy -1005 ldap_memcache_update -1006 ldap_keysort_entries -0 ldap_debug G full -0 lber_debug G full diff --git a/mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.client b/mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.client deleted file mode 100644 index f2e0f4c86cf..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.client +++ /dev/null @@ -1,266 +0,0 @@ -# -# The contents of this file are subject to the Netscape Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/NPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is Mozilla Communicator client code, released -# March 31, 1998. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-1999 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -DEPTH = ../../../../.. -NS_DEPTH = ../../../.. -LDAP_SRC = ../.. -NSCP_DISTDIR = ../../../../../dist -NSPR_TREE = ../../.. -MOD_DEPTH = ../../.. - -include $(NSPR_TREE)/config/rules.mk -include ../../../build.mk - -SRCS = abandon.c \ - add.c \ - bind.c \ - cache.c \ - charray.c \ - charset.c \ - compare.c \ - compat.c \ - control.c \ - countvalues.c \ - delete.c \ - disptmpl.c \ - dsparse.c \ - error.c \ - extendop.c \ - free.c \ - freevalues.c \ - friendly.c \ - getattr.c \ - getdn.c \ - getdxbyname.c \ - getentry.c \ - getfilter.c \ - getoption.c \ - getvalues.c \ - memcache.c \ - message.c \ - modify.c \ - open.c \ - os-ip.c \ - proxyauthctrl.c \ - psearch.c \ - referral.c \ - regex.c \ - rename.c \ - request.c \ - reslist.c \ - result.c \ - saslbind.c \ - sbind.c \ - search.c \ - setoption.c \ - sort.c \ - sortctrl.c \ - srchpref.c \ - tmplout.c \ - ufn.c \ - unbind.c \ - unescape.c \ - url.c \ - utf8.c \ - vlistctrl.c - -ifeq ($(OS_ARCH), WINNT) -SRCS +=dllmain.c -SRCS +=mozock.c -endif - -ifeq ($(OS_ARCH), WINNT) -REALOBJS = $(SRCS:.c=.obj) -else -REALOBJS = $(SRCS:.c=.o) -endif - -LDAPOBJDEST = $(OBJDIR_NAME) -OBJS = $(addprefix $(LDAPOBJDEST)/, $(REALOBJS)) - -DISTHDIR = $(NSCP_DISTDIR)/public/ldap -HDIR = $(LDAP_SRC)/include - -ifeq ($(OS_ARCH), WINNT) -LIBLDAP = $(addprefix $(LDAPOBJDEST)/, $(LDAP_LIBNAME).$(DLL_SUFFIX)) -DLLLDAP = $(addprefix $(LDAPOBJDEST)/, $(LDAP_LIBNAME).$(LIB_SUFFIX)) -else -LIBLDAP = $(addprefix $(LDAPOBJDEST)/, lib$(LDAP_LIBNAME).$(DLL_SUFFIX)) -DLLLDAP = $(addprefix $(LDAPOBJDEST)/, lib$(LDAP_LIBNAME).$(LIB_SUFFIX)) -endif -INSTALLDIR = $(DEPTH)/dist/$(OBJDIR_NAME) - -LOCAL_INCLUDES = -I$(PUBLIC)/nspr -INCLUDES += -I$(DISTHDIR) -I$(HDIR) -I$(INSTALLDIR)/include \ - -I../../../../../dist/include -DEFINES += $(DEFS) - -PLATFORMCFLAGS = -DUSE_WAITPID -DNEEDPROTOS -#PLATFORMLIBS = -THREADS = -THREADSLIB = - -ETCFILES = ldapfilter.conf \ - ldapfriendly \ - ldapsearchprefs.conf \ - ldaptemplates.conf \ - $(NULL) - -ETCDIR = $(INSTALLDIR)/etc - -# -# if you want things to run in a different directory from where they -# are installed, set this accordingly (this path gets compiled into a -# few binaries). otherwise, leave it alone. -# -RUNTIMEETCDIR = $(ETCDIR) - -# -# shared library symbol export definitions -# -ifeq ($(USE_DLL_EXPORTS_FILE), 1) -ifeq ($(OS_ARCH), WINNT) -GENEXPORTS=cmd /c $(PERL) $(LDAP_SRC)/build/genexports.pl -else -GENEXPORTS=$(PERL) $(LDAP_SRC)/build/genexports.pl -endif - -# variable definitions for exported symbols -ifeq ($(OS_ARCH), WINNT) - LDAP_EXPORT_DEFS=../msdos/winsock/nsldap32.def -else - LDAP_EXPORT_DEFS= $(LDAPOBJDEST)/libldap.exp -endif - -LDAP_EXPORT_FLAGS=$(addprefix $(DLLEXPORTS_PREFIX), $(LDAP_EXPORT_DEFS)) - -GENEXPARGS=$(BUILD_DEBUG) $(LDAPVERS_SUFFIX) $(LDAPVERS) -endif # USE_DLL_EXPORTS_FILE - -ifeq ($(OS_ARCH), SunOS) -EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LBER_LIBNAME) -EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib -endif - -ifeq ($(OS_ARCH), Linux) -EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LBER_LIBNAME) -EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib -endif - -ifeq ($(OS_ARCH), WINNT) -EXTRA_LIBS =wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ - rpcrt4.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib -EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(LDIF_LIBNAME).lib -EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(LBER_LIBNAME).lib -endif - -ifeq ($(OS_ARCH), OSF1) -EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LBER_LIBNAME) -EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib -EXTRA_LIBS += -L/usr/lib -lcxx -lpthread -lrt -lmach -lexc -endif - -ifeq ($(OS_ARCH), AIX) -EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LBER_LIBNAME) -EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib -EXTRA_LIBS += -ldl -brtl -lpthreads -lc_r -lm -endif - -ifeq ($(OS_ARCH), HP-UX) -EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LBER_LIBNAME) -EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib -EXTRA_LIBS += -ldld -lm -lpthread -endif - -OBJDEST = $(OBJDIR_NAME) - -########################################################################### - -ifeq ($(USE_DLL_EXPORTS_FILE), 1) -# recursive gmake rule to create exported symbols file -$(LDAP_EXPORT_DEFS):: ../libldap.ex -ifeq ($(OS_ARCH), WINNT) - $(GENEXPORTS) Win32 Standard $< $(GENEXPARGS) > $@ -else - $(GENEXPORTS) $(OS_ARCH) Standard $< $(GENEXPARGS) > $@ -endif -endif # USE_DLL_EXPORTS_FILE - -versiont.c: Makefile.client Version.c - @$(RM) $@ - @(u="$${USER-root}" v="$(shell cat ../../build/version)" d="$(shell pwd)" \ - h="$(shell hostname)" t="$(shell date)"; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -all:: $(OBJDEST) $(LIBDIR) $(OBJS) $(LIBLDAP) $(DLLLDAP) - -ltest:: $(LIBLDAP) test.o - $(LINK_EXE) test.o - -$(LIBDIR): - $(MKDIR) $(LIBDIR) - -$(LIBLDAP): $(OBJS) $(LIBDIR) $(LDAP_EXPORT_DEFS) - @echo ======= making $(LIBLDAP) -ifdef SO_FILES_TO_REMOVE - -$(RM) $(SO_FILES_TO_REMOVE) -endif - $(LINK_DLL) $(DSO_LDOPTS) $(LDAP_EXPORT_FLAGS) $(EXTRA_LIBS) - -$(DLLLDAP): $(OBJS) $(LIBDIR) $(LDAP_EXPORT_DEFS) - @echo ======= making $(DLLLDAP) -ifdef SO_FILES_TO_REMOVE - -$(RM) $(SO_FILES_TO_REMOVE) -endif -ifeq ($(OS_ARCH), AIX) - $(LINK_LIB) ../liblber/$(OBJDIR_NAME)/*.a -else -ifeq ($(OS_ARCH), Linux) - $(LINK_LIB) ../liblber/$(OBJDIR_NAME)/*.a -else - $(LINK_LIB) $(EXTRA_LIBS) -endif -endif - -veryclean:: clean - -clean:: - $(RM) $(OBJS) $(LIBLDAP) - $(RM) -r $(LDAPOBJDEST) - -$(OBJDEST): - $(MKDIR) $(OBJDEST) - -install:: $(LIBLDAP) $(DLLLDAP) -ifdef MKSHLIB - $(INSTALL) -m 555 $(LIBLDAP) $(INSTALLDIR)/lib - $(INSTALL) -m 555 $(DLLLDAP) $(INSTALLDIR)/lib -endif -ifeq ($(OS_ARCH), WINNT) - $(INSTALL) -m 555 $(LIBLDAP) $(INSTALLDIR)/lib - $(INSTALL) -m 555 $(DLLLDAP) $(INSTALLDIR)/lib -endif - $(INSTALL) -m 555 $(ETCFILES) $(ETCDIR) - diff --git a/mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in b/mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in deleted file mode 100644 index 54e631ff770..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in +++ /dev/null @@ -1,160 +0,0 @@ -DEPTH = ../../../../.. -NS_DEPTH = ../../../.. -srcdir = @srcdir@ -ldaptopsrcdir = @top_srcdir@ - -RM = rm -f -SED = sed - -SRCS = abandon.c \ - add.c \ - bind.c \ - cache.c \ - charray.c \ - charset.c \ - compare.c \ - compat.c \ - control.c \ - countvalues.c \ - delete.c \ - disptmpl.c \ - dsparse.c \ - error.c \ - extendop.c \ - free.c \ - freevalues.c \ - friendly.c \ - getattr.c \ - getdn.c \ - getdxbyname.c \ - getentry.c \ - getfilter.c \ - getoption.c \ - getvalues.c \ - memcache.c \ - message.c \ - modify.c \ - open.c \ - os-ip.c \ - proxyauthctrl.c \ - psearch.c \ - referral.c \ - regex.c \ - rename.c \ - request.c \ - reslist.c \ - result.c \ - saslbind.c \ - sbind.c \ - search.c \ - setoption.c \ - sort.c \ - sortctrl.c \ - srchpref.c \ - tmplout.c \ - ufn.c \ - unbind.c \ - unescape.c \ - url.c \ - utf8.c \ - vlistctrl.c - -REALOBJS = $(SRCS:.c=.o) - -#OBJS = $(REALOBJS) versiont.o -OBJS = $(REALOBJS) - -HDIR = $(ldaptopsrcdir)/include -HDIR2 = ../../include - -CFLAGS = $(INCLUDES) $(DEFINES) - -LIBRARY_NAME = ldap41 - -# -# DEFS are included in CFLAGS -# -DEFS = $(PLATFORMCFLAGS) $(LDAP_DEBUG) $(KERBEROS) $(AFSKERBEROS) \ - $(UOFM) $(UOFA) $(NO_USERINTERFACE) $(CLDAP) $(NO_CACHE) \ - $(LDAP_REFERRALS) $(LDAP_DNS) $(STR_TRANSLATION) \ - $(LIBLDAP_CHARSETS) $(LIBLDAP_DEF_CHARSET) \ - $(SLAPD_BACKENDS) $(LDBMBACKEND) $(LDBMINCLUDE) $(PHONETIC) - -include ../../build/autoconf.mk -include $(NSPR_TREE)/config/rules.mk - -LOCAL_INCLUDES = -I$(PUBLIC)/nspr -INCLUDES += -I$(HDIR) -I$(HDIR2) $(KRBINCLUDEFLAG) -DEFINES += $(DEFS) -DFILTERFILE=./ldapfilter.conf \ - -DTEMPLATEFILE=./ldaptemplates.conf \ - -DNDEBUG -UMOZILLA_CLIENT - -# So we actually get the definition of hostent_data.... -ifeq ($(OS_ARCH),AIX) -DEFINES += -D_THREAD_SAFE -endif - -GARBAGE += $(ETCDIR)/ldapfriendly $(ETCDIR)/ldapfilter.conf \ - $(ETCDIR)/ldaptemplates.conf $(ETCDIR)/ldapsearchprefs.conf - -PLATFORMCFLAGS = -DUSE_WAITPID -DNEEDPROTOS -PLATFORMLIBS = -THREADS = -THREADSLIB = - -ETCFILES = ldapfilter.conf \ - ldapfriendly \ - ldapsearchprefs.conf \ - ldaptemplates.conf \ - $(NULL) - -ETCDIR = $(DIST)/etc - -# -# if you want things to run in a different directory from where they -# are installed, set this accordingly (this path gets compiled into a -# few binaries). otherwise, leave it alone. -# -RUNTIMEETCDIR = $(ETCDIR) - -# -# To build slapd (the stand-alone ldap daemon), uncomment the MAKESLAPD -# line and select the SLAPD_BACKENDS you want to use. If you enable the -# LDBM backend, also select one of the LDBM backends. -# -MAKESLAPD = yes -SLAPD_BACKENDS = -DLDAP_LDBM -DLDAP_SHELL -DLDAP_PASSWD -LDBMBACKEND = -DLDBM_USE_NDBM - -# -# uncomment this line to enable debugging code (a good idea) -# -ifndef BUILD_OPT -LDAP_DEBUG = -DLDAP_DEBUG -endif - -# -# uncomment this line to enable support for LDAP referrals in libldap -# -LDAP_REFERRALS = -DLDAP_REFERRALS - -########################################################################### - -versiont.c: Makefile.client Version.c - @$(RM) $@ - @(u="$${USER-root}" v="$(shell cat ../../build/version)" d="$(shell pwd)" \ - h="$(shell hostname)" t="$(shell date)"; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install:: $(LIBRARY) $(SHARED_LIBRARY) - $(INSTALL) -m 444 $(LIBRARY) $(DIST)/lib -ifdef MKSHLIB - $(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/lib - $(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/bin -endif - -# XXX currently we don't install any of these config files; what to do? -# -# $(INSTALL) $(INSTALLFLAGS) -m 644 $(ETCFILES) $(ETCDIR) diff --git a/mozilla/directory/c-sdk/ldap/libraries/libldap/abandon.c b/mozilla/directory/c-sdk/ldap/libraries/libldap/abandon.c deleted file mode 100644 index db5b968c6cc..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libldap/abandon.c +++ /dev/null @@ -1,271 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * Copyright (c) 1990 Regents of the University of Michigan. - * All rights reserved. - */ -/* - * abandon.c - */ - -#if 0 -#ifndef lint -static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; -#endif -#endif - -#include "ldap-int.h" - -static int do_abandon( LDAP *ld, int origid, int msgid, - LDAPControl **serverctrls, LDAPControl **clientctrls ); - -/* - * ldap_abandon - perform an ldap abandon operation. Parameters: - * - * ld LDAP descriptor - * msgid The message id of the operation to abandon - * - * ldap_abandon returns 0 if everything went ok, -1 otherwise. - * - * Example: - * ldap_abandon( ld, msgid ); - */ -int -LDAP_CALL -ldap_abandon( LDAP *ld, int msgid ) -{ - LDAPDebug( LDAP_DEBUG_TRACE, "ldap_abandon %d\n", msgid, 0, 0 ); - LDAPDebug( LDAP_DEBUG_TRACE, "4e65747363617065\n", msgid, 0, 0 ); - LDAPDebug( LDAP_DEBUG_TRACE, "466f726576657221\n", msgid, 0, 0 ); - - if ( ldap_abandon_ext( ld, msgid, NULL, NULL ) == LDAP_SUCCESS ) { - return( 0 ); - } - - return( -1 ); -} - - -/* - * LDAPv3 extended abandon. - * Returns an LDAP error code. - */ -int -LDAP_CALL -ldap_abandon_ext( LDAP *ld, int msgid, LDAPControl **serverctrls, - LDAPControl **clientctrls ) -{ - int rc; - - LDAPDebug( LDAP_DEBUG_TRACE, "ldap_abandon_ext %d\n", msgid, 0, 0 ); - - if ( !NSLDAPI_VALID_LDAP_POINTER( ld )) { - return( LDAP_PARAM_ERROR ); - } - - LDAP_MUTEX_LOCK( ld, LDAP_CONN_LOCK ); - LDAP_MUTEX_LOCK( ld, LDAP_REQ_LOCK ); - rc = do_abandon( ld, msgid, msgid, serverctrls, clientctrls ); - - /* - * XXXmcs should use cache function pointers to hook in memcache - */ - ldap_memcache_abandon( ld, msgid ); - - LDAP_MUTEX_UNLOCK( ld, LDAP_REQ_LOCK ); - LDAP_MUTEX_UNLOCK( ld, LDAP_CONN_LOCK ); - - return( rc ); -} - - -/* - * Abandon all outstanding requests for msgid (included child requests - * spawned when chasing referrals). This function calls itself recursively. - * No locking is done is this function so it must be done by the caller. - * Returns an LDAP error code and sets it in LDAP *ld as well - */ -static int -do_abandon( LDAP *ld, int origid, int msgid, LDAPControl **serverctrls, - LDAPControl **clientctrls ) -{ - BerElement *ber; - int i, bererr, lderr, sendabandon; - Sockbuf *sb; - LDAPRequest *lr = NULL; - - /* - * An abandon request looks like this: - * AbandonRequest ::= MessageID - */ - LDAPDebug( LDAP_DEBUG_TRACE, "do_abandon origid %d, msgid %d\n", - origid, msgid, 0 ); - - /* optimistic */ - lderr = LDAP_SUCCESS; - -/* - * this is not the best implementation... - * the code special cases the when async io is enabled. - * The logic is clear this way, at the cost of code bloat. - * This logic should be cleaned up post nova 4.5 rtm - */ - if (ld->ld_options & LDAP_BITOPT_ASYNC) - { - /* Don't send an abandon message unless there is something to abandon. */ - sendabandon = 0; - - /* Find the request that we are abandoning. */ - if (ld->ld_requests != NULL) { - for ( lr = ld->ld_requests; lr != NULL; lr = lr->lr_next ) { - if ( lr->lr_msgid == msgid ) { /* this message */ - if ( origid == msgid && lr->lr_parent != NULL ) { - /* don't let caller abandon child requests! */ - lderr = LDAP_PARAM_ERROR; - goto set_errorcode_and_return; - } - if ( lr->lr_status == LDAP_REQST_INPROGRESS ) { - /* We only need to send an abandon message if the request - * is in progress. - */ - sendabandon = 1; - } - break; - } - if ( lr->lr_origid == msgid ) { /* child: abandon it */ - (void)do_abandon( ld, msgid, lr->lr_msgid, - serverctrls, clientctrls ); - /* we ignore errors from child abandons... */ - } - } - } - } - else - { - sendabandon = 1; - /* find the request that we are abandoning */ - for ( lr = ld->ld_requests; lr != NULL; lr = lr->lr_next ) { - if ( lr->lr_msgid == msgid ) { /* this message */ - break; - } - if ( lr->lr_origid == msgid ) { /* child: abandon it */ - (void)do_abandon( ld, msgid, lr->lr_msgid, - serverctrls, clientctrls ); - /* we ignore errors from child abandons... */ - } - } - - if ( lr != NULL ) { - if ( origid == msgid && lr->lr_parent != NULL ) { - /* don't let caller abandon child requests! */ - lderr = LDAP_PARAM_ERROR; - goto set_errorcode_and_return; - } - if ( lr->lr_status != LDAP_REQST_INPROGRESS ) { - /* no need to send abandon message */ - sendabandon = 0; - } - } - } - if ( ldap_msgdelete( ld, msgid ) == 0 ) { - /* we had all the results and deleted them */ - goto set_errorcode_and_return; - } - - if ( sendabandon ) { - /* create a message to send */ - if (( lderr = nsldapi_alloc_ber_with_options( ld, &ber )) == - LDAP_SUCCESS ) { - LDAP_MUTEX_LOCK( ld, LDAP_MSGID_LOCK ); -#ifdef CLDAP - if ( ld->ld_dbp->sb_naddr > 0 ) { - bererr = ber_printf( ber, "{isti", - ++ld->ld_msgid, ld->ld_cldapdn, - LDAP_REQ_ABANDON, msgid ); - } else { -#endif /* CLDAP */ - bererr = ber_printf( ber, "{iti", - ++ld->ld_msgid, LDAP_REQ_ABANDON, msgid ); -#ifdef CLDAP - } -#endif /* CLDAP */ - LDAP_MUTEX_UNLOCK( ld, LDAP_MSGID_LOCK ); - - if ( bererr == -1 || - ( lderr = nsldapi_put_controls( ld, serverctrls, - 1, ber )) != LDAP_SUCCESS ) { - lderr = LDAP_ENCODING_ERROR; - ber_free( ber, 1 ); - } else { - /* send the message */ - if ( lr != NULL ) { - sb = lr->lr_conn->lconn_sb; - } else { - sb = ld->ld_sbp; - } - if ( nsldapi_ber_flush( ld, sb, ber, 1, 0 ) - != 0 ) { - lderr = LDAP_SERVER_DOWN; - } - } - } - } - - if ( lr != NULL ) { - if ( sendabandon ) { - nsldapi_free_connection( ld, lr->lr_conn, NULL, NULL, - 0, 1 ); - } - if ( origid == msgid ) { - nsldapi_free_request( ld, lr, 0 ); - } - } - - - LDAP_MUTEX_LOCK( ld, LDAP_ABANDON_LOCK ); - if ( ld->ld_abandoned == NULL ) { - if ( (ld->ld_abandoned = (int *)NSLDAPI_MALLOC( 2 - * sizeof(int) )) == NULL ) { - lderr = LDAP_NO_MEMORY; - LDAP_MUTEX_UNLOCK( ld, LDAP_ABANDON_LOCK ); - goto set_errorcode_and_return; - } - i = 0; - } else { - for ( i = 0; ld->ld_abandoned[i] != -1; i++ ) - ; /* NULL */ - if ( (ld->ld_abandoned = (int *)NSLDAPI_REALLOC( (char *) - ld->ld_abandoned, (i + 2) * sizeof(int) )) == NULL ) { - lderr = LDAP_NO_MEMORY; - LDAP_MUTEX_UNLOCK( ld, LDAP_ABANDON_LOCK ); - goto set_errorcode_and_return; - } - } - ld->ld_abandoned[i] = msgid; - ld->ld_abandoned[i + 1] = -1; - LDAP_MUTEX_UNLOCK( ld, LDAP_ABANDON_LOCK ); - -set_errorcode_and_return: - LDAP_SET_LDERRNO( ld, lderr, NULL, NULL ); - return( lderr ); -} diff --git a/mozilla/directory/c-sdk/ldap/libraries/libldap/add.c b/mozilla/directory/c-sdk/ldap/libraries/libldap/add.c deleted file mode 100644 index 31a4faa2631..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libldap/add.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* - * Copyright (c) 1990 Regents of the University of Michigan. - * All rights reserved. - */ -/* - * add.c - */ - -#if 0 -#ifndef lint -static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; -#endif -#endif - -#include "ldap-int.h" - -/* - * ldap_add - initiate an ldap add operation. Parameters: - * - * ld LDAP descriptor - * dn DN of the entry to add - * mods List of attributes for the entry. This is a null- - * terminated array of pointers to LDAPMod structures. - * only the type and values in the structures need be - * filled in. - * - * Example: - * LDAPMod *attrs[] = { - * { 0, "cn", { "babs jensen", "babs", 0 } }, - * { 0, "sn", { "jensen", 0 } }, - * { 0, "objectClass", { "person", 0 } }, - * 0 - * } - * msgid = ldap_add( ld, dn, attrs ); - */ -int -LDAP_CALL -ldap_add( LDAP *ld, const char *dn, LDAPMod **attrs ) -{ - int msgid; - - LDAPDebug( LDAP_DEBUG_TRACE, "ldap_add\n", 0, 0, 0 ); - - if ( ldap_add_ext( ld, dn, attrs, NULL, NULL, &msgid ) - == LDAP_SUCCESS ) { - return( msgid ); - } else { - return( -1 ); /* error is in ld handle */ - } -} - - -/* - * LDAPv3 extended add. - * Returns an LDAP error code. - */ -int -LDAP_CALL -ldap_add_ext( LDAP *ld, const char *dn, LDAPMod **attrs, - LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp ) -{ - BerElement *ber; - int i, rc, lderr; - - /* - * An add request looks like this: - * AddRequest ::= SEQUENCE { - * entry DistinguishedName, - * attrs SEQUENCE OF SEQUENCE { - * type AttributeType, - * values SET OF AttributeValue - * } - * } - */ - - LDAPDebug( LDAP_DEBUG_TRACE, "ldap_add_ext\n", 0, 0, 0 ); - - if ( !NSLDAPI_VALID_LDAP_POINTER( ld )) { - return( LDAP_PARAM_ERROR ); - } - - if ( !NSLDAPI_VALID_LDAPMESSAGE_POINTER( msgidp )) - { - LDAP_SET_LDERRNO( ld, LDAP_PARAM_ERROR, NULL, NULL ); - return( LDAP_PARAM_ERROR ); - } - if ( !NSLDAPI_VALID_NONEMPTY_LDAPMOD_ARRAY( attrs ) - || msgidp == NULL ) { - lderr = LDAP_PARAM_ERROR; - LDAP_SET_LDERRNO( ld, lderr, NULL, NULL ); - return( lderr ); - } - - if ( dn == NULL ) { - dn = ""; - } - - LDAP_MUTEX_LOCK( ld, LDAP_MSGID_LOCK ); - *msgidp = ++ld->ld_msgid; - LDAP_MUTEX_UNLOCK( ld, LDAP_MSGID_LOCK ); - - /* see if we should add to the cache */ - if ( ld->ld_cache_on && ld->ld_cache_add != NULL ) { - LDAP_MUTEX_LOCK( ld, LDAP_CACHE_LOCK ); - if ( (rc = (ld->ld_cache_add)( ld, *msgidp, LDAP_REQ_ADD, dn, - attrs )) != 0 ) { - *msgidp = rc; - LDAP_MUTEX_UNLOCK( ld, LDAP_CACHE_LOCK ); - return( LDAP_SUCCESS ); - } - LDAP_MUTEX_UNLOCK( ld, LDAP_CACHE_LOCK ); - } - - /* create a message to send */ - if (( lderr = nsldapi_alloc_ber_with_options( ld, &ber )) - != LDAP_SUCCESS ) { - return( lderr ); - } - - if ( ber_printf( ber, "{it{s{", *msgidp, LDAP_REQ_ADD, dn ) - == -1 ) { - lderr = LDAP_ENCODING_ERROR; - LDAP_SET_LDERRNO( ld, lderr, NULL, NULL ); - ber_free( ber, 1 ); - return( lderr ); - } - - /* for each attribute in the entry... */ - for ( i = 0; attrs[i] != NULL; i++ ) { - if ( ( attrs[i]->mod_op & LDAP_MOD_BVALUES) != 0 ) { - rc = ber_printf( ber, "{s[V]}", attrs[i]->mod_type, - attrs[i]->mod_bvalues ); - } else { - rc = ber_printf( ber, "{s[v]}", attrs[i]->mod_type, - attrs[i]->mod_values ); - } - if ( rc == -1 ) { - lderr = LDAP_ENCODING_ERROR; - LDAP_SET_LDERRNO( ld, lderr, NULL, NULL ); - ber_free( ber, 1 ); - return( lderr ); - } - } - - if ( ber_printf( ber, "}}" ) == -1 ) { - lderr = LDAP_ENCODING_ERROR; - LDAP_SET_LDERRNO( ld, lderr, NULL, NULL ); - ber_free( ber, 1 ); - return( lderr ); - } - - if (( lderr = nsldapi_put_controls( ld, serverctrls, 1, ber )) - != LDAP_SUCCESS ) { - ber_free( ber, 1 ); - return( lderr ); - } - - /* send the message */ - rc = nsldapi_send_initial_request( ld, *msgidp, LDAP_REQ_ADD, - (char *) dn, ber ); - *msgidp = rc; - return( rc < 0 ? LDAP_GET_LDERRNO( ld, NULL, NULL ) : LDAP_SUCCESS ); -} - -int -LDAP_CALL -ldap_add_s( LDAP *ld, const char *dn, LDAPMod **attrs ) -{ - return( ldap_add_ext_s( ld, dn, attrs, NULL, NULL )); -} - -int LDAP_CALL -ldap_add_ext_s( LDAP *ld, const char *dn, LDAPMod **attrs, - LDAPControl **serverctrls, LDAPControl **clientctrls ) -{ - int err, msgid; - LDAPMessage *res; - - if (( err = ldap_add_ext( ld, dn, attrs, serverctrls, clientctrls, - &msgid )) != LDAP_SUCCESS ) { - return( err ); - } - - if ( ldap_result( ld, msgid, 1, (struct timeval *)NULL, &res ) == -1 ) { - return( LDAP_GET_LDERRNO( ld, NULL, NULL ) ); - } - - return( ldap_result2error( ld, res, 1 ) ); -} diff --git a/mozilla/directory/c-sdk/ldap/libraries/libldap/bind.c b/mozilla/directory/c-sdk/ldap/libraries/libldap/bind.c deleted file mode 100644 index 0432025e24b..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libldap/bind.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* - * bind.c - */ - -#if 0 -#ifndef lint -static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; -#endif -#endif - -#include "ldap-int.h" - -/* - * ldap_bind - bind to the ldap server. The dn and password - * of the entry to which to bind are supplied, along with the authentication - * method to use. The msgid of the bind request is returned on success, - * -1 if there's trouble. Note, the kerberos support assumes the user already - * has a valid tgt for now. ldap_result() should be called to find out the - * outcome of the bind request. - * - * Example: - * ldap_bind( ld, "cn=manager, o=university of michigan, c=us", "secret", - * LDAP_AUTH_SIMPLE ) - */ - -int -LDAP_CALL -ldap_bind( LDAP *ld, const char *dn, const char *passwd, int authmethod ) -{ - /* - * The bind request looks like this: - * BindRequest ::= SEQUENCE { - * version INTEGER, - * name DistinguishedName, -- who - * authentication CHOICE { - * simple [0] OCTET STRING -- passwd - * } - * } - * all wrapped up in an LDAPMessage sequence. - */ - - LDAPDebug( LDAP_DEBUG_TRACE, "ldap_bind\n", 0, 0, 0 ); - - if ( !NSLDAPI_VALID_LDAP_POINTER( ld )) { - return( -1 ); - } - - switch ( authmethod ) { - case LDAP_AUTH_SIMPLE: - return( ldap_simple_bind( ld, dn, passwd ) ); - - default: - LDAP_SET_LDERRNO( ld, LDAP_AUTH_UNKNOWN, NULL, NULL ); - return( -1 ); - } -} - -/* - * ldap_bind_s - bind to the ldap server. The dn and password - * of the entry to which to bind are supplied, along with the authentication - * method to use. This routine just calls whichever bind routine is - * appropriate and returns the result of the bind (e.g. LDAP_SUCCESS or - * some other error indication). Note, the kerberos support assumes the - * user already has a valid tgt for now. - * - * Examples: - * ldap_bind_s( ld, "cn=manager, o=university of michigan, c=us", - * "secret", LDAP_AUTH_SIMPLE ) - * ldap_bind_s( ld, "cn=manager, o=university of michigan, c=us", - * NULL, LDAP_AUTH_KRBV4 ) - */ -int -LDAP_CALL -ldap_bind_s( LDAP *ld, const char *dn, const char *passwd, int authmethod ) -{ - int err; - - LDAPDebug( LDAP_DEBUG_TRACE, "ldap_bind_s\n", 0, 0, 0 ); - - switch ( authmethod ) { - case LDAP_AUTH_SIMPLE: - return( ldap_simple_bind_s( ld, dn, passwd ) ); - - default: - err = LDAP_AUTH_UNKNOWN; - LDAP_SET_LDERRNO( ld, err, NULL, NULL ); - return( err ); - } -} - - -void -LDAP_CALL -ldap_set_rebind_proc( LDAP *ld, LDAP_REBINDPROC_CALLBACK *rebindproc, - void *arg ) -{ - if ( ld == NULL ) { - if ( !nsldapi_initialized ) { - nsldapi_initialize_defaults(); - } - ld = &nsldapi_ld_defaults; - } - - if ( NSLDAPI_VALID_LDAP_POINTER( ld )) { - LDAP_MUTEX_LOCK( ld, LDAP_OPTION_LOCK ); - ld->ld_rebind_fn = rebindproc; - ld->ld_rebind_arg = arg; - LDAP_MUTEX_UNLOCK( ld, LDAP_OPTION_LOCK ); - } -} - - -/* - * return a pointer to the bind DN for the default connection (a copy is - * not made). If there is no bind DN available, NULL is returned. - */ -char * -nsldapi_get_binddn( LDAP *ld ) -{ - char *binddn; - - binddn = NULL; /* default -- assume they are not bound */ - - LDAP_MUTEX_LOCK( ld, LDAP_CONN_LOCK ); - if ( NULL != ld->ld_defconn && LDAP_CONNST_CONNECTED == - ld->ld_defconn->lconn_status && ld->ld_defconn->lconn_bound ) { - if (( binddn = ld->ld_defconn->lconn_binddn ) == NULL ) { - binddn = ""; - } - } - LDAP_MUTEX_UNLOCK( ld, LDAP_CONN_LOCK ); - - return( binddn ); -} diff --git a/mozilla/directory/c-sdk/ldap/libraries/libldap/cache.c b/mozilla/directory/c-sdk/ldap/libraries/libldap/cache.c deleted file mode 100644 index 8d4b8de4bdd..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libldap/cache.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* - * Copyright (c) 1993 The Regents of the University of Michigan. - * All rights reserved. - */ -/* - * cache.c - generic caching support for LDAP - */ - -#include "ldap-int.h" - -/* - * ldap_cache_flush - flush part of the LDAP cache. returns an - * ldap error code (LDAP_SUCCESS, LDAP_NO_SUCH_OBJECT, etc.). - */ - -int -LDAP_CALL -ldap_cache_flush( LDAP *ld, const char *dn, const char *filter ) -{ - if ( !NSLDAPI_VALID_LDAP_POINTER( ld )) { - return( LDAP_PARAM_ERROR ); - } - - if ( dn == NULL ) { - dn = ""; - } - - return( (ld->ld_cache_flush)( ld, dn, filter ) ); -} - -/* - * nsldapi_add_result_to_cache - add an ldap entry we just read off the network - * to the ldap cache. this routine parses the ber for the entry and - * constructs the appropriate add request. this routine calls the - * cache add routine to actually add the entry. - */ - -void -nsldapi_add_result_to_cache( LDAP *ld, LDAPMessage *m ) -{ - char *dn; - LDAPMod **mods; - int i, max, rc; - char *a; - BerElement *ber; - char buf[50]; - struct berval bv; - struct berval *bvp[2]; - - LDAPDebug( LDAP_DEBUG_TRACE, "=> nsldapi_add_result_to_cache id %d type %d\n", - m->lm_msgid, m->lm_msgtype, 0 ); - if ( m->lm_msgtype != LDAP_RES_SEARCH_ENTRY || - ld->ld_cache_add == NULL ) { - LDAPDebug( LDAP_DEBUG_TRACE, - "<= nsldapi_add_result_to_cache not added\n", 0, 0, 0 ); - return; - } - -#define GRABSIZE 5 - - dn = ldap_get_dn( ld, m ); - mods = (LDAPMod **)NSLDAPI_MALLOC( GRABSIZE * sizeof(LDAPMod *) ); - max = GRABSIZE; - for ( i = 0, a = ldap_first_attribute( ld, m, &ber ); a != NULL; - a = ldap_next_attribute( ld, m, ber ), i++ ) { - if ( i == (max - 1) ) { - max += GRABSIZE; - mods = (LDAPMod **)NSLDAPI_REALLOC( mods, - sizeof(LDAPMod *) * max ); - } - - mods[i] = (LDAPMod *)NSLDAPI_CALLOC( 1, sizeof(LDAPMod) ); - mods[i]->mod_op = LDAP_MOD_BVALUES; - mods[i]->mod_type = a; - mods[i]->mod_bvalues = ldap_get_values_len( ld, m, a ); - } - if ( ber != NULL ) { - ber_free( ber, 0 ); - } - if (( rc = LDAP_GET_LDERRNO( ld, NULL, NULL )) != LDAP_SUCCESS ) { - LDAPDebug( LDAP_DEBUG_TRACE, - "<= nsldapi_add_result_to_cache error: failed to construct mod list (%s)\n", - ldap_err2string( rc ), 0, 0 ); - ldap_mods_free( mods, 1 ); - return; - } - - /* update special cachedtime attribute */ - if ( i == (max - 1) ) { - max++; - mods = (LDAPMod **)NSLDAPI_REALLOC( mods, - sizeof(LDAPMod *) * max ); - } - mods[i] = (LDAPMod *)NSLDAPI_CALLOC( 1, sizeof(LDAPMod) ); - mods[i]->mod_op = LDAP_MOD_BVALUES; - mods[i]->mod_type = "cachedtime"; - sprintf( buf, "%d", time( NULL ) ); - bv.bv_val = buf; - bv.bv_len = strlen( buf ); - bvp[0] = &bv; - bvp[1] = NULL; - mods[i]->mod_bvalues = bvp; - mods[++i] = NULL; - - /* msgid of -1 means don't send the result */ - rc = (ld->ld_cache_add)( ld, -1, m->lm_msgtype, dn, mods ); - LDAPDebug( LDAP_DEBUG_TRACE, - "<= nsldapi_add_result_to_cache added (rc %d)\n", rc, 0, 0 ); -} diff --git a/mozilla/directory/c-sdk/ldap/libraries/libldap/charray.c b/mozilla/directory/c-sdk/ldap/libraries/libldap/charray.c deleted file mode 100644 index a0f4a2fb416..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libldap/charray.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* charray.c - routines for dealing with char * arrays */ - - -#include "ldap-int.h" - -/* - * Add s at the end of the array of strings *a. - * Return 0 for success, -1 for failure. - */ -int -LDAP_CALL -ldap_charray_add( - char ***a, - char *s -) -{ - int n; - - if ( *a == NULL ) { - *a = (char **)NSLDAPI_MALLOC( 2 * sizeof(char *) ); - if ( *a == NULL ) { - return -1; - } - n = 0; - } else { - for ( n = 0; *a != NULL && (*a)[n] != NULL; n++ ) { - ; /* NULL */ - } - - *a = (char **)NSLDAPI_REALLOC( (char *) *a, - (n + 2) * sizeof(char *) ); - if ( *a == NULL ) { - return -1; - } - } - - (*a)[n++] = s; - (*a)[n] = NULL; - return 0; -} - -/* - * Add array of strings s at the end of the array of strings *a. - * Return 0 for success, -1 for failure. - */ -int -LDAP_CALL -ldap_charray_merge( - char ***a, - char **s -) -{ - int i, n, nn; - - if ( (s == NULL) || (s[0] == NULL) ) - return 0; - - for ( n = 0; *a != NULL && (*a)[n] != NULL; n++ ) { - ; /* NULL */ - } - for ( nn = 0; s[nn] != NULL; nn++ ) { - ; /* NULL */ - } - - *a = (char **)NSLDAPI_REALLOC( (char *) *a, - (n + nn + 1) * sizeof(char *) ); - if ( *a == NULL ) { - return -1; - } - - for ( i = 0; i < nn; i++ ) { - (*a)[n + i] = s[i]; - } - (*a)[n + nn] = NULL; - return 0; -} - -void -LDAP_CALL -ldap_charray_free( char **array ) -{ - char **a; - - if ( array == NULL ) { - return; - } - - for ( a = array; *a != NULL; a++ ) { - if ( *a != NULL ) { - NSLDAPI_FREE( *a ); - } - } - NSLDAPI_FREE( (char *) array ); -} - -int -LDAP_CALL -ldap_charray_inlist( - char **a, - char *s -) -{ - int i; - - if ( a == NULL ) - return( 0 ); - - for ( i = 0; a[i] != NULL; i++ ) { - if ( strcasecmp( s, a[i] ) == 0 ) { - return( 1 ); - } - } - - return( 0 ); -} - -/* - * Duplicate the array of strings a, return NULL upon any memory failure. - */ -char ** -LDAP_CALL -ldap_charray_dup( char **a ) -{ - int i; - char **new; - - for ( i = 0; a[i] != NULL; i++ ) - ; /* NULL */ - - new = (char **)NSLDAPI_MALLOC( (i + 1) * sizeof(char *) ); - if ( new == NULL ) { - return NULL; - } - - for ( i = 0; a[i] != NULL; i++ ) { - new[i] = nsldapi_strdup( a[i] ); - if ( new[i] == NULL ) { - int j; - - for ( j = 0; j < i; j++ ) - NSLDAPI_FREE( new[j] ); - NSLDAPI_FREE( new ); - return NULL; - } - } - new[i] = NULL; - - return( new ); -} - -/* - * Tokenize the string str, return NULL upon any memory failure. - * XXX: on many platforms this function is not thread safe because it - * uses strtok(). - */ -char ** -LDAP_CALL -ldap_str2charray( char *str, char *brkstr ) - /* This implementation fails if brkstr contains multibyte characters. - But it works OK if str is UTF-8 and brkstr is 7-bit ASCII. - */ -{ - char **res; - char *s; - int i; - - i = 1; - for ( s = str; *s; s++ ) { - if ( strchr( brkstr, *s ) != NULL ) { - i++; - } - } - - res = (char **)NSLDAPI_MALLOC( (i + 1) * sizeof(char *) ); - if ( res == NULL ) { - return NULL; - } - i = 0; - for ( s = strtok( str, brkstr ); s != NULL; s = strtok( NULL, - brkstr ) ) { - res[i++] = nsldapi_strdup( s ); - if ( res[i - 1] == NULL ) { - int j; - - for ( j = 0; j < (i - 1); j++ ) - NSLDAPI_FREE( res[j] ); - NSLDAPI_FREE( res ); - return NULL; - } - } - res[i] = NULL; - - return( res ); -} - -int -LDAP_CALL -ldap_charray_position( char **a, char *s ) -{ - int i; - - for ( i = 0; a[i] != NULL; i++ ) { - if ( strcasecmp( s, a[i] ) == 0 ) { - return( i ); - } - } - - return( -1 ); -} diff --git a/mozilla/directory/c-sdk/ldap/libraries/libldap/charset.c b/mozilla/directory/c-sdk/ldap/libraries/libldap/charset.c deleted file mode 100644 index 85792483500..00000000000 --- a/mozilla/directory/c-sdk/ldap/libraries/libldap/charset.c +++ /dev/null @@ -1,1830 +0,0 @@ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* - * Copyright (c) 1995 Regents of the University of Michigan. - * All rights reserved. - */ -/* - * charset.c - */ - -#include "ldap-int.h" - -#ifdef STR_TRANSLATION - -void -ldap_set_string_translators( LDAP *ld, BERTranslateProc encode_proc, - BERTranslateProc decode_proc ) -{ - if ( ld == NULL ) { - if ( !nsldapi_initialized ) { - nsldapi_initialize_defaults(); - } - ld = &nsldapi_ld_defaults; - } - - if ( NSLDAPI_VALID_LDAP_POINTER( ld )) { - ld->ld_lber_encode_translate_proc = encode_proc; - ld->ld_lber_decode_translate_proc = decode_proc; - } -} - - -void -ldap_enable_translation( LDAP *ld, LDAPMessage *entry, int enable ) -{ - char *optionsp; - - if ( ld == NULL ) { - if ( !nsldapi_initialized ) { - nsldapi_initialize_defaults(); - } - ld = &nsldapi_ld_defaults; - } - - optionsp = ( entry == NULLMSG ) ? &ld->ld_lberoptions : - &entry->lm_ber->ber_options; - - if ( enable ) { - *optionsp |= LBER_OPT_TRANSLATE_STRINGS; - } else { - *optionsp &= ~LBER_OPT_TRANSLATE_STRINGS; - } -} - - -int -ldap_translate_from_t61( LDAP *ld, char **bufp, unsigned long *lenp, - int free_input ) -{ - if ( ld->ld_lber_decode_translate_proc == NULL ) { - return( LDAP_SUCCESS ); - } - - return( (*ld->ld_lber_decode_translate_proc)( bufp, lenp, free_input )); -} - - -int -ldap_translate_to_t61( LDAP *ld, char **bufp, unsigned long *lenp, - int free_input ) -{ - if ( ld->ld_lber_encode_translate_proc == NULL ) { - return( LDAP_SUCCESS ); - } - - return( (*ld->ld_lber_encode_translate_proc)( bufp, lenp, free_input )); -} - - -/* - ** Character translation routine notes: - * - * On entry: bufp points to a "string" to be converted (not necessarily - * zero-terminated) and buflenp points to the length of the buffer. - * - * On exit: bufp should point to a malloc'd result. If free_input is - * non-zero then the original bufp will be freed. *buflenp should be - * set to the new length. Zero bytes in the input buffer must be left - * as zero bytes. - * - * Return values: any ldap error code (LDAP_SUCCESS if all goes well). - */ - - -#ifdef LDAP_CHARSET_8859 - -#if LDAP_CHARSET_8859 == 88591 -#define ISO_8859 1 -#elif LDAP_CHARSET_8859 == 88592 -#define ISO_8859 2 -#elif LDAP_CHARSET_8859 == 88593 -#define ISO_8859 3 -#elif LDAP_CHARSET_8859 == 88594 -#define ISO_8859 4 -#elif LDAP_CHARSET_8859 == 88595 -#define ISO_8859 5 -#elif LDAP_CHARSET_8859 == 88596 -#define ISO_8859 6 -#elif LDAP_CHARSET_8859 == 88597 -#define ISO_8859 7 -#elif LDAP_CHARSET_8859 == 88598 -#define ISO_8859 8 -#elif LDAP_CHARSET_8859 == 88599 -#define ISO_8859 9 -#elif LDAP_CHARSET_8859 == 885910 -#define ISO_8859 10 -#else -#define ISO_8859 0 -#endif - -/* - * the following ISO_8859 to/afrom T.61 character set translation code is - * based on the code found in Enrique Silvestre Mora's iso-t61.c, found - * as part of this package: - * ftp://pereiii.uji.es/pub/uji-ftp/unix/ldap/iso-t61.translation.tar.Z - * Enrique is now (10/95) at this address: enrique.silvestre@uv.es - * - * changes made by mcs@umich.edu 12 October 1995: - * Change calling conventions of iso8859_t61() and t61_iso8859() to - * match libldap conventions; rename to ldap_8859_to_t61() and - * ldap_t61_to_8859(). - * Change conversion routines to deal with non-zero terminated strings. - * ANSI-ize functions and include prototypes. - */ - -/* iso-t61.c - ISO-T61 translation routines (version: 0.2.1, July-1994) */ -/* - * Copyright (c) 1994 Enrique Silvestre Mora, Universitat Jaume I, Spain. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the Universitat Jaume I. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. -*/ - - -#include -#include -#include - -/* Character set used: ISO 8859-1, ISO 8859-2, ISO 8859-3, ... */ -/* #define ISO_8859 1 */ - -#ifndef ISO_8859 -# define ISO_8859 0 -#endif - -typedef unsigned char Byte; -typedef struct { Byte a, b; } Couple; - -#ifdef NEEDPROTOS -static Byte *c_to_hh( Byte *o, Byte c ); -static Byte *c_to_cc( Byte *o, Couple *cc, Byte c ); -static int hh_to_c( Byte *h ); -static Byte *cc_to_t61( Byte *o, Byte *s ); -#else /* NEEDPROTOS */ -static Byte *c_to_hh(); -static Byte *c_to_cc(); -static int hh_to_c(); -static Byte *cc_to_t61(); -#endif /* NEEDPROTOS */ - -/* - Character choosed as base in diacritics alone: NO-BREAK SPACE. - (The standard say it must be a blank space, 0x20.) -*/ -#define ALONE 0xA0 - -static Couple diacritic[16] = { -#if (ISO_8859 == 1) || (ISO_8859 == 9) - {0,0}, {'`',0}, {0xb4,0}, {'^',0}, - {'~',0}, {0xaf,0}, {'(',ALONE}, {'.',ALONE}, - {0xa8,0}, {0,0}, {'0',ALONE}, {0xb8,0}, - {0,0}, {'"',ALONE}, {';',ALONE}, {'<',ALONE}, -#elif (ISO_8859 == 2) - {0,0}, {'`',0}, {0xb4,0}, {'^',0}, - {'~',0}, {'-',ALONE}, {0xa2,0}, {0xff,0}, - {0xa8,0}, {0,0}, {'0',ALONE}, {0xb8,0}, - {0,0}, {0xbd,0}, {0xb2,0}, {0xb7,0} -#elif (ISO_8859 == 3) - {0,0}, {'`',0}, {0xb4,0}, {'^',0}, - {'~',0}, {'-',ALONE}, {0xa2,0}, {0xff,0}, - {0xa8,0}, {0,0}, {'0',ALONE}, {0xb8,0}, - {0,0}, {'"',ALONE}, {';',ALONE}, {'<',ALONE} -#elif (ISO_8859 == 4) - {0,0}, {'`',0}, {0xb4,0}, {'^',0}, - {'~',0}, {0xaf,0}, {'(',ALONE}, {0xff,0}, - {0xa8,0}, {0,0}, {'0',ALONE}, {0xb8,0}, - {0,0}, {'"',ALONE}, {0xb2,0}, {0xb7,0} -#else - {0,0}, {'`',0}, {'\'',ALONE}, {'^',0}, - {'~',0}, {'-',ALONE}, {'(',ALONE}, {'.',ALONE}, - {':',ALONE}, {0,0}, {'0',ALONE}, {',',ALONE}, - {0,0}, {'"',ALONE}, {';',ALONE}, {'<',ALONE} -#endif -}; - -/* - --- T.61 (T.51) letters with diacritics: conversion to ISO 8859-n ----- - A, C, D, E, G, H, I, J, K, - L, N, O, R, S, T, U, W, Y, Z. - ----------------------------------------------------------------------- -*/ -static int letter_w_diacritic[16][38] = { -#if (ISO_8859 == 1) - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0xc0,0, 0, 0xc8,0, 0, 0xcc,0, 0, - 0, 0, 0xd2,0, 0, 0, 0xd9,0, 0, 0, - 0xe0,0, 0, 0xe8,0, 0, 0xec,0, 0, - 0, 0, 0xf2,0, 0, 0, 0xf9,0, 0, 0, - 0xc1,-1, 0, 0xc9,0, 0, 0xcd,0, 0, - -1, -1, 0xd3,-1, -1, 0, 0xda,0, 0xdd,-1, - 0xe1,-1, 0, 0xe9,0, 0, 0xed,0, 0, - -1, -1, 0xf3,-1, -1, 0, 0xfa,0, 0xfd,-1, - 0xc2,-1, 0, 0xca,-1, -1, 0xce,-1, 0, - 0, 0, 0xd4,0, -1, 0, 0xdb,-1, -1, 0, - 0xe2,-1, 0, 0xea,-1, -1, 0xee,-1, 0, - 0, 0, 0xf4,0, -1, 0, 0xfb,-1, -1, 0, - 0xc3,0, 0, 0, 0, 0, -1, 0, 0, - 0, 0xd1,0xd5,0, 0, 0, -1, 0, 0, 0, - 0xe3,0, 0, 0, 0, 0, -1, 0, 0, - 0, 0xf1,0xf5,0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, 0, -1, -1, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - 0, -1, 0, -1, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - 0xc4,0, 0, 0xcb,0, 0, 0xcf,0, 0, - 0, 0, 0xd6,0, 0, 0, 0xdc,0, -1, 0, - 0xe4,0, 0, 0xeb,0, 0, 0xef,0, 0, - 0, 0, 0xf6,0, 0, 0, 0xfc,0, 0xff,0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0xc5,0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0xe5,0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, 0xc7,0, 0, -1, 0, 0, 0, -1, - -1, -1, 0, -1, -1, -1, 0, 0, 0, 0, - 0, 0xe7,0, 0, -1, 0, 0, 0, -1, - -1, -1, 0, -1, -1, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, -1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, -1, -1, 0, 0, 0, -1, - 0, -1, -1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, -1, -1, 0, 0, 0, -1 -#elif (ISO_8859 == 2) - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0xc1,0xc6,0, 0xc9,0, 0, 0xcd,0, 0, - 0xc5,0xd1,0xd3,0xc0,0xa6,0, 0xda,0, 0xdd,0xac, - 0xe1,0xe6,0, 0xe9,0, 0, 0xed,0, 0, - 0xe5,0xf1,0xf3,0xe0,0xb6,0, 0xfa,0, 0xfd,0xbc, - 0xc2,-1, 0, -1, -1, -1, 0xce,-1, 0, - 0, 0, 0xd4,0, -1, 0, -1, -1, -1, 0, - 0xe2,-1, 0, -1, -1, -1, 0xee,-1, 0, - 0, 0, 0xf4,0, -1, 0, -1, -1, -1, 0, - -1, 0, 0, 0, 0, 0, -1, 0, 0, - 0, -1, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, 0, 0, -1, 0, 0, - 0, -1, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0xc3,0, 0, 0, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0xe3,0, 0, 0, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, 0, -1, -1, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xaf, - 0, -1, 0, -1, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xbf, - 0xc4,0, 0, 0xcb,0, 0, -1, 0, 0, - 0, 0, 0xd6,0, 0, 0, 0xdc,0, -1, 0, - 0xe4,0, 0, 0xeb,0, 0, -1, 0, 0, - 0, 0, 0xf6,0, 0, 0, 0xfc,0, -1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0xd9,0, 0, 0, - -1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0xf9,0, 0, 0, - 0, 0xc7,0, 0, -1, 0, 0, 0, -1, - -1, -1, 0, -1, 0xaa,0xde,0, 0, 0, 0, - 0, 0xe7,0, 0, -1, 0, 0, 0, -1, - -1, -1, 0, -1, 0xba,0xfe,0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0xd5,0, 0, 0, 0xdb,0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0xf5,0, 0, 0, 0xfb,0, 0, 0, - 0xa1,0, 0, 0xca,0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0xb1,0, 0, 0xea,0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, 0xc8,0xcf,0xcc,0, 0, 0, 0, 0, - 0xa5,0xd2,0, 0xd8,0xa9,0xab,0, 0, 0, 0xae, - 0, 0xe8,0xef,0xec,0, 0, 0, 0, 0, - 0xb5,0xf2,0, 0xf8,0xb9,0xbb,0, 0, 0, 0xbe -#elif (ISO_8859 == 3) - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0xc0,0, 0, 0xc8,0, 0, 0xcc,0, 0, - 0, 0, 0xd2,0, 0, 0, 0xd9,0, 0, 0, - 0xe0,0, 0, 0xe8,0, 0, 0xec,0, 0, - 0, 0, 0xf2,0, 0, 0, 0xf9,0, 0, 0, - 0xc1,-1, 0, 0xc9,0, 0, 0xcd,0, 0, - -1, -1, 0xd3,-1, -1, 0, 0xda,0, -1, -1, - 0xe1,-1, 0, 0xe9,0, 0, 0xed,0, 0, - -1, -1, 0xf3,-1, -1, 0, 0xfa,0, -1, -1, - 0xc2,0xc6,0, 0xca,0xd8,0xa6,0xce,0xac,0, - 0, 0, 0xd4,0, 0xde,0, 0xdb,-1, -1, 0, - 0xe2,0xe6,0, 0xea,0xf8,0xb6,0xee,0xbc,0, - 0, 0, 0xf4,0, 0xfe,0, 0xfb,-1, -1, 0, - -1, 0, 0, 0, 0, 0, -1, 0, 0, - 0, 0xd1,-1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, 0, 0, -1, 0, 0, - 0, 0xf1,-1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, 0xab,0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0xdd,0, 0, 0, - -1, 0, 0, 0, 0xbb,0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0xfd,0, 0, 0, - 0, 0xc5,0, -1, 0xd5,0, 0xa9,0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xaf, - 0, 0xe5,0, -1, 0xf5,0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xbf, - 0xc4,0, 0, 0xcb,0, 0, 0xcf,0, 0, - 0, 0, 0xd6,0, 0, 0, 0xdc,0, -1, 0, - 0xe4,0, 0, 0xeb,0, 0, 0xef,0, 0, - 0, 0, 0xf6,0, 0, 0, 0xfc,0, -1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, 0xc7,0, 0, -1, 0, 0, 0, -1, - -1, -1, 0, -1, 0xaa,-1, 0, 0, 0, 0, - 0, 0xe7,0, 0, -1, 0, 0, 0, -1, - -1, -1, 0, -1, 0xba,-1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, -1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, -1, -1, 0, 0, 0, -1, - 0, -1, -1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, -1, -1, 0, 0, 0, -1 -#elif (ISO_8859 == 4) - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0xc1,-1, 0, 0xc9,0, 0, 0xcd,0, 0, - -1, -1, -1, -1, -1, 0, 0xda,0, -1, -1, - 0xe1,-1, 0, 0xe9,0, 0, 0xed,0, 0, - -1, -1, -1, -1, -1, 0, 0xfa,0, -1, -1, - 0xc2,-1, 0, -1, -1, -1, 0xce,-1, 0, - 0, 0, 0xd4,0, -1, 0, 0xdb,-1, -1, 0, - 0xe2,-1, 0, -1, -1, -1, 0xee,-1, 0, - 0, 0, 0xf4,0, -1, 0, 0xfb,-1, -1, 0, - 0xc3,0, 0, 0, 0, 0, 0xa5,0, 0, - 0, -1, 0xd5,0, 0, 0, 0xdd,0, 0, 0, - 0xe3,0, 0, 0, 0, 0, 0xb5,0, 0, - 0, -1, 0xf5,0, 0, 0, 0xfd,0, 0, 0, - 0xc0,0, 0, 0xaa,0, 0, 0xcf,0, 0, - 0, 0, 0xd2,0, 0, 0, 0xde,0, 0, 0, - 0xe0,0, 0, 0xba,0, 0, 0xef,0, 0, - 0, 0, 0xf2,0, 0, 0, 0xfe,0, 0, 0, - -1, 0, 0, 0, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, 0, 0xcc,-1, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - 0, -1, 0, 0xec,-1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - 0xc4,0, 0, 0xcb,0, 0, -1, 0, 0, - 0, 0, 0xd6,0, 0, 0, 0xdc,0, -1, 0, - 0xe4,0, 0, 0xeb,0, 0, -1, 0, 0, - 0, 0, 0xf6,0, 0, 0, 0xfc,0, -1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0xc5,0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0xe5,0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, 0, 0, 0xab,0, 0, 0, 0xd3, - 0xa6,0xd1,0, 0xa3,-1, -1, 0, 0, 0, 0, - 0, -1, 0, 0, 0xbb,0, 0, 0, 0xf3, - 0xb6,0xf1,0, 0xb3,-1, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0xa1,0, 0, 0xca,0, 0, 0xc7,0, 0, - 0, 0, 0, 0, 0, 0, 0xd9,0, 0, 0, - 0xb1,0, 0, 0xea,0, 0, 0xe7,0, 0, - 0, 0, 0, 0, 0, 0, 0xf9,0, 0, 0, - 0, 0xc8,-1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, 0xa9,-1, 0, 0, 0, 0xae, - 0, 0xe8,-1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, 0xb9,-1, 0, 0, 0, 0xbe -#elif (ISO_8859 == 9) - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0xc0,0, 0, 0xc8,0, 0, 0xcc,0, 0, - 0, 0, 0xd2,0, 0, 0, 0xd9,0, 0, 0, - 0xe0,0, 0, 0xe8,0, 0, -1, 0, 0, - 0, 0, 0xf2,0, 0, 0, 0xf9,0, 0, 0, - 0xc1,-1, 0, 0xc9,0, 0, 0xcd,0, 0, - -1, -1, 0xd3,-1, -1, 0, 0xda,0, -1, -1, - 0xe1,-1, 0, 0xe9,0, 0, 0xed,0, 0, - -1, -1, 0xf3,-1, -1, 0, 0xfa,0, -1, -1, - 0xc2,-1, 0, 0xca,-1, -1, 0xce,-1, 0, - 0, 0, 0xd4,0, -1, 0, 0xdb,-1, -1, 0, - 0xe2,-1, 0, -1, -1, -1, 0xee,-1, 0, - 0, 0, 0xf4,0, -1, 0, 0xfb,-1, -1, 0, - 0xc3,0, 0, 0, 0, 0, -1, 0, 0, - 0, 0xd1,0xd5,0, 0, 0, -1, 0, 0, 0, - 0xe3,0, 0, 0, 0, 0, -1, 0, 0, - 0, 0xf1,0xf5,0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, 0xef,0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, 0xd0,0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, 0xf0,0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, 0, -1, -1, 0, 0xdd,0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - 0, -1, 0, 0xec,-1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - 0xc4,0, 0, 0xcb,0, 0, 0xcf,0, 0, - 0, 0, 0xd6,0, 0, 0, 0xdc,0, -1, 0, - 0xe4,0, 0, 0xeb,0, 0, -1, 0, 0, - 0, 0, 0xf6,0, 0, 0, 0xfc,0, 0xff,0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0xc5,0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0xe5,0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, 0xc7,0, 0, -1, 0, 0, 0, -1, - -1, -1, 0, -1, 0xde,-1, 0, 0, 0, 0, - 0, 0xe7,0, 0, -1, 0, 0, 0, -1, - -1, -1, 0, -1, 0xfe,-1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0xea,0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, -1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, -1, -1, 0, 0, 0, -1, - 0, -1, -1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, -1, -1, 0, 0, 0, -1 -#elif (ISO_8859 == 10) - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0xc1,-1, 0, 0xc9,0, 0, 0xcd,0, 0, - -1, -1, 0xd3,-1, -1, 0, 0xda,0, 0xdd,-1, - 0xe1,-1, 0, 0xe9,0, 0, 0xed,0, 0, - -1, -1, 0xf3,-1, -1, 0, 0xfa,0, 0xfd,-1, - 0xc2,-1, 0, -1, -1, -1, 0xce,-1, 0, - 0, 0, 0xd4,0, -1, 0, 0xdb,-1, -1, 0, - 0xe2,-1, 0, -1, -1, -1, 0xee,-1, 0, - 0, 0, 0xf4,0, -1, 0, 0xfb,-1, -1, 0, - 0xc3,0, 0, 0, 0, 0, 0xa5,0, 0, - 0, -1, 0xd5,0, 0, 0, 0xd7,0, 0, 0, - 0xe3,0, 0, 0, 0, 0, 0xb5,0, 0, - 0, -1, 0xf5,0, 0, 0, 0xf7,0, 0, 0, - 0xc0,0, 0, 0xa2,0, 0, 0xa4,0, 0, - 0, 0, 0xd2,0, 0, 0, 0xae,0, 0, 0, - 0xe0,0, 0, 0xb2,0, 0, 0xb4,0, 0, - 0, 0, 0xf2,0, 0, 0, 0xbe,0, 0, 0, - -1, 0, 0, 0, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, 0, 0xcc,-1, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - 0, -1, 0, 0xec,-1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - 0xc4,0, 0, 0xcb,0, 0, 0xcf,0, 0, - 0, 0, 0xd6,0, 0, 0, 0xdc,0, -1, 0, - 0xe4,0, 0, 0xeb,0, 0, 0xef,0, 0, - 0, 0, 0xf6,0, 0, 0, 0xfc,0, -1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0xc5,0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0xe5,0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, 0, 0, 0xa3,0, 0, 0, 0xa6, - 0xa8,0xd1,0, -1, -1, -1, 0, 0, 0, 0, - 0, -1, 0, 0, 0xb3,0, 0, 0, 0xb6, - 0xb8,0xf1,0, -1, -1, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0xa1,0, 0, 0xca,0, 0, 0xc7,0, 0, - 0, 0, 0, 0, 0, 0, 0xd9,0, 0, 0, - 0xb1,0, 0, 0xea,0, 0, 0xe7,0, 0, - 0, 0, 0, 0, 0, 0, 0xf9,0, 0, 0, - 0, 0xc8,-1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, 0xaa,-1, 0, 0, 0, 0xac, - 0, 0xe8,-1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, 0xba,-1, 0, 0, 0, 0xbc -#else - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, -1, 0, -1, 0, 0, -1, 0, 0, - -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, - -1, -1, 0, -1, 0, 0, -1, 0, 0, - -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, - -1, -1, 0, -1, -1, -1, -1, -1, 0, - 0, 0, -1, 0, -1, 0, -1, -1, -1, 0, - -1, -1, 0, -1, -1, -1, -1, -1, 0, - 0, 0, -1, 0, -1, 0, -1, -1, -1, 0, - -1, 0, 0, 0, 0, 0, -1, 0, 0, - 0, -1, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, 0, 0, -1, 0, 0, - 0, -1, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, 0, -1, -1, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - 0, -1, 0, -1, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, -1, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, -1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, 0, 0, -1, 0, 0, 0, -1, - -1, -1, 0, -1, -1, -1, 0, 0, 0, 0, - 0, -1, 0, 0, -1, 0, 0, 0, -1, - -1, -1, 0, -1, -1, -1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - -1, 0, 0, -1, 0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, - 0, -1, -1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, -1, -1, 0, 0, 0, -1, - 0, -1, -1, -1, 0, 0, 0, 0, 0, - -1, -1, 0, -1, -1, -1, 0, 0, 0, -1 -#endif -}; - -/* ---- T.61 characters [0xA0 .. 0xBF] ----------------- -*/ -static Couple trans_t61a_iso8859[32] = { -#if (ISO_8859 == 1) || (ISO_8859 == 9) - {'N','S'}, {0xa1,0}, {0xa2,0}, {0xa3,0}, - {'D','O'}, {0xa5,0}, {'C','u'}, {0xa7,0}, - {0xa4,0}, {'\'','6'},{'"','6'}, {0xab,0}, - {'<','-'}, {'-','!'}, {'-','>'}, {'-','v'}, - {0xb0,0}, {0xb1,0}, {0xb2,0}, {0xb3,0}, - {0xd7,0}, {0xb5,0}, {0xb6,0}, {0xb7,0}, - {0xf7,0}, {'\'','9'},{'"','9'}, {0xbb,0}, - {0xbc,0}, {0xbd,0}, {0xbe,0}, {0xbf,0} -#elif (ISO_8859 == 2) || (ISO_8859 == 4) - {'N','S'}, {'!','I'}, {'C','t'}, {'P','d'}, - {'D','O'}, {'Y','e'}, {'C','u'}, {0xa7,0}, - {0xa4,0}, {'\'','6'},{'"','6'}, {'<','<'}, - {'<','-'}, {'-','!'}, {'-','>'}, {'-','v'}, - {0xb0,0}, {'+','-'}, {'2','S'}, {'3','S'}, - {0xd7,0}, {'M','y'}, {'P','I'}, {'.','M'}, - {0xf7,0}, {'\'','9'},{'"','9'}, {'>','>'}, - {'1','4'}, {'1','2'}, {'3','4'}, {'?','I'}, -#elif (ISO_8859 == 3) - {'N','S'}, {'!','I'}, {'C','t'}, {0xa3,0}, - {'D','O'}, {'Y','e'}, {'C','u'}, {0xa7,0}, - {0xa4,0}, {'\'','6'},{'"','6'}, {'<','<'}, - {'<','-'}, {'-','!'}, {'-','>'}, {'-','v'}, - {0xb0,0}, {'+','-'}, {0xb2,0}, {0xb3,0}, - {0xd7,0}, {0xb5,0}, {'P','I'}, {0xb7,0}, - {0xf7,0}, {'\'','9'},{'"','9'}, {'>','>'}, - {'1','4'}, {0xbd,0}, {'3','4'}, {'?','I'} -#elif (ISO_8859 == 10) - {'N','S'}, {'!','I'}, {'C','t'}, {'P','d'}, - {'D','O'}, {'Y','e'}, {'C','u'}, {0xa7,0}, - {'C','u'}, {'\'','6'},{'"','6'}, {'<','<'}, - {'<','-'}, {'-','!'}, {'-','>'}, {'-','v'}, - {0xb0,0}, {'+','-'}, {'2','S'}, {'3','S'}, - {'*','X'}, {'M','y'}, {'P','I'}, {0xb7,0}, - {'-',':'}, {'\'','9'},{'"','9'}, {'>','>'}, - {'1','4'}, {'1','2'}, {'3','4'}, {'?','I'} -#else - {'N','S'}, {'!','I'}, {'C','t'}, {'P','d'}, - {'D','O'}, {'Y','e'}, {'C','u'}, {'S','E'}, - {'X','O'}, {'\'','6'},{'"','6'}, {'<','<'}, - {'<','-'}, {'-','!'}, {'-','>'}, {'-','v'}, - {'D','G'}, {'+','-'}, {'2','S'}, {'3','S'}, - {'*','X'}, {'M','y'}, {'P','I'}, {'.','M'}, - {'-',':'}, {'\'','9'},{'"','9'}, {'>','>'}, - {'1','4'}, {'1','2'}, {'3','4'}, {'?','I'} -#endif -}; - -/* ---- T.61 characters [0xE0 .. 0xFF] ----------------- -*/ -static Couple trans_t61b_iso8859[48] = { -#if (ISO_8859 == 1) - {'-','M'}, {0xb9,0}, {0xae,0}, {0xa9,0}, - {'T','M'}, {'M','8'}, {0xac,0}, {0xa6,0}, - {0,0}, {0,0}, {0,0}, {0,0}, - {'1','8'}, {'3','8'}, {'5','8'}, {'7','8'}, - {'O','m'}, {0xc6,0}, {0xd0,0}, {0xaa,0}, - {'H','/'}, {0,0}, {'I','J'}, {'L','.'}, - {'L','/'}, {0xd8,0}, {'O','E'}, {0xba,0}, - {0xde,0}, {'T','/'}, {'N','G'}, {'\'','n'}, - {'k','k'}, {0xe6,0}, {'d','/'}, {0xf0,0}, - {'h','/'}, {'i','.'}, {'i','j'}, {'l','.'}, - {'l','/'}, {0xf8,0}, {'o','e'}, {0xdf,0}, - {0xfe,0}, {'t','/'}, {'n','g'}, {'-','-'} -#elif (ISO_8859 == 2) - {'-','M'}, {'1','S'}, {'R','g'}, {'C','o'}, - {'T','M'}, {'M','8'}, {'N','O'}, {'B','B'}, - {0,0}, {0,0}, {0,0}, {0,0}, - {'1','8'}, {'3','8'}, {'5','8'}, {'7','8'}, - {'O','m'}, {'A','E'}, {0xd0,0}, {'-','a'}, - {'H','/'}, {0,0}, {'I','J'}, {'L','.'}, - {0xa3,0}, {'O','/'}, {'O','E'}, {'-','o'}, - {'T','H'}, {'T','/'}, {'N','G'}, {'\'','n'}, - {'k','k'}, {'a','e'}, {0xf0,0}, {'d','-'}, - {'h','/'}, {'i','.'}, {'i','j'}, {'l','.'}, - {0xb3,0}, {'o','/'}, {'o','e'}, {0xdf,0}, - {'t','h'}, {'t','/'}, {'n','g'}, {'-','-'} -#elif (ISO_8859 == 3) - {'-','M'}, {'1','S'}, {'R','g'}, {'C','o'}, - {'T','M'}, {'M','8'}, {'N','O'}, {'B','B'}, - {0,0}, {0,0}, {0,0}, {0,0}, - {'1','8'}, {'3','8'}, {'5','8'}, {'7','8'}, - {'O','m'}, {'A','E'}, {'D','/'}, {'-','a'}, - {0xa1,0}, {0,0}, {'I','J'}, {'L','.'}, - {'L','/'}, {'O','/'}, {'O','E'}, {'-','o'}, - {'T','H'}, {'T','/'}, {'N','G'}, {'\'','n'}, - {'k','k'}, {'a','e'}, {'d','/'}, {'d','-'}, - {0xb1,0}, {0xb9,0}, {'i','j'}, {'l','.'}, - {'l','/'}, {'o','/'}, {'o','e'}, {0xdf,0}, - {'t','h'}, {'t','/'}, {'n','g'}, {'-','-'} -#elif (ISO_8859 == 4) - {'-','M'}, {'1','S'}, {'R','g'}, {'C','o'}, - {'T','M'}, {'M','8'}, {'N','O'}, {'B','B'}, - {0,0}, {0,0}, {0,0}, {0,0}, - {'1','8'}, {'3','8'}, {'5','8'}, {'7','8'}, - {'O','m'}, {0xc6,0}, {0xd0,0}, {'-','a'}, - {'H','/'}, {0,0}, {'I','J'}, {'L','.'}, - {'L','/'}, {0xd8,0}, {'O','E'}, {'-','o'}, - {'T','H'}, {0xac,0}, {0xbd,0}, {'\'','n'}, - {0xa2,0}, {0xe6,0}, {0xf0,0}, {'d','-'}, - {'h','/'}, {'i','.'}, {'i','j'}, {'l','.'}, - {'l','/'}, {0xf8,0}, {'o','e'}, {0xdf,0}, - {'t','h'}, {0xbc,0}, {0xbf,0}, {'-','-'} -#elif (ISO_8859 == 9) - {'-','M'}, {0xb9,0}, {0xae,0}, {0xa9,0}, - {'T','M'}, {'M','8'}, {0xac,0}, {0xa6,0}, - {0,0}, {0,0}, {0,0}, {0,0}, - {'1','8'}, {'3','8'}, {'5','8'}, {'7','8'}, - {'O','m'}, {0xc6,0}, {'D','/'}, {0xaa,0}, - {'H','/'}, {0,0}, {'I','J'}, {'L','.'}, - {'L','/'}, {0xd8,0}, {'O','E'}, {0xba,0}, - {'T','H'}, {'T','/'}, {'N','G'}, {'\'','n'}, - {'k','k'}, {0xe6,0}, {'d','/'}, {'d','-'}, - {'h','/'}, {0xfd,0}, {'i','j'}, {'l','.'}, - {'l','/'}, {0xf8,0}, {'o','e'}, {0xdf,0}, - {'t','h'}, {'t','/'}, {'n','g'}, {'-','-'} -#elif (ISO_8859 == 10) - {0xbd,0}, {'1','S'}, {'R','g'}, {'C','o'}, - {'T','M'}, {'M','8'}, {'N','O'}, {'B','B'}, - {0,0}, {0,0}, {0,0}, {0,0}, - {'1','8'}, {'3','8'}, {'5','8'}, {'7','8'}, - {'O','m'}, {0xc6,0}, {0xa9,0}, {'-','a'}, - {'H','/'}, {0,0}, {'I','J'}, {'L','.'}, - {'L','/'}, {0xd8,0}, {'O','E'}, {'-','o'}, - {0xde,0}, {0xab,0}, {0xaf,0}, {'\'','n'}, - {0xff,0}, {0xe6,0}, {0xb9,0}, {0xf0,0}, - {'h','/'}, {'i','.'}, {'i','j'}, {'l','.'}, - {'l','/'}, {0xf8,0}, {'o','e'}, {0xdf,0}, - {0xfe,0}, {0xbb,0}, {0xbf,0}, {'-','-'} -#else - {'-','M'}, {'1','S'}, {'R','g'}, {'C','o'}, - {'T','M'}, {'M','8'}, {'N','O'}, {'B','B'}, - {0,0}, {0,0}, {0,0}, {0,0}, - {'1','8'}, {'3','8'}, {'5','8'}, {'7','8'}, - {'O','m'}, {'A','E'}, {'D','/'}, {'-','a'}, - {'H','/'}, {0,0}, {'I','J'}, {'L','.'}, - {'L','/'}, {'O','/'}, {'O','E'}, {'-','o'}, - {'T','H'}, {'T','/'}, {'N','G'}, {'\'','n'}, - {'k','k'}, {'a','e'}, {'d','/'}, {'d','-'}, - {'h','/'}, {'i','.'}, {'i','j'}, {'l','.'}, - {'l','/'}, {'o','/'}, {'o','e'}, {'s','s'}, - {'t','h'}, {'t','-'}, {'n','g'}, {'-','-'} -#endif -}; - -/* ---- ISO 8859-n characters <0xA0 .. 0xFF> ------------------- -*/ -#if (ISO_8859 == 1) -static Couple trans_iso8859_t61[96] = { - {0xa0,0}, {0xa1,0}, {0xa2,0}, {0xa3,0}, - {0xa8,0}, {0xa5,0}, {0xd7,0}, {0xa7,0}, - {0xc8,ALONE}, {0xd3,0}, {0xe3,0}, {0xab,0}, - {0xd6,0}, {0xff,0}, {0xd2,0}, {0xc5,ALONE}, - {0xb0,0}, {0xb1,0}, {0xb2,0}, {0xb3,0}, - {0xc2,ALONE}, {0xb5,0}, {0xb6,0}, {0xb7,0}, - {0xcb,ALONE}, {0xd1,0}, {0xeb,0}, {0xbb,0}, - {0xbc,0}, {0xbd,0}, {0xbe,0}, {0xbf,0}, - {0xc1,'A'}, {0xc2,'A'}, {0xc3,'A'}, {0xc4,'A'}, - {0xc8,'A'}, {0xca,'A'}, {0xe1,0}, {0xcb,'C'}, - {0xc1,'E'}, {0xc2,'E'}, {0xc3,'E'}, {0xc8,'E'}, - {0xc1,'I'}, {0xc2,'I'}, {0xc3,'I'}, {0xc8,'I'}, - {0xe2,0}, {0xc4,'N'}, {0xc1,'O'}, {0xc2,'O'}, - {0xc3,'O'}, {0xc4,'O'}, {0xc8,'O'}, {0xb4,0}, - {0xe9,0}, {0xc1,'U'}, {0xc2,'U'}, {0xc3,'U'}, - {0xc8,'U'}, {0xc2,'Y'}, {0xec,0}, {0xfb,0}, - {0xc1,'a'}, {0xc2,'a'}, {0xc3,'a'}, {0xc4,'a'}, - {0xc8,'a'}, {0xca,'a'}, {0xf1,0}, {0xcb,'c'}, - {0xc1,'e'}, {0xc2,'e'}, {0xc3,'e'}, {0xc8,'e'}, - {0xc1,'i'}, {0xc2,'i'}, {0xc3,'i'}, {0xc8,'i'}, - {0xf3,0}, {0xc4,'n'}, {0xc1,'o'}, {0xc2,'o'}, - {0xc3,'o'}, {0xc4,'o'}, {0xc8,'o'}, {0xb8,0}, - {0xf9,0}, {0xc1,'u'}, {0xc2,'u'}, {0xc3,'u'}, - {0xc8,'u'}, {0xc2,'y'}, {0xfc,0}, {0xc8,'y'} -}; -#elif (ISO_8859 == 2) -static Couple trans_iso8859_t61[96] = { - {0xa0,0}, {0xce,'A'}, {0xc6,ALONE}, {0xe8,0}, - {0xa8,0}, {0xcf,'L'}, {0xc2,'S'}, {0xa7,0}, - {0xc8,ALONE}, {0xcf,'S'}, {0xcb,'S'}, {0xcf,'T'}, - {0xc2,'Z'}, {0xff,0}, {0xcf,'Z'}, {0xc7,'Z'}, - {0xb0,0}, {0xce,'a'}, {0xce,ALONE}, {0xf8,0}, - {0xc2,ALONE}, {0xcf,'l'}, {0xc2,'s'}, {0xcf,ALONE}, - {0xcb,ALONE}, {0xcf,'s'}, {0xcb,'s'}, {0xcf,'t'}, - {0xc2,'z'}, {0xcd,ALONE}, {0xcf,'z'}, {0xc7,'z'}, - {0xc2,'R'}, {0xc2,'A'}, {0xc3,'A'}, {0xc6,'A'}, - {0xc8,'A'}, {0xc2,'L'}, {0xc2,'C'}, {0xcb,'C'}, - {0xcf,'C'}, {0xc2,'E'}, {0xce,'E'}, {0xc8,'E'}, - {0xcf,'E'}, {0xc2,'I'}, {0xc3,'I'}, {0xcf,'D'}, - {0xe2,0}, {0xc2,'N'}, {0xcf,'N'}, {0xc2,'O'}, - {0xc3,'O'}, {0xcd,'O'}, {0xc8,'O'}, {0xb4,0}, - {0xcf,'R'}, {0xca,'U'}, {0xc2,'U'}, {0xcd,'U'}, - {0xc8,'U'}, {0xc2,'Y'}, {0xcb,'T'}, {0xfb,0}, - {0xc2,'r'}, {0xc2,'a'}, {0xc3,'a'}, {0xc6,'a'}, - {0xc8,'a'}, {0xc2,'l'}, {0xc2,'c'}, {0xcb,'c'}, - {0xcf,'c'}, {0xc2,'e'}, {0xce,'e'}, {0xc8,'e'}, - {0xcf,'e'}, {0xc2,'i'}, {0xc3,'i'}, {0xcf,'d'}, - {0xf2,0}, {0xc2,'n'}, {0xcf,'n'}, {0xc2,'o'}, - {0xc3,'o'}, {0xcd,'o'}, {0xc8,'o'}, {0xb8,0}, - {0xcf,'r'}, {0xca,'u'}, {0xc2,'u'}, {0xcd,'u'}, - {0xc8,'u'}, {0xc2,'y'}, {0xcb,'t'}, {0xc7,ALONE} -}; -#elif (ISO_8859 == 3) -static Couple trans_iso8859_t61[96] = { - {0xa0,0}, {0xe4,0}, {0xc6,ALONE}, {0xa3,0}, - {0xa8,0}, {0,0}, {0xc3,'H'}, {0xa7,0}, - {0xc8,ALONE}, {0xc7,'I'}, {0xcb,'S'}, {0xc6,'G'}, - {0xc3,'J'}, {0xff,0}, {0,0}, {0xc7,'Z'}, - {0xb0,0}, {0xf4,0}, {0xb2,0}, {0xb3,0}, - {0xc2,ALONE}, {0xb5,0}, {0xc3,'h'}, {0xb7,0}, - {0xcb,ALONE}, {0xf5,0}, {0xcb,'s'}, {0xc6,'g'}, - {0xc3,'j'}, {0xbd,0}, {0,0}, {0xc7,'z'}, - {0xc1,'A'}, {0xc2,'A'}, {0xc3,'A'}, {0,0}, - {0xc8,'A'}, {0xc7,'C'}, {0xc3,'C'}, {0xcb,'C'}, - {0xc1,'E'}, {0xc2,'E'}, {0xc3,'E'}, {0xc8,'E'}, - {0xc1,'I'}, {0xc2,'I'}, {0xc3,'I'}, {0xc8,'I'}, - {0,0}, {0xc4,'N'}, {0xc1,'O'}, {0xc2,'O'}, - {0xc3,'O'}, {0xc7,'G'}, {0xc8,'O'}, {0xb4,0}, - {0xc3,'G'}, {0xc1,'U'}, {0xc2,'U'}, {0xc3,'U'}, - {0xc8,'U'}, {0xc6,'U'}, {0xc3,'S'}, {0xfb,0}, - {0xc1,'a'}, {0xc2,'a'}, {0xc3,'a'}, {0,0}, - {0xc8,'a'}, {0xc7,'c'}, {0xc3,'c'}, {0xcb,'c'}, - {0xc1,'e'}, {0xc2,'e'}, {0xc3,'e'}, {0xc8,'e'}, - {0xc1,'i'}, {0xc2,'i'}, {0xc3,'i'}, {0xc8,'i'}, - {0,0}, {0xc4,'n'}, {0xc1,'o'}, {0xc2,'o'}, - {0xc3,'o'}, {0xc7,'g'}, {0xc8,'o'}, {0xb8,0}, - {0xc3,'g'}, {0xc1,'u'}, {0xc2,'u'}, {0xc3,'u'}, - {0xc8,'u'}, {0xc6,'u'}, {0xc3,'s'}, {0xc7,ALONE} -}; -#elif (ISO_8859 == 4) -static Couple trans_iso8859_t61[96] = { - {0xa0,0}, {0xce,'A'}, {0xf0,0}, {0xcb,'R'}, - {0xa8,0}, {0xc4,'I'}, {0xcb,'L'}, {0xa7,0}, - {0xc8,ALONE}, {0xcf,'S'}, {0xc5,'E'}, {0xcb,'G'}, - {0xed,0}, {0xff,0}, {0xcf,'Z'}, {0xc5,ALONE}, - {0xb0,0}, {0xce,'a'}, {0xce,ALONE}, {0xcb,'r'}, - {0xc2,ALONE}, {0xc4,'i'}, {0xcb,'l'}, {0xcf,ALONE}, - {0xcb,ALONE}, {0xcf,'s'}, {0xc5,'e'}, {0xcb,'g'}, - {0xfd,0}, {0xee,0}, {0xcf,'z'}, {0xfe,0}, - {0xc5,'A'}, {0xc2,'A'}, {0xc3,'A'}, {0xc4,'A'}, - {0xc8,'A'}, {0xca,'A'}, {0xe1,0}, {0xce,'I'}, - {0xcf,'C'}, {0xc2,'E'}, {0xce,'E'}, {0xc8,'E'}, - {0xc7,'E'}, {0xc2,'I'}, {0xc3,'I'}, {0xc5,'I'}, - {0xe2,0}, {0xcb,'N'}, {0xc5,'O'}, {0xcb,'K'}, - {0xc3,'O'}, {0xc4,'O'}, {0xc8,'O'}, {0xb4,0}, - {0xe9,0}, {0xce,'U'}, {0xc2,'U'}, {0xc3,'U'}, - {0xc8,'U'}, {0xc4,'U'}, {0xc5,'U'}, {0xfb,0}, - {0xc5,'a'}, {0xc2,'a'}, {0xc3,'a'}, {0xc4,'a'}, - {0xc8,'a'}, {0xca,'a'}, {0xf1,0}, {0xce,'i'}, - {0xcf,'c'}, {0xc2,'e'}, {0xce,'e'}, {0xc8,'e'}, - {0xc7,'e'}, {0xc2,'i'}, {0xc3,'i'}, {0xc5,'i'}, - {0xf2,0}, {0xcb,'n'}, {0xc5,'o'}, {0xcb,'k'}, - {0xc3,'o'}, {0xc4,'o'}, {0xc8,'o'}, {0xb8,0}, - {0xf9,0}, {0xce,'u'}, {0xc2,'u'}, {0xc3,'u'}, - {0xc8,'u'}, {0xc4,'u'}, {0xc5,'u'}, {0xc7,ALONE} -}; -#elif (ISO_8859 == 9) -static Couple trans_iso8859_t61[96] = { - {0xa0,0}, {0xa1,0}, {0xa2,0}, {0xa3,0}, - {0xa8,0}, {0xa5,0}, {0xd7,0}, {0xa7,0}, - {0xc8,ALONE}, {0xd3,0}, {0xe3,0}, {0xab,0}, - {0xd6,0}, {0xff,0}, {0xd2,0}, {0xc5,ALONE}, - {0xb0,0}, {0xb1,0}, {0xb2,0}, {0xb3,0}, - {0xc2,ALONE}, {0xb5,0}, {0xb6,0}, {0xb7,0}, - {0xcb,ALONE}, {0xd1,0}, {0xeb,0}, {0xbb,0}, - {0xbc,0}, {0xbd,0}, {0xbe,0}, {0xbf,0}, - {0xc1,'A'}, {0xc2,'A'}, {0xc3,'A'}, {0xc4,'A'}, - {0xc8,'A'}, {0xca,'A'}, {0xe1,0}, {0xcb,'C'}, - {0xc1,'E'}, {0xc2,'E'}, {0xc3,'E'}, {0xc8,'E'}, - {0xc1,'I'}, {0xc2,'I'}, {0xc3,'I'}, {0xc8,'I'}, - {0xc6,'G'}, {0xc4,'N'}, {0xc1,'O'}, {0xc2,'O'}, - {0xc3,'O'}, {0xc4,'O'}, {0xc8,'O'}, {0xb4,0}, - {0xe9,0}, {0xc1,'U'}, {0xc2,'U'}, {0xc3,'U'}, - {0xc8,'U'}, {0xc7,'I'}, {0xcb,'S'}, {0xfb,0}, - {0xc1,'a'}, {0xc2,'a'}, {0xc3,'a'}, {0xc4,'a'}, - {0xc8,'a'}, {0xca,'a'}, {0xf1,0}, {0xcb,'c'}, - {0xc1,'e'}, {0xc2,'e'}, {0xce,'e'}, {0xc8,'e'}, - {0xc7,'e'}, {0xc2,'i'}, {0xc3,'i'}, {0xc5,'i'}, - {0xc6,'g'}, {0xc4,'n'}, {0xc1,'o'}, {0xc2,'o'}, - {0xc3,'o'}, {0xc4,'o'}, {0xc8,'o'}, {0xb8,0}, - {0xf9,0}, {0xc1,'u'}, {0xc2,'u'}, {0xc3,'u'}, - {0xc8,'u'}, {0xf5,0}, {0xcb,'s'}, {0xc8,'y'} -}; -#elif (ISO_8859 == 10) -static Couple trans_iso8859_t61[96] = { - {0xa0,0}, {0xce,'A'}, {0xc5,'E'}, {0xcb,'G'}, - {0xc5,'I'}, {0xc4,'I'}, {0xcb,'K'}, {0xa7,0}, - {0xcb,'L'}, {0xe2,0}, {0xcf,'S'}, {0xed,0}, - {0xcf,'Z'}, {0xff,0}, {0xc5,'U'}, {0xee,0}, - {0xb0,0}, {0xce,'a'}, {0xc5,'e'}, {0xcb,'g'}, - {0xc5,'i'}, {0xc4,'i'}, {0xcb,'k'}, {0xb7,0}, - {0xcb,'l'}, {0xf2,0}, {0xcf,'s'}, {0xfd,0}, - {0xcf,'z'}, {0xd0,0}, {0xc5,'u'}, {0xfe,0}, - {0xc5,'A'}, {0xc2,'A'}, {0xc3,'A'}, {0xc4,'A'}, - {0xc8,'A'}, {0xca,'A'}, {0xe1,0}, {0xce,'I'}, - {0xcf,'C'}, {0xc2,'E'}, {0xce,'E'}, {0xc8,'E'}, - {0xc7,'E'}, {0xc2,'I'}, {0xc3,'I'}, {0xc8,'I'}, - {0,0}, {0xcb,'N'}, {0xc5,'O'}, {0xc2,'O'}, - {0xc3,'O'}, {0xc4,'O'}, {0xc8,'O'}, {0xc4,'U'}, - {0xe9,0}, {0xce,'U'}, {0xc2,'U'}, {0xc3,'U'}, - {0xc8,'U'}, {0xc2,'Y'}, {0xec,0}, {0xfb,0}, - {0xc5,'a'}, {0xc2,'a'}, {0xc3,'a'}, {0xc4,'a'}, - {0xc8,'a'}, {0xca,'a'}, {0xf1,0}, {0xce,'i'}, - {0xcf,'c'}, {0xc2,'e'}, {0xce,'e'}, {0xc8,'e'}, - {0xc7,'e'}, {0xc2,'i'}, {0xc3,'i'}, {0xc8,'i'}, - {0xf3,0}, {0xcb,'n'}, {0xc5,'o'}, {0xc2,'o'}, - {0xc3,'o'}, {0xc4,'o'}, {0xc8,'o'}, {0xc4,'u'}, - {0xf9,0}, {0xce,'u'}, {0xc2,'u'}, {0xc3,'u'}, - {0xc8,'u'}, {0xc2,'y'}, {0xfc,0}, {0xf0,0} -}; -#endif - - -static Byte * -c_to_hh( Byte *o, Byte c ) -{ - Byte n; - - *o++ = '{'; *o++ = 'x'; - n = c >> 4; - *o++ = ((n < 0xA) ? '0' : 'A' - 0xA) + n; - n = c & 0x0F; - *o++ = ((n < 0xA) ? '0' : 'A' - 0xA) + n; - *o++ = '}'; - return o; -} - - -static Byte * -c_to_cc( Byte *o, Couple *cc, Byte c ) -{ - if ( (*cc).a != 0 ) { - if ( (*cc).b == 0 ) - *o++ = (*cc).a; - else { - *o++ = '{'; - *o++ = (*cc).a; - *o++ = (*cc).b; - *o++ = '}'; - } - return o; - } - else - return c_to_hh( o, c ); -} - -/* --- routine to convert from T.61 to ISO 8859-n --- */ - -int -ldap_t61_to_8859( char **bufp, unsigned long *buflenp, int free_input ) -{ - Byte *s, *oo, *o; - unsigned int n; - int c; - unsigned long len; - Couple *cc; - - LDAPDebug( LDAP_DEBUG_TRACE, "ldap_t61_to_8859 input length: %ld\n", - *buflenp, 0, 0 ); - - len = *buflenp; - s = (Byte *) *bufp; - - if ( (o = oo = (Byte *)NSLDAPI_MALLOC( 2 * len + 64 )) == NULL ) { - return( 1 ); - } - - while ( (char *)s - *(char **)bufp < len ) { - switch ( *s >> 4 ) { - - case 0xA: case 0xB: - o = c_to_cc( o, &trans_t61a_iso8859[ *s - 0xA0 ], *s ); - s++; - break; - - case 0xD: case 0xE: case 0xF: - o = c_to_cc( o, &trans_t61b_iso8859[ *s - 0xD0 ], *s ); - s++; - break; - - case 0xC: - if ( (*s == 0xC0) || (*s == 0xC9) || (*s == 0xCC) ) { - o = c_to_hh( o, *s++ ); - break; - } - - n = (*s++) - 0xC0; - switch ( *s ) { - - case 'A': c = letter_w_diacritic[n][0]; break; - case 'C': c = letter_w_diacritic[n][1]; break; - case 'D': c = letter_w_diacritic[n][2]; break; - case 'E': c = letter_w_diacritic[n][3]; break; - case 'G': c = letter_w_diacritic[n][4]; break; - case 'H': c = letter_w_diacritic[n][5]; break; - case 'I': c = letter_w_diacritic[n][6]; break; - case 'J': c = letter_w_diacritic[n][7]; break; - case 'K': c = letter_w_diacritic[n][8]; break; - case 'L': c = letter_w_diacritic[n][9]; break; - case 'N': c = letter_w_diacritic[n][10]; break; - case 'O': c = letter_w_diacritic[n][11]; break; - case 'R': c = letter_w_diacritic[n][12]; break; - case 'S': c = letter_w_diacritic[n][13]; break; - case 'T': c = letter_w_diacritic[n][14]; break; - case 'U': c = letter_w_diacritic[n][15]; break; - case 'W': c = letter_w_diacritic[n][16]; break; - case 'Y': c = letter_w_diacritic[n][17]; break; - case 'Z': c = letter_w_diacritic[n][18]; break; - - case 'a': c = letter_w_diacritic[n][19]; break; - case 'c': c = letter_w_diacritic[n][20]; break; - case 'd': c = letter_w_diacritic[n][21]; break; - case 'e': c = letter_w_diacritic[n][22]; break; - case 'g': c = letter_w_diacritic[n][23]; break; - case 'h': c = letter_w_diacritic[n][24]; break; - case 'i': c = letter_w_diacritic[n][25]; break; - case 'j': c = letter_w_diacritic[n][26]; break; - case 'k': c = letter_w_diacritic[n][27]; break; - case 'l': c = letter_w_diacritic[n][28]; break; - case 'n': c = letter_w_diacritic[n][29]; break; - case 'o': c = letter_w_diacritic[n][30]; break; - case 'r': c = letter_w_diacritic[n][31]; break; - case 's': c = letter_w_diacritic[n][32]; break; - case 't': c = letter_w_diacritic[n][33]; break; - case 'u': c = letter_w_diacritic[n][34]; break; - case 'w': c = letter_w_diacritic[n][35]; break; - case 'y': c = letter_w_diacritic[n][36]; break; - case 'z': c = letter_w_diacritic[n][37]; break; - - case ALONE: c = (( !diacritic[n].b ) ? diacritic[n].a : -1); - break; - - default: c = 0; - } - - if ( c > 0 ) { - *o++ = c; s++; - } else { - *o++ = '{'; - if ( c == -1 ) { - *o++ = ( ( *s == ALONE ) ? ' ' : *s ); - s++; - } else { - *o++ = '"'; - } - *o++ = diacritic[n].a; - *o++ = '}'; - } - break; - -#if (ISO_8859 == 0) - case 0x8: case 0x9: - *o++ = 0x1B; /* */ - *o++ = *s++ - 0x40; - break; -#endif - - default: - *o++ = *s++; - } - } - - len = o - oo; - o = oo; - - if ( (oo = (Byte *)NSLDAPI_REALLOC( o, len )) == NULL ) { - NSLDAPI_FREE( o ); - return( 1 ); - } - - if ( free_input ) { - NSLDAPI_FREE( *bufp ); - } - *bufp = (char *) oo; - *buflenp = len; - return( 0 ); -} - - -static int -hh_to_c( Byte *h ) -{ - Byte c; - - if ( (*h >= '0') && (*h <= '9') ) c = *h++ - '0'; - else if ( (*h >= 'A') && (*h <= 'F') ) c = *h++ - 'A' + 10; - else if ( (*h >= 'a') && (*h <= 'f') ) c = *h++ - 'a' + 10; - else return -1; - - c <<= 4; - - if ( (*h >= '0') && (*h <= '9') ) c |= *h - '0'; - else if ( (*h >= 'A') && (*h <= 'F') ) c |= *h - 'A' + 10; - else if ( (*h >= 'a') && (*h <= 'f') ) c |= *h - 'a' + 10; - else return -1; - - return c; -} - - -static Byte * -cc_to_t61( Byte *o, Byte *s ) -{ - int n, c = 0; - - switch ( *(s + 1) ) { - - case '`': c = -1; break; /* */ - - case '!': - switch ( *s ) { - case '!': c = 0x7C; break; /* */ - case '(': c = 0x7B; break; /* */ - case '-': c = 0xAD; break; /* */ - default: c = -1; /* */ - } - break; - -#if (ISO_8859 == 1) || (ISO_8859 == 2) || (ISO_8859 == 3) || \ - (ISO_8859 == 4) || (ISO_8859 == 9) - case 0xB4: -#endif - case '\'': c = -2; break; /* */ - - case '^': c = -3; break; /* */ - - case '>': - switch ( *s ) { - case ')': c = 0x5D; break; /* */ - case '>': c = 0xBB; break; /* */ - case '-': c = 0xAE; break; /* */ - default: c = -3; /* */ - } - break; - - case '~': - case '?': c = -4; break; /* */ - -#if (ISO_8859 == 1) || (ISO_8859 == 4) || (ISO_8859 == 9) - case 0xAF: c = -5; break; /* */ -#endif - - case '-': - switch ( *s ) { - case '-': c = 0xFF; break; /* */ - case '<': c = 0xAC; break; /* */ - case '+': c = 0xB1; break; /* */ - case 'd': c = 0xF3; break; /* */ - default: c = -5; /* */ - } - break; - -#if (ISO_8859 == 2) || (ISO_8859 == 3) - case 0xA2: c = -6; break; /* */ -#endif - - case '(': - if ( *s == '<' ) c = 0x5B; /* */ - else c = -6; /* */ - break; - -#if (ISO_8859 == 2) || (ISO_8859 == 3) || (ISO_8859 == 4) - case 0xFF: c = -7; break; /* */ -#endif - - case '.': - switch ( *s ) { - case 'i': c = 0xF5; break; /* */ - case 'L': c = 0xE7; break; /* */ - case 'l': c = 0xF7; break; /* */ - default: c = -7; /* */ - } - break; - -#if (ISO_8859 == 1) || (ISO_8859 == 2) || (ISO_8859 == 3) || \ - (ISO_8859 == 4) || (ISO_8859 == 9) - case 0xA8: c = -8; break; /* */ -#endif - - case ':': - if ( *s == '-') c = 0xB8; /* */ - else c = -8; /* */ - break; - -#if (ISO_8859 == 1) || (ISO_8859 == 2) || (ISO_8859 == 3) || \ - (ISO_8859 == 4) || (ISO_8859 == 9) || (ISO_8859 == 10) - case 0xB0: -#endif - case '0': c = -10; break; /* */ - -#if (ISO_8859 == 1) || (ISO_8859 == 2) || (ISO_8859 == 3) || \ - (ISO_8859 == 4) || (ISO_8859 == 9) - case 0xB8: -#endif - case ',': c = -11; break; /* */ - -#if (ISO_8859 == 2) - case 0xBD: -#endif - case '"': c = -13; break; /* */ - -#if (ISO_8859 == 2) || (ISO_8859 == 4) - case 0xB2: -#endif - case ';': c = -14; break; /* */ - -#if (ISO_8859 == 2) || (ISO_8859 == 4) - case 0xB7: c = -15; break; /* */ -#endif - - case ')': - if ( *s == '!' ) c = 0x7D; /* */ - break; - - case '<': - if ( *s == '<' ) c = 0xAB; /* */ - else c = -15; /* */ - break; - - case '/': - switch ( *s ) { - case '/': c = 0x5C; break; /* */ - case 'D': c = 0xE2; break; /* */ - case 'd': c = 0xF2; break; /* */ - case 'H': c = 0xE4; break; /* */ - case 'h': c = 0xF4; break; /* */ - case 'L': c = 0xE8; break; /* */ - case 'l': c = 0xF8; break; /* */ - case 'O': c = 0xE9; break; /* */ - case 'o': c = 0xF9; break; /* */ - case 'T': c = 0xED; break; /* */ - case 't': c = 0xFD; break; /* */ - } - break; - - case '2': - if ( *s == '1' ) c = 0xBD; /* */ - break; - - case '4': - switch ( *s ) { - case '1': c = 0xBC; break; /* */ - case '3': c = 0xBE; break; /* */ - } - break; - - case '6': - switch ( *s ) { - case '\'': c = 0xA9; break; /* */ - case '"': c = 0xAA; break; /* */ - } - break; - - case '8': - switch ( *s ) { - case '1': c = 0xDC; break; /* */ - case '3': c = 0xDD; break; /*