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
4e18649c
Commit
4e18649c
authored
Aug 16, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sane.ds: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7d550de2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
capability.c
dlls/sane.ds/capability.c
+7
-7
ui.c
dlls/sane.ds/ui.c
+1
-1
No files found.
dlls/sane.ds/capability.c
View file @
4e18649c
...
@@ -174,7 +174,7 @@ static TW_UINT16 TWAIN_GetSupportedCaps(pTW_CAPABILITY pCapability)
...
@@ -174,7 +174,7 @@ static TW_UINT16 TWAIN_GetSupportedCaps(pTW_CAPABILITY pCapability)
TW_UINT32
i
;
TW_UINT32
i
;
a
=
GlobalLock
(
pCapability
->
hContainer
);
a
=
GlobalLock
(
pCapability
->
hContainer
);
a
->
ItemType
=
TWTY_UINT16
;
a
->
ItemType
=
TWTY_UINT16
;
a
->
NumItems
=
sizeof
(
supported_caps
)
/
sizeof
(
supported_caps
[
0
]
);
a
->
NumItems
=
ARRAY_SIZE
(
supported_caps
);
u
=
(
UINT16
*
)
a
->
ItemList
;
u
=
(
UINT16
*
)
a
->
ItemList
;
for
(
i
=
0
;
i
<
a
->
NumItems
;
i
++
)
for
(
i
=
0
;
i
<
a
->
NumItems
;
i
++
)
u
[
i
]
=
supported_caps
[
i
];
u
[
i
]
=
supported_caps
[
i
];
...
@@ -203,7 +203,7 @@ static TW_UINT16 SANE_ICAPXferMech (pTW_CAPABILITY pCapability, TW_UINT16 action
...
@@ -203,7 +203,7 @@ static TW_UINT16 SANE_ICAPXferMech (pTW_CAPABILITY pCapability, TW_UINT16 action
break
;
break
;
case
MSG_GET
:
case
MSG_GET
:
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
sizeof
(
possible_values
)
/
sizeof
(
possible_values
[
0
]
),
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
ARRAY_SIZE
(
possible_values
),
TWTY_UINT16
,
activeDS
.
capXferMech
,
TWSX_NATIVE
);
TWTY_UINT16
,
activeDS
.
capXferMech
,
TWSX_NATIVE
);
break
;
break
;
...
@@ -482,7 +482,7 @@ static TW_UINT16 SANE_ICAPBitDepth(pTW_CAPABILITY pCapability, TW_UINT16 action)
...
@@ -482,7 +482,7 @@ static TW_UINT16 SANE_ICAPBitDepth(pTW_CAPABILITY pCapability, TW_UINT16 action)
break
;
break
;
case
MSG_GET
:
case
MSG_GET
:
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
sizeof
(
possible_values
)
/
sizeof
(
possible_values
[
0
]
),
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
ARRAY_SIZE
(
possible_values
),
TWTY_UINT16
,
activeDS
.
sane_param
.
depth
,
activeDS
.
sane_param
.
depth
);
TWTY_UINT16
,
activeDS
.
sane_param
.
depth
,
activeDS
.
sane_param
.
depth
);
break
;
break
;
...
@@ -536,7 +536,7 @@ static TW_UINT16 SANE_ICAPCompression (pTW_CAPABILITY pCapability, TW_UINT16 act
...
@@ -536,7 +536,7 @@ static TW_UINT16 SANE_ICAPCompression (pTW_CAPABILITY pCapability, TW_UINT16 act
break
;
break
;
case
MSG_GET
:
case
MSG_GET
:
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
sizeof
(
possible_values
)
/
sizeof
(
possible_values
[
0
]
),
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
ARRAY_SIZE
(
possible_values
),
TWTY_UINT16
,
TWCP_NONE
,
TWCP_NONE
);
TWTY_UINT16
,
TWCP_NONE
,
TWCP_NONE
);
FIXME
(
"Partial stub: We don't attempt to support compression
\n
"
);
FIXME
(
"Partial stub: We don't attempt to support compression
\n
"
);
break
;
break
;
...
@@ -731,7 +731,7 @@ static TW_UINT16 SANE_ICAPPixelFlavor (pTW_CAPABILITY pCapability, TW_UINT16 act
...
@@ -731,7 +731,7 @@ static TW_UINT16 SANE_ICAPPixelFlavor (pTW_CAPABILITY pCapability, TW_UINT16 act
break
;
break
;
case
MSG_GET
:
case
MSG_GET
:
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
sizeof
(
possible_values
)
/
sizeof
(
possible_values
[
0
]
),
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
ARRAY_SIZE
(
possible_values
),
TWTY_UINT16
,
flavor
,
flavor
);
TWTY_UINT16
,
flavor
,
flavor
);
break
;
break
;
...
@@ -935,9 +935,9 @@ static TW_UINT16 SANE_ICAPSupportedSizes (pTW_CAPABILITY pCapability, TW_UINT16
...
@@ -935,9 +935,9 @@ static TW_UINT16 SANE_ICAPSupportedSizes (pTW_CAPABILITY pCapability, TW_UINT16
break
;
break
;
case
MSG_GET
:
case
MSG_GET
:
for
(
i
=
0
;
i
<
sizeof
(
supported_sizes
)
/
sizeof
(
supported_sizes
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
supported_sizes
);
i
++
)
possible_values
[
i
]
=
supported_sizes
[
i
].
size
;
possible_values
[
i
]
=
supported_sizes
[
i
].
size
;
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
sizeof
(
possible_values
)
/
sizeof
(
possible_values
[
0
]
),
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
ARRAY_SIZE
(
possible_values
),
TWTY_UINT16
,
current_size
,
default_size
);
TWTY_UINT16
,
current_size
,
default_size
);
WARN
(
"Partial Stub: our supported size selection is a bit thin.
\n
"
);
WARN
(
"Partial Stub: our supported size selection is a bit thin.
\n
"
);
break
;
break
;
...
...
dlls/sane.ds/ui.c
View file @
4e18649c
...
@@ -639,7 +639,7 @@ static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt,
...
@@ -639,7 +639,7 @@ static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt,
else
return
;
else
return
;
buffer
[
len
++
]
=
' '
;
buffer
[
len
++
]
=
' '
;
LoadStringW
(
SANE_instance
,
opt
->
unit
,
buffer
+
len
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
-
len
);
LoadStringW
(
SANE_instance
,
opt
->
unit
,
buffer
+
len
,
ARRAY_SIZE
(
buffer
)
-
len
);
edit_w
=
GetDlgItem
(
hwnd
,
index
+
ID_BASE
+
ID_EDIT_BASE
);
edit_w
=
GetDlgItem
(
hwnd
,
index
+
ID_BASE
+
ID_EDIT_BASE
);
if
(
edit_w
)
SetWindowTextW
(
edit_w
,
buffer
);
if
(
edit_w
)
SetWindowTextW
(
edit_w
,
buffer
);
...
...
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