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
0aa28b5b
Commit
0aa28b5b
authored
May 17, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export the debugging API from libwine instead of ntdll.
Removed debugres_[aw].
parent
dff78edb
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
316 additions
and
141 deletions
+316
-141
menu.c
controls/menu.c
+1
-1
cdlg32.c
dlls/commdlg/cdlg32.c
+1
-1
debugtools.c
dlls/ntdll/debugtools.c
+31
-33
ntdll.spec
dlls/ntdll/ntdll.spec
+0
-8
resource.c
dlls/user/resource.c
+1
-1
relay.c
if1632/relay.c
+4
-4
debug.h
include/wine/debug.h
+19
-16
debug.c
library/debug.c
+193
-0
resource.c
loader/ne/resource.c
+2
-2
atom.c
memory/atom.c
+5
-5
font.c
objects/font.c
+5
-5
snoop.c
relay32/snoop.c
+43
-54
class.c
windows/class.c
+4
-4
dialog.c
windows/dialog.c
+2
-2
win.c
windows/win.c
+5
-5
No files found.
controls/menu.c
View file @
0aa28b5b
...
@@ -4086,7 +4086,7 @@ HMENU16 WINAPI LoadMenu16( HINSTANCE16 instance, LPCSTR name )
...
@@ -4086,7 +4086,7 @@ HMENU16 WINAPI LoadMenu16( HINSTANCE16 instance, LPCSTR name )
HGLOBAL16
handle
;
HGLOBAL16
handle
;
HMENU16
hMenu
;
HMENU16
hMenu
;
TRACE
(
"(%04x,%s)
\n
"
,
instance
,
debug
res
_a
(
name
)
);
TRACE
(
"(%04x,%s)
\n
"
,
instance
,
debug
str
_a
(
name
)
);
if
(
HIWORD
(
name
))
if
(
HIWORD
(
name
))
{
{
...
...
dlls/commdlg/cdlg32.c
View file @
0aa28b5b
...
@@ -63,7 +63,7 @@ static char * GPA_string = "Failed to get entry point %s for hinst = 0x%08x\n";
...
@@ -63,7 +63,7 @@ static char * GPA_string = "Failed to get entry point %s for hinst = 0x%08x\n";
#define GPA(dest, hinst, name) \
#define GPA(dest, hinst, name) \
if(!(dest = (void*)GetProcAddress(hinst,name)))\
if(!(dest = (void*)GetProcAddress(hinst,name)))\
{ \
{ \
ERR(GPA_string, debug
res
_a(name), hinst); \
ERR(GPA_string, debug
str
_a(name), hinst); \
return FALSE; \
return FALSE; \
}
}
...
...
dlls/ntdll/debugtools.c
View file @
0aa28b5b
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/exception.h"
#include "wine/exception.h"
#include "wine/unicode.h"
#include "thread.h"
#include "thread.h"
#include "winbase.h"
#include "winbase.h"
#include "winnt.h"
#include "winnt.h"
...
@@ -92,11 +93,12 @@ inline static char *put_string_a( const char *src, int n )
...
@@ -92,11 +93,12 @@ inline static char *put_string_a( const char *src, int n )
{
{
char
*
dst
,
*
res
;
char
*
dst
,
*
res
;
if
(
n
==
-
1
)
n
=
strlen
(
src
);
if
(
n
<
0
)
n
=
0
;
if
(
n
<
0
)
n
=
0
;
else
if
(
n
>
200
)
n
=
200
;
else
if
(
n
>
200
)
n
=
200
;
dst
=
res
=
gimme1
(
n
*
4
+
6
);
dst
=
res
=
gimme1
(
n
*
4
+
6
);
*
dst
++
=
'"'
;
*
dst
++
=
'"'
;
while
(
n
--
>
0
&&
*
src
)
while
(
n
--
>
0
)
{
{
unsigned
char
c
=
*
src
++
;
unsigned
char
c
=
*
src
++
;
switch
(
c
)
switch
(
c
)
...
@@ -135,12 +137,13 @@ inline static char *put_string_w( const WCHAR *src, int n )
...
@@ -135,12 +137,13 @@ inline static char *put_string_w( const WCHAR *src, int n )
{
{
char
*
dst
,
*
res
;
char
*
dst
,
*
res
;
if
(
n
==
-
1
)
n
=
strlenW
(
src
);
if
(
n
<
0
)
n
=
0
;
if
(
n
<
0
)
n
=
0
;
else
if
(
n
>
200
)
n
=
200
;
else
if
(
n
>
200
)
n
=
200
;
dst
=
res
=
gimme1
(
n
*
5
+
7
);
dst
=
res
=
gimme1
(
n
*
5
+
7
);
*
dst
++
=
'L'
;
*
dst
++
=
'L'
;
*
dst
++
=
'"'
;
*
dst
++
=
'"'
;
while
(
n
--
>
0
&&
*
src
)
while
(
n
--
>
0
)
{
{
WCHAR
c
=
*
src
++
;
WCHAR
c
=
*
src
++
;
switch
(
c
)
switch
(
c
)
...
@@ -174,9 +177,9 @@ inline static char *put_string_w( const WCHAR *src, int n )
...
@@ -174,9 +177,9 @@ inline static char *put_string_w( const WCHAR *src, int n )
}
}
/***********************************************************************
/***********************************************************************
*
wine_dbgstr_an (NTDLL.@)
*
NTDLL_dbgstr_an
*/
*/
const
char
*
wine
_dbgstr_an
(
const
char
*
src
,
int
n
)
static
const
char
*
NTDLL
_dbgstr_an
(
const
char
*
src
,
int
n
)
{
{
char
*
res
,
*
old_pos
;
char
*
res
,
*
old_pos
;
struct
debug_info
*
info
=
get_info
();
struct
debug_info
*
info
=
get_info
();
...
@@ -204,9 +207,9 @@ const char *wine_dbgstr_an( const char *src, int n )
...
@@ -204,9 +207,9 @@ const char *wine_dbgstr_an( const char *src, int n )
}
}
/***********************************************************************
/***********************************************************************
*
wine_dbgstr_wn (NTDLL.@)
*
NTDLL_dbgstr_wn
*/
*/
const
char
*
wine
_dbgstr_wn
(
const
WCHAR
*
src
,
int
n
)
static
const
char
*
NTDLL
_dbgstr_wn
(
const
WCHAR
*
src
,
int
n
)
{
{
char
*
res
,
*
old_pos
;
char
*
res
,
*
old_pos
;
struct
debug_info
*
info
=
get_info
();
struct
debug_info
*
info
=
get_info
();
...
@@ -235,9 +238,9 @@ const char *wine_dbgstr_wn( const WCHAR *src, int n )
...
@@ -235,9 +238,9 @@ const char *wine_dbgstr_wn( const WCHAR *src, int n )
}
}
/***********************************************************************
/***********************************************************************
*
wine_dbgstr_guid (NTDLL.@)
*
NTDLL_dbgstr_guid
*/
*/
const
char
*
wine
_dbgstr_guid
(
const
GUID
*
id
)
static
const
char
*
NTDLL
_dbgstr_guid
(
const
GUID
*
id
)
{
{
char
*
str
;
char
*
str
;
...
@@ -259,9 +262,9 @@ const char *wine_dbgstr_guid( const GUID *id )
...
@@ -259,9 +262,9 @@ const char *wine_dbgstr_guid( const GUID *id )
}
}
/***********************************************************************
/***********************************************************************
*
wine_dbg_vprintf (NTDLL.@)
*
NTDLL_dbg_vprintf
*/
*/
int
wine
_dbg_vprintf
(
const
char
*
format
,
va_list
args
)
static
int
NTDLL
_dbg_vprintf
(
const
char
*
format
,
va_list
args
)
{
{
struct
debug_info
*
info
=
get_info
();
struct
debug_info
*
info
=
get_info
();
char
*
p
;
char
*
p
;
...
@@ -296,36 +299,31 @@ int wine_dbg_vprintf( const char *format, va_list args )
...
@@ -296,36 +299,31 @@ int wine_dbg_vprintf( const char *format, va_list args )
}
}
/***********************************************************************
/***********************************************************************
*
wine_dbg_printf (NTDLL.@)
*
NTDLL_dbg_vlog
*/
*/
int
wine_dbg_printf
(
const
char
*
format
,
...)
static
int
NTDLL_dbg_vlog
(
int
cls
,
const
char
*
channel
,
const
char
*
function
,
const
char
*
format
,
va_list
args
)
{
{
int
ret
;
static
const
char
*
classes
[]
=
{
"fixme"
,
"err"
,
"warn"
,
"trace"
};
va_list
valist
;
va_start
(
valist
,
format
);
ret
=
wine_dbg_vprintf
(
format
,
valist
);
va_end
(
valist
);
return
ret
;
}
/***********************************************************************
* wine_dbg_log (NTDLL.@)
*/
int
wine_dbg_log
(
enum
__WINE_DEBUG_CLASS
cls
,
const
char
*
channel
,
const
char
*
function
,
const
char
*
format
,
...
)
{
static
const
char
*
classes
[
__WINE_DBCL_COUNT
]
=
{
"fixme"
,
"err"
,
"warn"
,
"trace"
};
va_list
valist
;
int
ret
=
0
;
int
ret
=
0
;
va_start
(
valist
,
format
);
if
(
TRACE_ON
(
tid
))
if
(
TRACE_ON
(
tid
))
ret
=
wine_dbg_printf
(
"%08lx:"
,
(
DWORD
)
NtCurrentTeb
()
->
tid
);
ret
=
wine_dbg_printf
(
"%08lx:"
,
(
DWORD
)
NtCurrentTeb
()
->
tid
);
if
(
cls
<
__WINE_DBCL_COUNT
)
if
(
cls
<
sizeof
(
classes
)
/
sizeof
(
classes
[
0
])
)
ret
+=
wine_dbg_printf
(
"%s:%s:%s "
,
classes
[
cls
],
channel
+
1
,
function
);
ret
+=
wine_dbg_printf
(
"%s:%s:%s "
,
classes
[
cls
],
channel
+
1
,
function
);
if
(
format
)
if
(
format
)
ret
+=
wine_dbg_vprintf
(
format
,
valist
);
ret
+=
NTDLL_dbg_vprintf
(
format
,
args
);
va_end
(
valist
);
return
ret
;
return
ret
;
}
}
/***********************************************************************
* debug_init
*/
DECL_GLOBAL_CONSTRUCTOR
(
debug_init
)
{
__wine_dbgstr_an
=
NTDLL_dbgstr_an
;
__wine_dbgstr_wn
=
NTDLL_dbgstr_wn
;
__wine_dbgstr_guid
=
NTDLL_dbgstr_guid
;
__wine_dbg_vprintf
=
NTDLL_dbg_vprintf
;
__wine_dbg_vlog
=
NTDLL_dbg_vlog
;
}
dlls/ntdll/ntdll.spec
View file @
0aa28b5b
...
@@ -1021,14 +1021,6 @@ name ntdll
...
@@ -1021,14 +1021,6 @@ name ntdll
# Relays
# Relays
@ cdecl -norelay -i386 __wine_call_from_32_regs() __wine_call_from_32_regs
@ cdecl -norelay -i386 __wine_call_from_32_regs() __wine_call_from_32_regs
# Debugging interface
@ cdecl -norelay wine_dbgstr_an(str long) wine_dbgstr_an
@ cdecl -norelay wine_dbgstr_wn(str long) wine_dbgstr_wn
@ cdecl -norelay wine_dbgstr_guid(ptr) wine_dbgstr_guid
@ cdecl -norelay wine_dbg_vprintf(str ptr) wine_dbg_vprintf
@ varargs wine_dbg_printf(str) wine_dbg_printf
@ varargs wine_dbg_log(long str str str) wine_dbg_log
# Server interface
# Server interface
@ cdecl -norelay wine_server_call(ptr) wine_server_call
@ cdecl -norelay wine_server_call(ptr) wine_server_call
@ cdecl wine_server_handle_to_fd(long long ptr ptr ptr) wine_server_handle_to_fd
@ cdecl wine_server_handle_to_fd(long long ptr ptr ptr) wine_server_handle_to_fd
...
...
dlls/user/resource.c
View file @
0aa28b5b
...
@@ -47,7 +47,7 @@ HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, LPCSTR lpTableName)
...
@@ -47,7 +47,7 @@ HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, LPCSTR lpTableName)
{
{
HRSRC16
hRsrc
;
HRSRC16
hRsrc
;
TRACE_
(
accel
)(
"%04x %s
\n
"
,
instance
,
debug
res
_a
(
lpTableName
)
);
TRACE_
(
accel
)(
"%04x %s
\n
"
,
instance
,
debug
str
_a
(
lpTableName
)
);
if
(
!
(
hRsrc
=
FindResource16
(
instance
,
lpTableName
,
RT_ACCELERATORA
)))
{
if
(
!
(
hRsrc
=
FindResource16
(
instance
,
lpTableName
,
RT_ACCELERATORA
)))
{
WARN_
(
accel
)(
"couldn't find accelerator table resource
\n
"
);
WARN_
(
accel
)(
"couldn't find accelerator table resource
\n
"
);
...
...
if1632/relay.c
View file @
0aa28b5b
...
@@ -248,12 +248,12 @@ void RELAY_DebugCallFrom16( CONTEXT86 *context )
...
@@ -248,12 +248,12 @@ void RELAY_DebugCallFrom16( CONTEXT86 *context )
break
;
break
;
case
ARG_STR
:
case
ARG_STR
:
DPRINTF
(
"%08x %s"
,
*
(
int
*
)
args16
,
DPRINTF
(
"%08x %s"
,
*
(
int
*
)
args16
,
debug
res
_a
(
MapSL
(
*
(
SEGPTR
*
)
args16
)));
debug
str
_a
(
MapSL
(
*
(
SEGPTR
*
)
args16
)));
args16
+=
sizeof
(
int
);
args16
+=
sizeof
(
int
);
break
;
break
;
case
ARG_SEGSTR
:
case
ARG_SEGSTR
:
DPRINTF
(
"%04x:%04x %s"
,
*
(
WORD
*
)(
args16
+
2
),
*
(
WORD
*
)
args16
,
DPRINTF
(
"%04x:%04x %s"
,
*
(
WORD
*
)(
args16
+
2
),
*
(
WORD
*
)
args16
,
debug
res
_a
(
MapSL
(
*
(
SEGPTR
*
)
args16
))
);
debug
str
_a
(
MapSL
(
*
(
SEGPTR
*
)
args16
))
);
args16
+=
sizeof
(
SEGPTR
);
args16
+=
sizeof
(
SEGPTR
);
break
;
break
;
default:
default:
...
@@ -289,12 +289,12 @@ void RELAY_DebugCallFrom16( CONTEXT86 *context )
...
@@ -289,12 +289,12 @@ void RELAY_DebugCallFrom16( CONTEXT86 *context )
case
ARG_STR
:
case
ARG_STR
:
args16
-=
sizeof
(
int
);
args16
-=
sizeof
(
int
);
DPRINTF
(
"%08x %s"
,
*
(
int
*
)
args16
,
DPRINTF
(
"%08x %s"
,
*
(
int
*
)
args16
,
debug
res
_a
(
MapSL
(
*
(
SEGPTR
*
)
args16
)));
debug
str
_a
(
MapSL
(
*
(
SEGPTR
*
)
args16
)));
break
;
break
;
case
ARG_SEGSTR
:
case
ARG_SEGSTR
:
args16
-=
sizeof
(
SEGPTR
);
args16
-=
sizeof
(
SEGPTR
);
DPRINTF
(
"%04x:%04x %s"
,
*
(
WORD
*
)(
args16
+
2
),
*
(
WORD
*
)
args16
,
DPRINTF
(
"%04x:%04x %s"
,
*
(
WORD
*
)(
args16
+
2
),
*
(
WORD
*
)
args16
,
debug
res
_a
(
MapSL
(
*
(
SEGPTR
*
)
args16
))
);
debug
str
_a
(
MapSL
(
*
(
SEGPTR
*
)
args16
))
);
break
;
break
;
default:
default:
break
;
break
;
...
...
include/wine/debug.h
View file @
0aa28b5b
...
@@ -87,6 +87,13 @@ enum __WINE_DEBUG_CLASS {
...
@@ -87,6 +87,13 @@ enum __WINE_DEBUG_CLASS {
#endif
/* __GNUC__ */
#endif
/* __GNUC__ */
extern
const
char
*
(
*
__wine_dbgstr_an
)(
const
char
*
s
,
int
n
);
extern
const
char
*
(
*
__wine_dbgstr_wn
)(
const
WCHAR
*
s
,
int
n
);
extern
const
char
*
(
*
__wine_dbgstr_guid
)(
const
struct
_GUID
*
id
);
extern
int
(
*
__wine_dbg_vprintf
)(
const
char
*
format
,
va_list
args
);
extern
int
(
*
__wine_dbg_vlog
)(
int
cls
,
const
char
*
channel
,
const
char
*
function
,
const
char
*
format
,
va_list
args
);
/*
/*
* Exported definitions and macros
* Exported definitions and macros
...
@@ -95,17 +102,15 @@ enum __WINE_DEBUG_CLASS {
...
@@ -95,17 +102,15 @@ enum __WINE_DEBUG_CLASS {
/* These function return a printable version of a string, including
/* These function return a printable version of a string, including
quotes. The string will be valid for some time, but not indefinitely
quotes. The string will be valid for some time, but not indefinitely
as strings are re-used. */
as strings are re-used. */
extern
const
char
*
wine_dbgstr_an
(
const
char
*
s
,
int
n
);
inline
static
const
char
*
wine_dbgstr_guid
(
const
struct
_GUID
*
id
)
{
return
__wine_dbgstr_guid
(
id
);
}
extern
const
char
*
wine_dbgstr_wn
(
const
WCHAR
*
s
,
int
n
);
inline
static
const
char
*
wine_dbgstr_an
(
const
char
*
s
,
int
n
)
{
return
__wine_dbgstr_an
(
s
,
n
);
}
extern
const
char
*
wine_dbgstr_guid
(
const
struct
_GUID
*
id
);
inline
static
const
char
*
wine_dbgstr_wn
(
const
WCHAR
*
s
,
int
n
)
{
return
__wine_dbgstr_wn
(
s
,
n
);
}
inline
static
const
char
*
wine_dbgstr_a
(
const
char
*
s
)
{
return
__wine_dbgstr_an
(
s
,
-
1
);
}
inline
static
const
char
*
wine_dbgstr_w
(
const
WCHAR
*
s
)
{
return
__wine_dbgstr_wn
(
s
,
-
1
);
}
extern
int
wine_dbg_vprintf
(
const
char
*
format
,
va_list
args
)
__WINE_PRINTF_ATTR
(
1
,
0
);
extern
int
wine_dbg_printf
(
const
char
*
format
,
...
)
__WINE_PRINTF_ATTR
(
1
,
2
);
extern
int
wine_dbg_printf
(
const
char
*
format
,
...
)
__WINE_PRINTF_ATTR
(
1
,
2
);
extern
int
wine_dbg_log
(
enum
__WINE_DEBUG_CLASS
cls
,
const
char
*
ch
,
extern
int
wine_dbg_log
(
int
cls
,
const
char
*
ch
,
const
char
*
func
,
const
char
*
func
,
const
char
*
format
,
...
)
__WINE_PRINTF_ATTR
(
4
,
5
);
const
char
*
format
,
...
)
__WINE_PRINTF_ATTR
(
4
,
5
);
inline
static
const
char
*
wine_dbgstr_a
(
const
char
*
s
)
{
return
wine_dbgstr_an
(
s
,
80
);
}
inline
static
const
char
*
wine_dbgstr_w
(
const
WCHAR
*
s
)
{
return
wine_dbgstr_wn
(
s
,
80
);
}
#define WINE_TRACE __WINE_DPRINTF(_TRACE,__wine_dbch___default)
#define WINE_TRACE __WINE_DPRINTF(_TRACE,__wine_dbch___default)
#define WINE_TRACE_(ch) __WINE_DPRINTF(_TRACE,__wine_dbch_##ch)
#define WINE_TRACE_(ch) __WINE_DPRINTF(_TRACE,__wine_dbch_##ch)
...
@@ -135,13 +140,11 @@ inline static const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_w
...
@@ -135,13 +140,11 @@ inline static const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_w
#ifdef __WINE__
#ifdef __WINE__
/* Wine uses shorter names that are very likely to conflict with other software */
/* Wine uses shorter names that are very likely to conflict with other software */
inline
static
const
char
*
debugstr_an
(
const
char
*
s
,
int
n
)
{
return
wine_dbgstr_an
(
s
,
n
);
}
inline
static
const
char
*
debugstr_an
(
const
char
*
s
,
int
n
)
{
return
__wine_dbgstr_an
(
s
,
n
);
}
inline
static
const
char
*
debugstr_wn
(
const
WCHAR
*
s
,
int
n
)
{
return
wine_dbgstr_wn
(
s
,
n
);
}
inline
static
const
char
*
debugstr_wn
(
const
WCHAR
*
s
,
int
n
)
{
return
__wine_dbgstr_wn
(
s
,
n
);
}
inline
static
const
char
*
debugstr_guid
(
const
struct
_GUID
*
id
)
{
return
wine_dbgstr_guid
(
id
);
}
inline
static
const
char
*
debugstr_guid
(
const
struct
_GUID
*
id
)
{
return
__wine_dbgstr_guid
(
id
);
}
inline
static
const
char
*
debugstr_a
(
const
char
*
s
)
{
return
wine_dbgstr_an
(
s
,
80
);
}
inline
static
const
char
*
debugstr_a
(
const
char
*
s
)
{
return
__wine_dbgstr_an
(
s
,
-
1
);
}
inline
static
const
char
*
debugstr_w
(
const
WCHAR
*
s
)
{
return
wine_dbgstr_wn
(
s
,
80
);
}
inline
static
const
char
*
debugstr_w
(
const
WCHAR
*
s
)
{
return
__wine_dbgstr_wn
(
s
,
-
1
);
}
inline
static
const
char
*
debugres_a
(
const
char
*
s
)
{
return
wine_dbgstr_an
(
s
,
80
);
}
inline
static
const
char
*
debugres_w
(
const
WCHAR
*
s
)
{
return
wine_dbgstr_wn
(
s
,
80
);
}
#define TRACE WINE_TRACE
#define TRACE WINE_TRACE
#define TRACE_(ch) WINE_TRACE_(ch)
#define TRACE_(ch) WINE_TRACE_(ch)
...
...
library/debug.c
View file @
0aa28b5b
...
@@ -18,11 +18,20 @@
...
@@ -18,11 +18,20 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <string.h>
#include <unistd.h>
#include <unistd.h>
#include <ctype.h>
#include <ctype.h>
#include "wine/debug.h"
#include "wine/library.h"
#include "wine/unicode.h"
struct
dll
struct
dll
{
{
struct
dll
*
next
;
/* linked list of dlls */
struct
dll
*
next
;
/* linked list of dlls */
...
@@ -130,3 +139,187 @@ void wine_dbg_add_option( const char *name, unsigned char set, unsigned char cle
...
@@ -130,3 +139,187 @@ void wine_dbg_add_option( const char *name, unsigned char set, unsigned char cle
dll
=
dll
->
next
;
dll
=
dll
->
next
;
}
}
}
}
/* varargs wrapper for __wine_dbg_vprintf */
int
wine_dbg_printf
(
const
char
*
format
,
...
)
{
int
ret
;
va_list
valist
;
va_start
(
valist
,
format
);
ret
=
__wine_dbg_vprintf
(
format
,
valist
);
va_end
(
valist
);
return
ret
;
}
/* varargs wrapper for __wine_dbg_vlog */
int
wine_dbg_log
(
int
cls
,
const
char
*
channel
,
const
char
*
func
,
const
char
*
format
,
...
)
{
int
ret
;
va_list
valist
;
va_start
(
valist
,
format
);
ret
=
__wine_dbg_vlog
(
cls
,
channel
,
func
,
format
,
valist
);
va_end
(
valist
);
return
ret
;
}
/* allocate some tmp string space */
/* FIXME: this is not 100% thread-safe */
static
char
*
get_tmp_space
(
int
size
)
{
static
char
*
list
[
32
];
static
long
pos
;
char
*
ret
;
int
idx
;
idx
=
interlocked_xchg_add
(
&
pos
,
1
)
%
(
sizeof
(
list
)
/
sizeof
(
list
[
0
]));
if
((
ret
=
realloc
(
list
[
idx
],
size
)))
list
[
idx
]
=
ret
;
return
ret
;
}
/* default implementation of wine_dbgstr_an */
static
const
char
*
default_dbgstr_an
(
const
char
*
str
,
int
n
)
{
char
*
dst
,
*
res
;
if
(
n
==
-
1
)
n
=
strlen
(
str
);
if
(
n
<
0
)
n
=
0
;
else
if
(
n
>
200
)
n
=
200
;
dst
=
res
=
get_tmp_space
(
n
*
4
+
6
);
*
dst
++
=
'"'
;
while
(
n
--
>
0
)
{
unsigned
char
c
=
*
str
++
;
switch
(
c
)
{
case
'\n'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'n'
;
break
;
case
'\r'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'r'
;
break
;
case
'\t'
:
*
dst
++
=
'\\'
;
*
dst
++
=
't'
;
break
;
case
'"'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'"'
;
break
;
case
'\\'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'\\'
;
break
;
default:
if
(
c
>=
' '
&&
c
<=
126
)
*
dst
++
=
c
;
else
{
*
dst
++
=
'\\'
;
*
dst
++
=
'0'
+
((
c
>>
6
)
&
7
);
*
dst
++
=
'0'
+
((
c
>>
3
)
&
7
);
*
dst
++
=
'0'
+
((
c
>>
0
)
&
7
);
}
}
}
*
dst
++
=
'"'
;
if
(
*
str
)
{
*
dst
++
=
'.'
;
*
dst
++
=
'.'
;
*
dst
++
=
'.'
;
}
*
dst
=
0
;
return
res
;
}
/* default implementation of wine_dbgstr_wn */
static
const
char
*
default_dbgstr_wn
(
const
WCHAR
*
str
,
int
n
)
{
char
*
dst
,
*
res
;
if
(
n
==
-
1
)
n
=
strlenW
(
str
);
if
(
n
<
0
)
n
=
0
;
else
if
(
n
>
200
)
n
=
200
;
dst
=
res
=
get_tmp_space
(
n
*
5
+
7
);
*
dst
++
=
'L'
;
*
dst
++
=
'"'
;
while
(
n
--
>
0
)
{
WCHAR
c
=
*
str
++
;
switch
(
c
)
{
case
'\n'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'n'
;
break
;
case
'\r'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'r'
;
break
;
case
'\t'
:
*
dst
++
=
'\\'
;
*
dst
++
=
't'
;
break
;
case
'"'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'"'
;
break
;
case
'\\'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'\\'
;
break
;
default:
if
(
c
>=
' '
&&
c
<=
126
)
*
dst
++
=
c
;
else
{
*
dst
++
=
'\\'
;
sprintf
(
dst
,
"%04x"
,
c
);
dst
+=
4
;
}
}
}
*
dst
++
=
'"'
;
if
(
*
str
)
{
*
dst
++
=
'.'
;
*
dst
++
=
'.'
;
*
dst
++
=
'.'
;
}
*
dst
=
0
;
return
res
;
}
/* default implementation of wine_dbgstr_guid */
static
const
char
*
default_dbgstr_guid
(
const
struct
_GUID
*
id
)
{
char
*
str
;
if
(
!
id
)
return
"(null)"
;
if
(
!
((
int
)
id
>>
16
))
{
str
=
get_tmp_space
(
12
);
sprintf
(
str
,
"<guid-0x%04x>"
,
(
int
)
id
&
0xffff
);
}
else
{
str
=
get_tmp_space
(
40
);
sprintf
(
str
,
"{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
,
id
->
Data1
,
id
->
Data2
,
id
->
Data3
,
id
->
Data4
[
0
],
id
->
Data4
[
1
],
id
->
Data4
[
2
],
id
->
Data4
[
3
],
id
->
Data4
[
4
],
id
->
Data4
[
5
],
id
->
Data4
[
6
],
id
->
Data4
[
7
]
);
}
return
str
;
}
/* default implementation of wine_dbg_vprintf */
static
int
default_dbg_vprintf
(
const
char
*
format
,
va_list
args
)
{
return
vfprintf
(
stderr
,
format
,
args
);
}
/* default implementation of wine_dbg_vlog */
static
int
default_dbg_vlog
(
int
cls
,
const
char
*
channel
,
const
char
*
func
,
const
char
*
format
,
va_list
args
)
{
static
const
char
*
const
classes
[]
=
{
"fixme"
,
"err"
,
"warn"
,
"trace"
};
int
ret
=
0
;
if
(
cls
<
sizeof
(
classes
)
/
sizeof
(
classes
[
0
]))
ret
+=
wine_dbg_printf
(
"%s:%s:%s "
,
classes
[
cls
],
channel
+
1
,
func
);
if
(
format
)
ret
+=
__wine_dbg_vprintf
(
format
,
args
);
return
ret
;
}
/* exported function pointers so that debugging functions can be redirected at run-time */
const
char
*
(
*
__wine_dbgstr_an
)(
const
char
*
s
,
int
n
)
=
default_dbgstr_an
;
const
char
*
(
*
__wine_dbgstr_wn
)(
const
WCHAR
*
s
,
int
n
)
=
default_dbgstr_wn
;
const
char
*
(
*
__wine_dbgstr_guid
)(
const
struct
_GUID
*
id
)
=
default_dbgstr_guid
;
int
(
*
__wine_dbg_vprintf
)(
const
char
*
format
,
va_list
args
)
=
default_dbg_vprintf
;
int
(
*
__wine_dbg_vlog
)(
int
cls
,
const
char
*
channel
,
const
char
*
function
,
const
char
*
format
,
va_list
args
)
=
default_dbg_vlog
;
loader/ne/resource.c
View file @
0aa28b5b
...
@@ -294,7 +294,7 @@ FARPROC16 WINAPI SetResourceHandler16( HMODULE16 hModule, LPCSTR typeId,
...
@@ -294,7 +294,7 @@ FARPROC16 WINAPI SetResourceHandler16( HMODULE16 hModule, LPCSTR typeId,
if
(
!
pModule
||
!
pModule
->
res_table
)
return
NULL
;
if
(
!
pModule
||
!
pModule
->
res_table
)
return
NULL
;
TRACE
(
"module=%04x type=%s
\n
"
,
hModule
,
debug
res
_a
(
typeId
)
);
TRACE
(
"module=%04x type=%s
\n
"
,
hModule
,
debug
str
_a
(
typeId
)
);
for
(;;)
for
(;;)
{
{
...
@@ -319,7 +319,7 @@ HRSRC16 NE_FindResource( NE_MODULE *pModule, LPCSTR name, LPCSTR type )
...
@@ -319,7 +319,7 @@ HRSRC16 NE_FindResource( NE_MODULE *pModule, LPCSTR name, LPCSTR type )
if
(
!
pModule
||
!
pModule
->
res_table
)
return
0
;
if
(
!
pModule
||
!
pModule
->
res_table
)
return
0
;
TRACE
(
"module=%04x name=%s type=%s
\n
"
,
pModule
->
self
,
debug
res_a
(
name
),
debugres
_a
(
type
)
);
TRACE
(
"module=%04x name=%s type=%s
\n
"
,
pModule
->
self
,
debug
str_a
(
name
),
debugstr
_a
(
type
)
);
if
(
HIWORD
(
name
))
/* Check for '#xxx' name */
if
(
HIWORD
(
name
))
/* Check for '#xxx' name */
{
{
...
...
memory/atom.c
View file @
0aa28b5b
...
@@ -354,7 +354,7 @@ ATOM WINAPI FindAtom16( LPCSTR str )
...
@@ -354,7 +354,7 @@ ATOM WINAPI FindAtom16( LPCSTR str )
if
(
CURRENT_DS
==
ATOM_UserDS
)
return
GlobalFindAtomA
(
str
);
if
(
CURRENT_DS
==
ATOM_UserDS
)
return
GlobalFindAtomA
(
str
);
TRACE
(
"%s
\n
"
,
debug
res
_a
(
str
));
TRACE
(
"%s
\n
"
,
debug
str
_a
(
str
));
if
(
ATOM_IsIntAtomA
(
str
,
&
iatom
))
return
iatom
;
if
(
ATOM_IsIntAtomA
(
str
,
&
iatom
))
return
iatom
;
if
((
len
=
strlen
(
str
))
>
255
)
len
=
255
;
if
((
len
=
strlen
(
str
))
>
255
)
len
=
255
;
...
@@ -451,7 +451,7 @@ static ATOM ATOM_AddAtomA( LPCSTR str, BOOL local )
...
@@ -451,7 +451,7 @@ static ATOM ATOM_AddAtomA( LPCSTR str, BOOL local )
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
}
}
TRACE
(
"(%s) %s -> %x
\n
"
,
local
?
"local"
:
"global"
,
debug
res
_a
(
str
),
atom
);
TRACE
(
"(%s) %s -> %x
\n
"
,
local
?
"local"
:
"global"
,
debug
str
_a
(
str
),
atom
);
return
atom
;
return
atom
;
}
}
...
@@ -506,7 +506,7 @@ static ATOM ATOM_AddAtomW( LPCWSTR str, BOOL local )
...
@@ -506,7 +506,7 @@ static ATOM ATOM_AddAtomW( LPCWSTR str, BOOL local )
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
}
}
TRACE
(
"(%s) %s -> %x
\n
"
,
local
?
"local"
:
"global"
,
debug
res
_w
(
str
),
atom
);
TRACE
(
"(%s) %s -> %x
\n
"
,
local
?
"local"
:
"global"
,
debug
str
_w
(
str
),
atom
);
return
atom
;
return
atom
;
}
}
...
@@ -598,7 +598,7 @@ static ATOM ATOM_FindAtomA( LPCSTR str, BOOL local )
...
@@ -598,7 +598,7 @@ static ATOM ATOM_FindAtomA( LPCSTR str, BOOL local )
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
}
}
TRACE
(
"(%s) %s -> %x
\n
"
,
local
?
"local"
:
"global"
,
debug
res
_a
(
str
),
atom
);
TRACE
(
"(%s) %s -> %x
\n
"
,
local
?
"local"
:
"global"
,
debug
str
_a
(
str
),
atom
);
return
atom
;
return
atom
;
}
}
...
@@ -652,7 +652,7 @@ static ATOM ATOM_FindAtomW( LPCWSTR str, BOOL local )
...
@@ -652,7 +652,7 @@ static ATOM ATOM_FindAtomW( LPCWSTR str, BOOL local )
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
}
}
TRACE
(
"(%s) %s -> %x
\n
"
,
local
?
"local"
:
"global"
,
debug
res
_w
(
str
),
atom
);
TRACE
(
"(%s) %s -> %x
\n
"
,
local
?
"local"
:
"global"
,
debug
str
_w
(
str
),
atom
);
return
atom
;
return
atom
;
}
}
...
...
objects/font.c
View file @
0aa28b5b
...
@@ -2290,7 +2290,7 @@ INT16 WINAPI AddFontResource16( LPCSTR filename )
...
@@ -2290,7 +2290,7 @@ INT16 WINAPI AddFontResource16( LPCSTR filename )
INT
WINAPI
AddFontResourceA
(
LPCSTR
str
)
INT
WINAPI
AddFontResourceA
(
LPCSTR
str
)
{
{
FIXME
(
"(%s): stub! Read the Wine User Guide on how to install "
FIXME
(
"(%s): stub! Read the Wine User Guide on how to install "
"this font manually.
\n
"
,
debug
res
_a
(
str
));
"this font manually.
\n
"
,
debug
str
_a
(
str
));
return
1
;
return
1
;
}
}
...
@@ -2301,7 +2301,7 @@ INT WINAPI AddFontResourceA( LPCSTR str )
...
@@ -2301,7 +2301,7 @@ INT WINAPI AddFontResourceA( LPCSTR str )
INT
WINAPI
AddFontResourceW
(
LPCWSTR
str
)
INT
WINAPI
AddFontResourceW
(
LPCWSTR
str
)
{
{
FIXME
(
"(%s): stub! Read the Wine User Guide on how to install "
FIXME
(
"(%s): stub! Read the Wine User Guide on how to install "
"this font manually.
\n
"
,
debug
res
_w
(
str
));
"this font manually.
\n
"
,
debug
str
_w
(
str
));
return
1
;
return
1
;
}
}
...
@@ -2310,7 +2310,7 @@ INT WINAPI AddFontResourceW( LPCWSTR str )
...
@@ -2310,7 +2310,7 @@ INT WINAPI AddFontResourceW( LPCWSTR str )
*/
*/
BOOL16
WINAPI
RemoveFontResource16
(
LPCSTR
str
)
BOOL16
WINAPI
RemoveFontResource16
(
LPCSTR
str
)
{
{
FIXME
(
"(%s): stub
\n
"
,
debug
res
_a
(
str
));
FIXME
(
"(%s): stub
\n
"
,
debug
str
_a
(
str
));
return
TRUE
;
return
TRUE
;
}
}
...
@@ -2342,7 +2342,7 @@ BOOL WINAPI RemoveFontResourceA( LPCSTR str )
...
@@ -2342,7 +2342,7 @@ BOOL WINAPI RemoveFontResourceA( LPCSTR str )
LeaveCriticalSection( &crtsc_fonts_X11 );
LeaveCriticalSection( &crtsc_fonts_X11 );
return retVal;
return retVal;
*/
*/
FIXME
(
"(%s): stub
\n
"
,
debug
res
_a
(
str
));
FIXME
(
"(%s): stub
\n
"
,
debug
str
_a
(
str
));
return
TRUE
;
return
TRUE
;
}
}
...
@@ -2352,6 +2352,6 @@ BOOL WINAPI RemoveFontResourceA( LPCSTR str )
...
@@ -2352,6 +2352,6 @@ BOOL WINAPI RemoveFontResourceA( LPCSTR str )
*/
*/
BOOL
WINAPI
RemoveFontResourceW
(
LPCWSTR
str
)
BOOL
WINAPI
RemoveFontResourceW
(
LPCWSTR
str
)
{
{
FIXME
(
"(%s): stub
\n
"
,
debug
res
_w
(
str
)
);
FIXME
(
"(%s): stub
\n
"
,
debug
str
_w
(
str
)
);
return
TRUE
;
return
TRUE
;
}
}
relay32/snoop.c
View file @
0aa28b5b
...
@@ -229,58 +229,41 @@ SNOOP_GetProcAddress(HMODULE hmod,LPCSTR name,DWORD ordinal,FARPROC origfun) {
...
@@ -229,58 +229,41 @@ SNOOP_GetProcAddress(HMODULE hmod,LPCSTR name,DWORD ordinal,FARPROC origfun) {
return
(
FARPROC
)
&
(
fun
->
lcall
);
return
(
FARPROC
)
&
(
fun
->
lcall
);
}
}
static
char
*
static
void
SNOOP_PrintArg
(
DWORD
x
)
SNOOP_PrintArg
(
DWORD
x
)
{
{
static
char
buf
[
200
];
int
i
,
nostring
;
int
i
,
nostring
;
char
*
volatile
ret
=
0
;
DPRINTF
(
"%08lx"
,
x
);
if
(
!
HIWORD
(
x
)
)
return
;
/* trivial reject to avoid faults */
if
(
!
HIWORD
(
x
)
)
{
/* trivial reject to avoid faults */
__TRY
sprintf
(
buf
,
"%08lx"
,
x
);
{
return
buf
;
LPBYTE
s
=
(
LPBYTE
)
x
;
}
i
=
0
;
nostring
=
0
;
__TRY
{
while
(
i
<
80
)
{
LPBYTE
s
=
(
LPBYTE
)
x
;
if
(
s
[
i
]
==
0
)
break
;
i
=
0
;
nostring
=
0
;
if
(
s
[
i
]
<
0x20
)
{
nostring
=
1
;
break
;}
while
(
i
<
80
)
{
if
(
s
[
i
]
>=
0x80
)
{
nostring
=
1
;
break
;}
if
(
s
[
i
]
==
0
)
break
;
i
++
;
if
(
s
[
i
]
<
0x20
)
{
nostring
=
1
;
break
;}
}
if
(
s
[
i
]
>=
0x80
)
{
nostring
=
1
;
break
;}
if
(
!
nostring
&&
i
>
5
)
i
++
;
DPRINTF
(
" %s"
,
debugstr_an
((
LPSTR
)
x
,
i
));
}
else
/* try unicode */
if
(
!
nostring
)
{
{
if
(
i
>
5
)
{
LPWSTR
s
=
(
LPWSTR
)
x
;
snprintf
(
buf
,
sizeof
(
buf
),
"%08lx %s"
,
x
,
debugstr_an
((
LPSTR
)
x
,
sizeof
(
buf
)
-
10
));
i
=
0
;
nostring
=
0
;
ret
=
buf
;
while
(
i
<
80
)
{
}
if
(
s
[
i
]
==
0
)
break
;
}
if
(
s
[
i
]
<
0x20
)
{
nostring
=
1
;
break
;}
}
if
(
s
[
i
]
>
0x100
)
{
nostring
=
1
;
break
;}
__EXCEPT
(
page_fault
){}
i
++
;
__ENDTRY
}
if
(
ret
)
if
(
!
nostring
&&
i
>
5
)
DPRINTF
(
" %s"
,
debugstr_wn
((
LPWSTR
)
x
,
i
));
return
ret
;
}
__TRY
{
}
LPWSTR
s
=
(
LPWSTR
)
x
;
__EXCEPT
(
page_fault
)
i
=
0
;
nostring
=
0
;
{
while
(
i
<
80
)
{
}
if
(
s
[
i
]
==
0
)
break
;
__ENDTRY
if
(
s
[
i
]
<
0x20
)
{
nostring
=
1
;
break
;}
if
(
s
[
i
]
>
0x100
)
{
nostring
=
1
;
break
;}
i
++
;
}
if
(
!
nostring
)
{
if
(
i
>
5
)
{
snprintf
(
buf
,
sizeof
(
buf
),
"%08lx %s"
,
x
,
debugstr_wn
((
LPWSTR
)
x
,
sizeof
(
buf
)
-
10
));
ret
=
buf
;
}
}
}
__EXCEPT
(
page_fault
){}
__ENDTRY
if
(
ret
)
return
ret
;
sprintf
(
buf
,
"%08lx"
,
x
);
return
buf
;
}
}
#define CALLER1REF (*(DWORD*)context->Esp)
#define CALLER1REF (*(DWORD*)context->Esp)
...
@@ -354,7 +337,10 @@ void WINAPI SNOOP_DoEntry( CONTEXT86 *context )
...
@@ -354,7 +337,10 @@ void WINAPI SNOOP_DoEntry( CONTEXT86 *context )
if
(
fun
->
nrofargs
>
0
)
{
if
(
fun
->
nrofargs
>
0
)
{
max
=
fun
->
nrofargs
;
if
(
max
>
16
)
max
=
16
;
max
=
fun
->
nrofargs
;
if
(
max
>
16
)
max
=
16
;
for
(
i
=
0
;
i
<
max
;
i
++
)
for
(
i
=
0
;
i
<
max
;
i
++
)
DPRINTF
(
"%s%s"
,
SNOOP_PrintArg
(
*
(
DWORD
*
)(
context
->
Esp
+
4
+
sizeof
(
DWORD
)
*
i
)),(
i
<
fun
->
nrofargs
-
1
)
?
","
:
""
);
{
SNOOP_PrintArg
(
*
(
DWORD
*
)(
context
->
Esp
+
4
+
sizeof
(
DWORD
)
*
i
));
if
(
i
<
fun
->
nrofargs
-
1
)
DPRINTF
(
","
);
}
if
(
max
!=
fun
->
nrofargs
)
if
(
max
!=
fun
->
nrofargs
)
DPRINTF
(
" ..."
);
DPRINTF
(
" ..."
);
}
else
if
(
fun
->
nrofargs
<
0
)
{
}
else
if
(
fun
->
nrofargs
<
0
)
{
...
@@ -388,7 +374,10 @@ void WINAPI SNOOP_DoReturn( CONTEXT86 *context )
...
@@ -388,7 +374,10 @@ void WINAPI SNOOP_DoReturn( CONTEXT86 *context )
if
(
max
>
16
)
max
=
16
;
if
(
max
>
16
)
max
=
16
;
for
(
i
=
0
;
i
<
max
;
i
++
)
for
(
i
=
0
;
i
<
max
;
i
++
)
DPRINTF
(
"%s%s"
,
SNOOP_PrintArg
(
ret
->
args
[
i
]),(
i
<
max
-
1
)
?
","
:
""
);
{
SNOOP_PrintArg
(
ret
->
args
[
i
]);
if
(
i
<
max
-
1
)
DPRINTF
(
","
);
}
DPRINTF
(
") retval = %08lx ret=%08lx
\n
"
,
DPRINTF
(
") retval = %08lx ret=%08lx
\n
"
,
context
->
Eax
,(
DWORD
)
ret
->
origreturn
);
context
->
Eax
,(
DWORD
)
ret
->
origreturn
);
HeapFree
(
GetProcessHeap
(),
0
,
ret
->
args
);
HeapFree
(
GetProcessHeap
(),
0
,
ret
->
args
);
...
...
windows/class.c
View file @
0aa28b5b
...
@@ -766,7 +766,7 @@ BOOL16 WINAPI UnregisterClass16( LPCSTR className, HINSTANCE16 hInstance )
...
@@ -766,7 +766,7 @@ BOOL16 WINAPI UnregisterClass16( LPCSTR className, HINSTANCE16 hInstance )
*/
*/
BOOL
WINAPI
UnregisterClassA
(
LPCSTR
className
,
HINSTANCE
hInstance
)
BOOL
WINAPI
UnregisterClassA
(
LPCSTR
className
,
HINSTANCE
hInstance
)
{
{
TRACE
(
"%s %x
\n
"
,
debug
res
_a
(
className
),
hInstance
);
TRACE
(
"%s %x
\n
"
,
debug
str
_a
(
className
),
hInstance
);
return
CLASS_UnregisterClass
(
GlobalFindAtomA
(
className
),
hInstance
);
return
CLASS_UnregisterClass
(
GlobalFindAtomA
(
className
),
hInstance
);
}
}
...
@@ -775,7 +775,7 @@ BOOL WINAPI UnregisterClassA( LPCSTR className, HINSTANCE hInstance )
...
@@ -775,7 +775,7 @@ BOOL WINAPI UnregisterClassA( LPCSTR className, HINSTANCE hInstance )
*/
*/
BOOL
WINAPI
UnregisterClassW
(
LPCWSTR
className
,
HINSTANCE
hInstance
)
BOOL
WINAPI
UnregisterClassW
(
LPCWSTR
className
,
HINSTANCE
hInstance
)
{
{
TRACE
(
"%s %x
\n
"
,
debug
res
_w
(
className
),
hInstance
);
TRACE
(
"%s %x
\n
"
,
debug
str
_w
(
className
),
hInstance
);
return
CLASS_UnregisterClass
(
GlobalFindAtomW
(
className
),
hInstance
);
return
CLASS_UnregisterClass
(
GlobalFindAtomW
(
className
),
hInstance
);
}
}
...
@@ -1111,7 +1111,7 @@ BOOL16 WINAPI GetClassInfo16( HINSTANCE16 hInstance, SEGPTR name, WNDCLASS16 *wc
...
@@ -1111,7 +1111,7 @@ BOOL16 WINAPI GetClassInfo16( HINSTANCE16 hInstance, SEGPTR name, WNDCLASS16 *wc
ATOM
atom
;
ATOM
atom
;
CLASS
*
classPtr
;
CLASS
*
classPtr
;
TRACE
(
"%x %s %p
\n
"
,
hInstance
,
debug
res
_a
(
MapSL
(
name
)),
wc
);
TRACE
(
"%x %s %p
\n
"
,
hInstance
,
debug
str
_a
(
MapSL
(
name
)),
wc
);
hInstance
=
GetExePtr
(
hInstance
);
hInstance
=
GetExePtr
(
hInstance
);
if
(
!
(
atom
=
GlobalFindAtomA
(
MapSL
(
name
)
))
||
if
(
!
(
atom
=
GlobalFindAtomA
(
MapSL
(
name
)
))
||
...
@@ -1223,7 +1223,7 @@ BOOL16 WINAPI GetClassInfoEx16( HINSTANCE16 hInstance, SEGPTR name, WNDCLASSEX16
...
@@ -1223,7 +1223,7 @@ BOOL16 WINAPI GetClassInfoEx16( HINSTANCE16 hInstance, SEGPTR name, WNDCLASSEX16
ATOM
atom
;
ATOM
atom
;
CLASS
*
classPtr
;
CLASS
*
classPtr
;
TRACE
(
"%x %s %p
\n
"
,
hInstance
,
debug
res
_a
(
MapSL
(
name
)
),
wc
);
TRACE
(
"%x %s %p
\n
"
,
hInstance
,
debug
str
_a
(
MapSL
(
name
)
),
wc
);
hInstance
=
GetExePtr
(
hInstance
);
hInstance
=
GetExePtr
(
hInstance
);
if
(
!
(
atom
=
GlobalFindAtomA
(
MapSL
(
name
)
))
||
if
(
!
(
atom
=
GlobalFindAtomA
(
MapSL
(
name
)
))
||
...
...
windows/dialog.c
View file @
0aa28b5b
...
@@ -379,7 +379,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
...
@@ -379,7 +379,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
TRACE
(
" %s %s %d, %d, %d, %d, %d, %08lx, %08lx, %08lx
\n
"
,
TRACE
(
" %s %s %d, %d, %d, %d, %d, %08lx, %08lx, %08lx
\n
"
,
debugstr_w
(
(
LPCWSTR
)
info
->
className
),
debugstr_w
(
(
LPCWSTR
)
info
->
className
),
debug
res
_w
(
(
LPCWSTR
)
info
->
windowName
),
debug
str
_w
(
(
LPCWSTR
)
info
->
windowName
),
info
->
id
,
info
->
x
,
info
->
y
,
info
->
cx
,
info
->
cy
,
info
->
id
,
info
->
x
,
info
->
y
,
info
->
cx
,
info
->
cy
,
info
->
style
,
info
->
exStyle
,
info
->
helpId
);
info
->
style
,
info
->
exStyle
,
info
->
helpId
);
...
@@ -913,7 +913,7 @@ HWND16 WINAPI CreateDialogParam16( HINSTANCE16 hInst, LPCSTR dlgTemplate,
...
@@ -913,7 +913,7 @@ HWND16 WINAPI CreateDialogParam16( HINSTANCE16 hInst, LPCSTR dlgTemplate,
LPCVOID
data
;
LPCVOID
data
;
TRACE
(
"%04x,%s,%04x,%08lx,%ld
\n
"
,
TRACE
(
"%04x,%s,%04x,%08lx,%ld
\n
"
,
hInst
,
debug
res
_a
(
dlgTemplate
),
owner
,
(
DWORD
)
dlgProc
,
param
);
hInst
,
debug
str
_a
(
dlgTemplate
),
owner
,
(
DWORD
)
dlgProc
,
param
);
if
(
!
(
hRsrc
=
FindResource16
(
hInst
,
dlgTemplate
,
RT_DIALOGA
)))
return
0
;
if
(
!
(
hRsrc
=
FindResource16
(
hInst
,
dlgTemplate
,
RT_DIALOGA
)))
return
0
;
if
(
!
(
hmem
=
LoadResource16
(
hInst
,
hRsrc
)))
return
0
;
if
(
!
(
hmem
=
LoadResource16
(
hInst
,
hRsrc
)))
return
0
;
...
...
windows/win.c
View file @
0aa28b5b
...
@@ -999,8 +999,8 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
...
@@ -999,8 +999,8 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
BOOL
unicode
=
(
type
==
WIN_PROC_32W
);
BOOL
unicode
=
(
type
==
WIN_PROC_32W
);
TRACE
(
"%s %s ex=%08lx style=%08lx %d,%d %dx%d parent=%04x menu=%04x inst=%08x params=%p
\n
"
,
TRACE
(
"%s %s ex=%08lx style=%08lx %d,%d %dx%d parent=%04x menu=%04x inst=%08x params=%p
\n
"
,
(
type
==
WIN_PROC_32W
)
?
debug
res_w
((
LPWSTR
)
cs
->
lpszName
)
:
debugres
_a
(
cs
->
lpszName
),
(
type
==
WIN_PROC_32W
)
?
debug
str_w
((
LPWSTR
)
cs
->
lpszName
)
:
debugstr
_a
(
cs
->
lpszName
),
(
type
==
WIN_PROC_32W
)
?
debug
res_w
((
LPWSTR
)
cs
->
lpszClass
)
:
debugres
_a
(
cs
->
lpszClass
),
(
type
==
WIN_PROC_32W
)
?
debug
str_w
((
LPWSTR
)
cs
->
lpszClass
)
:
debugstr
_a
(
cs
->
lpszClass
),
cs
->
dwExStyle
,
cs
->
style
,
cs
->
x
,
cs
->
y
,
cs
->
cx
,
cs
->
cy
,
cs
->
dwExStyle
,
cs
->
style
,
cs
->
x
,
cs
->
y
,
cs
->
cx
,
cs
->
cy
,
cs
->
hwndParent
,
cs
->
hMenu
,
cs
->
hInstance
,
cs
->
lpCreateParams
);
cs
->
hwndParent
,
cs
->
hMenu
,
cs
->
hInstance
,
cs
->
lpCreateParams
);
...
@@ -1209,7 +1209,7 @@ HWND16 WINAPI CreateWindowEx16( DWORD exStyle, LPCSTR className,
...
@@ -1209,7 +1209,7 @@ HWND16 WINAPI CreateWindowEx16( DWORD exStyle, LPCSTR className,
{
{
if
(
!
(
classAtom
=
GlobalFindAtomA
(
className
)))
if
(
!
(
classAtom
=
GlobalFindAtomA
(
className
)))
{
{
ERR
(
"bad class name %s
\n
"
,
debug
res
_a
(
className
)
);
ERR
(
"bad class name %s
\n
"
,
debug
str
_a
(
className
)
);
return
0
;
return
0
;
}
}
}
}
...
@@ -1271,7 +1271,7 @@ HWND WINAPI CreateWindowExA( DWORD exStyle, LPCSTR className,
...
@@ -1271,7 +1271,7 @@ HWND WINAPI CreateWindowExA( DWORD exStyle, LPCSTR className,
{
{
if
(
!
(
classAtom
=
GlobalFindAtomA
(
className
)))
if
(
!
(
classAtom
=
GlobalFindAtomA
(
className
)))
{
{
ERR
(
"bad class name %s
\n
"
,
debug
res
_a
(
className
)
);
ERR
(
"bad class name %s
\n
"
,
debug
str
_a
(
className
)
);
return
0
;
return
0
;
}
}
}
}
...
@@ -1330,7 +1330,7 @@ HWND WINAPI CreateWindowExW( DWORD exStyle, LPCWSTR className,
...
@@ -1330,7 +1330,7 @@ HWND WINAPI CreateWindowExW( DWORD exStyle, LPCWSTR className,
{
{
if
(
!
(
classAtom
=
GlobalFindAtomW
(
className
)))
if
(
!
(
classAtom
=
GlobalFindAtomW
(
className
)))
{
{
ERR
(
"bad class name %s
\n
"
,
debug
res
_w
(
className
)
);
ERR
(
"bad class name %s
\n
"
,
debug
str
_w
(
className
)
);
return
0
;
return
0
;
}
}
}
}
...
...
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