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
9c6f2e2d
Commit
9c6f2e2d
authored
May 02, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winefile: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dff5a025
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
144 deletions
+11
-144
Makefile.in
programs/winefile/Makefile.in
+2
-2
splitpath.c
programs/winefile/splitpath.c
+0
-92
winefile.c
programs/winefile/winefile.c
+9
-16
winefile.h
programs/winefile/winefile.h
+0
-34
No files found.
programs/winefile/Makefile.in
View file @
9c6f2e2d
MODULE
=
winefile.exe
MODULE
=
winefile.exe
APPMODE
=
-mwindows
-municode
IMPORTS
=
uuid shell32 comdlg32 comctl32 ole32 mpr version user32 gdi32 advapi32 shlwapi
IMPORTS
=
uuid shell32 comdlg32 comctl32 ole32 mpr version user32 gdi32 advapi32 shlwapi
EXTRADLLFLAGS
=
-mwindows
-municode
-mno-cygwin
C_SRCS
=
\
C_SRCS
=
\
splitpath.c
\
winefile.c
winefile.c
RC_SRCS
=
winefile.rc
RC_SRCS
=
winefile.rc
...
...
programs/winefile/splitpath.c
deleted
100644 → 0
View file @
dff5a025
/*
* Copyright 2000, 2004 Martin Fuchs
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "winefile.h"
void
_wsplitpath
(
const
WCHAR
*
path
,
WCHAR
*
drv
,
WCHAR
*
dir
,
WCHAR
*
name
,
WCHAR
*
ext
)
{
const
WCHAR
*
end
;
/* end of processed string */
const
WCHAR
*
p
;
/* search pointer */
const
WCHAR
*
s
;
/* copy pointer */
/* extract drive name */
if
(
path
[
0
]
&&
path
[
1
]
==
':'
)
{
if
(
drv
)
{
*
drv
++
=
*
path
++
;
*
drv
++
=
*
path
++
;
*
drv
=
'\0'
;
}
}
else
if
(
drv
)
*
drv
=
'\0'
;
end
=
path
+
lstrlenW
(
path
);
/* search for begin of file extension */
for
(
p
=
end
;
p
>
path
&&
*--
p
!=
'\\'
&&
*
p
!=
'/'
;
)
if
(
*
p
==
'.'
)
{
end
=
p
;
break
;
}
if
(
ext
)
for
(
s
=
end
;
(
*
ext
=*
s
++
);
)
ext
++
;
/* search for end of directory name */
for
(
p
=
end
;
p
>
path
;
)
if
(
*--
p
==
'\\'
||
*
p
==
'/'
)
{
p
++
;
break
;
}
if
(
name
)
{
for
(
s
=
p
;
s
<
end
;
)
*
name
++
=
*
s
++
;
*
name
=
'\0'
;
}
if
(
dir
)
{
for
(
s
=
path
;
s
<
p
;
)
*
dir
++
=
*
s
++
;
*
dir
=
'\0'
;
}
}
/*
void main() // test splipath()
{
WCHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT];
_wsplitpath(L"x\\y", drv, dir, name, ext);
_wsplitpath(L"x\\", drv, dir, name, ext);
_wsplitpath(L"\\x", drv, dir, name, ext);
_wsplitpath(L"x", drv, dir, name, ext);
_wsplitpath(L"", drv, dir, name, ext);
_wsplitpath(L".x", drv, dir, name, ext);
_wsplitpath(L":x", drv, dir, name, ext);
_wsplitpath(L"a:x", drv, dir, name, ext);
_wsplitpath(L"a.b:x", drv, dir, name, ext);
_wsplitpath(L"W:\\/\\abc/Z:~", drv, dir, name, ext);
_wsplitpath(L"abc.EFGH:12345", drv, dir, name, ext);
_wsplitpath(L"C:/dos/command.com", drv, dir, name, ext);
}
*/
programs/winefile/winefile.c
View file @
9c6f2e2d
...
@@ -21,17 +21,10 @@
...
@@ -21,17 +21,10 @@
#define COBJMACROS
#define COBJMACROS
#include <assert.h>
#include <stdio.h>
#include "winefile.h"
#include "winefile.h"
#include "resource.h"
#include "resource.h"
#include "wine/unicode.h"
#ifndef _MAX_PATH
#define _MAX_DRIVE 3
#define _MAX_FNAME 256
#define _MAX_DIR _MAX_FNAME
#define _MAX_EXT _MAX_FNAME
#define _MAX_PATH 260
#endif
#ifdef NONAMELESSUNION
#ifdef NONAMELESSUNION
#define UNION_MEMBER(x) DUMMYUNIONNAME.x
#define UNION_MEMBER(x) DUMMYUNIONNAME.x
...
@@ -887,8 +880,8 @@ static int compareExt(const void* arg1, const void* arg2)
...
@@ -887,8 +880,8 @@ static int compareExt(const void* arg1, const void* arg2)
name1
=
fd1
->
cFileName
;
name1
=
fd1
->
cFileName
;
name2
=
fd2
->
cFileName
;
name2
=
fd2
->
cFileName
;
ext1
=
strrchrW
(
name1
,
'.'
);
ext1
=
wcsrchr
(
name1
,
'.'
);
ext2
=
strrchrW
(
name2
,
'.'
);
ext2
=
wcsrchr
(
name2
,
'.'
);
if
(
ext1
)
if
(
ext1
)
ext1
++
;
ext1
++
;
...
@@ -1108,7 +1101,7 @@ static ChildWnd* alloc_child_window(LPCWSTR path, LPITEMIDLIST pidl, HWND hwnd)
...
@@ -1108,7 +1101,7 @@ static ChildWnd* alloc_child_window(LPCWSTR path, LPITEMIDLIST pidl, HWND hwnd)
if
(
path
)
if
(
path
)
{
{
int
pathlen
=
strlenW
(
path
);
int
pathlen
=
l
strlenW
(
path
);
const
WCHAR
*
npath
=
path
;
const
WCHAR
*
npath
=
path
;
if
(
path
[
0
]
==
'"'
&&
path
[
pathlen
-
1
]
==
'"'
)
if
(
path
[
0
]
==
'"'
&&
path
[
pathlen
-
1
]
==
'"'
)
...
@@ -1560,7 +1553,7 @@ static void CheckForFileInfo(struct PropertiesDialog* dlg, HWND hwnd, LPCWSTR st
...
@@ -1560,7 +1553,7 @@ static void CheckForFileInfo(struct PropertiesDialog* dlg, HWND hwnd, LPCWSTR st
VS_FIXEDFILEINFO
*
pFixedFileInfo
=
(
VS_FIXEDFILEINFO
*
)
pVal
;
VS_FIXEDFILEINFO
*
pFixedFileInfo
=
(
VS_FIXEDFILEINFO
*
)
pVal
;
WCHAR
buffer
[
BUFFER_LEN
];
WCHAR
buffer
[
BUFFER_LEN
];
s
printfW
(
buffer
,
sFmt
,
s
wprintf
(
buffer
,
ARRAY_SIZE
(
buffer
)
,
sFmt
,
HIWORD
(
pFixedFileInfo
->
dwFileVersionMS
),
LOWORD
(
pFixedFileInfo
->
dwFileVersionMS
),
HIWORD
(
pFixedFileInfo
->
dwFileVersionMS
),
LOWORD
(
pFixedFileInfo
->
dwFileVersionMS
),
HIWORD
(
pFixedFileInfo
->
dwFileVersionLS
),
LOWORD
(
pFixedFileInfo
->
dwFileVersionLS
));
HIWORD
(
pFixedFileInfo
->
dwFileVersionLS
),
LOWORD
(
pFixedFileInfo
->
dwFileVersionLS
));
...
@@ -2614,7 +2607,7 @@ static BOOL is_registered_type(LPCWSTR ext)
...
@@ -2614,7 +2607,7 @@ static BOOL is_registered_type(LPCWSTR ext)
static
enum
FILE_TYPE
get_file_type
(
LPCWSTR
filename
)
static
enum
FILE_TYPE
get_file_type
(
LPCWSTR
filename
)
{
{
LPCWSTR
ext
=
strrchrW
(
filename
,
'.'
);
LPCWSTR
ext
=
wcsrchr
(
filename
,
'.'
);
if
(
!
ext
)
if
(
!
ext
)
ext
=
sEmpty
;
ext
=
sEmpty
;
...
@@ -3519,7 +3512,7 @@ static HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParen
...
@@ -3519,7 +3512,7 @@ static HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParen
static
LRESULT
CALLBACK
ChildWndProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
)
static
LRESULT
CALLBACK
ChildWndProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
{
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLongPtrW
(
hwnd
,
GWLP_USERDATA
);
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLongPtrW
(
hwnd
,
GWLP_USERDATA
);
ASSERT
(
child
);
assert
(
child
);
switch
(
nmsg
)
{
switch
(
nmsg
)
{
case
WM_DRAWITEM
:
{
case
WM_DRAWITEM
:
{
...
@@ -3849,7 +3842,7 @@ static LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -3849,7 +3842,7 @@ static LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
{
{
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLongPtrW
(
GetParent
(
hwnd
),
GWLP_USERDATA
);
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLongPtrW
(
GetParent
(
hwnd
),
GWLP_USERDATA
);
Pane
*
pane
=
(
Pane
*
)
GetWindowLongPtrW
(
hwnd
,
GWLP_USERDATA
);
Pane
*
pane
=
(
Pane
*
)
GetWindowLongPtrW
(
hwnd
,
GWLP_USERDATA
);
ASSERT
(
child
);
assert
(
child
);
switch
(
nmsg
)
{
switch
(
nmsg
)
{
case
WM_HSCROLL
:
case
WM_HSCROLL
:
...
...
programs/winefile/winefile.h
View file @
9c6f2e2d
...
@@ -16,25 +16,8 @@
...
@@ -16,25 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN
#define NOSERVICE
#define NOMCX
#define NOIME
#define NOCOMM
#define NOKANJI
#define NORPC
#define NOPROXYSTUB
#define NOIMAGE
#define NOTAPE
#include <windows.h>
#include <windows.h>
#include <commdlg.h>
#include <commdlg.h>
#ifdef UNICODE
#define _UNICODE
#endif
#include <locale.h>
#include <locale.h>
#include <time.h>
#include <time.h>
...
@@ -42,23 +25,8 @@
...
@@ -42,23 +25,8 @@
#include <shellapi.h>
/* for ShellExecuteW() */
#include <shellapi.h>
/* for ShellExecuteW() */
#include <shlobj.h>
#include <shlobj.h>
#ifndef FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
#define FILE_ATTRIBUTE_ENCRYPTED 0x00000040
#define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
#endif
#ifdef _DEBUG
#define ASSERT(x) {if (!(x)) DebugBreak();}
#else
#define ASSERT(x)
/* nothing */
#endif
#define BUFFER_LEN 1024
#define BUFFER_LEN 1024
enum
IMAGE
{
enum
IMAGE
{
IMG_NONE
=-
1
,
IMG_FILE
=
0
,
IMG_DOCUMENT
,
IMG_EXECUTABLE
,
IMG_NONE
=-
1
,
IMG_FILE
=
0
,
IMG_DOCUMENT
,
IMG_EXECUTABLE
,
IMG_FOLDER
,
IMG_OPEN_FOLDER
,
IMG_FOLDER_PLUS
,
IMG_OPEN_PLUS
,
IMG_OPEN_MINUS
,
IMG_FOLDER
,
IMG_OPEN_FOLDER
,
IMG_FOLDER_PLUS
,
IMG_OPEN_PLUS
,
IMG_OPEN_MINUS
,
...
@@ -129,5 +97,3 @@ typedef struct
...
@@ -129,5 +97,3 @@ typedef struct
}
WINEFILE_GLOBALS
;
}
WINEFILE_GLOBALS
;
extern
WINEFILE_GLOBALS
Globals
;
extern
WINEFILE_GLOBALS
Globals
;
extern
void
_wsplitpath
(
const
WCHAR
*
path
,
WCHAR
*
drv
,
WCHAR
*
dir
,
WCHAR
*
name
,
WCHAR
*
ext
);
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