Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
a4fac876
Commit
a4fac876
authored
Sep 07, 2000
by
Kurt Zeilenga
Browse files
Use ucdata (very experimental)
parent
f9690a37
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
build/main.dsw
View file @
a4fac876
...
...
@@ -128,6 +128,9 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name passwd
End Project Dependency
Begin Project Dependency
Project_Dep_Name ucgendat
End Project Dependency
}}}
###############################################################################
...
...
@@ -512,6 +515,9 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name libslapd
End Project Dependency
Begin Project Dependency
Project_Dep_Name liblunicode
End Project Dependency
}}}
###############################################################################
...
...
@@ -548,6 +554,9 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name backldbm
End Project Dependency
Begin Project Dependency
Project_Dep_Name liblunicode
End Project Dependency
}}}
###############################################################################
...
...
@@ -587,6 +596,9 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name libslapd
End Project Dependency
Begin Project Dependency
Project_Dep_Name liblunicode
End Project Dependency
}}}
###############################################################################
...
...
@@ -623,6 +635,9 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name libslapd
End Project Dependency
Begin Project Dependency
Project_Dep_Name liblunicode
End Project Dependency
}}}
###############################################################################
...
...
@@ -642,6 +657,18 @@ Package=<4>
###############################################################################
Project: "ucgendat"=..\libraries\liblunicode\ucgetdat.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "ud"=..\clients\ud\ud.dsp - Package Owner=<4>
Package=<5>
...
...
libraries/liblunicode/liblunicode.dsp
View file @
a4fac876
...
...
@@ -128,6 +128,10 @@ LIB32=link.exe -lib
# Name "liblunicode - Win32 Single Release"
# Begin Source File
SOURCE=..\..\include\ldap_pvt_uc.h
# End Source File
# Begin Source File
SOURCE=.\ucdata\ucdata.c
# End Source File
# Begin Source File
...
...
@@ -136,6 +140,10 @@ SOURCE=.\ucdata\ucdata.h
# End Source File
# Begin Source File
SOURCE=.\ucstr.c
# End Source File
# Begin Source File
SOURCE=.\ure\ure.c
# End Source File
# Begin Source File
...
...
libraries/liblunicode/ucdata/ucdata.c
View file @
a4fac876
...
...
@@ -24,13 +24,7 @@
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef lint
#ifdef __GNUC__
static
char
rcsid
[]
__attribute__
((
unused
))
=
"$Id: ucdata.c,v 1.3 1999/08/23 16:14:09 mleisher Exp $"
;
#else
static
char
rcsid
[]
=
"$Id: ucdata.c,v 1.3 1999/08/23 16:14:09 mleisher Exp $"
;
#endif
#endif
/* $Id: ucdata.c,v 1.3 1999/08/23 16:14:09 mleisher Exp $" */
#include
"portable.h"
...
...
@@ -61,12 +55,14 @@ typedef struct {
* A simple array of 32-bit masks for lookup.
*/
static
unsigned
long
masks32
[
32
]
=
{
0x00000001
,
0x00000002
,
0x00000004
,
0x00000008
,
0x00000010
,
0x00000020
,
0x00000040
,
0x00000080
,
0x00000100
,
0x00000200
,
0x00000400
,
0x00000800
,
0x00001000
,
0x00002000
,
0x00004000
,
0x00008000
,
0x00010000
,
0x00020000
,
0x00040000
,
0x00080000
,
0x00100000
,
0x00200000
,
0x00400000
,
0x00800000
,
0x01000000
,
0x02000000
,
0x04000000
,
0x08000000
,
0x10000000
,
0x20000000
,
0x40000000
,
0x80000000
0x00000001UL
,
0x00000002UL
,
0x00000004UL
,
0x00000008UL
,
0x00000010UL
,
0x00000020UL
,
0x00000040UL
,
0x00000080UL
,
0x00000100UL
,
0x00000200UL
,
0x00000400UL
,
0x00000800UL
,
0x00001000UL
,
0x00002000UL
,
0x00004000UL
,
0x00008000UL
,
0x00010000UL
,
0x00020000UL
,
0x00040000UL
,
0x00080000UL
,
0x00100000UL
,
0x00200000UL
,
0x00400000UL
,
0x00800000UL
,
0x01000000UL
,
0x02000000UL
,
0x04000000UL
,
0x08000000UL
,
0x10000000UL
,
0x20000000UL
,
0x40000000UL
,
0x80000000UL
};
#define endian_short(cc) (((cc) >> 8) | (((cc) & 0xff) << 8))
...
...
libraries/liblunicode/ucdata/ucgendat.c
View file @
a4fac876
/* $OpenLDAP$
/*
* Copyright 1999 Computing Research Labs, New Mexico State University
*
...
...
@@ -19,13 +20,7 @@
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef lint
#ifdef __GNUC__
static
char
rcsid
[]
__attribute__
((
unused
))
=
"$Id: ucgendat.c,v 1.3 1999/10/07 20:49:56 mleisher Exp $"
;
#else
static
char
rcsid
[]
=
"$Id: ucgendat.c,v 1.3 1999/10/07 20:49:56 mleisher Exp $"
;
#endif
#endif
/* $Id: ucgendat.c,v 1.3 1999/10/07 20:49:56 mleisher Exp $" */
#include
"portable.h"
...
...
libraries/liblunicode/ucgetdat.dsp
0 → 100644
View file @
a4fac876
# Microsoft Developer Studio Project File - Name="ucgendat" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=ucgendat - Win32 Single Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ucgendat.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ucgendat.mak" CFG="ucgendat - Win32 Single Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ucgendat - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "ucgendat - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "ucgendat - Win32 Single Debug" (based on\
"Win32 (x86) Console Application")
!MESSAGE "ucgendat - Win32 Single Release" (based on\
"Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ucgendat - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\Release"
# PROP Intermediate_Dir "..\..\Release\ucgendat"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 oldap32.lib olber32.lib sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "ucgendat - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "ucgendat_"
# PROP BASE Intermediate_Dir "ucgendat_"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug"
# PROP Intermediate_Dir "..\..\Debug\ucgendat"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 oldap32.lib olber32.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "ucgendat - Win32 Single Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "ucgendat_"
# PROP BASE Intermediate_Dir "ucgendat_"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\SDebug"
# PROP Intermediate_Dir "..\..\SDebug\ucgendat"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug"
# ADD LINK32 oldap32.lib olber32.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ELSEIF "$(CFG)" == "ucgendat - Win32 Single Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ucgendat0"
# PROP BASE Intermediate_Dir "ucgendat0"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\SRelease"
# PROP Intermediate_Dir "..\..\SRelease\ucgendat"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Release"
# ADD LINK32 oldap32.lib olber32.lib sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease"
!ENDIF
# Begin Target
# Name "ucgendat - Win32 Release"
# Name "ucgendat - Win32 Debug"
# Name "ucgendat - Win32 Single Debug"
# Name "ucgendat - Win32 Single Release"
# Begin Source File
SOURCE=.\ucdata\ucgendat.c
# End Source File
# End Target
# End Project
libraries/liblunicode/ucstr.c
0 → 100644
View file @
a4fac876
#include
"portable.h"
#include
<ldap_pvt_uc.h>
int
ucstrncmp
(
const
ldap_unicode_t
*
u1
,
const
ldap_unicode_t
*
u2
,
ber_len_t
n
)
{
for
(;
0
<
n
;
++
u1
,
++
u2
,
--
n
)
{
if
(
*
u1
!=
*
u2
)
{
return
*
u1
<
*
u2
?
-
1
:
+
1
;
}
if
(
*
u1
==
0
)
{
return
0
;
}
}
return
0
;
}
int
ucstrncasecmp
(
const
ldap_unicode_t
*
u1
,
const
ldap_unicode_t
*
u2
,
ber_len_t
n
)
{
for
(;
0
<
n
;
++
u1
,
++
u2
,
--
n
)
{
ldap_unicode_t
uu1
=
uctoupper
(
*
u1
);
ldap_unicode_t
uu2
=
uctoupper
(
*
u2
);
if
(
uu1
!=
uu2
)
{
return
uu1
<
uu2
?
-
1
:
+
1
;
}
if
(
uu1
==
0
)
{
return
0
;
}
}
return
0
;
}
ldap_unicode_t
*
ucstrnchr
(
const
ldap_unicode_t
*
u
,
ber_len_t
n
,
ldap_unicode_t
c
)
{
for
(;
0
<
n
;
++
u
,
--
n
)
{
if
(
*
u
==
c
)
{
return
(
ldap_unicode_t
*
)
u
;
}
}
return
NULL
;
}
ldap_unicode_t
*
ucstrncasechr
(
const
ldap_unicode_t
*
u
,
ber_len_t
n
,
ldap_unicode_t
c
)
{
c
=
uctoupper
(
c
);
for
(;
0
<
n
;
++
u
,
--
n
)
{
if
(
uctoupper
(
*
u
)
==
c
)
{
return
(
ldap_unicode_t
*
)
u
;
}
}
return
NULL
;
}
void
ucstr2upper
(
ldap_unicode_t
*
u
,
ber_len_t
n
)
{
for
(;
0
<
n
;
++
u
,
--
n
)
{
*
u
=
uctoupper
(
*
u
);
}
}
libraries/liblunicode/ure/ure.c
View file @
a4fac876
...
...
@@ -25,9 +25,7 @@
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef lint
static
char
rcsid
[]
=
"$Id: ure.c,v 1.2 1999/09/21 15:47:43 mleisher Exp $"
;
#endif
/* $Id: ure.c,v 1.2 1999/09/21 15:47:43 mleisher Exp $" */
#include
"portable.h"
...
...
libraries/liblunicode/ure/urestubs.c
View file @
a4fac876
...
...
@@ -25,12 +25,16 @@
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef lint
static
char
rcsid
[]
=
"$Id: urestubs.c,v 1.2 1999/09/21 15:47:44 mleisher Exp $"
;
#endif
/* $Id: urestubs.c,v 1.2 1999/09/21 15:47:44 mleisher Exp $" */
#include
"ure.h"
#ifdef _MSC_VER
# include "../ucdata/ucdata.h"
#else
# include "ucdata.h"
#endif
/*
* This file contains stub routines needed by the URE package to test
* character properties and other Unicode implementation specific details.
...
...
@@ -42,9 +46,53 @@ static char rcsid[] = "$Id: urestubs.c,v 1.2 1999/09/21 15:47:44 mleisher Exp $"
*/
ucs4_t
_ure_tolower
(
ucs4_t
c
)
{
return
c
;
return
uctoupper
(
c
)
;
}
static
struct
maskmap
{
unsigned
long
mask1
;
unsigned
long
mask2
;
}
masks
[
32
]
=
{
{
UC_MN
,
0
},
/* _URE_NONSPACING */
{
UC_MC
,
0
},
/* _URE_COMBINING */
{
UC_ND
,
0
},
/* _URE_NUMDIGIT */
{
UC_NL
|
UC_NO
,
0
},
/* _URE_NUMOTHER */
{
UC_ZS
,
0
},
/* _URE_SPACESEP */
{
UC_ZL
,
0
},
/* _URE_LINESEP */
{
UC_ZP
,
0
},
/* _URE_PARASEP */
{
UC_CC
,
0
},
/* _URE_CNTRL */
{
UC_CO
,
0
},
/* _URE_PUA */
{
UC_LU
,
0
},
/* _URE_UPPER */
{
UC_LL
,
0
},
/* _URE_LOWER */
{
UC_LT
,
0
},
/* _URE_TITLE */
{
UC_LM
,
0
},
/* _URE_MODIFIER */
{
UC_LO
,
0
},
/* _URE_OTHERLETTER */
{
UC_PD
,
0
},
/* _URE_DASHPUNCT */
{
UC_PS
,
0
},
/* _URE_OPENPUNCT */
{
UC_PC
,
0
},
/* _URE_CLOSEPUNCT */
{
UC_PO
,
0
},
/* _URE_OTHERPUNCT */
{
UC_SM
,
0
},
/* _URE_MATHSYM */
{
UC_SC
,
0
},
/* _URE_CURRENCYSYM */
{
UC_SO
,
0
},
/* _URE_OTHERSYM */
{
UC_L
,
0
},
/* _URE_LTR */
{
UC_R
,
0
},
/* _URE_RTL */
{
0
,
UC_EN
},
/* _URE_EURONUM */
{
0
,
UC_ES
},
/* _URE_EURONUMSEP */
{
0
,
UC_ET
},
/* _URE_EURONUMTERM */
{
0
,
UC_AN
},
/* _URE_ARABNUM */
{
0
,
UC_CS
},
/* _URE_COMMONSEP */
{
0
,
UC_B
},
/* _URE_BLOCKSEP */
{
0
,
UC_S
},
/* _URE_SEGMENTSEP */
{
0
,
UC_WS
},
/* _URE_WHITESPACE */
{
0
,
UC_ON
}
/* _URE_OTHERNEUT */
};
/*
* This routine takes a set of URE character property flags (see ure.h) along
* with a character and tests to see if the character has one or more of those
...
...
@@ -53,5 +101,15 @@ ucs4_t _ure_tolower(ucs4_t c)
int
_ure_matches_properties
(
unsigned
long
props
,
ucs4_t
c
)
{
return
1
;
int
i
;
unsigned
long
mask1
=
0
,
mask2
=
0
;
for
(
i
=
0
;
i
<
32
;
i
++
)
{
if
(
props
&
(
1
<<
i
)
)
{
mask1
|=
masks
[
i
].
mask1
;
mask2
|=
masks
[
i
].
mask2
;
}
}
return
ucisprop
(
mask1
,
mask2
,
c
);
}
servers/slapd/schema_init.c
View file @
a4fac876
This diff is collapsed.
Click to expand it.
servers/slapd/schema_prep.c
View file @
a4fac876
...
...
@@ -15,7 +15,7 @@
#include
"slap.h"
#include
"ldap_pvt.h"
#include
"
../libraries/liblunicode/ucdata
.h"
#include
"
ldap_pvt_uc
.h"
int
schema_init_done
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment