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
2f5bfc0f
Commit
2f5bfc0f
authored
Apr 11, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Apr 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Add prompting and COPYCMD plus /Y support to move.
parent
d0a6fe10
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
60 additions
and
1 deletion
+60
-1
Cs.rc
programs/cmd/Cs.rc
+1
-0
De.rc
programs/cmd/De.rc
+1
-0
En.rc
programs/cmd/En.rc
+1
-0
Es.rc
programs/cmd/Es.rc
+1
-0
Fr.rc
programs/cmd/Fr.rc
+1
-0
Ja.rc
programs/cmd/Ja.rc
+1
-0
Ko.rc
programs/cmd/Ko.rc
+1
-0
Nl.rc
programs/cmd/Nl.rc
+1
-0
No.rc
programs/cmd/No.rc
+1
-0
Pl.rc
programs/cmd/Pl.rc
+1
-0
Pt.rc
programs/cmd/Pt.rc
+1
-0
Ru.rc
programs/cmd/Ru.rc
+1
-0
Si.rc
programs/cmd/Si.rc
+1
-0
Tr.rc
programs/cmd/Tr.rc
+1
-0
builtins.c
programs/cmd/builtins.c
+45
-1
wcmd.h
programs/cmd/wcmd.h
+1
-0
No files found.
programs/cmd/Cs.rc
View file @
2f5bfc0f
...
...
@@ -236,4 +236,5 @@ Zadejte HELP <pkaz> pro podrobnj informace o nkterm z ve uvedench pk
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/De.rc
View file @
2f5bfc0f
...
...
@@ -253,4 +253,5 @@ obigen Befehle erhalten.\n"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/En.rc
View file @
2f5bfc0f
...
...
@@ -240,4 +240,5 @@ Enter HELP <command> for further information on any of the above commands\n"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/Es.rc
View file @
2f5bfc0f
...
...
@@ -248,4 +248,5 @@ Introduzca HELP <comando> para ms informacin sobre cualquiera de los comandos\
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/Fr.rc
View file @
2f5bfc0f
...
...
@@ -230,4 +230,5 @@ Entrez HELP <commande> pour plus d'informations sur les commandes ci-dessus\n"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/Ja.rc
View file @
2f5bfc0f
...
...
@@ -234,4 +234,5 @@ EXIT\t\tCMDI\n\n\
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/Ko.rc
View file @
2f5bfc0f
...
...
@@ -232,4 +232,5 @@ HELP <명령>을 치면 그 명령의 상세한 정보를 보여줌\n"
WCMD_NO, "아니오"
WCMD_NOASSOC, "이 파일확장자 %s에 연결된 풀그림이 없습니다. \n"
WCMD_NOFTYPE, "이 파일 형식 '%s'과 연결된 어떠한 명령도 없습니다.'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/Nl.rc
View file @
2f5bfc0f
...
...
@@ -233,4 +233,5 @@ type HELP <opdracht> voor meer informatie over bovengenoemde opdrachten\n"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/No.rc
View file @
2f5bfc0f
...
...
@@ -231,4 +231,5 @@ Skriv HELP <kommando> for mer informasjon om kommandoene ovenfor\n"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/Pl.rc
View file @
2f5bfc0f
...
...
@@ -235,4 +235,5 @@ Wpisz HELP <komenda> dla dokadniejszych informacji o komendzie\n"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/Pt.rc
View file @
2f5bfc0f
...
...
@@ -440,4 +440,5 @@ Digite HELP <comando> para mais informaes sobre alguns dos comandos acima\n"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/Ru.rc
View file @
2f5bfc0f
...
...
@@ -246,4 +246,5 @@ EXIT\t\t CMD\n\n\
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/Si.rc
View file @
2f5bfc0f
...
...
@@ -232,4 +232,5 @@ Enter HELP <command> for further information on any of the above commands\n"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/Tr.rc
View file @
2f5bfc0f
...
...
@@ -234,4 +234,5 @@ Yukardaki komutlar hakknda daha fazla bilgi iin HELP <komut> girin\n"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
WCMD_OVERWRITE, "Overwrite"
}
programs/cmd/builtins.c
View file @
2f5bfc0f
...
...
@@ -783,7 +783,51 @@ void WCMD_move (void) {
SetLastError
(
ERROR_ACCESS_DENIED
);
status
=
0
;
}
else
{
status
=
MoveFile
(
src
,
dest
);
BOOL
ok
=
TRUE
;
/* If destination exists, prompt unless /Y supplied */
if
(
GetFileAttributesA
(
dest
)
!=
INVALID_FILE_ATTRIBUTES
)
{
BOOL
force
=
FALSE
;
char
copycmd
[
MAXSTRING
];
int
len
;
/* /-Y has the highest priority, then /Y and finally the COPYCMD env. variable */
if
(
strstr
(
quals
,
"/-Y"
))
force
=
FALSE
;
else
if
(
strstr
(
quals
,
"/Y"
))
force
=
TRUE
;
else
{
len
=
GetEnvironmentVariable
(
"COPYCMD"
,
copycmd
,
sizeof
(
copycmd
));
force
=
(
len
&&
len
<
sizeof
(
copycmd
)
&&
!
lstrcmpi
(
copycmd
,
"/Y"
));
}
/* Prompt if overwriting */
if
(
!
force
)
{
char
question
[
MAXSTRING
];
char
overwrite
[
MAXSTRING
];
LoadString
(
hinst
,
WCMD_OVERWRITE
,
overwrite
,
sizeof
(
overwrite
));
/* Ask for confirmation */
sprintf
(
question
,
"%s %s? "
,
overwrite
,
dest
);
ok
=
WCMD_ask_confirm
(
question
,
TRUE
);
/* So delete the destination prior to the move */
if
(
ok
)
{
if
(
!
DeleteFile
(
dest
))
{
WCMD_print_error
();
errorlevel
=
1
;
ok
=
FALSE
;
}
}
}
}
if
(
ok
)
{
status
=
MoveFile
(
src
,
dest
);
}
else
{
status
=
1
;
/* Anything other than 0 to prevent error msg below */
}
}
if
(
!
status
)
{
...
...
programs/cmd/wcmd.h
View file @
2f5bfc0f
...
...
@@ -179,6 +179,7 @@ extern const char anykey[];
#define WCMD_NO 1003
#define WCMD_NOASSOC 1004
#define WCMD_NOFTYPE 1005
#define WCMD_OVERWRITE 1006
/* msdn specified max for Win XP */
#define MAXSTRING 8192
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