Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
39f138a2
Commit
39f138a2
authored
Mar 18, 2008
by
Andrew Talbot
Committed by
Alexandre Julliard
Mar 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
twain_32: Assign to structs instead of using memcpy.
parent
c5b499d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
dsm_ctrl.c
dlls/twain_32/dsm_ctrl.c
+5
-5
No files found.
dlls/twain_32/dsm_ctrl.c
View file @
39f138a2
...
...
@@ -88,7 +88,7 @@ twain_add_onedriver(const char *dsname) {
else
devices
=
malloc
(
sizeof
(
devices
[
0
]));
devices
[
nrdevices
].
modname
=
strdup
(
dsname
);
memcpy
(
&
devices
[
nrdevices
].
identity
,
&
sourceId
,
sizeof
(
sourceId
))
;
devices
[
nrdevices
].
identity
=
sourceId
;
nrdevices
++
;
DSM_sourceId
++
;
}
while
(
1
);
...
...
@@ -155,7 +155,7 @@ TW_UINT16 TWAIN_IdentityGetDefault (pTW_IDENTITY pOrigin, TW_MEMREF pData)
twain_autodetect
();
if
(
!
nrdevices
)
return
TWRC_FAILURE
;
memcpy
(
pSourceIdentity
,
&
devices
[
0
].
identity
,
sizeof
(
TW_IDENTITY
))
;
*
pSourceIdentity
=
devices
[
0
].
identity
;
return
TWRC_SUCCESS
;
}
...
...
@@ -172,7 +172,7 @@ TW_UINT16 TWAIN_IdentityGetFirst (pTW_IDENTITY pOrigin, TW_MEMREF pData)
return
TWRC_ENDOFLIST
;
}
DSM_currentDevice
=
0
;
memcpy
(
pSourceIdentity
,
&
devices
[
DSM_currentDevice
++
].
identity
,
sizeof
(
TW_IDENTITY
))
;
*
pSourceIdentity
=
devices
[
DSM_currentDevice
++
].
identity
;
return
TWRC_SUCCESS
;
}
...
...
@@ -186,7 +186,7 @@ TW_UINT16 TWAIN_IdentityGetNext (pTW_IDENTITY pOrigin, TW_MEMREF pData)
DSM_twCC
=
TWCC_SUCCESS
;
return
TWRC_ENDOFLIST
;
}
memcpy
(
pSourceIdentity
,
&
devices
[
DSM_currentDevice
++
].
identity
,
sizeof
(
TW_IDENTITY
))
;
*
pSourceIdentity
=
devices
[
DSM_currentDevice
++
].
identity
;
return
TWRC_SUCCESS
;
}
...
...
@@ -263,7 +263,7 @@ TW_UINT16 TWAIN_UserSelect (pTW_IDENTITY pOrigin, TW_MEMREF pData)
DSM_twCC
=
TWCC_OPERATIONERROR
;
return
TWRC_FAILURE
;
}
memcpy
(
selected
,
&
devices
[
0
].
identity
,
sizeof
(
TW_IDENTITY
))
;
*
selected
=
devices
[
0
].
identity
;
DSM_twCC
=
TWCC_SUCCESS
;
return
TWRC_SUCCESS
;
}
...
...
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