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
ef70d88b
Commit
ef70d88b
authored
Aug 25, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Make some WCHAR arrays static.
parent
d338323a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
builtins.c
programs/cmd/builtins.c
+4
-4
directory.c
programs/cmd/directory.c
+1
-1
wcmdmain.c
programs/cmd/wcmdmain.c
+12
-12
No files found.
programs/cmd/builtins.c
View file @
ef70d88b
...
...
@@ -902,8 +902,8 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
WIN32_FIND_DATAW
fd
;
HANDLE
hff
;
int
i
;
const
WCHAR
inW
[]
=
{
'i'
,
'n'
};
const
WCHAR
doW
[]
=
{
'd'
,
'o'
};
static
const
WCHAR
inW
[]
=
{
'i'
,
'n'
};
static
const
WCHAR
doW
[]
=
{
'd'
,
'o'
};
CMD_LIST
*
setStart
,
*
thisSet
,
*
cmdStart
,
*
cmdEnd
;
WCHAR
variable
[
4
];
WCHAR
*
firstCmd
;
...
...
@@ -1250,7 +1250,7 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd,
if
(
isIF
)
processThese
=
conditionTRUE
;
while
(
*
cmdList
)
{
const
WCHAR
ifElse
[]
=
{
'e'
,
'l'
,
's'
,
'e'
};
static
const
WCHAR
ifElse
[]
=
{
'e'
,
'l'
,
's'
,
'e'
};
/* execute all appropriate commands */
curPosition
=
*
cmdList
;
...
...
@@ -1615,7 +1615,7 @@ void WCMD_move (void) {
else
if
(
strstrW
(
quals
,
parmY
))
force
=
TRUE
;
else
{
const
WCHAR
copyCmdW
[]
=
{
'C'
,
'O'
,
'P'
,
'Y'
,
'C'
,
'M'
,
'D'
,
'\0'
};
static
const
WCHAR
copyCmdW
[]
=
{
'C'
,
'O'
,
'P'
,
'Y'
,
'C'
,
'M'
,
'D'
,
'\0'
};
len
=
GetEnvironmentVariableW
(
copyCmdW
,
copycmd
,
sizeof
(
copycmd
)
/
sizeof
(
WCHAR
));
force
=
(
len
&&
len
<
(
sizeof
(
copycmd
)
/
sizeof
(
WCHAR
))
&&
!
lstrcmpiW
(
copycmd
,
parmY
));
...
...
programs/cmd/directory.c
View file @
ef70d88b
...
...
@@ -878,7 +878,7 @@ void WCMD_directory (WCHAR *cmd) {
strcatW
(
path
,
starW
);
}
else
{
const
WCHAR
slashStarW
[]
=
{
'\\'
,
'*'
,
'\0'
};
static
const
WCHAR
slashStarW
[]
=
{
'\\'
,
'*'
,
'\0'
};
strcatW
(
path
,
slashStarW
);
}
}
...
...
programs/cmd/wcmdmain.c
View file @
ef70d88b
...
...
@@ -321,7 +321,7 @@ static void WCMD_show_prompt (void) {
len
=
GetEnvironmentVariableW
(
envPrompt
,
prompt_string
,
sizeof
(
prompt_string
)
/
sizeof
(
WCHAR
));
if
((
len
==
0
)
||
(
len
>=
(
sizeof
(
prompt_string
)
/
sizeof
(
WCHAR
))))
{
const
WCHAR
dfltPrompt
[]
=
{
'$'
,
'P'
,
'$'
,
'G'
,
'\0'
};
static
const
WCHAR
dfltPrompt
[]
=
{
'$'
,
'P'
,
'$'
,
'G'
,
'\0'
};
strcpyW
(
prompt_string
,
dfltPrompt
);
}
p
=
prompt_string
;
...
...
@@ -1048,7 +1048,7 @@ void WCMD_run_program (WCHAR *command, int called) {
WCHAR
thisDir
[
MAX_PATH
]
=
{
'\0'
};
WCHAR
*
pos
=
NULL
;
BOOL
found
=
FALSE
;
const
WCHAR
slashW
[]
=
{
'\\'
,
'\0'
};
static
const
WCHAR
slashW
[]
=
{
'\\'
,
'\0'
};
/* Work on the first directory on the search path */
pos
=
strchrW
(
pathposn
,
';'
);
...
...
@@ -1753,10 +1753,10 @@ 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'
};
const
WCHAR
forCmd
[]
=
{
'f'
,
'o'
,
'r'
};
const
WCHAR
ifCmd
[]
=
{
'i'
,
'f'
};
const
WCHAR
ifElse
[]
=
{
'e'
,
'l'
,
's'
,
'e'
};
static
const
WCHAR
remCmd
[]
=
{
'r'
,
'e'
,
'm'
};
static
const
WCHAR
forCmd
[]
=
{
'f'
,
'o'
,
'r'
};
static
const
WCHAR
ifCmd
[]
=
{
'i'
,
'f'
};
static
const
WCHAR
ifElse
[]
=
{
'e'
,
'l'
,
's'
,
'e'
};
BOOL
inRem
=
FALSE
;
BOOL
inFor
=
FALSE
;
BOOL
inIn
=
FALSE
;
...
...
@@ -1799,9 +1799,9 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
if
(
context
)
handleExpansion
(
extraSpace
,
FALSE
,
NULL
,
NULL
);
/* Show prompt before batch line IF echo is on and in batch program */
if
(
context
&&
echo_mode
&&
extraSpace
[
0
]
&&
(
extraSpace
[
0
]
!=
'@'
))
{
const
WCHAR
spc
[]
=
{
' '
,
'\0'
};
const
WCHAR
echoDot
[]
=
{
'e'
,
'c'
,
'h'
,
'o'
,
'.'
};
const
WCHAR
echoCol
[]
=
{
'e'
,
'c'
,
'h'
,
'o'
,
':'
};
static
const
WCHAR
spc
[]
=
{
' '
,
'\0'
};
static
const
WCHAR
echoDot
[]
=
{
'e'
,
'c'
,
'h'
,
'o'
,
'.'
};
static
const
WCHAR
echoCol
[]
=
{
'e'
,
'c'
,
'h'
,
'o'
,
':'
};
const
DWORD
len
=
sizeof
(
echoDot
)
/
sizeof
(
echoDot
[
0
]);
DWORD
curr_size
=
strlenW
(
extraSpace
);
DWORD
min_len
=
(
curr_size
<
len
?
curr_size
:
len
);
...
...
@@ -1838,7 +1838,7 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
/* Certain commands need special handling */
if
(
curStringLen
==
0
&&
curCopyTo
==
curString
)
{
const
WCHAR
forDO
[]
=
{
'd'
,
'o'
};
static
const
WCHAR
forDO
[]
=
{
'd'
,
'o'
};
/* If command starts with 'rem ', ignore any &&, ( etc. */
if
(
WCMD_keyword_ws_found
(
remCmd
,
sizeof
(
remCmd
)
/
sizeof
(
remCmd
[
0
]),
curPos
))
{
...
...
@@ -1884,7 +1884,7 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
/* Special handling for the 'FOR' command */
if
(
inFor
&&
lastWasWhiteSpace
)
{
const
WCHAR
forIN
[]
=
{
'i'
,
'n'
};
static
const
WCHAR
forIN
[]
=
{
'i'
,
'n'
};
WINE_TRACE
(
"Found 'FOR ', comparing next parm: '%s'
\n
"
,
wine_dbgstr_w
(
curPos
));
...
...
@@ -2296,7 +2296,7 @@ int wmain (int argc, WCHAR *argvW[])
}
if
(
opt_q
)
{
const
WCHAR
eoff
[]
=
{
'O'
,
'F'
,
'F'
,
'\0'
};
static
const
WCHAR
eoff
[]
=
{
'O'
,
'F'
,
'F'
,
'\0'
};
WCMD_echo
(
eoff
);
}
...
...
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