Constify wcmd.

This commit is contained in:
Andreas Mohr 2005-06-27 09:48:57 +00:00 committed by Alexandre Julliard
parent e452c24654
commit cf2b9f093d
2 changed files with 4 additions and 4 deletions

View File

@ -105,7 +105,7 @@ DWORD count;
WIN32_FIND_DATA fd; WIN32_FIND_DATA fd;
HANDLE hff; HANDLE hff;
BOOL force, status; BOOL force, status;
static const char *overwrite = "Overwrite file (Y/N)?"; static const char overwrite[] = "Overwrite file (Y/N)?";
char string[8], outpath[MAX_PATH], inpath[MAX_PATH], *infile; char string[8], outpath[MAX_PATH], inpath[MAX_PATH], *infile;
if ((strchr(param1,'*') != NULL) && (strchr(param1,'%') != NULL)) { if ((strchr(param1,'*') != NULL) && (strchr(param1,'%') != NULL)) {
@ -213,7 +213,7 @@ char *p;
void WCMD_echo (const char *command) { void WCMD_echo (const char *command) {
static const char *eon = "Echo is ON\n", *eoff = "Echo is OFF\n"; static const char eon[] = "Echo is ON\n", eoff[] = "Echo is OFF\n";
int count; int count;
if ((command[0] == '.') && (command[1] == 0)) { if ((command[0] == '.') && (command[1] == 0)) {
@ -976,7 +976,7 @@ DWORD count;
void WCMD_verify (char *command) { void WCMD_verify (char *command) {
static const char *von = "Verify is ON\n", *voff = "Verify is OFF\n"; static const char von[] = "Verify is ON\n", voff[] = "Verify is OFF\n";
int count; int count;
count = strlen(command); count = strlen(command);

View File

@ -27,7 +27,7 @@
#include "ntstatus.h" #include "ntstatus.h"
#include "wcmd.h" #include "wcmd.h"
const char *inbuilt[] = {"ATTRIB", "CALL", "CD", "CHDIR", "CLS", "COPY", "CTTY", const char * const inbuilt[] = {"ATTRIB", "CALL", "CD", "CHDIR", "CLS", "COPY", "CTTY",
"DATE", "DEL", "DIR", "ECHO", "ERASE", "FOR", "GOTO", "DATE", "DEL", "DIR", "ECHO", "ERASE", "FOR", "GOTO",
"HELP", "IF", "LABEL", "MD", "MKDIR", "MOVE", "PATH", "PAUSE", "HELP", "IF", "LABEL", "MD", "MKDIR", "MOVE", "PATH", "PAUSE",
"PROMPT", "REM", "REN", "RENAME", "RD", "RMDIR", "SET", "SHIFT", "PROMPT", "REM", "REN", "RENAME", "RD", "RMDIR", "SET", "SHIFT",