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
6d3fd3ab
Commit
6d3fd3ab
authored
Aug 25, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Fix REM tab handling.
parent
d147df41
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+6
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+6
-0
wcmdmain.c
programs/cmd/wcmdmain.c
+3
-4
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
6d3fd3ab
...
...
@@ -58,12 +58,18 @@ rem Hello
rem Hello || foo
rem echo lol
rem echo foo & echo bar
rem @tab@ Hello
rem@tab@ Hello
rem@tab@echo foo & echo bar
@echo on
rem Hello
rem Hello
rem Hello || foo
rem echo lol
rem echo foo & echo bar
rem @tab@ Hello
rem@tab@ Hello
rem@tab@echo foo & echo bar
@echo off
echo ------------ Testing redirection operators --------------
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
6d3fd3ab
...
...
@@ -106,6 +106,12 @@ word
@pwd@>rem echo lol@space@
@pwd@>rem echo foo & echo bar@space@
@pwd@>rem @tab@ Hello@space@
@pwd@>rem@tab@ Hello@space@
@pwd@>rem@tab@echo foo & echo bar@space@
------------ Testing redirection operators --------------
...stdout redirection
foo
...
...
programs/cmd/wcmdmain.c
View file @
6d3fd3ab
...
...
@@ -1753,7 +1753,7 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
CMD_LIST
*
lastEntry
=
NULL
;
CMD_DELIMITERS
prevDelim
=
CMD_NONE
;
static
WCHAR
*
extraSpace
=
NULL
;
/* Deliberately never freed */
const
WCHAR
remCmd
[]
=
{
'r'
,
'e'
,
'm'
,
' '
,
'\0'
};
const
WCHAR
remCmd
[]
=
{
'r'
,
'e'
,
'm'
};
const
WCHAR
forCmd
[]
=
{
'f'
,
'o'
,
'r'
};
const
WCHAR
ifCmd
[]
=
{
'i'
,
'f'
,
' '
,
'\0'
};
const
WCHAR
ifElse
[]
=
{
'e'
,
'l'
,
's'
,
'e'
,
' '
,
'\0'
};
...
...
@@ -1840,9 +1840,8 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
if
(
curStringLen
==
0
&&
curCopyTo
==
curString
)
{
const
WCHAR
forDO
[]
=
{
'd'
,
'o'
};
/* If command starts with 'rem', ignore any &&, ( etc */
if
(
CompareStringW
(
LOCALE_USER_DEFAULT
,
NORM_IGNORECASE
|
SORT_STRINGSORT
,
curPos
,
4
,
remCmd
,
-
1
)
==
CSTR_EQUAL
)
{
/* If command starts with 'rem ', ignore any &&, ( etc. */
if
(
WCMD_keyword_ws_found
(
remCmd
,
sizeof
(
remCmd
)
/
sizeof
(
remCmd
[
0
]),
curPos
))
{
inRem
=
TRUE
;
}
else
if
(
WCMD_keyword_ws_found
(
forCmd
,
sizeof
(
forCmd
)
/
sizeof
(
forCmd
[
0
]),
curPos
))
{
...
...
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