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
0e4ceb9a
Commit
0e4ceb9a
authored
Mar 29, 2012
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Mar 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Use BOOL instead of int for boolean variables.
parent
5b56d060
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
19 deletions
+18
-19
batch.c
programs/cmd/batch.c
+4
-4
builtins.c
programs/cmd/builtins.c
+1
-1
wcmd.h
programs/cmd/wcmd.h
+2
-2
wcmdmain.c
programs/cmd/wcmdmain.c
+11
-12
No files found.
programs/cmd/batch.c
View file @
0e4ceb9a
...
...
@@ -40,8 +40,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(cmd);
* a label to goto once opened.
*/
void
WCMD_batch
(
WCHAR
*
file
,
WCHAR
*
command
,
int
called
,
WCHAR
*
startLabel
,
HANDLE
pgmHandle
)
{
void
WCMD_batch
(
WCHAR
*
file
,
WCHAR
*
command
,
BOOL
called
,
WCHAR
*
startLabel
,
HANDLE
pgmHandle
)
{
HANDLE
h
=
INVALID_HANDLE_VALUE
;
BATCH_CONTEXT
*
prev_context
;
...
...
@@ -583,7 +583,7 @@ void WCMD_call (WCHAR *command) {
/* Run other program if no leading ':' */
if
(
*
command
!=
':'
)
{
WCMD_run_program
(
command
,
1
);
WCMD_run_program
(
command
,
TRUE
);
}
else
{
WCHAR
gotoLabel
[
MAX_PATH
];
...
...
@@ -600,7 +600,7 @@ void WCMD_call (WCHAR *command) {
li
.
u
.
LowPart
=
SetFilePointer
(
context
->
h
,
li
.
u
.
LowPart
,
&
li
.
u
.
HighPart
,
FILE_CURRENT
);
WCMD_batch
(
param1
,
command
,
1
,
gotoLabel
,
context
->
h
);
WCMD_batch
(
param1
,
command
,
TRUE
,
gotoLabel
,
context
->
h
);
SetFilePointer
(
context
->
h
,
li
.
u
.
LowPart
,
&
li
.
u
.
HighPart
,
FILE_BEGIN
);
...
...
programs/cmd/builtins.c
View file @
0e4ceb9a
...
...
@@ -1416,7 +1416,7 @@ void WCMD_give_help (const WCHAR *command)
static
const
WCHAR
helpW
[]
=
{
' '
,
'/'
,
'?'
,
'\0'
};
strcpyW
(
cmd
,
command
);
strcatW
(
cmd
,
helpW
);
WCMD_run_program
(
cmd
,
0
);
WCMD_run_program
(
cmd
,
FALSE
);
return
;
}
}
...
...
programs/cmd/wcmd.h
View file @
0e4ceb9a
...
...
@@ -54,7 +54,7 @@ typedef struct _CMD_LIST {
}
CMD_LIST
;
void
WCMD_assoc
(
const
WCHAR
*
,
BOOL
);
void
WCMD_batch
(
WCHAR
*
,
WCHAR
*
,
int
,
WCHAR
*
,
HANDLE
);
void
WCMD_batch
(
WCHAR
*
,
WCHAR
*
,
BOOL
,
WCHAR
*
,
HANDLE
);
void
WCMD_call
(
WCHAR
*
command
);
void
WCMD_change_tty
(
void
);
void
WCMD_choice
(
const
WCHAR
*
);
...
...
@@ -86,7 +86,7 @@ void WCMD_print_error (void);
void
WCMD_pushd
(
const
WCHAR
*
command
);
void
WCMD_remove_dir
(
WCHAR
*
command
);
void
WCMD_rename
(
void
);
void
WCMD_run_program
(
WCHAR
*
command
,
int
called
);
void
WCMD_run_program
(
WCHAR
*
command
,
BOOL
called
);
void
WCMD_setlocal
(
const
WCHAR
*
command
);
void
WCMD_setshow_date
(
void
);
void
WCMD_setshow_default
(
const
WCHAR
*
command
);
...
...
programs/cmd/wcmdmain.c
View file @
0e4ceb9a
...
...
@@ -993,8 +993,8 @@ static void init_msvcrt_io_block(STARTUPINFOW* st)
* findexecutable to achieve this which is left untouched.
*/
void
WCMD_run_program
(
WCHAR
*
command
,
int
called
)
{
void
WCMD_run_program
(
WCHAR
*
command
,
BOOL
called
)
{
WCHAR
temp
[
MAX_PATH
];
WCHAR
pathtosearch
[
MAXSTRING
];
WCHAR
*
pathposn
;
...
...
@@ -1585,7 +1585,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
break
;
default:
prev_echo_mode
=
echo_mode
;
WCMD_run_program
(
whichcmd
,
0
);
WCMD_run_program
(
whichcmd
,
FALSE
);
echo_mode
=
prev_echo_mode
;
}
HeapFree
(
GetProcessHeap
(),
0
,
cmd
);
...
...
@@ -2336,19 +2336,19 @@ int wmain (int argc, WCHAR *argvW[])
argsLeft
=
args
;
for
(
arg
=
argvW
;
argsLeft
>
0
;
arg
++
,
argsLeft
--
)
{
int
has_space
,
bcount
;
BOOL
has_space
=
FALSE
;
int
bcount
;
WCHAR
*
a
;
has_space
=
0
;
bcount
=
0
;
a
=*
arg
;
if
(
!*
a
)
has_space
=
1
;
if
(
!*
a
)
has_space
=
TRUE
;
while
(
*
a
!=
'\0'
)
{
if
(
*
a
==
'\\'
)
{
bcount
++
;
}
else
{
if
(
*
a
==
' '
||
*
a
==
'\t'
)
{
has_space
=
1
;
has_space
=
TRUE
;
}
else
if
(
*
a
==
'"'
)
{
/* doubling of '\' preceding a '"',
* plus escaping of said '"'
...
...
@@ -2395,20 +2395,19 @@ int wmain (int argc, WCHAR *argvW[])
argsLeft
=
args
;
for
(
arg
=
argvW
;
argsLeft
>
0
;
arg
++
,
argsLeft
--
)
{
int
has_space
,
has_quote
;
BOOL
has_space
=
FALSE
,
has_quote
=
FALSE
;
WCHAR
*
a
;
/* Check for quotes and spaces in this argument */
has_space
=
has_quote
=
0
;
a
=*
arg
;
if
(
!*
a
)
has_space
=
1
;
if
(
!*
a
)
has_space
=
TRUE
;
while
(
*
a
!=
'\0'
)
{
if
(
*
a
==
' '
||
*
a
==
'\t'
)
{
has_space
=
1
;
has_space
=
TRUE
;
if
(
has_quote
)
break
;
}
else
if
(
*
a
==
'"'
)
{
has_quote
=
1
;
has_quote
=
TRUE
;
if
(
has_space
)
break
;
}
...
...
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