cmd.exe: Fix 'help garbage' command post-unicode support.
This commit is contained in:
parent
b8aa5fc586
commit
afe4d80a5e
|
@ -46,7 +46,7 @@ struct env_stack *saved_environment;
|
||||||
struct env_stack *pushd_directories;
|
struct env_stack *pushd_directories;
|
||||||
|
|
||||||
extern HINSTANCE hinst;
|
extern HINSTANCE hinst;
|
||||||
extern WCHAR *inbuilt[];
|
extern WCHAR inbuilt[][10];
|
||||||
extern int echo_mode, verify_mode, defaultColor;
|
extern int echo_mode, verify_mode, defaultColor;
|
||||||
extern WCHAR quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
|
extern WCHAR quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
|
||||||
extern BATCH_CONTEXT *context;
|
extern BATCH_CONTEXT *context;
|
||||||
|
@ -659,19 +659,16 @@ void WCMD_execute (WCHAR *orig_cmd, WCHAR *param, WCHAR *subst) {
|
||||||
void WCMD_give_help (WCHAR *command) {
|
void WCMD_give_help (WCHAR *command) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
WCHAR buffer[2048];
|
|
||||||
|
|
||||||
command = WCMD_strtrim_leading_spaces(command);
|
command = WCMD_strtrim_leading_spaces(command);
|
||||||
if (strlenW(command) == 0) {
|
if (strlenW(command) == 0) {
|
||||||
LoadString (hinst, 1000, buffer, sizeof(buffer)/sizeof(WCHAR));
|
WCMD_output_asis (WCMD_LoadMessage(WCMD_ALLHELP));
|
||||||
WCMD_output_asis (buffer);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (i=0; i<=WCMD_EXIT; i++) {
|
for (i=0; i<=WCMD_EXIT; i++) {
|
||||||
if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
|
if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
|
||||||
param1, -1, inbuilt[i], -1) == 2) {
|
param1, -1, inbuilt[i], -1) == 2) {
|
||||||
LoadString (hinst, i, buffer, sizeof(buffer)/sizeof(WCHAR));
|
WCMD_output_asis (WCMD_LoadMessage(i));
|
||||||
WCMD_output_asis (buffer);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,6 +189,7 @@ extern WCHAR anykey[];
|
||||||
extern WCHAR version_string[];
|
extern WCHAR version_string[];
|
||||||
|
|
||||||
/* Translated messages */
|
/* Translated messages */
|
||||||
|
#define WCMD_ALLHELP 1000
|
||||||
#define WCMD_CONFIRM 1001
|
#define WCMD_CONFIRM 1001
|
||||||
#define WCMD_YES 1002
|
#define WCMD_YES 1002
|
||||||
#define WCMD_NO 1003
|
#define WCMD_NO 1003
|
||||||
|
|
Loading…
Reference in New Issue