constify wcmd

Andreas Mohr andi at rhlx01.fht-esslingen.de
Sun Jun 26 12:25:32 CDT 2005


Hi,

from

andi     21668 10.3  1.5 1588944 8096 pts/3    S+   19:22   0:01
/usr/local/s
-rwxr-xr-x  1 andi adm 795927 Jun 26 18:23 wcmd.exe.so

to

andi     21730 30.8  1.5 1589008 8096 pts/3    S+   19:23   0:01
/usr/local/s
-rwxr-xr-x  1 andi adm 795903 Jun 26 19:23 wcmd.exe.so

Andreas Mohr
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
cvs diff: Diffing programs/wcmd
Index: programs/wcmd/builtins.c
===================================================================
RCS file: /home/wine/wine/programs/wcmd/builtins.c,v
retrieving revision 1.27
diff -u -r1.27 builtins.c
--- programs/wcmd/builtins.c	14 Feb 2005 11:01:35 -0000	1.27
+++ programs/wcmd/builtins.c	26 Jun 2005 17:23:52 -0000
@@ -105,7 +105,7 @@
 WIN32_FIND_DATA fd;
 HANDLE hff;
 BOOL force, status;
-static const char *overwrite = "Overwrite file (Y/N)?";
+static const char * const overwrite = "Overwrite file (Y/N)?";
 char string[8], outpath[MAX_PATH], inpath[MAX_PATH], *infile;
 
   if ((strchr(param1,'*') != NULL) && (strchr(param1,'%') != NULL)) {
@@ -213,7 +213,7 @@
 
 void WCMD_echo (const char *command) {
 
-static const char *eon = "Echo is ON\n", *eoff = "Echo is OFF\n";
+static const char * const eon = "Echo is ON\n", * const eoff = "Echo is OFF\n";
 int count;
 
   if ((command[0] == '.') && (command[1] == 0)) {
@@ -976,7 +976,7 @@
 
 void WCMD_verify (char *command) {
 
-static const char *von = "Verify is ON\n", *voff = "Verify is OFF\n";
+static const char * const von = "Verify is ON\n", * const voff = "Verify is OFF\n";
 int count;
 
   count = strlen(command);
Index: programs/wcmd/wcmdmain.c
===================================================================
RCS file: /home/wine/wine/programs/wcmd/wcmdmain.c,v
retrieving revision 1.43
diff -u -r1.43 wcmdmain.c
--- programs/wcmd/wcmdmain.c	2 Mar 2005 13:53:50 -0000	1.43
+++ programs/wcmd/wcmdmain.c	26 Jun 2005 17:23:52 -0000
@@ -27,7 +27,7 @@
 #include "ntstatus.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",
 		"HELP", "IF", "LABEL", "MD", "MKDIR", "MOVE", "PATH", "PAUSE",
 		"PROMPT", "REM", "REN", "RENAME", "RD", "RMDIR", "SET", "SHIFT",


More information about the wine-patches mailing list