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
ac550a88
Commit
ac550a88
authored
Dec 12, 2006
by
Andrew Talbot
Committed by
Alexandre Julliard
Dec 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt/tests: Cast-qual warnings fix.
parent
9cf1579a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
file.c
dlls/msvcrt/tests/file.c
+9
-7
No files found.
dlls/msvcrt/tests/file.c
View file @
ac550a88
...
...
@@ -138,10 +138,12 @@ static void test_readmode( BOOL ascii_mode )
static
const
char
outbuffer
[]
=
"0,1,2,3,4,5,6,7,8,9
\r\n\r\n
A,B,C,D,E
\r\n
X,Y,Z"
;
static
const
char
padbuffer
[]
=
"ghjghjghjghj"
;
static
const
char
nlbuffer
[]
=
"
\r\n
"
;
char
buffer
[
2
*
BUFSIZ
+
256
],
*
optr
;
char
buffer
[
2
*
BUFSIZ
+
256
];
const
char
*
optr
;
int
fd
;
FILE
*
file
;
int
i
,
j
,
m
,
fp
,
ao
,
*
ip
,
pl
;
const
int
*
ip
;
int
i
,
j
,
m
,
fp
,
ao
,
pl
;
long
l
;
fd
=
open
(
"fdopen.tst"
,
O_WRONLY
|
O_CREAT
|
O_BINARY
,
_S_IREAD
|
_S_IWRITE
);
...
...
@@ -215,7 +217,7 @@ static void test_readmode( BOOL ascii_mode )
for
(
m
=
0
;
m
<
3
;
m
++
)
ok
(
buffer
[
m
]
==
padbuffer
[
m
+
(
BUFSIZ
-
4
)
%
strlen
(
padbuffer
)],
"expected %c got %c
\n
"
,
padbuffer
[
m
],
buffer
[
m
]);
m
+=
BUFSIZ
+
2
+
ao
;
optr
=
(
char
*
)
outbuffer
;
optr
=
outbuffer
;
for
(;
m
<
i
;
m
++
)
{
ok
(
buffer
[
m
]
==*
optr
,
"char %d expected %c got %c in %s
\n
"
,
m
,
*
optr
,
buffer
[
m
],
IOMODE
);
optr
++
;
...
...
@@ -246,7 +248,7 @@ static void test_readmode( BOOL ascii_mode )
ok
(
ftell
(
file
)
==
0
,
"Did not start at beginning of file in %s
\n
"
,
IOMODE
);
ok
(
fgets
(
buffer
,
2
*
BUFSIZ
+
256
,
file
)
!=
0
,
"padding line fgets failed unexpected in %s
\n
"
,
IOMODE
);
i
=
_getw
(
file
);
ip
=
(
int
*
)
outbuffer
;
ip
=
(
const
int
*
)
outbuffer
;
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
;
...
...
@@ -266,7 +268,7 @@ static void test_readmode( BOOL ascii_mode )
}
static
WCHAR
*
AtoW
(
char
*
p
)
static
WCHAR
*
AtoW
(
c
onst
c
har
*
p
)
{
WCHAR
*
buffer
;
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
p
,
-
1
,
NULL
,
0
);
...
...
@@ -329,7 +331,7 @@ static void test_fgetwc( void )
l
=
ftell
(
tempfh
);
ok
(
l
==
BUFSIZ
-
2
+
strlen
(
mytext
),
"ftell expected %d got %ld
\n
"
,
BUFSIZ
-
2
+
strlen
(
mytext
),
l
);
mytextW
=
AtoW
(
(
char
*
)
mytext
);
mytextW
=
AtoW
(
mytext
);
aptr
=
mytextW
;
wptr
=
wtextW
;
for
(
i
=
0
;
i
<
strlen
(
mytext
)
-
2
;
i
++
,
aptr
++
,
wptr
++
)
...
...
@@ -493,7 +495,7 @@ static void test_file_put_get( void )
fclose
(
tempfh
);
tempfh
=
fopen
(
tempf
,
"rt"
);
/* open in TEXT mode */
fgetws
(
wtextW
,
LLEN
,
tempfh
);
mytextW
=
AtoW
(
(
char
*
)
mytext
);
mytextW
=
AtoW
(
mytext
);
aptr
=
mytextW
;
wptr
=
wtextW
;
...
...
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