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
47b90d6b
Commit
47b90d6b
authored
Aug 07, 2006
by
Andrew Talbot
Committed by
Alexandre Julliard
Aug 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user/tests: Write-strings and cast-qual warnings fix.
parent
5d0e4ba0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
sysparams.c
dlls/user/tests/sysparams.c
+1
-1
text.c
dlls/user/tests/text.c
+12
-11
No files found.
dlls/user/tests/sysparams.c
View file @
47b90d6b
...
...
@@ -336,7 +336,7 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCS
/* get a metric from the registry. If the value is negative
* it is assumed to be in twips and converted to pixels */
static
UINT
metricfromreg
(
c
har
*
keyname
,
char
*
valname
,
int
dpi
)
static
UINT
metricfromreg
(
c
onst
char
*
keyname
,
const
char
*
valname
,
int
dpi
)
{
HKEY
hkey
;
char
buf
[
64
];
...
...
dlls/user/tests/text.c
View file @
47b90d6b
...
...
@@ -33,12 +33,13 @@ static void test_DrawTextCalcRect(void)
HDC
hdc
;
HFONT
hFont
,
hOldFont
;
LOGFONTA
lf
;
const
char
text
[]
=
"Example text for testing DrawText in "
static
CHAR
text
[]
=
"Example text for testing DrawText in "
"MM_HIENGLISH mode"
;
const
WCHAR
textW
[]
=
{
'W'
,
'i'
,
'd'
,
'e'
,
' '
,
'c'
,
'h'
,
'a'
,
'r'
,
' '
,
static
WCHAR
textW
[]
=
{
'W'
,
'i'
,
'd'
,
'e'
,
' '
,
'c'
,
'h'
,
'a'
,
'r'
,
' '
,
's'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'\0'
};
const
WCHAR
emptystringW
[]
=
{
0
};
INT
textlen
,
textheight
;
static
CHAR
emptystring
[]
=
""
;
static
WCHAR
emptystringW
[]
=
{
0
};
INT
textlen
,
textheight
;
RECT
rect
=
{
0
,
0
,
100
,
0
};
BOOL
ret
;
...
...
@@ -106,12 +107,12 @@ static void test_DrawTextCalcRect(void)
/* note: testing the function's return value is useless, it differs
* ( 0 or 1) on every Windows version I tried */
SetRect
(
&
rect
,
10
,
10
,
100
,
100
);
textheight
=
DrawTextExA
(
hdc
,
(
char
*
)
text
,
0
,
&
rect
,
DT_CALCRECT
,
NULL
);
textheight
=
DrawTextExA
(
hdc
,
text
,
0
,
&
rect
,
DT_CALCRECT
,
NULL
);
ok
(
!
(
rect
.
left
==
rect
.
right
&&
rect
.
bottom
==
rect
.
top
),
"rectangle should NOT be empty.
\n
"
);
SetRect
(
&
rect
,
10
,
10
,
100
,
100
);
SetLastError
(
0
);
textheight
=
DrawTextExA
(
hdc
,
""
,
-
1
,
&
rect
,
DT_CALCRECT
,
NULL
);
textheight
=
DrawTextExA
(
hdc
,
emptystring
,
-
1
,
&
rect
,
DT_CALCRECT
,
NULL
);
ok
(
(
rect
.
left
==
rect
.
right
&&
rect
.
bottom
==
rect
.
top
),
"rectangle should be empty.
\n
"
);
SetRect
(
&
rect
,
10
,
10
,
100
,
100
);
...
...
@@ -127,12 +128,12 @@ static void test_DrawTextCalcRect(void)
/* Wide char versions */
SetRect
(
&
rect
,
10
,
10
,
100
,
100
);
SetLastError
(
0
);
textheight
=
DrawTextExW
(
hdc
,
(
WCHAR
*
)
textW
,
0
,
&
rect
,
DT_CALCRECT
,
NULL
);
textheight
=
DrawTextExW
(
hdc
,
textW
,
0
,
&
rect
,
DT_CALCRECT
,
NULL
);
if
(
GetLastError
()
!=
ERROR_CALL_NOT_IMPLEMENTED
)
{
ok
(
!
(
rect
.
left
==
rect
.
right
&&
rect
.
bottom
==
rect
.
top
),
"rectangle should NOT be empty.
\n
"
);
SetRect
(
&
rect
,
10
,
10
,
100
,
100
);
textheight
=
DrawTextExW
(
hdc
,
(
WCHAR
*
)
emptystringW
,
-
1
,
&
rect
,
DT_CALCRECT
,
NULL
);
textheight
=
DrawTextExW
(
hdc
,
emptystringW
,
-
1
,
&
rect
,
DT_CALCRECT
,
NULL
);
ok
(
(
rect
.
left
==
rect
.
right
&&
rect
.
bottom
==
rect
.
top
),
"rectangle should be empty.
\n
"
);
SetRect
(
&
rect
,
10
,
10
,
100
,
100
);
...
...
@@ -144,7 +145,7 @@ static void test_DrawTextCalcRect(void)
ok
(
!
(
rect
.
left
==
rect
.
right
&&
rect
.
bottom
==
rect
.
top
),
"rectangle should NOT be empty.
\n
"
);
}
SelectObject
(
hdc
,
hOldFont
);
ret
=
DeleteObject
(
hFont
);
ok
(
ret
,
"DeleteObject error %lu
\n
"
,
GetLastError
());
...
...
@@ -157,7 +158,7 @@ static void test_DrawTextCalcRect(void)
}
/* replace tabs by \t */
static
void
strfmt
(
char
*
str
,
char
*
strout
)
static
void
strfmt
(
c
onst
c
har
*
str
,
char
*
strout
)
{
unsigned
int
i
,
j
;
for
(
i
=
0
,
j
=
0
;
i
<=
strlen
(
str
);
i
++
,
j
++
)
...
...
@@ -166,7 +167,7 @@ static void strfmt( char *str, char *strout)
strout
[
j
]
=
't'
;
}
}
#define TABTEST( tabval, tabcount, string, _exp) \
{ int i,x_act, x_exp; char strdisp[64];\
...
...
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