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
8d328ff8
Commit
8d328ff8
authored
Aug 04, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/tests: Refactor "broken" keyword handling so all cases are handled correctly.
parent
7158257f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
batch.c
programs/cmd/tests/batch.c
+4
-12
No files found.
programs/cmd/tests/batch.c
View file @
8d328ff8
...
...
@@ -152,16 +152,6 @@ static const char *compare_line(const char *out_line, const char *out_end, const
static
const
char
space_cmd
[]
=
{
'@'
,
's'
,
'p'
,
'a'
,
'c'
,
'e'
,
'@'
};
static
const
char
or_broken_cmd
[]
=
{
'@'
,
'o'
,
'r'
,
'_'
,
'b'
,
'r'
,
'o'
,
'k'
,
'e'
,
'n'
,
'@'
};
/* Corner case where exp_line directly starts with @or_broken@, on Windowses */
if
(
broken
(
1
)
&&
exp_line
+
sizeof
(
or_broken_cmd
)
<=
exp_end
&&
!
memcmp
(
exp_line
,
or_broken_cmd
,
sizeof
(
or_broken_cmd
)))
{
if
(
out_line
==
out_end
)
return
NULL
;
else
exp_ptr
=
exp_line
+
sizeof
(
or_broken_cmd
);
}
while
(
exp_ptr
<
exp_end
)
{
if
(
*
exp_ptr
==
'@'
)
{
if
(
exp_ptr
+
sizeof
(
pwd_cmd
)
<=
exp_end
...
...
@@ -183,8 +173,10 @@ static const char *compare_line(const char *out_line, const char *out_end, const
continue
;
}
else
if
(
exp_ptr
+
sizeof
(
or_broken_cmd
)
<=
exp_end
&&
!
memcmp
(
exp_ptr
,
or_broken_cmd
,
sizeof
(
or_broken_cmd
)))
{
exp_ptr
=
exp_end
;
continue
;
if
(
out_ptr
==
out_end
)
return
NULL
;
else
err
=
out_ptr
;
}
else
if
(
out_ptr
==
out_end
||
*
out_ptr
!=
*
exp_ptr
)
err
=
out_ptr
;
}
else
if
(
out_ptr
==
out_end
||
*
out_ptr
!=
*
exp_ptr
)
{
...
...
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