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
8c8a3a52
Commit
8c8a3a52
authored
Feb 14, 1999
by
Gavriel State
Committed by
Alexandre Julliard
Feb 14, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few non-x86 Winelib fixes.
parent
4097865b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
16 deletions
+61
-16
wintypes.h
include/wintypes.h
+13
-5
wrc_rsc.h
include/wrc_rsc.h
+2
-2
lstr.c
misc/lstr.c
+10
-0
wsprintf.c
misc/wsprintf.c
+31
-6
builtin32.c
relay32/builtin32.c
+2
-0
relay386.c
relay32/relay386.c
+1
-1
snoop.c
relay32/snoop.c
+2
-2
No files found.
include/wintypes.h
View file @
8c8a3a52
...
...
@@ -110,10 +110,8 @@ typedef long SCODE;
typedef
long
LONG_PTR
;
typedef
unsigned
long
ULONG_PTR
;
typedef
double
DOUBLE
;
#ifdef __i386__
typedef
double
LONGLONG
;
typedef
double
ULONGLONG
;
#endif
/*__i386__*/
/* Integer types. These are the same for emulator and library. */
...
...
@@ -396,8 +394,18 @@ DECL_WINELIB_TYPE(HWND)
#define OFFSETOF(ptr) (LOWORD(ptr))
/* Macros to access unaligned or wrong-endian WORDs and DWORDs. */
#ifdef __i386__
/* Note: These macros are semantically broken, at least for wrc. wrc
spits out data in the platform's current binary format, *not* in
little-endian format. These macros are used throughout the resource
code to load and store data to the resources. Since it is unlikely
that we'll ever be dealing with little-endian resource data, the
byte-swapping nature of these macros has been disabled. Rather than
remove the use of these macros from the resource loading code, the
macros have simply been disabled. In the future, someone may want
to reactivate these macros for other purposes. In that case, the
resource code will have to be modified to use different macros. */
#if 1
#define PUT_WORD(ptr,w) (*(WORD *)(ptr) = (w))
#define GET_WORD(ptr) (*(WORD *)(ptr))
#define PUT_DWORD(ptr,dw) (*(DWORD *)(ptr) = (dw))
...
...
@@ -411,7 +419,7 @@ DECL_WINELIB_TYPE(HWND)
PUT_WORD((WORD *)(ptr)+1,HIWORD(dw)))
#define GET_DWORD(ptr) ((DWORD)(GET_WORD(ptr) | \
((DWORD)GET_WORD((WORD *)(ptr)+1) << 16)))
#endif
/*
__i386__
*/
#endif
/*
1
*/
/* MIN and MAX macros */
...
...
include/wrc_rsc.h
View file @
8c8a3a52
...
...
@@ -27,7 +27,7 @@ typedef struct wrc_resource16
INT32
resid
;
/* The resource id if resname == NULL */
LPSTR
resname
;
INT32
restype
;
/* The resource type-id if typename == NULL */
LPSTR
typename
;
LPSTR
res
typename
;
LPBYTE
data
;
/* Actual resource data */
UINT32
datasize
;
/* The size of the resource */
}
wrc_resource16_t
;
...
...
@@ -37,7 +37,7 @@ typedef struct wrc_resource32
INT32
resid
;
/* The resource id if resname == NULL */
LPWSTR
resname
;
INT32
restype
;
/* The resource type-id if typename == NULL */
LPWSTR
typename
;
LPWSTR
res
typename
;
LPBYTE
data
;
/* Actual resource data */
UINT32
datasize
;
/* The size of the resource */
}
wrc_resource32_t
;
...
...
misc/lstr.c
View file @
8c8a3a52
...
...
@@ -543,6 +543,8 @@ DWORD WINAPI FormatMessage32A(
DWORD
nSize
,
LPDWORD
args
/* va_list *args */
)
{
#ifdef __i386__
/* This implementation is completely dependant on the format of the va_list on x86 CPUs */
LPSTR
target
,
t
;
DWORD
talloced
;
LPSTR
from
,
f
;
...
...
@@ -698,6 +700,9 @@ DWORD WINAPI FormatMessage32A(
return
(
dwFlags
&
FORMAT_MESSAGE_ALLOCATE_BUFFER
)
?
strlen
(
*
(
LPSTR
*
)
lpBuffer
)
:
strlen
(
lpBuffer
);
#else
return
0
;
#endif
/* __i386__ */
}
#undef ADD_TO_T
...
...
@@ -714,6 +719,8 @@ DWORD WINAPI FormatMessage32W(
DWORD
nSize
,
LPDWORD
args
/* va_list *args */
)
{
#ifdef __i386__
/* This implementation is completely dependant on the format of the va_list on x86 CPUs */
LPSTR
target
,
t
;
DWORD
talloced
;
LPSTR
from
,
f
;
...
...
@@ -870,5 +877,8 @@ DWORD WINAPI FormatMessage32W(
return
(
dwFlags
&
FORMAT_MESSAGE_ALLOCATE_BUFFER
)
?
lstrlen32W
(
*
(
LPWSTR
*
)
lpBuffer
)
:
lstrlen32W
(
lpBuffer
);
#else
return
0
;
#endif
/* __i386__ */
}
#undef ADD_TO_T
misc/wsprintf.c
View file @
8c8a3a52
...
...
@@ -239,6 +239,29 @@ static UINT32 WPRINTF_GetLen( WPRINTF_FORMAT *format, LPCVOID arg,
return
len
;
}
/***********************************************************************
* WPRINTF_ExtractVAPtr (Not a Windows API)
*/
static
LPVOID
WPRINTF_ExtractVAPtr
(
WPRINTF_FORMAT
*
format
,
va_list
args
)
{
switch
(
format
->
type
)
{
case
WPR_WCHAR
:
return
(
LPVOID
)
va_arg
(
args
,
WCHAR
);
case
WPR_CHAR
:
return
(
LPVOID
)
va_arg
(
args
,
CHAR
);
case
WPR_STRING
:
return
(
LPVOID
)
va_arg
(
args
,
LPCSTR
);
case
WPR_WSTRING
:
return
(
LPVOID
)
va_arg
(
args
,
LPCWSTR
);
case
WPR_HEXA
:
case
WPR_SIGNED
:
case
WPR_UNSIGNED
:
return
(
LPVOID
)
va_arg
(
args
,
INT32
);
default:
return
NULL
;
}
}
/***********************************************************************
* wvsnprintf16 (Not a Windows API)
...
...
@@ -344,6 +367,7 @@ INT32 WINAPI wvsnprintf32A( LPSTR buffer, UINT32 maxlen, LPCSTR spec,
LPSTR
p
=
buffer
;
UINT32
i
,
len
;
CHAR
number
[
20
];
LPVOID
argPtr
=
NULL
;
while
(
*
spec
&&
(
maxlen
>
1
))
{
...
...
@@ -351,29 +375,30 @@ INT32 WINAPI wvsnprintf32A( LPSTR buffer, UINT32 maxlen, LPCSTR spec,
spec
++
;
if
(
*
spec
==
'%'
)
{
*
p
++
=
*
spec
++
;
maxlen
--
;
continue
;
}
spec
+=
WPRINTF_ParseFormatA
(
spec
,
&
format
);
len
=
WPRINTF_GetLen
(
&
format
,
args
,
number
,
maxlen
-
1
);
argPtr
=
WPRINTF_ExtractVAPtr
(
&
format
,
args
);
len
=
WPRINTF_GetLen
(
&
format
,
&
argPtr
,
number
,
maxlen
-
1
);
if
(
!
(
format
.
flags
&
WPRINTF_LEFTALIGN
))
for
(
i
=
format
.
precision
;
i
<
format
.
width
;
i
++
,
maxlen
--
)
*
p
++
=
' '
;
switch
(
format
.
type
)
{
case
WPR_WCHAR
:
if
((
*
p
=
(
CHAR
)
va_arg
(
args
,
WCHAR
)
))
p
++
;
if
((
*
p
=
(
CHAR
)
argPtr
))
p
++
;
else
if
(
format
.
width
>
1
)
*
p
++
=
' '
;
else
len
=
0
;
break
;
case
WPR_CHAR
:
if
((
*
p
=
va_arg
(
args
,
CHAR
)
))
p
++
;
if
((
*
p
=
(
CHAR
)
argPtr
))
p
++
;
else
if
(
format
.
width
>
1
)
*
p
++
=
' '
;
else
len
=
0
;
break
;
case
WPR_STRING
:
memcpy
(
p
,
va_arg
(
args
,
LPCSTR
)
,
len
);
memcpy
(
p
,
(
LPCSTR
)
argPtr
,
len
);
p
+=
len
;
break
;
case
WPR_WSTRING
:
{
LPCWSTR
ptr
=
va_arg
(
args
,
LPCWSTR
)
;
LPCWSTR
ptr
=
(
LPCWSTR
)
argPtr
;
for
(
i
=
0
;
i
<
len
;
i
++
)
*
p
++
=
(
CHAR
)
*
ptr
++
;
}
break
;
...
...
@@ -393,7 +418,7 @@ INT32 WINAPI wvsnprintf32A( LPSTR buffer, UINT32 maxlen, LPCSTR spec,
for
(
i
=
len
;
i
<
format
.
precision
;
i
++
,
maxlen
--
)
*
p
++
=
'0'
;
memcpy
(
p
,
number
,
len
);
p
+=
len
;
(
void
)
va_arg
(
args
,
INT32
);
/* Go to the next arg */
/* Go to the next arg */
break
;
case
WPR_UNKNOWN
:
continue
;
...
...
relay32/builtin32.c
View file @
8c8a3a52
...
...
@@ -377,6 +377,7 @@ void BUILTIN32_SwitchRelayDebug(BOOL32 onoff) {
HMODULE32
hModule
;
int
i
;
#ifdef __i386__
if
(
!
(
TRACE_ON
(
relay
)
||
WARN_ON
(
relay
)))
return
;
for
(
dll
=
BuiltinDLLs
;
dll
->
descr
;
dll
++
)
{
...
...
@@ -402,6 +403,7 @@ void BUILTIN32_SwitchRelayDebug(BOOL32 onoff) {
}
}
}
#endif
/* __i386__ */
return
;
}
...
...
relay32/relay386.c
View file @
8c8a3a52
...
...
@@ -4,7 +4,6 @@
* Copyright 1997 Alexandre Julliard
*/
#ifdef __i386__
#include <assert.h>
#include <string.h>
...
...
@@ -18,6 +17,7 @@
char
**
debug_relay_excludelist
=
NULL
,
**
debug_relay_includelist
=
NULL
;
#ifdef __i386__
/***********************************************************************
* RELAY_ShowDebugmsgRelay
*
...
...
relay32/snoop.c
View file @
8c8a3a52
...
...
@@ -18,10 +18,10 @@
#include "debugstr.h"
#include "debug.h"
#ifdef __i386__
char
**
debug_snoop_excludelist
=
NULL
,
**
debug_snoop_includelist
=
NULL
;
#ifdef __i386__
#ifdef NEED_UNDERSCORE_PREFIX
# define PREFIX "_"
#else
...
...
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