Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
56759946
Commit
56759946
authored
Jul 03, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winepath: Use CRT allocation functions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
ee1f96eb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
winepath.c
programs/winepath/winepath.c
+6
-6
No files found.
programs/winepath/winepath.c
View file @
56759946
...
...
@@ -195,7 +195,7 @@ int __cdecl wmain(int argc, WCHAR *argv[])
if
(
outputformats
&
UNIXFORMAT
)
{
WCHAR
*
ntpath
,
*
tail
;
int
ntpathlen
=
lstrlenW
(
argv
[
i
]);
ntpath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
ntpath
)
*
(
ntpathlen
+
1
));
ntpath
=
malloc
(
sizeof
(
*
ntpath
)
*
(
ntpathlen
+
1
));
lstrcpyW
(
ntpath
,
argv
[
i
]);
tail
=
NULL
;
while
(
1
)
...
...
@@ -215,7 +215,7 @@ int __cdecl wmain(int argc, WCHAR *argv[])
{
printf
(
"%s%c"
,
unix_name
,
separator
);
}
HeapFree
(
GetProcessHeap
(),
0
,
unix_name
);
free
(
unix_name
);
break
;
}
...
...
@@ -247,7 +247,7 @@ int __cdecl wmain(int argc, WCHAR *argv[])
tail
=
slash
;
*
tail
=
'\0'
;
}
HeapFree
(
GetProcessHeap
(),
0
,
ntpath
);
free
(
ntpath
);
}
if
(
outputformats
&
WINDOWSFORMAT
)
{
WCHAR
*
windows_name
;
...
...
@@ -255,17 +255,17 @@ int __cdecl wmain(int argc, WCHAR *argv[])
DWORD
size
;
size
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
argv
[
i
],
-
1
,
NULL
,
0
,
NULL
,
NULL
);
unix_name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
unix_name
=
malloc
(
size
);
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
argv
[
i
],
-
1
,
unix_name
,
size
,
NULL
,
NULL
);
if
((
windows_name
=
wine_get_dos_file_name_ptr
(
unix_name
)))
{
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
windows_name
,
-
1
,
path
,
MAX_PATH
,
NULL
,
NULL
);
printf
(
"%s%c"
,
path
,
separator
);
HeapFree
(
GetProcessHeap
(),
0
,
windows_name
);
free
(
windows_name
);
}
else
printf
(
"%c"
,
separator
);
HeapFree
(
GetProcessHeap
(),
0
,
unix_name
);
free
(
unix_name
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment