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
fe29ed41
Commit
fe29ed41
authored
Feb 27, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Feb 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Support del /p.
parent
409368eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
builtins.c
programs/cmd/builtins.c
+21
-6
wcmd.h
programs/cmd/wcmd.h
+1
-1
No files found.
programs/cmd/builtins.c
View file @
fe29ed41
...
...
@@ -240,7 +240,7 @@ char *p;
/* If filename part of parameter is * or *.*, prompt unless
/Q supplied. */
if
(
strstr
(
quals
,
"/Q"
)
==
NULL
)
{
if
(
(
strstr
(
quals
,
"/Q"
)
==
NULL
)
&&
(
strstr
(
quals
,
"/P"
)
==
NULL
)
)
{
char
drive
[
10
];
char
dir
[
MAX_PATH
];
...
...
@@ -259,7 +259,7 @@ char *p;
/* Ask for confirmation */
sprintf
(
question
,
"%s, "
,
fpath
);
ok
=
WCMD_ask_confirm
(
question
);
ok
=
WCMD_ask_confirm
(
question
,
TRUE
);
/* Abort if answer is 'N' */
if
(
!
ok
)
return
;
...
...
@@ -288,7 +288,20 @@ char *p;
}
else
strcpy
(
fpath
,
fd
.
cFileName
);
if
(
!
(
fd
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
))
{
if
(
!
DeleteFile
(
fpath
))
WCMD_print_error
();
/* /P means prompt for each file */
if
(
strstr
(
quals
,
"/P"
)
!=
NULL
)
{
BOOL
ok
;
char
question
[
MAXSTRING
];
/* Ask for confirmation */
sprintf
(
question
,
"%s, Delete"
,
fpath
);
ok
=
WCMD_ask_confirm
(
question
,
FALSE
);
/* Only delete if answer is 'Y' */
if
(
ok
&&
!
DeleteFile
(
fpath
))
WCMD_print_error
();
}
else
{
if
(
!
DeleteFile
(
fpath
))
WCMD_print_error
();
}
}
}
while
(
FindNextFile
(
hff
,
&
fd
)
!=
0
);
FindClose
(
hff
);
...
...
@@ -681,7 +694,7 @@ void WCMD_remove_dir (void) {
/* Ask for confirmation */
sprintf
(
question
,
"%s, "
,
param1
);
ok
=
WCMD_ask_confirm
(
question
);
ok
=
WCMD_ask_confirm
(
question
,
TRUE
);
/* Abort if answer is 'N' */
if
(
!
ok
)
return
;
...
...
@@ -1313,7 +1326,7 @@ void WCMD_exit (void) {
* Returns True if Y answer is selected
*
*/
BOOL
WCMD_ask_confirm
(
char
*
message
)
{
BOOL
WCMD_ask_confirm
(
char
*
message
,
BOOL
showSureText
)
{
char
msgbuffer
[
MAXSTRING
];
char
Ybuffer
[
MAXSTRING
];
...
...
@@ -1329,7 +1342,9 @@ BOOL WCMD_ask_confirm (char *message) {
/* Loop waiting on a Y or N */
while
(
answer
[
0
]
!=
Ybuffer
[
0
]
&&
answer
[
0
]
!=
Nbuffer
[
0
])
{
WCMD_output_asis
(
message
);
WCMD_output_asis
(
msgbuffer
);
if
(
showSureText
)
{
WCMD_output_asis
(
msgbuffer
);
}
WCMD_output_asis
(
" ("
);
WCMD_output_asis
(
Ybuffer
);
WCMD_output_asis
(
"/"
);
...
...
programs/cmd/wcmd.h
View file @
fe29ed41
...
...
@@ -80,7 +80,7 @@ char *WCMD_strtrim_leading_spaces (char *string);
void
WCMD_strtrim_trailing_spaces
(
char
*
string
);
void
WCMD_opt_s_strip_quotes
(
char
*
cmd
);
void
WCMD_HandleTildaModifiers
(
char
**
start
,
char
*
forVariable
);
BOOL
WCMD_ask_confirm
(
char
*
message
);
BOOL
WCMD_ask_confirm
(
char
*
message
,
BOOL
showSureText
);
void
WCMD_splitpath
(
const
CHAR
*
path
,
CHAR
*
drv
,
CHAR
*
dir
,
CHAR
*
name
,
CHAR
*
ext
);
...
...
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