winefile: Do not use wide character constants.

Michael Stefaniuc mstefani at redhat.de
Wed Jun 27 15:48:29 CDT 2007


They aren't needed and the implicit cast from the 32bit wchar_t to the
16bit WCHAR isn't that much better than the (Wine) normal implicit cast
from the 8bit char.
---
 programs/winefile/splitpath.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/programs/winefile/splitpath.c b/programs/winefile/splitpath.c
index 542379a..42286ec 100644
--- a/programs/winefile/splitpath.c
+++ b/programs/winefile/splitpath.c
@@ -33,18 +33,18 @@ void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR*
 		if (drv) {
 			*drv++ = *path++;
 			*drv++ = *path++;
-			*drv = L'\0';
+			*drv = '\0';
 		}
 	} else if (drv)
-		*drv = L'\0';
+		*drv = '\0';
 
 	/* search for end of string or stream separator */
-	for(end=path; *end && *end!=L':'; )
+	for(end=path; *end && *end!=':'; )
 		end++;
 
 	/* search for begin of file extension */
-	for(p=end; p>path && *--p!=L'\\' && *p!=L'/'; )
-		if (*p == L'.') {
+	for(p=end; p>path && *--p!='\\' && *p!='/'; )
+		if (*p == '.') {
 			end = p;
 			break;
 		}
@@ -64,14 +64,14 @@ void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR*
 		for(s=p; s<end; )
 			*name++ = *s++;
 
-		*name = L'\0';
+		*name = '\0';
 	}
 
 	if (dir) {
 		for(s=path; s<p; )
 			*dir++ = *s++;
 
-		*dir = L'\0';
+		*dir = '\0';
 	}
 }
 
-- 
1.5.0.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070627/b472f2ea/attachment.pgp


More information about the wine-patches mailing list