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
765ff5d6
Commit
765ff5d6
authored
Oct 31, 2006
by
Markus Amsler
Committed by
Alexandre Julliard
Oct 31, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Check for argument in copy, mkdir, delete, goto, move, rmdir, rename, type.
parent
85e28ae3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
builtins.c
programs/cmd/builtins.c
+34
-0
No files found.
programs/cmd/builtins.c
View file @
765ff5d6
...
...
@@ -110,6 +110,11 @@ BOOL force, status;
static
const
char
overwrite
[]
=
"Overwrite file (Y/N)?"
;
char
string
[
8
],
outpath
[
MAX_PATH
],
inpath
[
MAX_PATH
],
*
infile
;
if
(
param1
[
0
]
==
0x00
)
{
WCMD_output
(
"Argument missing
\n
"
);
return
;
}
if
((
strchr
(
param1
,
'*'
)
!=
NULL
)
&&
(
strchr
(
param1
,
'%'
)
!=
NULL
))
{
WCMD_output
(
"Wildcards not yet supported
\n
"
);
return
;
...
...
@@ -203,6 +208,10 @@ BOOL create_full_path(CHAR* path)
void
WCMD_create_dir
(
void
)
{
if
(
param1
[
0
]
==
0x00
)
{
WCMD_output
(
"Argument missing
\n
"
);
return
;
}
if
(
!
create_full_path
(
param1
))
WCMD_print_error
();
}
...
...
@@ -220,6 +229,10 @@ HANDLE hff;
char
fpath
[
MAX_PATH
];
char
*
p
;
if
(
param1
[
0
]
==
0x00
)
{
WCMD_output
(
"Argument missing
\n
"
);
return
;
}
hff
=
FindFirstFile
(
param1
,
&
fd
);
if
(
hff
==
INVALID_HANDLE_VALUE
)
{
WCMD_output
(
"%s :File Not Found
\n
"
,
param1
);
...
...
@@ -413,6 +426,10 @@ void WCMD_goto (void) {
char
string
[
MAX_PATH
];
if
(
param1
[
0
]
==
0x00
)
{
WCMD_output
(
"Argument missing
\n
"
);
return
;
}
if
(
context
!=
NULL
)
{
SetFilePointer
(
context
->
h
,
0
,
NULL
,
FILE_BEGIN
);
while
(
WCMD_fgets
(
string
,
sizeof
(
string
),
context
->
h
))
{
...
...
@@ -484,6 +501,11 @@ char outpath[MAX_PATH], inpath[MAX_PATH], *infile;
WIN32_FIND_DATA
fd
;
HANDLE
hff
;
if
(
param1
[
0
]
==
0x00
)
{
WCMD_output
(
"Argument missing
\n
"
);
return
;
}
if
((
strchr
(
param1
,
'*'
)
!=
NULL
)
||
(
strchr
(
param1
,
'%'
)
!=
NULL
))
{
WCMD_output
(
"Wildcards not yet supported
\n
"
);
return
;
...
...
@@ -533,6 +555,10 @@ char string[32];
void
WCMD_remove_dir
(
void
)
{
if
(
param1
[
0
]
==
0x00
)
{
WCMD_output
(
"Argument missing
\n
"
);
return
;
}
if
(
!
RemoveDirectory
(
param1
))
WCMD_print_error
();
}
...
...
@@ -547,6 +573,10 @@ void WCMD_rename (void) {
int
status
;
if
(
param1
[
0
]
==
0x00
||
param2
[
0
]
==
0x00
)
{
WCMD_output
(
"Argument missing
\n
"
);
return
;
}
if
((
strchr
(
param1
,
'*'
)
!=
NULL
)
||
(
strchr
(
param1
,
'%'
)
!=
NULL
))
{
WCMD_output
(
"Wildcards not yet supported
\n
"
);
return
;
...
...
@@ -1008,6 +1038,10 @@ HANDLE h;
char
buffer
[
512
];
DWORD
count
;
if
(
param1
[
0
]
==
0x00
)
{
WCMD_output
(
"Argument missing
\n
"
);
return
;
}
h
=
CreateFile
(
param1
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
h
==
INVALID_HANDLE_VALUE
)
{
...
...
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