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
f309e012
Commit
f309e012
authored
Oct 24, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Oct 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10/tests: Fix tests compilation with __WINESRC__ defined.
parent
3b429e88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
15 deletions
+13
-15
Makefile.in
dlls/usp10/tests/Makefile.in
+0
-1
usp10.c
dlls/usp10/tests/usp10.c
+13
-14
No files found.
dlls/usp10/tests/Makefile.in
View file @
f309e012
TESTDLL
=
usp10.dll
TESTDLL
=
usp10.dll
IMPORTS
=
usp10 user32 gdi32
IMPORTS
=
usp10 user32 gdi32
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
C_SRCS
=
\
usp10.c
usp10.c
...
...
dlls/usp10/tests/usp10.c
View file @
f309e012
...
@@ -825,10 +825,9 @@ typedef struct tagRangeP {
...
@@ -825,10 +825,9 @@ typedef struct tagRangeP {
LOGFONTA
lf
;
LOGFONTA
lf
;
}
fontEnumParam
;
}
fontEnumParam
;
static
int
CALLBACK
enumFontProc
(
const
LOGFONT
*
lpelfe
,
const
TEXTMETRIC
*
lpntme
,
static
int
CALLBACK
enumFontProc
(
const
LOGFONTA
*
lpelfe
,
const
TEXTMETRICA
*
lpntme
,
DWORD
FontType
,
LPARAM
lParam
)
DWORD
FontType
,
LPARAM
lParam
)
{
{
NEWTEXTMETRICEX
*
ntme
=
(
NEWTEXTMETRICEX
*
)
lpntme
;
NEWTEXTMETRICEX
A
*
ntme
=
(
NEWTEXTMETRICEXA
*
)
lpntme
;
fontEnumParam
*
rp
=
(
fontEnumParam
*
)
lParam
;
fontEnumParam
*
rp
=
(
fontEnumParam
*
)
lParam
;
int
idx
=
0
;
int
idx
=
0
;
DWORD
i
;
DWORD
i
;
...
@@ -850,7 +849,7 @@ static int CALLBACK enumFontProc( const LOGFONT *lpelfe, const TEXTMETRIC *lpntm
...
@@ -850,7 +849,7 @@ static int CALLBACK enumFontProc( const LOGFONT *lpelfe, const TEXTMETRIC *lpntm
if
(
ntme
->
ntmFontSig
.
fsUsb
[
idx
]
&
mask
)
if
(
ntme
->
ntmFontSig
.
fsUsb
[
idx
]
&
mask
)
{
{
memcpy
(
&
(
rp
->
lf
),
lpelfe
,
sizeof
(
LOGFONT
));
memcpy
(
&
(
rp
->
lf
),
lpelfe
,
sizeof
(
LOGFONT
A
));
return
0
;
return
0
;
}
}
return
1
;
return
1
;
...
@@ -862,7 +861,7 @@ static int _find_font_for_range(HDC hdc, const CHAR *recommended, BYTE range, co
...
@@ -862,7 +861,7 @@ static int _find_font_for_range(HDC hdc, const CHAR *recommended, BYTE range, co
fontEnumParam
lParam
;
fontEnumParam
lParam
;
lParam
.
range
=
range
;
lParam
.
range
=
range
;
memset
(
&
lParam
.
lf
,
0
,
sizeof
(
LOGFONT
));
memset
(
&
lParam
.
lf
,
0
,
sizeof
(
LOGFONT
A
));
*
hfont
=
NULL
;
*
hfont
=
NULL
;
if
(
recommended
)
if
(
recommended
)
...
@@ -881,7 +880,7 @@ static int _find_font_for_range(HDC hdc, const CHAR *recommended, BYTE range, co
...
@@ -881,7 +880,7 @@ static int _find_font_for_range(HDC hdc, const CHAR *recommended, BYTE range, co
if
(
!*
hfont
)
if
(
!*
hfont
)
{
{
memset
(
&
lParam
.
lf
,
0
,
sizeof
(
LOGFONT
));
memset
(
&
lParam
.
lf
,
0
,
sizeof
(
LOGFONT
A
));
lParam
.
lf
.
lfCharSet
=
DEFAULT_CHARSET
;
lParam
.
lf
.
lfCharSet
=
DEFAULT_CHARSET
;
if
(
!
EnumFontFamiliesExA
(
hdc
,
&
lParam
.
lf
,
enumFontProc
,
(
LPARAM
)
&
lParam
,
0
)
&&
lParam
.
lf
.
lfFaceName
[
0
])
if
(
!
EnumFontFamiliesExA
(
hdc
,
&
lParam
.
lf
,
enumFontProc
,
(
LPARAM
)
&
lParam
,
0
)
&&
lParam
.
lf
.
lfFaceName
[
0
])
...
@@ -1809,10 +1808,10 @@ static void test_ScriptGetCMap(HDC hdc, unsigned short pwOutGlyphs[256])
...
@@ -1809,10 +1808,10 @@ static void test_ScriptGetCMap(HDC hdc, unsigned short pwOutGlyphs[256])
struct
enum_font_data
struct
enum_font_data
{
{
int
total
;
int
total
;
ENUMLOGFONT
elf
[
MAX_ENUM_FONTS
];
ENUMLOGFONT
A
elf
[
MAX_ENUM_FONTS
];
};
};
static
INT
CALLBACK
enum_bitmap_font_proc
(
const
LOGFONT
*
lf
,
const
TEXTMETRIC
*
ntm
,
DWORD
type
,
LPARAM
lParam
)
static
INT
CALLBACK
enum_bitmap_font_proc
(
const
LOGFONT
A
*
lf
,
const
TEXTMETRICA
*
ntm
,
DWORD
type
,
LPARAM
lParam
)
{
{
struct
enum_font_data
*
efnd
=
(
struct
enum_font_data
*
)
lParam
;
struct
enum_font_data
*
efnd
=
(
struct
enum_font_data
*
)
lParam
;
...
@@ -1820,7 +1819,7 @@ static INT CALLBACK enum_bitmap_font_proc(const LOGFONT *lf, const TEXTMETRIC *n
...
@@ -1820,7 +1819,7 @@ static INT CALLBACK enum_bitmap_font_proc(const LOGFONT *lf, const TEXTMETRIC *n
if
(
efnd
->
total
<
MAX_ENUM_FONTS
)
if
(
efnd
->
total
<
MAX_ENUM_FONTS
)
{
{
efnd
->
elf
[
efnd
->
total
++
]
=
*
(
ENUMLOGFONT
*
)
lf
;
efnd
->
elf
[
efnd
->
total
++
]
=
*
(
ENUMLOGFONT
A
*
)
lf
;
}
}
else
else
trace
(
"enum tests invalid; you have more than %d fonts
\n
"
,
MAX_ENUM_FONTS
);
trace
(
"enum tests invalid; you have more than %d fonts
\n
"
,
MAX_ENUM_FONTS
);
...
@@ -1828,7 +1827,7 @@ static INT CALLBACK enum_bitmap_font_proc(const LOGFONT *lf, const TEXTMETRIC *n
...
@@ -1828,7 +1827,7 @@ static INT CALLBACK enum_bitmap_font_proc(const LOGFONT *lf, const TEXTMETRIC *n
return
1
;
return
1
;
}
}
static
INT
CALLBACK
enum_truetype_proc
(
const
LOGFONT
*
lf
,
const
TEXTMETRIC
*
ntm
,
DWORD
type
,
LPARAM
lParam
)
static
INT
CALLBACK
enum_truetype_proc
(
const
LOGFONT
A
*
lf
,
const
TEXTMETRICA
*
ntm
,
DWORD
type
,
LPARAM
lParam
)
{
{
struct
enum_font_data
*
efnd
=
(
struct
enum_font_data
*
)
lParam
;
struct
enum_font_data
*
efnd
=
(
struct
enum_font_data
*
)
lParam
;
...
@@ -1836,7 +1835,7 @@ static INT CALLBACK enum_truetype_proc(const LOGFONT *lf, const TEXTMETRIC *ntm,
...
@@ -1836,7 +1835,7 @@ static INT CALLBACK enum_truetype_proc(const LOGFONT *lf, const TEXTMETRIC *ntm,
if
(
efnd
->
total
<
MAX_ENUM_FONTS
)
if
(
efnd
->
total
<
MAX_ENUM_FONTS
)
{
{
efnd
->
elf
[
efnd
->
total
++
]
=
*
(
ENUMLOGFONT
*
)
lf
;
efnd
->
elf
[
efnd
->
total
++
]
=
*
(
ENUMLOGFONT
A
*
)
lf
;
}
}
else
else
trace
(
"enum tests invalid; you have more than %d fonts
\n
"
,
MAX_ENUM_FONTS
);
trace
(
"enum tests invalid; you have more than %d fonts
\n
"
,
MAX_ENUM_FONTS
);
...
@@ -1850,7 +1849,7 @@ static void test_ScriptGetFontProperties(HDC hdc)
...
@@ -1850,7 +1849,7 @@ static void test_ScriptGetFontProperties(HDC hdc)
SCRIPT_CACHE
psc
,
old_psc
;
SCRIPT_CACHE
psc
,
old_psc
;
SCRIPT_FONTPROPERTIES
sfp
;
SCRIPT_FONTPROPERTIES
sfp
;
HFONT
font
,
oldfont
;
HFONT
font
,
oldfont
;
LOGFONT
lf
;
LOGFONT
A
lf
;
struct
enum_font_data
efnd
;
struct
enum_font_data
efnd
;
TEXTMETRICA
tmA
;
TEXTMETRICA
tmA
;
WORD
gi
[
3
];
WORD
gi
[
3
];
...
@@ -1934,7 +1933,7 @@ static void test_ScriptGetFontProperties(HDC hdc)
...
@@ -1934,7 +1933,7 @@ static void test_ScriptGetFontProperties(HDC hdc)
for
(
i
=
0
;
i
<
efnd
.
total
;
i
++
)
for
(
i
=
0
;
i
<
efnd
.
total
;
i
++
)
{
{
lstrcpyA
(
lf
.
lfFaceName
,
(
char
*
)
efnd
.
elf
[
i
].
elfFullName
);
lstrcpyA
(
lf
.
lfFaceName
,
(
char
*
)
efnd
.
elf
[
i
].
elfFullName
);
font
=
CreateFontIndirect
(
&
lf
);
font
=
CreateFontIndirect
A
(
&
lf
);
oldfont
=
SelectObject
(
hdc
,
font
);
oldfont
=
SelectObject
(
hdc
,
font
);
sfp
.
cBytes
=
sizeof
(
SCRIPT_FONTPROPERTIES
);
sfp
.
cBytes
=
sizeof
(
SCRIPT_FONTPROPERTIES
);
...
@@ -1975,7 +1974,7 @@ static void test_ScriptGetFontProperties(HDC hdc)
...
@@ -1975,7 +1974,7 @@ static void test_ScriptGetFontProperties(HDC hdc)
for
(
i
=
0
;
i
<
efnd
.
total
;
i
++
)
for
(
i
=
0
;
i
<
efnd
.
total
;
i
++
)
{
{
lstrcpyA
(
lf
.
lfFaceName
,
(
char
*
)
efnd
.
elf
[
i
].
elfFullName
);
lstrcpyA
(
lf
.
lfFaceName
,
(
char
*
)
efnd
.
elf
[
i
].
elfFullName
);
font
=
CreateFontIndirect
(
&
lf
);
font
=
CreateFontIndirect
A
(
&
lf
);
oldfont
=
SelectObject
(
hdc
,
font
);
oldfont
=
SelectObject
(
hdc
,
font
);
sfp
.
cBytes
=
sizeof
(
SCRIPT_FONTPROPERTIES
);
sfp
.
cBytes
=
sizeof
(
SCRIPT_FONTPROPERTIES
);
...
...
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