24 #include "wine/unicode.h" 176 char **strarrayU =
NULL;
185 char **
q = strarrayU;
262 static inline DWORD bvarraylen(
struct berval **bv )
269 static inline struct berval **bvarraydup(
struct berval **bv )
276 size =
sizeof(
struct berval *) * (bvarraylen( bv ) + 1);
282 while (*
p) *
q++ = bvdup( *
p++ );
289 static inline void bvarrayfree(
struct berval **bv )
306 modW->mod_vals.modv_bvals = bvarraydup(
mod->mod_vals.modv_bvals );
319 modU->mod_op =
mod->mod_op;
323 modU->mod_vals.modv_bvals = bvarraydup(
mod->mod_vals.modv_bvals );
325 modU->mod_vals.modv_strvals =
strarrayWtoU(
mod->mod_vals.modv_strvals );
333 bvarrayfree(
mod->mod_vals.modv_bvals );
342 bvarrayfree(
mod->mod_vals.modv_bvals );
369 size =
sizeof(
LDAPModW*) * (modarraylenA( modarray ) + 1);
375 while (*
p) *
q++ = modAtoW( *
p++ );
389 size =
sizeof(
LDAPMod*) * (modarraylenW( modarray ) + 1);
395 while (*
p) *
q++ = modWtoU( *
p++ );
402 static inline void modarrayfreeW(
LDAPModW **modarray )
407 while (*
p) modfreeW( *
p++ );
412 static inline void modarrayfreeU(
LDAPMod **modarray )
417 while (*
p) modfreeU( *
p++ );
493 controlU->ldctl_value.bv_len =
len;
494 controlU->ldctl_value.bv_val =
val;
503 DWORD len = control->ldctl_value.bv_len;
506 if (control->ldctl_value.bv_val)
521 controlW->ldctl_iscritical = control->ldctl_iscritical;
526 static inline void controlfreeA(
LDAPControlA *control )
536 static inline void controlfreeW(
LDAPControlW *control )
546 static inline void controlfreeU(
LDAPControl *control )
551 heap_free( control->ldctl_value.bv_val );
560 return p - controlarray;
567 return p - controlarray;
574 return p - controlarray;
590 while (*
p) *
q++ = controlAtoW( *
p++ );
594 return controlarrayW;
610 while (*
p) *
q++ = controlWtoA( *
p++ );
614 return controlarrayA;
630 while (*
p) *
q++ = controlWtoU( *
p++ );
634 return controlarrayU;
650 while (*
p) *
q++ = controlUtoW( *
p++ );
654 return controlarrayW;
657 static inline void controlarrayfreeA(
LDAPControlA **controlarray )
662 while (*
p) controlfreeA( *
p++ );
667 static inline void controlarrayfreeW(
LDAPControlW **controlarray )
672 while (*
p) controlfreeW( *
p++ );
677 static inline void controlarrayfreeU(
LDAPControl **controlarray )
682 while (*
p) controlfreeU( *
p++ );
726 static inline void sortkeyfreeA(
LDAPSortKeyA *sortkey )
736 static inline void sortkeyfreeW(
LDAPSortKeyW *sortkey )
746 static inline void sortkeyfreeU(
LDAPSortKey *sortkey )
760 return p - sortkeyarray;
767 return p - sortkeyarray;
783 while (*
p) *
q++ = sortkeyAtoW( *
p++ );
787 return sortkeyarrayW;
803 while (*
p) *
q++ = sortkeyWtoU( *
p++ );
807 return sortkeyarrayU;
810 static inline void sortkeyarrayfreeW(
LDAPSortKeyW **sortkeyarray )
815 while (*
p) sortkeyfreeW( *
p++ );
820 static inline void sortkeyarrayfreeU(
LDAPSortKey **sortkeyarray )
825 while (*
p) sortkeyfreeU( *
p++ );
static WCHAR * strdupW(const WCHAR *src)
static LPSTR * strarrayWtoA(LPWSTR *strarray)
static char * strWtoU(LPCWSTR str)
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
#define WideCharToMultiByte
static char * strdupU(const char *src)
ACPI_SIZE strlen(const char *String)
static const WCHAR controlW[]
static void strfreeA(LPSTR str)
static void strfreeU(char *str)
static void strfreeW(LPWSTR str)
static LPWSTR strUtoW(char *str)
static void * heap_alloc(size_t len)
struct WLDAP32_berval ldctl_value
static void strarrayfreeA(LPSTR *strarray)
static LPSTR strWtoA(LPCWSTR str)
static void strarrayfreeW(LPWSTR *strarray)
static LPWSTR strAtoW(LPCSTR str)
GLdouble GLdouble GLdouble GLdouble q
static char ** strarrayWtoU(LPWSTR *strarray)
#define memcpy(s1, s2, n)
static LPWSTR * strarrayUtoW(char **strarray)
static DWORD strarraylenA(LPSTR *strarray)
static const WCHAR modW[]
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
static DWORD strarraylenU(char **strarray)
HINSTANCE hwldap32 DECLSPEC_HIDDEN
struct WLDAP32_berval ldctl_value
static DWORD strarraylenW(LPWSTR *strarray)
static void strarrayfreeU(char **strarray)
#define MultiByteToWideChar
char * strcpy(char *DstString, const char *SrcString)
static LPWSTR * strarrayAtoW(LPSTR *strarray)
ULONG map_error(int) DECLSPEC_HIDDEN
static BOOL heap_free(void *mem)