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
fda7229b
Commit
fda7229b
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: Add prompt for rd /s.
parent
f1919c61
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
118 additions
and
2 deletions
+118
-2
Cs.rc
programs/cmd/Cs.rc
+4
-0
De.rc
programs/cmd/De.rc
+4
-0
En.rc
programs/cmd/En.rc
+4
-0
Es.rc
programs/cmd/Es.rc
+4
-0
Fr.rc
programs/cmd/Fr.rc
+4
-0
Ja.rc
programs/cmd/Ja.rc
+4
-0
Ko.rc
programs/cmd/Ko.rc
+4
-0
Nl.rc
programs/cmd/Nl.rc
+4
-0
No.rc
programs/cmd/No.rc
+4
-0
Pl.rc
programs/cmd/Pl.rc
+4
-0
Pt.rc
programs/cmd/Pt.rc
+4
-0
Ru.rc
programs/cmd/Ru.rc
+4
-0
Si.rc
programs/cmd/Si.rc
+4
-0
Tr.rc
programs/cmd/Tr.rc
+4
-0
builtins.c
programs/cmd/builtins.c
+56
-2
wcmd.h
programs/cmd/wcmd.h
+6
-0
No files found.
programs/cmd/Cs.rc
View file @
fda7229b
...
...
@@ -230,4 +230,8 @@ VER\t\tZobraz verzi CMD\n\
VOL\t\tUke jmenovku disku\n\
EXIT\t\tUkon CMD\n\n\
Zadejte HELP <pkaz> pro podrobnj informace o nkterm z ve uvedench pkaz\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/De.rc
View file @
fda7229b
...
...
@@ -247,4 +247,8 @@ VOL\t\tZeigt die Bezeichnung eines Laufwerkes an\n\
EXIT\t\tBeendet den CMD\n\n\
Geben Sie HELP <Befehl> ein, damit Sie weitere Informationen für einen der\n\
obigen Befehle erhalten.\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/En.rc
View file @
fda7229b
...
...
@@ -234,4 +234,8 @@ VER\t\tShow the current version of CMD\n\
VOL\t\tShow the volume label of a disk device\n\
EXIT\t\tClose down CMD\n\n\
Enter HELP <command> for further information on any of the above commands\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/Es.rc
View file @
fda7229b
...
...
@@ -242,4 +242,8 @@ VER\t\tMostrar la versión actual de CMD\n\
VOL\t\tMostrar la etiqueta de volumen de un dispositivo de disco\n\
EXIT\t\tConcluir CMD\n\n\
Introduzca HELP <comando> para más información sobre cualquiera de los comandos\nde arriba\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/Fr.rc
View file @
fda7229b
...
...
@@ -224,4 +224,8 @@ VER\t\tAffiche la version de cmd actuellement en mémoire.\n\
VOL\t\tAffiche le nom de volume d'un lecteur de disque\n\
EXIT\t\tQuitte CMD\n\n\
Entrez HELP <commande> pour plus d'informations sur les commandes ci-dessus\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/Ja.rc
View file @
fda7229b
...
...
@@ -228,4 +228,8 @@ VER\t\tCMDのバージョンを表示\n\
VOL\t\tディスクデバイスのボリュームラベルを表示\n\
EXIT\t\tCMDを終了\n\n\
上記のコマンドに関する詳細を表示するには HELP <コマンド名> と入力して下さい。\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/Ko.rc
View file @
fda7229b
...
...
@@ -219,4 +219,8 @@ VER\t\tCMD 현재 버젼 보여주기\n\
VOL\t\t디스크 장치의 불륨 라벨 보여주기\n\
EXIT\t\tCMD 닫기\n\n\
HELP <명령>을 치면 그 명령의 상세한 정보를 보여줌\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/Nl.rc
View file @
fda7229b
...
...
@@ -227,4 +227,8 @@ VER\t\tToon de versie van CMD\n\
VOL\t\tToon het label van een schijf\n\
EXIT\t\tSluit CMD af\n\n\
type HELP <opdracht> voor meer informatie over bovengenoemde opdrachten\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/No.rc
View file @
fda7229b
...
...
@@ -225,4 +225,8 @@ VER\t\tViser CMDs versjonnummer\n\
VOL\t\tViser volumnavnet til en stasjon\n\
EXIT\t\tAvslutter CMD\n\n\
Skriv «HELP <kommando>» for mer informasjon om kommandoene ovenfor\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/Pl.rc
View file @
fda7229b
...
...
@@ -221,4 +221,8 @@ VER\t\tWywietla wersj CMD\n\
VOL\t\tWywietla etykiet dysku\n\
EXIT\t\tWycza CMD\n\n\
Wpisz HELP <komenda> dla dokadniejszych informacji o komendzie\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/Pt.rc
View file @
fda7229b
...
...
@@ -434,4 +434,8 @@ VER\t\tMostra a versão atual do CMD\n\
VOL\t\tMostra o rótulo do volume de uma unidade de disco\n\
EXIT\t\tFecha o CMD\n\n\
Digite HELP <comando> para mais informações sobre alguns dos comandos acima\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/Ru.rc
View file @
fda7229b
...
...
@@ -225,4 +225,8 @@ VER\t\t WCMD\n\
VOL\t\t \n\
EXIT\t\t WCMD\n\n\
HELP <> .\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/Si.rc
View file @
fda7229b
...
...
@@ -226,4 +226,8 @@ VER\t\tShow the current version of CMD\n\
VOL\t\tShow the volume label of a disk device\n\
EXIT\t\tClose down CMD\n\n\
Enter HELP <command> for further information on any of the above commands\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/Tr.rc
View file @
fda7229b
...
...
@@ -228,4 +228,8 @@ VER\t\tGeerli CMD srmn gster\n\
VOL\t\tDisk aygtnn blm etiketini gster\n\
EXIT\t\tCMD'yi kapat\n\n\
Yukardaki komutlar hakknda daha fazla bilgi iin HELP <komut> girin\n"
WCMD_CONFIRM, "Are you sure"
WCMD_YES, "Y"
WCMD_NO, "N"
}
programs/cmd/builtins.c
View file @
fda7229b
...
...
@@ -643,8 +643,22 @@ void WCMD_remove_dir (void) {
/* Otherwise use ShFileOp to recursively remove a directory */
}
else
{
/* Do the delete */
SHFILEOPSTRUCT
lpDir
;
/* Ask first */
if
(
strstr
(
quals
,
"/Q"
)
==
NULL
)
{
BOOL
ok
;
char
question
[
MAXSTRING
];
/* Ask for confirmation */
sprintf
(
question
,
"%s, "
,
param1
);
ok
=
WCMD_ask_confirm
(
question
);
/* Abort if answer is 'N' */
if
(
!
ok
)
return
;
}
/* Do the delete */
lpDir
.
hwnd
=
NULL
;
lpDir
.
pTo
=
NULL
;
lpDir
.
pFrom
=
param1
;
...
...
@@ -786,7 +800,7 @@ void WCMD_endlocal (void) {
}
LocalFree
(
old
);
FreeEnvironmentStringsW
(
env
);
/* restore old environment */
env
=
temp
->
strings
;
len
=
0
;
...
...
@@ -1260,3 +1274,43 @@ void WCMD_exit (void) {
ExitProcess
(
rc
);
}
}
/**************************************************************************
* WCMD_ask_confirm
*
* Issue a message and ask 'Are you sure (Y/N)', waiting on a valid
* answer.
*
* Returns True if Y answer is selected
*
*/
BOOL
WCMD_ask_confirm
(
char
*
message
)
{
char
msgbuffer
[
MAXSTRING
];
char
Ybuffer
[
MAXSTRING
];
char
Nbuffer
[
MAXSTRING
];
char
answer
[
MAX_PATH
]
=
""
;
DWORD
count
=
0
;
/* Load the translated 'Are you sure', plus valid answers */
LoadString
(
hinst
,
WCMD_CONFIRM
,
msgbuffer
,
sizeof
(
msgbuffer
));
LoadString
(
hinst
,
WCMD_YES
,
Ybuffer
,
sizeof
(
Ybuffer
));
LoadString
(
hinst
,
WCMD_NO
,
Nbuffer
,
sizeof
(
Nbuffer
));
/* Loop waiting on a Y or N */
while
(
answer
[
0
]
!=
Ybuffer
[
0
]
&&
answer
[
0
]
!=
Nbuffer
[
0
])
{
WCMD_output_asis
(
message
);
WCMD_output_asis
(
msgbuffer
);
WCMD_output_asis
(
" ("
);
WCMD_output_asis
(
Ybuffer
);
WCMD_output_asis
(
"/"
);
WCMD_output_asis
(
Nbuffer
);
WCMD_output_asis
(
")?"
);
ReadFile
(
GetStdHandle
(
STD_INPUT_HANDLE
),
answer
,
sizeof
(
answer
),
&
count
,
NULL
);
answer
[
0
]
=
toupper
(
answer
[
0
]);
}
/* Return the answer */
return
(
answer
[
0
]
==
Ybuffer
[
0
]);
}
programs/cmd/wcmd.h
View file @
fda7229b
...
...
@@ -80,6 +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
);
/* Data structure to hold context when executing batch files */
...
...
@@ -154,5 +155,10 @@ extern const char newline[];
extern
const
char
version_string
[];
extern
const
char
anykey
[];
/* Translated messages */
#define WCMD_CONFIRM 1001
#define WCMD_YES 1002
#define WCMD_NO 1003
/* 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