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
30ee1d10
Commit
30ee1d10
authored
Jul 21, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool.drv/tests: Use nameless unions/structs.
parent
e7e43b45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
info.c
dlls/winspool.drv/tests/info.c
+16
-19
No files found.
dlls/winspool.drv/tests/info.c
View file @
30ee1d10
...
@@ -21,9 +21,6 @@
...
@@ -21,9 +21,6 @@
#include <stdarg.h>
#include <stdarg.h>
#include <assert.h>
#include <assert.h>
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "winerror.h"
#include "winerror.h"
...
@@ -2934,7 +2931,7 @@ static void test_OpenPrinter_defaults(void)
...
@@ -2934,7 +2931,7 @@ static void test_OpenPrinter_defaults(void)
pi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
pi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
ret
=
GetPrinterA
(
printer
,
2
,
(
BYTE
*
)
pi
,
needed
,
&
needed
);
ret
=
GetPrinterA
(
printer
,
2
,
(
BYTE
*
)
pi
,
needed
,
&
needed
);
ok
(
ret
,
"GetPrinterA() failed le=%ld
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetPrinterA() failed le=%ld
\n
"
,
GetLastError
()
);
default_size
=
pi
->
pDevMode
->
u1
.
s1
.
dmPaperSize
;
default_size
=
pi
->
pDevMode
->
dmPaperSize
;
HeapFree
(
GetProcessHeap
(),
0
,
pi
);
HeapFree
(
GetProcessHeap
(),
0
,
pi
);
needed
=
0
;
needed
=
0
;
...
@@ -2962,8 +2959,8 @@ static void test_OpenPrinter_defaults(void)
...
@@ -2962,8 +2959,8 @@ static void test_OpenPrinter_defaults(void)
todo_wine
todo_wine
ok
(
job_info
->
pDevMode
!=
NULL
,
"got NULL DEVMODEA
\n
"
);
ok
(
job_info
->
pDevMode
!=
NULL
,
"got NULL DEVMODEA
\n
"
);
if
(
job_info
->
pDevMode
)
if
(
job_info
->
pDevMode
)
ok
(
job_info
->
pDevMode
->
u1
.
s1
.
dmPaperSize
==
default_size
,
"got %d default %d
\n
"
,
ok
(
job_info
->
pDevMode
->
dmPaperSize
==
default_size
,
"got %d default %d
\n
"
,
job_info
->
pDevMode
->
u1
.
s1
.
dmPaperSize
,
default_size
);
job_info
->
pDevMode
->
dmPaperSize
,
default_size
);
HeapFree
(
GetProcessHeap
(),
0
,
job_info
);
HeapFree
(
GetProcessHeap
(),
0
,
job_info
);
ScheduleJob
(
printer
,
add_job
->
JobId
);
/* remove the empty job */
ScheduleJob
(
printer
,
add_job
->
JobId
);
/* remove the empty job */
...
@@ -2975,7 +2972,7 @@ static void test_OpenPrinter_defaults(void)
...
@@ -2975,7 +2972,7 @@ static void test_OpenPrinter_defaults(void)
memset
(
&
my_dm
,
0
,
sizeof
(
my_dm
)
);
memset
(
&
my_dm
,
0
,
sizeof
(
my_dm
)
);
my_dm
.
dmSize
=
sizeof
(
my_dm
);
my_dm
.
dmSize
=
sizeof
(
my_dm
);
my_dm
.
dmFields
=
DM_PAPERSIZE
;
my_dm
.
dmFields
=
DM_PAPERSIZE
;
my_dm
.
u1
.
s1
.
dmPaperSize
=
(
default_size
==
DMPAPER_A4
)
?
DMPAPER_LETTER
:
DMPAPER_A4
;
my_dm
.
dmPaperSize
=
(
default_size
==
DMPAPER_A4
)
?
DMPAPER_LETTER
:
DMPAPER_A4
;
prn_def
.
pDatatype
=
NULL
;
prn_def
.
pDatatype
=
NULL
;
prn_def
.
pDevMode
=
&
my_dm
;
prn_def
.
pDevMode
=
&
my_dm
;
...
@@ -2990,8 +2987,8 @@ static void test_OpenPrinter_defaults(void)
...
@@ -2990,8 +2987,8 @@ static void test_OpenPrinter_defaults(void)
pi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
pi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
ret
=
GetPrinterA
(
printer
,
2
,
(
BYTE
*
)
pi
,
needed
,
&
needed
);
ret
=
GetPrinterA
(
printer
,
2
,
(
BYTE
*
)
pi
,
needed
,
&
needed
);
ok
(
ret
,
"GetPrinterA() failed le=%ld
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetPrinterA() failed le=%ld
\n
"
,
GetLastError
()
);
ok
(
pi
->
pDevMode
->
u1
.
s1
.
dmPaperSize
==
default_size
,
"got %d default %d
\n
"
,
ok
(
pi
->
pDevMode
->
dmPaperSize
==
default_size
,
"got %d default %d
\n
"
,
pi
->
pDevMode
->
u1
.
s1
.
dmPaperSize
,
default_size
);
pi
->
pDevMode
->
dmPaperSize
,
default_size
);
HeapFree
(
GetProcessHeap
(),
0
,
pi
);
HeapFree
(
GetProcessHeap
(),
0
,
pi
);
...
@@ -3010,9 +3007,9 @@ static void test_OpenPrinter_defaults(void)
...
@@ -3010,9 +3007,9 @@ static void test_OpenPrinter_defaults(void)
ok
(
job_info
->
pDevMode
->
dmFields
==
DM_PAPERSIZE
,
"got %08lx
\n
"
,
ok
(
job_info
->
pDevMode
->
dmFields
==
DM_PAPERSIZE
,
"got %08lx
\n
"
,
job_info
->
pDevMode
->
dmFields
);
job_info
->
pDevMode
->
dmFields
);
ok
(
job_info
->
pDevMode
->
u1
.
s1
.
dmPaperSize
==
my_dm
.
u1
.
s1
.
dmPaperSize
,
ok
(
job_info
->
pDevMode
->
dmPaperSize
==
my_dm
.
dmPaperSize
,
"got %d new size %d
\n
"
,
"got %d new size %d
\n
"
,
job_info
->
pDevMode
->
u1
.
s1
.
dmPaperSize
,
my_dm
.
u1
.
s1
.
dmPaperSize
);
job_info
->
pDevMode
->
dmPaperSize
,
my_dm
.
dmPaperSize
);
HeapFree
(
GetProcessHeap
(),
0
,
job_info
);
HeapFree
(
GetProcessHeap
(),
0
,
job_info
);
ScheduleJob
(
printer
,
add_job
->
JobId
);
/* remove the empty job */
ScheduleJob
(
printer
,
add_job
->
JobId
);
/* remove the empty job */
...
@@ -3035,15 +3032,15 @@ static void test_IsValidDevmodeW(void)
...
@@ -3035,15 +3032,15 @@ static void test_IsValidDevmodeW(void)
{
0
,
FIELD_OFFSET
(
DEVMODEW
,
dmFields
)
+
3
,
FALSE
},
{
0
,
FIELD_OFFSET
(
DEVMODEW
,
dmFields
)
+
3
,
FALSE
},
{
0
,
FIELD_OFFSET
(
DEVMODEW
,
dmFields
)
+
4
,
TRUE
},
{
0
,
FIELD_OFFSET
(
DEVMODEW
,
dmFields
)
+
4
,
TRUE
},
{
DM_ORIENTATION
,
FIELD_OFFSET
(
DEVMODEW
,
u1
.
s1
.
dmOrientation
)
+
0
,
FALSE
},
{
DM_ORIENTATION
,
FIELD_OFFSET
(
DEVMODEW
,
dmOrientation
)
+
0
,
FALSE
},
{
DM_ORIENTATION
,
FIELD_OFFSET
(
DEVMODEW
,
u1
.
s1
.
dmOrientation
)
+
1
,
FALSE
},
{
DM_ORIENTATION
,
FIELD_OFFSET
(
DEVMODEW
,
dmOrientation
)
+
1
,
FALSE
},
{
DM_ORIENTATION
,
FIELD_OFFSET
(
DEVMODEW
,
u1
.
s1
.
dmOrientation
)
+
2
,
TRUE
},
{
DM_ORIENTATION
,
FIELD_OFFSET
(
DEVMODEW
,
dmOrientation
)
+
2
,
TRUE
},
{
DM_NUP
,
FIELD_OFFSET
(
DEVMODEW
,
u2
.
dmNup
)
+
0
,
FALSE
},
{
DM_NUP
,
FIELD_OFFSET
(
DEVMODEW
,
dmNup
)
+
0
,
FALSE
},
{
DM_NUP
,
FIELD_OFFSET
(
DEVMODEW
,
u2
.
dmNup
)
+
1
,
FALSE
},
{
DM_NUP
,
FIELD_OFFSET
(
DEVMODEW
,
dmNup
)
+
1
,
FALSE
},
{
DM_NUP
,
FIELD_OFFSET
(
DEVMODEW
,
u2
.
dmNup
)
+
2
,
FALSE
},
{
DM_NUP
,
FIELD_OFFSET
(
DEVMODEW
,
dmNup
)
+
2
,
FALSE
},
{
DM_NUP
,
FIELD_OFFSET
(
DEVMODEW
,
u2
.
dmNup
)
+
3
,
FALSE
},
{
DM_NUP
,
FIELD_OFFSET
(
DEVMODEW
,
dmNup
)
+
3
,
FALSE
},
{
DM_NUP
,
FIELD_OFFSET
(
DEVMODEW
,
u2
.
dmNup
)
+
4
,
TRUE
},
{
DM_NUP
,
FIELD_OFFSET
(
DEVMODEW
,
dmNup
)
+
4
,
TRUE
},
};
};
static
const
struct
static
const
struct
...
...
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