[eterhack] winepath: Do not convert path a second time (eterbug #6934).
Alexander Morozov
amorozov на etersoft.ru
Сб Мар 5 17:43:37 MSK 2011
---
programs/winepath/winepath.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/programs/winepath/winepath.c b/programs/winepath/winepath.c
index 6e5f58d..3e1871b 100644
--- a/programs/winepath/winepath.c
+++ b/programs/winepath/winepath.c
@@ -260,6 +260,7 @@ int wmain(int argc, WCHAR *argv[])
HeapFree(GetProcessHeap(), 0, ntpath);
}
if (outputformats & WINDOWSFORMAT) {
+#if 0
WCHAR* windows_name;
char* unix_name;
DWORD size;
@@ -276,6 +277,16 @@ int wmain(int argc, WCHAR *argv[])
}
else printf("%c", separator);
HeapFree( GetProcessHeap(), 0, unix_name );
+#else
+ char* path;
+ DWORD size;
+
+ size = WideCharToMultiByte(CP_UNIXCP, 0, argv[i], -1, NULL, 0, NULL, NULL);
+ path = HeapAlloc(GetProcessHeap(), 0, size);
+ WideCharToMultiByte(CP_UNIXCP, 0, argv[i], -1, path, size, NULL, NULL);
+ printf("%s\n", path);
+ HeapFree(GetProcessHeap(), 0, path);
+#endif
}
}
--
1.7.4.1
------------MbctLTg24HW6ystsiTmEzz--
Подробная информация о списке рассылки Wine-patches