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
68e7fcda
Commit
68e7fcda
authored
Aug 26, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Add @path@ keyword, replaced by regular non-expanded path.
parent
64ce7c0e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
batch.c
programs/cmd/tests/batch.c
+17
-0
No files found.
programs/cmd/tests/batch.c
View file @
68e7fcda
...
@@ -26,6 +26,8 @@ static char workdir[MAX_PATH];
...
@@ -26,6 +26,8 @@ static char workdir[MAX_PATH];
static
DWORD
workdir_len
;
static
DWORD
workdir_len
;
static
char
drive
[
2
];
static
char
drive
[
2
];
static
const
DWORD
drive_len
=
sizeof
(
drive
)
/
sizeof
(
drive
[
0
]);
static
const
DWORD
drive_len
=
sizeof
(
drive
)
/
sizeof
(
drive
[
0
]);
static
char
path
[
MAX_PATH
];
static
DWORD
path_len
;
/* Convert to DOS line endings, and substitute escaped whitespace chars with real ones */
/* Convert to DOS line endings, and substitute escaped whitespace chars with real ones */
static
const
char
*
convert_input_data
(
const
char
*
data
,
DWORD
size
,
DWORD
*
new_size
)
static
const
char
*
convert_input_data
(
const
char
*
data
,
DWORD
size
,
DWORD
*
new_size
)
...
@@ -157,6 +159,7 @@ static const char *compare_line(const char *out_line, const char *out_end, const
...
@@ -157,6 +159,7 @@ static const char *compare_line(const char *out_line, const char *out_end, const
static
const
char
pwd_cmd
[]
=
{
'@'
,
'p'
,
'w'
,
'd'
,
'@'
};
static
const
char
pwd_cmd
[]
=
{
'@'
,
'p'
,
'w'
,
'd'
,
'@'
};
static
const
char
drive_cmd
[]
=
{
'@'
,
'd'
,
'r'
,
'i'
,
'v'
,
'e'
,
'@'
};
static
const
char
drive_cmd
[]
=
{
'@'
,
'd'
,
'r'
,
'i'
,
'v'
,
'e'
,
'@'
};
static
const
char
path_cmd
[]
=
{
'@'
,
'p'
,
'a'
,
't'
,
'h'
,
'@'
};
static
const
char
space_cmd
[]
=
{
'@'
,
's'
,
'p'
,
'a'
,
'c'
,
'e'
,
'@'
};
static
const
char
space_cmd
[]
=
{
'@'
,
's'
,
'p'
,
'a'
,
'c'
,
'e'
,
'@'
};
static
const
char
tab_cmd
[]
=
{
'@'
,
't'
,
'a'
,
'b'
,
'@'
};
static
const
char
tab_cmd
[]
=
{
'@'
,
't'
,
'a'
,
'b'
,
'@'
};
static
const
char
or_broken_cmd
[]
=
{
'@'
,
'o'
,
'r'
,
'_'
,
'b'
,
'r'
,
'o'
,
'k'
,
'e'
,
'n'
,
'@'
};
static
const
char
or_broken_cmd
[]
=
{
'@'
,
'o'
,
'r'
,
'_'
,
'b'
,
'r'
,
'o'
,
'k'
,
'e'
,
'n'
,
'@'
};
...
@@ -185,6 +188,17 @@ static const char *compare_line(const char *out_line, const char *out_end, const
...
@@ -185,6 +188,17 @@ static const char *compare_line(const char *out_line, const char *out_end, const
out_ptr
+=
drive_len
;
out_ptr
+=
drive_len
;
continue
;
continue
;
}
}
}
else
if
(
exp_ptr
+
sizeof
(
path_cmd
)
<=
exp_end
&&
!
memcmp
(
exp_ptr
,
path_cmd
,
sizeof
(
path_cmd
)))
{
exp_ptr
+=
sizeof
(
path_cmd
);
if
(
out_end
-
out_ptr
<
path_len
||
(
CompareStringA
(
LOCALE_SYSTEM_DEFAULT
,
NORM_IGNORECASE
,
out_ptr
,
path_len
,
path
,
path_len
)
!=
CSTR_EQUAL
))
{
err
=
out_ptr
;
}
else
{
out_ptr
+=
path_len
;
continue
;
}
}
else
if
(
exp_ptr
+
sizeof
(
space_cmd
)
<=
exp_end
}
else
if
(
exp_ptr
+
sizeof
(
space_cmd
)
<=
exp_end
&&
!
memcmp
(
exp_ptr
,
space_cmd
,
sizeof
(
space_cmd
)))
{
&&
!
memcmp
(
exp_ptr
,
space_cmd
,
sizeof
(
space_cmd
)))
{
exp_ptr
+=
sizeof
(
space_cmd
);
exp_ptr
+=
sizeof
(
space_cmd
);
...
@@ -407,6 +421,9 @@ START_TEST(batch)
...
@@ -407,6 +421,9 @@ START_TEST(batch)
workdir_len
=
GetCurrentDirectoryA
(
sizeof
(
workdir
),
workdir
);
workdir_len
=
GetCurrentDirectoryA
(
sizeof
(
workdir
),
workdir
);
drive
[
0
]
=
workdir
[
0
];
drive
[
0
]
=
workdir
[
0
];
drive
[
1
]
=
workdir
[
1
];
/* Should be ':' */
drive
[
1
]
=
workdir
[
1
];
/* Should be ':' */
memcpy
(
path
,
workdir
+
drive_len
,
(
workdir_len
-
drive_len
)
*
sizeof
(
drive
[
0
]));
path
[
workdir_len
-
drive_len
]
=
'\\'
;
path_len
=
workdir_len
-
drive_len
+
1
;
argc
=
winetest_get_mainargs
(
&
argv
);
argc
=
winetest_get_mainargs
(
&
argv
);
if
(
argc
>
2
)
if
(
argc
>
2
)
...
...
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