Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
3dc7bceb
Commit
3dc7bceb
authored
Aug 25, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winefile: Don't use _tsplitpath().
parent
2b8f5e37
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
33 deletions
+21
-33
splitpath.c
programs/winefile/splitpath.c
+14
-17
winefile.c
programs/winefile/winefile.c
+7
-7
winefile.h
programs/winefile/winefile.h
+0
-9
No files found.
programs/winefile/splitpath.c
View file @
3dc7bceb
...
...
@@ -19,8 +19,6 @@
#include "winefile.h"
#ifdef __WINE__
void
_wsplitpath
(
const
WCHAR
*
path
,
WCHAR
*
drv
,
WCHAR
*
dir
,
WCHAR
*
name
,
WCHAR
*
ext
)
{
const
WCHAR
*
end
;
/* end of processed string */
...
...
@@ -73,25 +71,24 @@ void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR*
*
dir
=
'\0'
;
}
}
#endif
/* __WINE__ */
/*
void main() // test splipath()
{
T
CHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT];
_
t
splitpath(L"x\\y", drv, dir, name, ext);
_
t
splitpath(L"x\\", drv, dir, name, ext);
_
t
splitpath(L"\\x", drv, dir, name, ext);
_
t
splitpath(L"x", drv, dir, name, ext);
_
t
splitpath(L"", drv, dir, name, ext);
_
t
splitpath(L".x", drv, dir, name, ext);
_
t
splitpath(L":x", drv, dir, name, ext);
_
t
splitpath(L"a:x", drv, dir, name, ext);
_
t
splitpath(L"a.b:x", drv, dir, name, ext);
_
t
splitpath(L"W:\\/\\abc/Z:~", drv, dir, name, ext);
_
t
splitpath(L"abc.EFGH:12345", drv, dir, name, ext);
_
t
splitpath(L"C:/dos/command.com", drv, dir, name, ext);
W
CHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT];
_
w
splitpath(L"x\\y", drv, dir, name, ext);
_
w
splitpath(L"x\\", drv, dir, name, ext);
_
w
splitpath(L"\\x", drv, dir, name, ext);
_
w
splitpath(L"x", drv, dir, name, ext);
_
w
splitpath(L"", drv, dir, name, ext);
_
w
splitpath(L".x", drv, dir, name, ext);
_
w
splitpath(L":x", drv, dir, name, ext);
_
w
splitpath(L"a:x", drv, dir, name, ext);
_
w
splitpath(L"a.b:x", drv, dir, name, ext);
_
w
splitpath(L"W:\\/\\abc/Z:~", drv, dir, name, ext);
_
w
splitpath(L"abc.EFGH:12345", drv, dir, name, ext);
_
w
splitpath(L"C:/dos/command.com", drv, dir, name, ext);
}
*/
programs/winefile/winefile.c
View file @
3dc7bceb
...
...
@@ -1386,7 +1386,7 @@ static ChildWnd* alloc_child_window(LPCTSTR path, LPITEMIDLIST pidl, HWND hwnd)
{
lstrcpy
(
child
->
path
,
path
);
_
t
splitpath
(
path
,
drv
,
dir
,
name
,
ext
);
_
w
splitpath
(
path
,
drv
,
dir
,
name
,
ext
);
}
lstrcpy
(
child
->
filter_pattern
,
sAsterics
);
...
...
@@ -2101,14 +2101,14 @@ static BOOL activate_drive_window(LPCTSTR path)
TCHAR
drv1
[
_MAX_DRIVE
],
drv2
[
_MAX_DRIVE
];
HWND
child_wnd
;
_
t
splitpath
(
path
,
drv1
,
0
,
0
,
0
);
_
w
splitpath
(
path
,
drv1
,
0
,
0
,
0
);
/* search for a already open window for the same drive */
for
(
child_wnd
=
GetNextWindow
(
Globals
.
hmdiclient
,
GW_CHILD
);
child_wnd
;
child_wnd
=
GetNextWindow
(
child_wnd
,
GW_HWNDNEXT
))
{
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLongPtr
(
child_wnd
,
GWLP_USERDATA
);
if
(
child
)
{
_
t
splitpath
(
child
->
root
.
path
,
drv2
,
0
,
0
,
0
);
_
w
splitpath
(
child
->
root
.
path
,
drv2
,
0
,
0
,
0
);
if
(
!
lstrcmpi
(
drv2
,
drv1
))
{
SendMessage
(
Globals
.
hmdiclient
,
WM_MDIACTIVATE
,
(
WPARAM
)
child_wnd
,
0
);
...
...
@@ -2198,7 +2198,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
if
(
activate_drive_window
(
root
))
return
0
;
_
t
splitpath
(
root
,
drv
,
0
,
0
,
0
);
_
w
splitpath
(
root
,
drv
,
0
,
0
,
0
);
if
(
!
SetCurrentDirectory
(
drv
))
{
display_error
(
hwnd
,
GetLastError
());
...
...
@@ -3690,7 +3690,7 @@ static void refresh_child(ChildWnd* child)
int
idx
;
get_path
(
child
->
left
.
cur
,
path
);
_
t
splitpath
(
path
,
drv
,
NULL
,
NULL
,
NULL
);
_
w
splitpath
(
path
,
drv
,
NULL
,
NULL
,
NULL
);
child
->
right
.
root
=
NULL
;
...
...
@@ -4017,7 +4017,7 @@ static BOOL prompt_target(Pane* pane, LPTSTR source, LPTSTR target)
TCHAR
fname
[
_MAX_FNAME
],
ext
[
_MAX_EXT
];
static
const
TCHAR
sAppend
[]
=
{
'%'
,
's'
,
'/'
,
'%'
,
's'
,
'%'
,
's'
,
'\0'
};
_
t
splitpath
(
source
,
NULL
,
NULL
,
fname
,
ext
);
_
w
splitpath
(
source
,
NULL
,
NULL
,
fname
,
ext
);
wsprintf
(
target
,
sAppend
,
path
,
fname
,
ext
);
}
...
...
@@ -4733,7 +4733,7 @@ static BOOL show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
memset
(
name
,
0
,
sizeof
(
name
));
memset
(
name
,
0
,
sizeof
(
ext
));
_
t
splitpath
(
path
,
drv
,
dir
,
name
,
ext
);
_
w
splitpath
(
path
,
drv
,
dir
,
name
,
ext
);
if
(
name
[
0
])
{
count
=
SendMessage
(
child
->
right
.
hwnd
,
LB_GETCOUNT
,
0
,
0
);
...
...
programs/winefile/winefile.h
View file @
3dc7bceb
...
...
@@ -145,13 +145,4 @@ typedef struct
extern
WINEFILE_GLOBALS
Globals
;
#ifdef __WINE__
extern
void
_wsplitpath
(
const
WCHAR
*
path
,
WCHAR
*
drv
,
WCHAR
*
dir
,
WCHAR
*
name
,
WCHAR
*
ext
);
#define _tsplitpath _wsplitpath
#else
#include <tchar.h>
/* for _tsplitpath() */
#endif
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