const cleanup round 1

Mike Schaadt mschaadt at gmail.com
Tue Mar 13 02:21:00 CDT 2007


Skipped content of type multipart/alternative-------------- next part --------------
diff --git a/include/wine/unicode.h b/include/wine/unicode.h
index 83a7d52..4e2caa5 100644
--- a/include/wine/unicode.h
+++ b/include/wine/unicode.h
@@ -96,8 +96,8 @@ extern int strcmpiW( const WCHAR *str1, 
 extern int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n );
 extern int memicmpW( const WCHAR *str1, const WCHAR *str2, int n );
 extern WCHAR *strstrW( const WCHAR *str, const WCHAR *sub );
-extern long int strtolW( const WCHAR *nptr, WCHAR **endptr, int base );
-extern unsigned long int strtoulW( const WCHAR *nptr, WCHAR **endptr, int base );
+extern long int strtolW( const WCHAR *nptr, const WCHAR **endptr, int base );
+extern unsigned long int strtoulW( const WCHAR *nptr, const WCHAR **endptr, int base );
 extern int sprintfW( WCHAR *str, const WCHAR *format, ... );
 extern int snprintfW( WCHAR *str, size_t len, const WCHAR *format, ... );
 extern int vsprintfW( WCHAR *str, const WCHAR *format, va_list valist );
diff --git a/libs/port/spawn.c b/libs/port/spawn.c
diff --git a/libs/wine/string.c b/libs/wine/string.c
index 195af6c..a08b29f 100644
--- a/libs/wine/string.c
+++ b/libs/wine/string.c
@@ -66,7 +66,7 @@ WCHAR *strstrW( const WCHAR *str, const 
 /* strtolW and strtoulW implementation based on the GNU C library code */
 /* Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. */
 
-long int strtolW( const WCHAR *nptr, WCHAR **endptr, int base )
+long int strtolW( const WCHAR *nptr, const WCHAR **endptr, int base )
 {
   int negative;
   register unsigned long int cutoff;
@@ -149,7 +149,7 @@ long int strtolW( const WCHAR *nptr, WCH
   /* Store in ENDPTR the address of one character
      past the last character we converted.  */
   if (endptr != NULL)
-    *endptr = (WCHAR *)s;
+    *endptr = s;
 
   /* Check for a value that is within the range of
      `unsigned LONG int', but outside the range of `LONG int'.  */
@@ -176,17 +176,17 @@ noconv:
     {
       if (save - nptr >= 2 && toupperW (save[-1]) == 'X'
 	  && save[-2] == '0')
-	*endptr = (WCHAR *)&save[-1];
+	*endptr = &save[-1];
       else
 	/*  There was no number to convert.  */
-	*endptr = (WCHAR *)nptr;
+	*endptr = nptr;
     }
 
   return 0L;
 }
 
 
-unsigned long int strtoulW( const WCHAR *nptr, WCHAR **endptr, int base )
+unsigned long int strtoulW( const WCHAR *nptr, const WCHAR **endptr, int base )
 {
   int negative;
   register unsigned long int cutoff;
@@ -269,7 +269,7 @@ unsigned long int strtoulW( const WCHAR 
   /* Store in ENDPTR the address of one character
      past the last character we converted.  */
   if (endptr != NULL)
-    *endptr = (WCHAR *)s;
+    *endptr = s;
 
   if (overflow)
     {
@@ -288,10 +288,10 @@ noconv:
     {
       if (save - nptr >= 2 && toupperW (save[-1]) == 'X'
 	  && save[-2] == '0')
-	*endptr = (WCHAR *)&save[-1];
+	*endptr = &save[-1];
       else
 	/*  There was no number to convert.  */
-	*endptr = (WCHAR *)nptr;
+	*endptr = nptr;
     }
 
   return 0L;
diff --git a/tools/makedep.c b/tools/makedep.c
diff --git a/tools/winedump/lnk.c b/tools/winedump/lnk.c
index 661e48d..8837828 100644
--- a/tools/winedump/lnk.c
+++ b/tools/winedump/lnk.c
@@ -143,7 +143,7 @@ static int dump_pidl(void)
 
     while(sz<pidl->size)
     {
-        lnk_string *segment = (lnk_string*) &pidl->str.a[sz];
+        const lnk_string *segment = &pidl->str.a[sz];
 
         if(!segment->size)
             break;
diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c
diff --git a/tools/winedump/symbol.c b/tools/winedump/symbol.c
index f584c5d..3d95542 100644
--- a/tools/winedump/symbol.c
+++ b/tools/winedump/symbol.c
@@ -285,9 +285,9 @@ int   symbol_get_type (const char *strin
 /*******************************************************************
  *         symbol_clean_string
  *
- * Make a type string more Wine-friendly. Logically const :-)
+ * Make a type string more Wine-friendly.
  */
-void  symbol_clean_string (const char *string)
+void  symbol_clean_string (char *string)
 {
   const char * const *tab = swap_after;
   char *str = (char *)string;
diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h
index 2e15e24..6c0cc4a 100644
--- a/tools/winedump/winedump.h
+++ b/tools/winedump/winedump.h
@@ -183,7 +183,7 @@ const char *symbol_get_call_convention(c
 
 const char *symbol_get_spec_type (const parsed_symbol *sym, size_t arg);
 
-void  symbol_clean_string (const char *string);
+void  symbol_clean_string (char *string);
 
 int   symbol_get_type (const char *string);
 


More information about the wine-patches mailing list