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
e46d25a6
Commit
e46d25a6
authored
Jan 05, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Make some functions static.
parent
6b16d022
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
12 deletions
+9
-12
directory.c
programs/cmd/directory.c
+4
-4
wcmd.h
programs/cmd/wcmd.h
+0
-3
wcmdmain.c
programs/cmd/wcmdmain.c
+5
-5
No files found.
programs/cmd/directory.c
View file @
e46d25a6
...
@@ -74,7 +74,7 @@ static const WCHAR spaceW[] = {' ','\0'};
...
@@ -74,7 +74,7 @@ static const WCHAR spaceW[] = {' ','\0'};
*
*
* Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ).
* Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ).
*/
*/
WCHAR
*
WCMD_strrev
(
WCHAR
*
buff
)
{
static
WCHAR
*
WCMD_strrev
(
WCHAR
*
buff
)
{
int
r
,
i
;
int
r
,
i
;
WCHAR
b
;
WCHAR
b
;
...
@@ -95,7 +95,7 @@ WCHAR * WCMD_strrev (WCHAR *buff) {
...
@@ -95,7 +95,7 @@ WCHAR * WCMD_strrev (WCHAR *buff) {
* Result is returned in a static string overwritten with each call.
* Result is returned in a static string overwritten with each call.
* FIXME: There must be a better algorithm!
* FIXME: There must be a better algorithm!
*/
*/
WCHAR
*
WCMD_filesize64
(
ULONGLONG
n
)
{
static
WCHAR
*
WCMD_filesize64
(
ULONGLONG
n
)
{
ULONGLONG
q
;
ULONGLONG
q
;
unsigned
int
r
,
i
;
unsigned
int
r
,
i
;
...
@@ -121,7 +121,7 @@ WCHAR * WCMD_filesize64 (ULONGLONG n) {
...
@@ -121,7 +121,7 @@ WCHAR * WCMD_filesize64 (ULONGLONG n) {
*
*
* Sort based on the /O options supplied on the command line
* Sort based on the /O options supplied on the command line
*/
*/
int
WCMD_dir_sort
(
const
void
*
a
,
const
void
*
b
)
static
int
WCMD_dir_sort
(
const
void
*
a
,
const
void
*
b
)
{
{
WIN32_FIND_DATA
*
filea
=
(
WIN32_FIND_DATA
*
)
a
;
WIN32_FIND_DATA
*
filea
=
(
WIN32_FIND_DATA
*
)
a
;
WIN32_FIND_DATA
*
fileb
=
(
WIN32_FIND_DATA
*
)
b
;
WIN32_FIND_DATA
*
fileb
=
(
WIN32_FIND_DATA
*
)
b
;
...
@@ -200,7 +200,7 @@ int WCMD_dir_sort (const void *a, const void *b)
...
@@ -200,7 +200,7 @@ int WCMD_dir_sort (const void *a, const void *b)
*
*
* Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ).
* Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ).
*/
*/
void
WCMD_getfileowner
(
WCHAR
*
filename
,
WCHAR
*
owner
,
int
ownerlen
)
{
static
void
WCMD_getfileowner
(
WCHAR
*
filename
,
WCHAR
*
owner
,
int
ownerlen
)
{
ULONG
sizeNeeded
=
0
;
ULONG
sizeNeeded
=
0
;
DWORD
rc
;
DWORD
rc
;
...
...
programs/cmd/wcmd.h
View file @
e46d25a6
...
@@ -70,7 +70,6 @@ void WCMD_more (WCHAR *);
...
@@ -70,7 +70,6 @@ void WCMD_more (WCHAR *);
void
WCMD_move
(
void
);
void
WCMD_move
(
void
);
void
WCMD_output
(
const
WCHAR
*
format
,
...);
void
WCMD_output
(
const
WCHAR
*
format
,
...);
void
WCMD_output_asis
(
const
WCHAR
*
message
);
void
WCMD_output_asis
(
const
WCHAR
*
message
);
void
WCMD_parse
(
WCHAR
*
s
,
WCHAR
*
q
,
WCHAR
*
p1
,
WCHAR
*
p2
);
void
WCMD_pause
(
void
);
void
WCMD_pause
(
void
);
void
WCMD_popd
(
void
);
void
WCMD_popd
(
void
);
void
WCMD_print_error
(
void
);
void
WCMD_print_error
(
void
);
...
@@ -88,7 +87,6 @@ void WCMD_setshow_path (WCHAR *command);
...
@@ -88,7 +87,6 @@ void WCMD_setshow_path (WCHAR *command);
void
WCMD_setshow_prompt
(
void
);
void
WCMD_setshow_prompt
(
void
);
void
WCMD_setshow_time
(
void
);
void
WCMD_setshow_time
(
void
);
void
WCMD_shift
(
WCHAR
*
command
);
void
WCMD_shift
(
WCHAR
*
command
);
void
WCMD_show_prompt
(
void
);
void
WCMD_title
(
WCHAR
*
);
void
WCMD_title
(
WCHAR
*
);
void
WCMD_type
(
WCHAR
*
);
void
WCMD_type
(
WCHAR
*
);
void
WCMD_verify
(
WCHAR
*
command
);
void
WCMD_verify
(
WCHAR
*
command
);
...
@@ -98,7 +96,6 @@ int WCMD_volume (int mode, WCHAR *command);
...
@@ -98,7 +96,6 @@ int WCMD_volume (int mode, WCHAR *command);
WCHAR
*
WCMD_fgets
(
WCHAR
*
s
,
int
n
,
HANDLE
stream
);
WCHAR
*
WCMD_fgets
(
WCHAR
*
s
,
int
n
,
HANDLE
stream
);
WCHAR
*
WCMD_parameter
(
WCHAR
*
s
,
int
n
,
WCHAR
**
where
);
WCHAR
*
WCMD_parameter
(
WCHAR
*
s
,
int
n
,
WCHAR
**
where
);
WCHAR
*
WCMD_strtrim_leading_spaces
(
WCHAR
*
string
);
WCHAR
*
WCMD_strtrim_leading_spaces
(
WCHAR
*
string
);
void
WCMD_opt_s_strip_quotes
(
WCHAR
*
cmd
);
void
WCMD_HandleTildaModifiers
(
WCHAR
**
start
,
WCHAR
*
forVariable
,
WCHAR
*
forValue
,
BOOL
justFors
);
void
WCMD_HandleTildaModifiers
(
WCHAR
**
start
,
WCHAR
*
forVariable
,
WCHAR
*
forValue
,
BOOL
justFors
);
void
WCMD_splitpath
(
const
WCHAR
*
path
,
WCHAR
*
drv
,
WCHAR
*
dir
,
WCHAR
*
name
,
WCHAR
*
ext
);
void
WCMD_splitpath
(
const
WCHAR
*
path
,
WCHAR
*
drv
,
WCHAR
*
dir
,
WCHAR
*
name
,
WCHAR
*
ext
);
...
...
programs/cmd/wcmdmain.c
View file @
e46d25a6
...
@@ -309,7 +309,7 @@ void WCMD_print_error (void) {
...
@@ -309,7 +309,7 @@ void WCMD_print_error (void) {
*
*
*/
*/
void
WCMD_show_prompt
(
void
)
{
static
void
WCMD_show_prompt
(
void
)
{
int
status
;
int
status
;
WCHAR
out_string
[
MAX_PATH
],
curdir
[
MAX_PATH
],
prompt_string
[
MAX_PATH
];
WCHAR
out_string
[
MAX_PATH
],
curdir
[
MAX_PATH
],
prompt_string
[
MAX_PATH
];
...
@@ -442,7 +442,7 @@ WCHAR *WCMD_strtrim_leading_spaces (WCHAR *string) {
...
@@ -442,7 +442,7 @@ WCHAR *WCMD_strtrim_leading_spaces (WCHAR *string) {
*
*
* Remove first and last quote WCHARacters, preserving all other text
* Remove first and last quote WCHARacters, preserving all other text
*/
*/
void
WCMD_opt_s_strip_quotes
(
WCHAR
*
cmd
)
{
static
void
WCMD_opt_s_strip_quotes
(
WCHAR
*
cmd
)
{
WCHAR
*
src
=
cmd
+
1
,
*
dest
=
cmd
,
*
lastq
=
NULL
;
WCHAR
*
src
=
cmd
+
1
,
*
dest
=
cmd
,
*
lastq
=
NULL
;
while
((
*
dest
=*
src
)
!=
'\0'
)
{
while
((
*
dest
=*
src
)
!=
'\0'
)
{
if
(
*
src
==
'\"'
)
if
(
*
src
==
'\"'
)
...
@@ -761,7 +761,7 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start, WCHAR *forVar, WCHAR *forVal) {
...
@@ -761,7 +761,7 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start, WCHAR *forVar, WCHAR *forVal) {
* read in and not again, except for 'for' variable substitution.
* read in and not again, except for 'for' variable substitution.
* eg. As evidence, "echo %1 && shift && echo %1" or "echo %%path%%"
* eg. As evidence, "echo %1 && shift && echo %1" or "echo %%path%%"
*/
*/
void
handleExpansion
(
WCHAR
*
cmd
,
BOOL
justFors
,
WCHAR
*
forVariable
,
WCHAR
*
forValue
)
{
static
void
handleExpansion
(
WCHAR
*
cmd
,
BOOL
justFors
,
WCHAR
*
forVariable
,
WCHAR
*
forValue
)
{
/* For commands in a context (batch program): */
/* For commands in a context (batch program): */
/* Expand environment variables in a batch file %{0-9} first */
/* Expand environment variables in a batch file %{0-9} first */
...
@@ -846,7 +846,7 @@ void handleExpansion(WCHAR *cmd, BOOL justFors, WCHAR *forVariable, WCHAR *forVa
...
@@ -846,7 +846,7 @@ void handleExpansion(WCHAR *cmd, BOOL justFors, WCHAR *forVariable, WCHAR *forVa
* second in p2. Any subsequent non-qualifier strings are lost.
* second in p2. Any subsequent non-qualifier strings are lost.
* Parameters in quotes are handled.
* Parameters in quotes are handled.
*/
*/
void
WCMD_parse
(
WCHAR
*
s
,
WCHAR
*
q
,
WCHAR
*
p1
,
WCHAR
*
p2
)
static
void
WCMD_parse
(
WCHAR
*
s
,
WCHAR
*
q
,
WCHAR
*
p1
,
WCHAR
*
p2
)
{
{
int
p
=
0
;
int
p
=
0
;
...
@@ -1612,7 +1612,7 @@ static void WCMD_DumpCommands(CMD_LIST *commands) {
...
@@ -1612,7 +1612,7 @@ static void WCMD_DumpCommands(CMD_LIST *commands) {
*
*
* Adds a command to the current command list
* Adds a command to the current command list
*/
*/
void
WCMD_addCommand
(
WCHAR
*
command
,
int
*
commandLen
,
static
void
WCMD_addCommand
(
WCHAR
*
command
,
int
*
commandLen
,
WCHAR
*
redirs
,
int
*
redirLen
,
WCHAR
*
redirs
,
int
*
redirLen
,
WCHAR
**
copyTo
,
int
**
copyToLen
,
WCHAR
**
copyTo
,
int
**
copyToLen
,
CMD_DELIMITERS
prevDelim
,
int
curDepth
,
CMD_DELIMITERS
prevDelim
,
int
curDepth
,
...
...
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