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
de4c6970
Commit
de4c6970
authored
Jun 15, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Jun 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Lines starting with REM ignore any multiline/part characters.
parent
929a92f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
wcmdmain.c
programs/cmd/wcmdmain.c
+23
-1
No files found.
programs/cmd/wcmdmain.c
View file @
de4c6970
...
...
@@ -1907,6 +1907,8 @@ WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readF
CMD_LIST
*
lastEntry
=
NULL
;
BOOL
isAmphersand
=
FALSE
;
static
WCHAR
*
extraSpace
=
NULL
;
/* Deliberately never freed */
const
WCHAR
rem
[]
=
{
'r'
,
'e'
,
'm'
,
' '
,
'\0'
};
BOOL
inRem
=
FALSE
;
/* Allocate working space for a command read from keyboard, file etc */
if
(
!
extraSpace
)
...
...
@@ -1934,7 +1936,26 @@ WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readF
/* Parse every character on the line being processed */
while
(
*
curPos
!=
0x00
)
{
switch
(
*
curPos
)
{
WCHAR
thisChar
;
/* If command starts with 'rem', ignore any &&, ( etc */
if
(
curLen
==
0
&&
!
inRem
)
{
if
(
CompareString
(
LOCALE_USER_DEFAULT
,
NORM_IGNORECASE
|
SORT_STRINGSORT
,
curPos
,
4
,
rem
,
-
1
)
==
2
)
{
inRem
=
TRUE
;
}
else
{
inRem
=
FALSE
;
}
}
/* Nothing 'ends' a REM statement and &&, quotes etc are ineffective,
so just use the default processing ie skip character specific
matching below */
if
(
!
inRem
)
thisChar
=
*
curPos
;
else
thisChar
=
'X'
;
/* Character with no special processing */
switch
(
thisChar
)
{
case
'\t'
:
/* drop through - ignore whitespace at the start of a command */
case
' '
:
if
(
curLen
>
0
)
...
...
@@ -2043,6 +2064,7 @@ WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readF
/* If we have reached the end of the string, see if bracketing outstanding */
if
(
*
curPos
==
0x00
&&
curDepth
>
0
&&
readFrom
!=
INVALID_HANDLE_VALUE
)
{
inRem
=
FALSE
;
isAmphersand
=
FALSE
;
inQuotes
=
FALSE
;
memset
(
extraSpace
,
0x00
,
(
MAXSTRING
+
1
)
*
sizeof
(
WCHAR
));
...
...
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