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
88aeeb9f
Commit
88aeeb9f
authored
Jul 29, 2006
by
Duane Clark
Committed by
Alexandre Julliard
Jul 31, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix _getw.
parent
b44ea808
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
17 deletions
+21
-17
file.c
dlls/msvcrt/file.c
+19
-15
file.c
dlls/msvcrt/tests/file.c
+2
-2
No files found.
dlls/msvcrt/file.c
View file @
88aeeb9f
...
...
@@ -1675,21 +1675,6 @@ int CDECL _read(int fd, void *buf, unsigned int count)
}
/*********************************************************************
* _getw (MSVCRT.@)
*/
int
CDECL
MSVCRT__getw
(
MSVCRT_FILE
*
file
)
{
int
i
;
switch
(
_read
(
file
->
_file
,
&
i
,
sizeof
(
int
)))
{
case
1
:
return
i
;
case
0
:
file
->
_flag
|=
MSVCRT__IOEOF
;
break
;
default:
file
->
_flag
|=
MSVCRT__IOERR
;
break
;
}
return
EOF
;
}
/*********************************************************************
* _setmode (MSVCRT.@)
*/
int
CDECL
_setmode
(
int
fd
,
int
mode
)
...
...
@@ -2226,6 +2211,25 @@ MSVCRT_wint_t CDECL MSVCRT_fgetwc(MSVCRT_FILE* file)
}
/*********************************************************************
* _getw (MSVCRT.@)
*/
int
CDECL
MSVCRT__getw
(
MSVCRT_FILE
*
file
)
{
char
*
ch
;
int
i
,
j
,
k
;
ch
=
(
char
*
)
&
i
;
for
(
j
=
0
;
j
<
sizeof
(
int
);
j
++
)
{
k
=
MSVCRT_fgetc
(
file
);
if
(
k
==
MSVCRT_EOF
)
{
file
->
_flag
|=
MSVCRT__IOEOF
;
return
EOF
;
}
ch
[
j
]
=
k
;
}
return
i
;
}
/*********************************************************************
* getwc (MSVCRT.@)
*/
MSVCRT_wint_t
CDECL
MSVCRT_getwc
(
MSVCRT_FILE
*
file
)
...
...
dlls/msvcrt/tests/file.c
View file @
88aeeb9f
...
...
@@ -227,7 +227,7 @@ static void test_readmode( BOOL ascii_mode )
ok
(
fgets
(
buffer
,
MSVCRT_BUFSIZ
+
256
,
file
)
!=
0
,
"padding line fgets failed unexpected in %s
\n
"
,
IOMODE
);
i
=
_getw
(
file
);
ip
=
(
int
*
)
outbuffer
;
todo_wine
ok
(
i
==
*
ip
,
"_getw failed, expected %08x got %08x in %s
\n
"
,
*
ip
,
i
,
IOMODE
);
ok
(
i
==
*
ip
,
"_getw failed, expected %08x got %08x in %s
\n
"
,
*
ip
,
i
,
IOMODE
);
for
(
fp
=
0
;
fp
<
strlen
(
outbuffer
);
fp
++
)
if
(
outbuffer
[
fp
]
==
'\n'
)
break
;
fp
++
;
...
...
@@ -239,7 +239,7 @@ static void test_readmode( BOOL ascii_mode )
}
i
=
_getw
(
file
);
ip
=
(
int
*
)
buffer
;
todo_wine
ok
(
i
==
*
ip
,
"_getw failed, expected %08x got %08x in %s
\n
"
,
*
ip
,
i
,
IOMODE
);
ok
(
i
==
*
ip
,
"_getw failed, expected %08x got %08x in %s
\n
"
,
*
ip
,
i
,
IOMODE
);
fclose
(
file
);
unlink
(
"fdopen.tst"
);
...
...
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