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
6b7957f4
Commit
6b7957f4
authored
Nov 22, 2007
by
Gerald Pfeifer
Committed by
Alexandre Julliard
Nov 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedos: Use DWORD instead of long for return values of SetFilePointer.
Adjust type of loop variable in INT21_Ioctl_Char().
parent
7b804106
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
int21.c
dlls/winedos/int21.c
+20
-19
No files found.
dlls/winedos/int21.c
View file @
6b7957f4
...
@@ -1385,7 +1385,7 @@ static void INT21_SequentialReadFromFCB( CONTEXT86 *context )
...
@@ -1385,7 +1385,7 @@ static void INT21_SequentialReadFromFCB( CONTEXT86 *context )
struct
XFCB
*
xfcb
;
struct
XFCB
*
xfcb
;
HANDLE
handle
;
HANDLE
handle
;
DWORD
record_number
;
DWORD
record_number
;
long
position
;
DWORD
position
;
BYTE
*
disk_transfer_area
;
BYTE
*
disk_transfer_area
;
UINT
bytes_read
;
UINT
bytes_read
;
BYTE
AL_result
;
BYTE
AL_result
;
...
@@ -1405,7 +1405,7 @@ static void INT21_SequentialReadFromFCB( CONTEXT86 *context )
...
@@ -1405,7 +1405,7 @@ static void INT21_SequentialReadFromFCB( CONTEXT86 *context )
record_number
=
128
*
fcb
->
current_block_number
+
fcb
->
record_within_current_block
;
record_number
=
128
*
fcb
->
current_block_number
+
fcb
->
record_within_current_block
;
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
TRACE
(
"seek(%d, %d, 0) failed with %
ld
\n
"
,
TRACE
(
"seek(%d, %d, 0) failed with %
u
\n
"
,
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
AL_result
=
0x01
;
/* end of file, no data read */
AL_result
=
0x01
;
/* end of file, no data read */
}
else
{
}
else
{
...
@@ -1421,7 +1421,7 @@ static void INT21_SequentialReadFromFCB( CONTEXT86 *context )
...
@@ -1421,7 +1421,7 @@ static void INT21_SequentialReadFromFCB( CONTEXT86 *context )
AL_result
=
0x03
;
/* end of file, partial record read */
AL_result
=
0x03
;
/* end of file, partial record read */
}
/* if */
}
/* if */
}
else
{
}
else
{
TRACE
(
"successful read %d bytes from record %d (position %
ld
) of file %d (handle %p)
\n
"
,
TRACE
(
"successful read %d bytes from record %d (position %
u
) of file %d (handle %p)
\n
"
,
bytes_read
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
bytes_read
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
AL_result
=
0x00
;
/* successful */
AL_result
=
0x00
;
/* successful */
}
/* if */
}
/* if */
...
@@ -1465,7 +1465,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT86 *context )
...
@@ -1465,7 +1465,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT86 *context )
struct
XFCB
*
xfcb
;
struct
XFCB
*
xfcb
;
HANDLE
handle
;
HANDLE
handle
;
DWORD
record_number
;
DWORD
record_number
;
long
position
;
DWORD
position
;
BYTE
*
disk_transfer_area
;
BYTE
*
disk_transfer_area
;
UINT
bytes_written
;
UINT
bytes_written
;
BYTE
AL_result
;
BYTE
AL_result
;
...
@@ -1485,7 +1485,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT86 *context )
...
@@ -1485,7 +1485,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT86 *context )
record_number
=
128
*
fcb
->
current_block_number
+
fcb
->
record_within_current_block
;
record_number
=
128
*
fcb
->
current_block_number
+
fcb
->
record_within_current_block
;
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
TRACE
(
"seek(%d, %d, 0) failed with %
ld
\n
"
,
TRACE
(
"seek(%d, %d, 0) failed with %
u
\n
"
,
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
AL_result
=
0x01
;
/* disk full */
AL_result
=
0x01
;
/* disk full */
}
else
{
}
else
{
...
@@ -1496,7 +1496,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT86 *context )
...
@@ -1496,7 +1496,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT86 *context )
fcb
->
file_number
,
disk_transfer_area
,
fcb
->
logical_record_size
,
bytes_written
);
fcb
->
file_number
,
disk_transfer_area
,
fcb
->
logical_record_size
,
bytes_written
);
AL_result
=
0x01
;
/* disk full */
AL_result
=
0x01
;
/* disk full */
}
else
{
}
else
{
TRACE
(
"successful written %d bytes from record %d (position %
ld
) of file %d (handle %p)
\n
"
,
TRACE
(
"successful written %d bytes from record %d (position %
u
) of file %d (handle %p)
\n
"
,
bytes_written
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
bytes_written
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
AL_result
=
0x00
;
/* successful */
AL_result
=
0x00
;
/* successful */
}
/* if */
}
/* if */
...
@@ -1541,7 +1541,7 @@ static void INT21_ReadRandomRecordFromFCB( CONTEXT86 *context )
...
@@ -1541,7 +1541,7 @@ static void INT21_ReadRandomRecordFromFCB( CONTEXT86 *context )
struct
XFCB
*
xfcb
;
struct
XFCB
*
xfcb
;
HANDLE
handle
;
HANDLE
handle
;
DWORD
record_number
;
DWORD
record_number
;
long
position
;
DWORD
position
;
BYTE
*
disk_transfer_area
;
BYTE
*
disk_transfer_area
;
UINT
bytes_read
;
UINT
bytes_read
;
BYTE
AL_result
;
BYTE
AL_result
;
...
@@ -1561,7 +1561,7 @@ static void INT21_ReadRandomRecordFromFCB( CONTEXT86 *context )
...
@@ -1561,7 +1561,7 @@ static void INT21_ReadRandomRecordFromFCB( CONTEXT86 *context )
}
else
{
}
else
{
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
TRACE
(
"seek(%d, %d, 0) failed with %
ld
\n
"
,
TRACE
(
"seek(%d, %d, 0) failed with %
u
\n
"
,
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
AL_result
=
0x01
;
/* end of file, no data read */
AL_result
=
0x01
;
/* end of file, no data read */
}
else
{
}
else
{
...
@@ -1577,7 +1577,7 @@ static void INT21_ReadRandomRecordFromFCB( CONTEXT86 *context )
...
@@ -1577,7 +1577,7 @@ static void INT21_ReadRandomRecordFromFCB( CONTEXT86 *context )
AL_result
=
0x03
;
/* end of file, partial record read */
AL_result
=
0x03
;
/* end of file, partial record read */
}
/* if */
}
/* if */
}
else
{
}
else
{
TRACE
(
"successful read %d bytes from record %d (position %
ld
) of file %d (handle %p)
\n
"
,
TRACE
(
"successful read %d bytes from record %d (position %
u
) of file %d (handle %p)
\n
"
,
bytes_read
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
bytes_read
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
AL_result
=
0x00
;
/* successful */
AL_result
=
0x00
;
/* successful */
}
/* if */
}
/* if */
...
@@ -1614,7 +1614,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT86 *context )
...
@@ -1614,7 +1614,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT86 *context )
struct
XFCB
*
xfcb
;
struct
XFCB
*
xfcb
;
HANDLE
handle
;
HANDLE
handle
;
DWORD
record_number
;
DWORD
record_number
;
long
position
;
DWORD
position
;
BYTE
*
disk_transfer_area
;
BYTE
*
disk_transfer_area
;
UINT
bytes_written
;
UINT
bytes_written
;
BYTE
AL_result
;
BYTE
AL_result
;
...
@@ -1634,7 +1634,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT86 *context )
...
@@ -1634,7 +1634,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT86 *context )
}
else
{
}
else
{
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
TRACE
(
"seek(%d, %d, 0) failed with %
ld
\n
"
,
TRACE
(
"seek(%d, %d, 0) failed with %
u
\n
"
,
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
AL_result
=
0x01
;
/* disk full */
AL_result
=
0x01
;
/* disk full */
}
else
{
}
else
{
...
@@ -1645,7 +1645,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT86 *context )
...
@@ -1645,7 +1645,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT86 *context )
fcb
->
file_number
,
disk_transfer_area
,
fcb
->
logical_record_size
,
bytes_written
);
fcb
->
file_number
,
disk_transfer_area
,
fcb
->
logical_record_size
,
bytes_written
);
AL_result
=
0x01
;
/* disk full */
AL_result
=
0x01
;
/* disk full */
}
else
{
}
else
{
TRACE
(
"successful written %d bytes from record %d (position %
ld
) of file %d (handle %p)
\n
"
,
TRACE
(
"successful written %d bytes from record %d (position %
u
) of file %d (handle %p)
\n
"
,
bytes_written
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
bytes_written
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
AL_result
=
0x00
;
/* successful */
AL_result
=
0x00
;
/* successful */
}
/* if */
}
/* if */
...
@@ -1689,7 +1689,7 @@ static void INT21_RandomBlockReadFromFCB( CONTEXT86 *context )
...
@@ -1689,7 +1689,7 @@ static void INT21_RandomBlockReadFromFCB( CONTEXT86 *context )
struct
XFCB
*
xfcb
;
struct
XFCB
*
xfcb
;
HANDLE
handle
;
HANDLE
handle
;
DWORD
record_number
;
DWORD
record_number
;
long
position
;
DWORD
position
;
BYTE
*
disk_transfer_area
;
BYTE
*
disk_transfer_area
;
UINT
records_requested
;
UINT
records_requested
;
UINT
bytes_requested
;
UINT
bytes_requested
;
...
@@ -1713,7 +1713,7 @@ static void INT21_RandomBlockReadFromFCB( CONTEXT86 *context )
...
@@ -1713,7 +1713,7 @@ static void INT21_RandomBlockReadFromFCB( CONTEXT86 *context )
}
else
{
}
else
{
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
TRACE
(
"seek(%d, %d, 0) failed with %
ld
\n
"
,
TRACE
(
"seek(%d, %d, 0) failed with %
u
\n
"
,
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
records_read
=
0
;
records_read
=
0
;
AL_result
=
0x01
;
/* end of file, no data read */
AL_result
=
0x01
;
/* end of file, no data read */
...
@@ -1734,7 +1734,7 @@ static void INT21_RandomBlockReadFromFCB( CONTEXT86 *context )
...
@@ -1734,7 +1734,7 @@ static void INT21_RandomBlockReadFromFCB( CONTEXT86 *context )
AL_result
=
0x03
;
/* end of file, partial record read */
AL_result
=
0x03
;
/* end of file, partial record read */
}
/* if */
}
/* if */
}
else
{
}
else
{
TRACE
(
"successful read %d bytes from record %d (position %
ld
) of file %d (handle %p)
\n
"
,
TRACE
(
"successful read %d bytes from record %d (position %
u
) of file %d (handle %p)
\n
"
,
bytes_read
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
bytes_read
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
records_read
=
records_requested
;
records_read
=
records_requested
;
AL_result
=
0x00
;
/* successful */
AL_result
=
0x00
;
/* successful */
...
@@ -1780,7 +1780,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context )
...
@@ -1780,7 +1780,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context )
struct
XFCB
*
xfcb
;
struct
XFCB
*
xfcb
;
HANDLE
handle
;
HANDLE
handle
;
DWORD
record_number
;
DWORD
record_number
;
long
position
;
DWORD
position
;
BYTE
*
disk_transfer_area
;
BYTE
*
disk_transfer_area
;
UINT
records_requested
;
UINT
records_requested
;
UINT
bytes_requested
;
UINT
bytes_requested
;
...
@@ -1804,7 +1804,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context )
...
@@ -1804,7 +1804,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context )
}
else
{
}
else
{
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
position
=
SetFilePointer
(
handle
,
record_number
*
fcb
->
logical_record_size
,
NULL
,
0
);
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
if
(
position
!=
record_number
*
fcb
->
logical_record_size
)
{
TRACE
(
"seek(%d, %d, 0) failed with %
ld
\n
"
,
TRACE
(
"seek(%d, %d, 0) failed with %
u
\n
"
,
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
fcb
->
file_number
,
record_number
*
fcb
->
logical_record_size
,
position
);
records_written
=
0
;
records_written
=
0
;
AL_result
=
0x01
;
/* disk full */
AL_result
=
0x01
;
/* disk full */
...
@@ -1819,7 +1819,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context )
...
@@ -1819,7 +1819,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context )
records_written
=
bytes_written
/
fcb
->
logical_record_size
;
records_written
=
bytes_written
/
fcb
->
logical_record_size
;
AL_result
=
0x01
;
/* disk full */
AL_result
=
0x01
;
/* disk full */
}
else
{
}
else
{
TRACE
(
"successful write %d bytes from record %d (position %
ld
) of file %d (handle %p)
\n
"
,
TRACE
(
"successful write %d bytes from record %d (position %
u
) of file %d (handle %p)
\n
"
,
bytes_written
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
bytes_written
,
record_number
,
position
,
fcb
->
file_number
,
handle
);
records_written
=
records_requested
;
records_written
=
records_requested
;
AL_result
=
0x00
;
/* successful */
AL_result
=
0x00
;
/* successful */
...
@@ -2733,7 +2733,7 @@ static void INT21_IoctlHPScanHandler( CONTEXT86 *context )
...
@@ -2733,7 +2733,7 @@ static void INT21_IoctlHPScanHandler( CONTEXT86 *context )
*/
*/
static
void
INT21_Ioctl_Char
(
CONTEXT86
*
context
)
static
void
INT21_Ioctl_Char
(
CONTEXT86
*
context
)
{
{
int
status
,
i
;
int
status
;
int
IsConsoleIOHandle
=
0
;
int
IsConsoleIOHandle
=
0
;
IO_STATUS_BLOCK
io
;
IO_STATUS_BLOCK
io
;
FILE_INTERNAL_INFORMATION
info
;
FILE_INTERNAL_INFORMATION
info
;
...
@@ -2750,6 +2750,7 @@ static void INT21_Ioctl_Char( CONTEXT86 *context )
...
@@ -2750,6 +2750,7 @@ static void INT21_Ioctl_Char( CONTEXT86 *context )
return
;
return
;
}
}
}
else
{
}
else
{
UINT
i
;
for
(
i
=
0
;
i
<
NB_MAGIC_DEVICES
;
i
++
)
for
(
i
=
0
;
i
<
NB_MAGIC_DEVICES
;
i
++
)
{
{
if
(
!
magic_devices
[
i
].
handle
)
continue
;
if
(
!
magic_devices
[
i
].
handle
)
continue
;
...
...
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