Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7a1fb2ec
Commit
7a1fb2ec
authored
Apr 18, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32: Added a wrapper for ber_printf.
parent
e048a204
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
4 deletions
+81
-4
ber.c
dlls/wldap32/ber.c
+80
-3
wldap32.spec
dlls/wldap32/wldap32.spec
+1
-1
No files found.
dlls/wldap32/ber.c
View file @
7a1fb2ec
...
...
@@ -24,6 +24,9 @@
#include "windef.h"
#include "winbase.h"
#include "winldap.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wldap32
);
#ifndef LBER_ERROR
# define LBER_ERROR (~0U)
...
...
@@ -166,13 +169,87 @@ ULONG WLDAP32_ber_skip_tag( BerElement *berelement, ULONG *len )
}
#ifndef HAVE_LDAP
INT
ber_printf
(
BerElement
*
berelement
,
PCHAR
fmt
,
...
)
/***********************************************************************
* ber_printf (WLDAP32.@)
*/
INT
WLDAP32_ber_printf
(
BerElement
*
berelement
,
PCHAR
fmt
,
...
)
{
#ifdef HAVE_LDAP
va_list
list
;
int
ret
=
0
;
char
new_fmt
[
2
];
new_fmt
[
1
]
=
0
;
va_start
(
list
,
fmt
);
while
(
*
fmt
)
{
new_fmt
[
0
]
=
*
fmt
++
;
switch
(
new_fmt
[
0
])
{
case
'b'
:
case
'e'
:
case
'i'
:
{
int
i
=
va_arg
(
list
,
int
);
ret
=
ber_printf
(
berelement
,
new_fmt
,
i
);
break
;
}
case
'o'
:
case
's'
:
{
char
*
str
=
va_arg
(
list
,
char
*
);
ret
=
ber_printf
(
berelement
,
new_fmt
,
str
);
break
;
}
case
't'
:
{
unsigned
int
tag
=
va_arg
(
list
,
unsigned
int
);
ret
=
ber_printf
(
berelement
,
new_fmt
,
tag
);
break
;
}
case
'v'
:
{
char
**
array
=
va_arg
(
list
,
char
**
);
ret
=
ber_printf
(
berelement
,
new_fmt
,
array
);
break
;
}
case
'V'
:
{
struct
berval
**
array
=
va_arg
(
list
,
struct
berval
**
);
ret
=
ber_printf
(
berelement
,
new_fmt
,
array
);
break
;
}
case
'X'
:
{
char
*
str
=
va_arg
(
list
,
char
*
);
int
len
=
va_arg
(
list
,
int
);
ret
=
ber_printf
(
berelement
,
"B"
/* 'X' is deprecated */
,
str
,
len
);
break
;
}
case
'n'
:
case
'{'
:
case
'}'
:
case
'['
:
case
']'
:
ret
=
ber_printf
(
berelement
,
new_fmt
);
break
;
default:
FIXME
(
"Unknown format '%c'
\n
"
,
new_fmt
[
0
]
);
ret
=
-
1
;
break
;
}
if
(
ret
==
-
1
)
break
;
}
va_end
(
list
);
return
ret
;
#else
return
LBER_ERROR
;
#endif
}
#ifndef HAVE_LDAP
INT
ber_scanf
(
BerElement
*
berelement
,
PCHAR
fmt
,
...
)
{
return
LBER_ERROR
;
...
...
dlls/wldap32/wldap32.spec
View file @
7a1fb2ec
...
...
@@ -225,7 +225,7 @@
307 cdecl ber_first_element(ptr ptr ptr) WLDAP32_ber_first_element
308 cdecl ber_next_element(ptr ptr ptr) WLDAP32_ber_next_element
309 cdecl ber_flatten(ptr ptr) WLDAP32_ber_flatten
310 varargs ber_printf(ptr str)
310 varargs ber_printf(ptr str)
WLDAP32_ber_printf
311 varargs ber_scanf(ptr str)
312 cdecl ldap_conn_from_msg(ptr ptr)
313 cdecl ldap_sasl_bindW(ptr wstr wstr ptr ptr ptr ptr)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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