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
21049ffb
Commit
21049ffb
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: Replace TCHAR with WCHAR.
parent
575b7bf3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
87 deletions
+87
-87
winefile.c
programs/winefile/winefile.c
+85
-85
winefile.h
programs/winefile/winefile.h
+2
-2
No files found.
programs/winefile/winefile.c
View file @
21049ffb
...
@@ -102,9 +102,9 @@ typedef struct _Entry {
...
@@ -102,9 +102,9 @@ typedef struct _Entry {
typedef
struct
{
typedef
struct
{
Entry
entry
;
Entry
entry
;
T
CHAR
path
[
MAX_PATH
];
W
CHAR
path
[
MAX_PATH
];
T
CHAR
volname
[
_MAX_FNAME
];
W
CHAR
volname
[
_MAX_FNAME
];
T
CHAR
fs
[
_MAX_DIR
];
W
CHAR
fs
[
_MAX_DIR
];
DWORD
drive_type
;
DWORD
drive_type
;
DWORD
fs_flags
;
DWORD
fs_flags
;
}
Root
;
}
Root
;
...
@@ -160,8 +160,8 @@ typedef struct {
...
@@ -160,8 +160,8 @@ typedef struct {
int
split_pos
;
int
split_pos
;
BOOL
header_wdths_ok
;
BOOL
header_wdths_ok
;
T
CHAR
path
[
MAX_PATH
];
W
CHAR
path
[
MAX_PATH
];
T
CHAR
filter_pattern
[
MAX_PATH
];
W
CHAR
filter_pattern
[
MAX_PATH
];
int
filter_flags
;
int
filter_flags
;
Root
root
;
Root
root
;
...
@@ -175,7 +175,7 @@ static void set_curdir(ChildWnd* child, Entry* entry, int idx, HWND hwnd);
...
@@ -175,7 +175,7 @@ static void set_curdir(ChildWnd* child, Entry* entry, int idx, HWND hwnd);
static
void
refresh_child
(
ChildWnd
*
child
);
static
void
refresh_child
(
ChildWnd
*
child
);
static
void
refresh_drives
(
void
);
static
void
refresh_drives
(
void
);
static
void
get_path
(
Entry
*
dir
,
PTSTR
path
);
static
void
get_path
(
Entry
*
dir
,
PTSTR
path
);
static
void
format_date
(
const
FILETIME
*
ft
,
T
CHAR
*
buffer
,
int
visible_cols
);
static
void
format_date
(
const
FILETIME
*
ft
,
W
CHAR
*
buffer
,
int
visible_cols
);
static
LRESULT
CALLBACK
FrameWndProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
);
static
LRESULT
CALLBACK
FrameWndProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
);
static
LRESULT
CALLBACK
ChildWndProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
);
static
LRESULT
CALLBACK
ChildWndProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
);
...
@@ -188,14 +188,14 @@ WINEFILE_GLOBALS Globals;
...
@@ -188,14 +188,14 @@ WINEFILE_GLOBALS Globals;
static
int
last_split
;
static
int
last_split
;
/* some common string constants */
/* some common string constants */
static
const
T
CHAR
sEmpty
[]
=
{
'\0'
};
static
const
W
CHAR
sEmpty
[]
=
{
'\0'
};
static
const
WCHAR
sSpace
[]
=
{
' '
,
'\0'
};
static
const
WCHAR
sSpace
[]
=
{
' '
,
'\0'
};
static
const
T
CHAR
sNumFmt
[]
=
{
'%'
,
'd'
,
'\0'
};
static
const
W
CHAR
sNumFmt
[]
=
{
'%'
,
'd'
,
'\0'
};
static
const
T
CHAR
sQMarks
[]
=
{
'?'
,
'?'
,
'?'
,
'\0'
};
static
const
W
CHAR
sQMarks
[]
=
{
'?'
,
'?'
,
'?'
,
'\0'
};
/* window class names */
/* window class names */
static
const
T
CHAR
sWINEFILEFRAME
[]
=
{
'W'
,
'F'
,
'S'
,
'_'
,
'F'
,
'r'
,
'a'
,
'm'
,
'e'
,
'\0'
};
static
const
W
CHAR
sWINEFILEFRAME
[]
=
{
'W'
,
'F'
,
'S'
,
'_'
,
'F'
,
'r'
,
'a'
,
'm'
,
'e'
,
'\0'
};
static
const
T
CHAR
sWINEFILETREE
[]
=
{
'W'
,
'F'
,
'S'
,
'_'
,
'T'
,
'r'
,
'e'
,
'e'
,
'\0'
};
static
const
W
CHAR
sWINEFILETREE
[]
=
{
'W'
,
'F'
,
'S'
,
'_'
,
'T'
,
'r'
,
'e'
,
'e'
,
'\0'
};
static
void
format_longlong
(
LPWSTR
ret
,
ULONGLONG
val
)
static
void
format_longlong
(
LPWSTR
ret
,
ULONGLONG
val
)
{
{
...
@@ -223,7 +223,7 @@ static LPTSTR load_string(LPTSTR buffer, DWORD size, UINT id)
...
@@ -223,7 +223,7 @@ static LPTSTR load_string(LPTSTR buffer, DWORD size, UINT id)
/* display error message for the specified WIN32 error code */
/* display error message for the specified WIN32 error code */
static
void
display_error
(
HWND
hwnd
,
DWORD
error
)
static
void
display_error
(
HWND
hwnd
,
DWORD
error
)
{
{
T
CHAR
b1
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
W
CHAR
b1
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
PTSTR
msg
;
PTSTR
msg
;
if
(
FormatMessageW
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_FROM_SYSTEM
,
if
(
FormatMessageW
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_FROM_SYSTEM
,
...
@@ -239,7 +239,7 @@ static void display_error(HWND hwnd, DWORD error)
...
@@ -239,7 +239,7 @@ static void display_error(HWND hwnd, DWORD error)
/* display network error message using WNetGetLastErrorW() */
/* display network error message using WNetGetLastErrorW() */
static
void
display_network_error
(
HWND
hwnd
)
static
void
display_network_error
(
HWND
hwnd
)
{
{
T
CHAR
msg
[
BUFFER_LEN
],
provider
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
W
CHAR
msg
[
BUFFER_LEN
],
provider
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
DWORD
error
;
DWORD
error
;
if
(
WNetGetLastErrorW
(
&
error
,
msg
,
BUFFER_LEN
,
provider
,
BUFFER_LEN
)
==
NO_ERROR
)
if
(
WNetGetLastErrorW
(
&
error
,
msg
,
BUFFER_LEN
,
provider
,
BUFFER_LEN
)
==
NO_ERROR
)
...
@@ -373,7 +373,7 @@ static void read_directory_win(Entry* dir, LPCTSTR path)
...
@@ -373,7 +373,7 @@ static void read_directory_win(Entry* dir, LPCTSTR path)
HANDLE
hFile
;
HANDLE
hFile
;
#endif
#endif
T
CHAR
buffer
[
MAX_PATH
],
*
p
;
W
CHAR
buffer
[
MAX_PATH
],
*
p
;
for
(
p
=
buffer
;
*
path
;
)
for
(
p
=
buffer
;
*
path
;
)
*
p
++
=
*
path
++
;
*
p
++
=
*
path
++
;
...
@@ -468,7 +468,7 @@ static Entry* find_entry_win(Entry* dir, LPCTSTR name)
...
@@ -468,7 +468,7 @@ static Entry* find_entry_win(Entry* dir, LPCTSTR name)
static
Entry
*
read_tree_win
(
Root
*
root
,
LPCTSTR
path
,
SORT_ORDER
sortOrder
,
HWND
hwnd
)
static
Entry
*
read_tree_win
(
Root
*
root
,
LPCTSTR
path
,
SORT_ORDER
sortOrder
,
HWND
hwnd
)
{
{
T
CHAR
buffer
[
MAX_PATH
];
W
CHAR
buffer
[
MAX_PATH
];
Entry
*
entry
=
&
root
->
entry
;
Entry
*
entry
=
&
root
->
entry
;
LPCTSTR
s
=
path
;
LPCTSTR
s
=
path
;
PTSTR
d
=
buffer
;
PTSTR
d
=
buffer
;
...
@@ -629,7 +629,7 @@ static Entry* find_entry_unix(Entry* dir, LPCTSTR name)
...
@@ -629,7 +629,7 @@ static Entry* find_entry_unix(Entry* dir, LPCTSTR name)
static
Entry
*
read_tree_unix
(
Root
*
root
,
LPCTSTR
path
,
SORT_ORDER
sortOrder
,
HWND
hwnd
)
static
Entry
*
read_tree_unix
(
Root
*
root
,
LPCTSTR
path
,
SORT_ORDER
sortOrder
,
HWND
hwnd
)
{
{
T
CHAR
buffer
[
MAX_PATH
];
W
CHAR
buffer
[
MAX_PATH
];
Entry
*
entry
=
&
root
->
entry
;
Entry
*
entry
=
&
root
->
entry
;
LPCTSTR
s
=
path
;
LPCTSTR
s
=
path
;
PTSTR
d
=
buffer
;
PTSTR
d
=
buffer
;
...
@@ -767,7 +767,7 @@ static LPITEMIDLIST get_to_absolute_pidl(Entry* entry, HWND hwnd)
...
@@ -767,7 +767,7 @@ static LPITEMIDLIST get_to_absolute_pidl(Entry* entry, HWND hwnd)
return
idl
;
return
idl
;
}
else
if
(
entry
->
etype
==
ET_WINDOWS
)
{
}
else
if
(
entry
->
etype
==
ET_WINDOWS
)
{
T
CHAR
path
[
MAX_PATH
];
W
CHAR
path
[
MAX_PATH
];
get_path
(
entry
,
path
);
get_path
(
entry
,
path
);
...
@@ -784,7 +784,7 @@ static HICON extract_icon(IShellFolder* folder, LPCITEMIDLIST pidl)
...
@@ -784,7 +784,7 @@ static HICON extract_icon(IShellFolder* folder, LPCITEMIDLIST pidl)
IExtractIcon
*
pExtract
;
IExtractIcon
*
pExtract
;
if
(
SUCCEEDED
(
IShellFolder_GetUIObjectOf
(
folder
,
0
,
1
,
(
LPCITEMIDLIST
*
)
&
pidl
,
&
IID_IExtractIcon
,
0
,
(
LPVOID
*
)
&
pExtract
)))
{
if
(
SUCCEEDED
(
IShellFolder_GetUIObjectOf
(
folder
,
0
,
1
,
(
LPCITEMIDLIST
*
)
&
pidl
,
&
IID_IExtractIcon
,
0
,
(
LPVOID
*
)
&
pExtract
)))
{
T
CHAR
path
[
_MAX_PATH
];
W
CHAR
path
[
_MAX_PATH
];
unsigned
flags
;
unsigned
flags
;
HICON
hicon
;
HICON
hicon
;
int
idx
;
int
idx
;
...
@@ -1102,7 +1102,7 @@ static int compareExt(const void* arg1, const void* arg2)
...
@@ -1102,7 +1102,7 @@ static int compareExt(const void* arg1, const void* arg2)
{
{
const
WIN32_FIND_DATA
*
fd1
=
&
(
*
(
const
Entry
*
const
*
)
arg1
)
->
data
;
const
WIN32_FIND_DATA
*
fd1
=
&
(
*
(
const
Entry
*
const
*
)
arg1
)
->
data
;
const
WIN32_FIND_DATA
*
fd2
=
&
(
*
(
const
Entry
*
const
*
)
arg2
)
->
data
;
const
WIN32_FIND_DATA
*
fd2
=
&
(
*
(
const
Entry
*
const
*
)
arg2
)
->
data
;
const
T
CHAR
*
name1
,
*
name2
,
*
ext1
,
*
ext2
;
const
W
CHAR
*
name1
,
*
name2
,
*
ext1
,
*
ext2
;
int
cmp
=
compareType
(
fd1
,
fd2
);
int
cmp
=
compareType
(
fd1
,
fd2
);
if
(
cmp
)
if
(
cmp
)
...
@@ -1207,7 +1207,7 @@ static void SortDirectory(Entry* dir, SORT_ORDER sortOrder)
...
@@ -1207,7 +1207,7 @@ static void SortDirectory(Entry* dir, SORT_ORDER sortOrder)
static
void
read_directory
(
Entry
*
dir
,
LPCTSTR
path
,
SORT_ORDER
sortOrder
,
HWND
hwnd
)
static
void
read_directory
(
Entry
*
dir
,
LPCTSTR
path
,
SORT_ORDER
sortOrder
,
HWND
hwnd
)
{
{
T
CHAR
buffer
[
MAX_PATH
];
W
CHAR
buffer
[
MAX_PATH
];
Entry
*
entry
;
Entry
*
entry
;
LPCTSTR
s
;
LPCTSTR
s
;
PTSTR
d
;
PTSTR
d
;
...
@@ -1287,9 +1287,9 @@ static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND
...
@@ -1287,9 +1287,9 @@ static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND
static
Entry
*
read_tree
(
Root
*
root
,
LPCTSTR
path
,
LPITEMIDLIST
pidl
,
LPTSTR
drv
,
SORT_ORDER
sortOrder
,
HWND
hwnd
)
static
Entry
*
read_tree
(
Root
*
root
,
LPCTSTR
path
,
LPITEMIDLIST
pidl
,
LPTSTR
drv
,
SORT_ORDER
sortOrder
,
HWND
hwnd
)
{
{
#if !defined(_NO_EXTENSIONS) && defined(__WINE__)
#if !defined(_NO_EXTENSIONS) && defined(__WINE__)
static
const
T
CHAR
sSlash
[]
=
{
'/'
,
'\0'
};
static
const
W
CHAR
sSlash
[]
=
{
'/'
,
'\0'
};
#endif
#endif
static
const
T
CHAR
sBackslash
[]
=
{
'\\'
,
'\0'
};
static
const
W
CHAR
sBackslash
[]
=
{
'\\'
,
'\0'
};
#ifdef _SHELL_FOLDERS
#ifdef _SHELL_FOLDERS
if
(
pidl
)
if
(
pidl
)
...
@@ -1348,10 +1348,10 @@ enum TYPE_FILTER {
...
@@ -1348,10 +1348,10 @@ enum TYPE_FILTER {
static
ChildWnd
*
alloc_child_window
(
LPCTSTR
path
,
LPITEMIDLIST
pidl
,
HWND
hwnd
)
static
ChildWnd
*
alloc_child_window
(
LPCTSTR
path
,
LPITEMIDLIST
pidl
,
HWND
hwnd
)
{
{
T
CHAR
drv
[
_MAX_DRIVE
+
1
],
dir
[
_MAX_DIR
],
name
[
_MAX_FNAME
],
ext
[
_MAX_EXT
];
W
CHAR
drv
[
_MAX_DRIVE
+
1
],
dir
[
_MAX_DIR
],
name
[
_MAX_FNAME
],
ext
[
_MAX_EXT
];
T
CHAR
dir_path
[
MAX_PATH
];
W
CHAR
dir_path
[
MAX_PATH
];
T
CHAR
b1
[
BUFFER_LEN
];
W
CHAR
b1
[
BUFFER_LEN
];
static
const
T
CHAR
sAsterics
[]
=
{
'*'
,
'\0'
};
static
const
W
CHAR
sAsterics
[]
=
{
'*'
,
'\0'
};
ChildWnd
*
child
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ChildWnd
));
ChildWnd
*
child
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ChildWnd
));
Root
*
root
=
&
child
->
root
;
Root
*
root
=
&
child
->
root
;
...
@@ -1468,8 +1468,8 @@ static void get_path(Entry* dir, PTSTR path)
...
@@ -1468,8 +1468,8 @@ static void get_path(Entry* dir, PTSTR path)
if
(
entry
->
up
)
{
if
(
entry
->
up
)
{
if
(
l
>
0
)
{
if
(
l
>
0
)
{
memmove
(
path
+
l
+
1
,
path
,
len
*
sizeof
(
T
CHAR
));
memmove
(
path
+
l
+
1
,
path
,
len
*
sizeof
(
W
CHAR
));
memcpy
(
path
+
1
,
name
,
l
*
sizeof
(
T
CHAR
));
memcpy
(
path
+
1
,
name
,
l
*
sizeof
(
W
CHAR
));
len
+=
l
+
1
;
len
+=
l
+
1
;
#ifndef _NO_EXTENSIONS
#ifndef _NO_EXTENSIONS
...
@@ -1482,8 +1482,8 @@ static void get_path(Entry* dir, PTSTR path)
...
@@ -1482,8 +1482,8 @@ static void get_path(Entry* dir, PTSTR path)
entry
=
entry
->
up
;
entry
=
entry
->
up
;
}
else
{
}
else
{
memmove
(
path
+
l
,
path
,
len
*
sizeof
(
T
CHAR
));
memmove
(
path
+
l
,
path
,
len
*
sizeof
(
W
CHAR
));
memcpy
(
path
,
name
,
l
*
sizeof
(
T
CHAR
));
memcpy
(
path
,
name
,
l
*
sizeof
(
W
CHAR
));
len
+=
l
;
len
+=
l
;
break
;
break
;
}
}
...
@@ -1690,7 +1690,7 @@ static HWND create_child_window(ChildWnd* child)
...
@@ -1690,7 +1690,7 @@ static HWND create_child_window(ChildWnd* child)
struct
ExecuteDialog
{
struct
ExecuteDialog
{
T
CHAR
cmd
[
MAX_PATH
];
W
CHAR
cmd
[
MAX_PATH
];
int
cmdshow
;
int
cmdshow
;
};
};
...
@@ -1722,7 +1722,7 @@ static INT_PTR CALLBACK ExecuteDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam
...
@@ -1722,7 +1722,7 @@ static INT_PTR CALLBACK ExecuteDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam
static
INT_PTR
CALLBACK
DestinationDlgProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
)
static
INT_PTR
CALLBACK
DestinationDlgProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
{
T
CHAR
b1
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
W
CHAR
b1
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
switch
(
nmsg
)
{
switch
(
nmsg
)
{
case
WM_INITDIALOG
:
case
WM_INITDIALOG
:
...
@@ -1758,7 +1758,7 @@ static INT_PTR CALLBACK DestinationDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam,
...
@@ -1758,7 +1758,7 @@ static INT_PTR CALLBACK DestinationDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam,
struct
FilterDialog
{
struct
FilterDialog
{
T
CHAR
pattern
[
MAX_PATH
];
W
CHAR
pattern
[
MAX_PATH
];
int
flags
;
int
flags
;
};
};
...
@@ -1805,7 +1805,7 @@ static INT_PTR CALLBACK FilterDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam,
...
@@ -1805,7 +1805,7 @@ static INT_PTR CALLBACK FilterDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam,
struct
PropertiesDialog
{
struct
PropertiesDialog
{
T
CHAR
path
[
MAX_PATH
];
W
CHAR
path
[
MAX_PATH
];
Entry
entry
;
Entry
entry
;
void
*
pVersionData
;
void
*
pVersionData
;
};
};
...
@@ -1846,9 +1846,9 @@ static void PropDlg_DisplayValue(HWND hlbox, HWND hedit)
...
@@ -1846,9 +1846,9 @@ static void PropDlg_DisplayValue(HWND hlbox, HWND hedit)
static
void
CheckForFileInfo
(
struct
PropertiesDialog
*
dlg
,
HWND
hwnd
,
LPCTSTR
strFilename
)
static
void
CheckForFileInfo
(
struct
PropertiesDialog
*
dlg
,
HWND
hwnd
,
LPCTSTR
strFilename
)
{
{
static
T
CHAR
sBackSlash
[]
=
{
'\\'
,
'\0'
};
static
W
CHAR
sBackSlash
[]
=
{
'\\'
,
'\0'
};
static
T
CHAR
sTranslation
[]
=
{
'\\'
,
'V'
,
'a'
,
'r'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
'T'
,
'r'
,
'a'
,
'n'
,
's'
,
'l'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'\0'
};
static
W
CHAR
sTranslation
[]
=
{
'\\'
,
'V'
,
'a'
,
'r'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
'T'
,
'r'
,
'a'
,
'n'
,
's'
,
'l'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'\0'
};
static
T
CHAR
sStringFileInfo
[]
=
{
'\\'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
static
W
CHAR
sStringFileInfo
[]
=
{
'\\'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
'%'
,
'0'
,
'4'
,
'x'
,
'%'
,
'0'
,
'4'
,
'x'
,
'\\'
,
'%'
,
's'
,
'\0'
};
'%'
,
'0'
,
'4'
,
'x'
,
'%'
,
'0'
,
'4'
,
'x'
,
'\\'
,
'%'
,
's'
,
'\0'
};
DWORD
dwVersionDataLen
=
GetFileVersionInfoSizeW
(
strFilename
,
NULL
);
DWORD
dwVersionDataLen
=
GetFileVersionInfoSizeW
(
strFilename
,
NULL
);
...
@@ -1884,8 +1884,8 @@ static void CheckForFileInfo(struct PropertiesDialog* dlg, HWND hwnd, LPCTSTR st
...
@@ -1884,8 +1884,8 @@ static void CheckForFileInfo(struct PropertiesDialog* dlg, HWND hwnd, LPCTSTR st
LPCSTR
*
p
;
LPCSTR
*
p
;
for
(
p
=
InfoStrings
;
*
p
;
++
p
)
{
for
(
p
=
InfoStrings
;
*
p
;
++
p
)
{
T
CHAR
subblock
[
200
];
W
CHAR
subblock
[
200
];
T
CHAR
infoStr
[
100
];
W
CHAR
infoStr
[
100
];
LPCTSTR
pTxt
;
LPCTSTR
pTxt
;
UINT
nValLen
;
UINT
nValLen
;
...
@@ -1915,8 +1915,8 @@ static INT_PTR CALLBACK PropertiesDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wpa
...
@@ -1915,8 +1915,8 @@ static INT_PTR CALLBACK PropertiesDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wpa
switch
(
nmsg
)
{
switch
(
nmsg
)
{
case
WM_INITDIALOG
:
{
case
WM_INITDIALOG
:
{
static
const
T
CHAR
sByteFmt
[]
=
{
'%'
,
's'
,
' '
,
'B'
,
'y'
,
't'
,
'e'
,
's'
,
'\0'
};
static
const
W
CHAR
sByteFmt
[]
=
{
'%'
,
's'
,
' '
,
'B'
,
'y'
,
't'
,
'e'
,
's'
,
'\0'
};
T
CHAR
b1
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
W
CHAR
b1
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
LPWIN32_FIND_DATA
pWFD
;
LPWIN32_FIND_DATA
pWFD
;
dlg
=
(
struct
PropertiesDialog
*
)
lparam
;
dlg
=
(
struct
PropertiesDialog
*
)
lparam
;
...
@@ -2098,7 +2098,7 @@ static void toggle_child(HWND hwnd, UINT cmd, HWND hchild)
...
@@ -2098,7 +2098,7 @@ static void toggle_child(HWND hwnd, UINT cmd, HWND hchild)
static
BOOL
activate_drive_window
(
LPCTSTR
path
)
static
BOOL
activate_drive_window
(
LPCTSTR
path
)
{
{
T
CHAR
drv1
[
_MAX_DRIVE
],
drv2
[
_MAX_DRIVE
];
W
CHAR
drv1
[
_MAX_DRIVE
],
drv2
[
_MAX_DRIVE
];
HWND
child_wnd
;
HWND
child_wnd
;
_wsplitpath
(
path
,
drv1
,
0
,
0
,
0
);
_wsplitpath
(
path
,
drv1
,
0
,
0
,
0
);
...
@@ -2149,7 +2149,7 @@ static BOOL activate_fs_window(LPCTSTR filesys)
...
@@ -2149,7 +2149,7 @@ static BOOL activate_fs_window(LPCTSTR filesys)
static
LRESULT
CALLBACK
FrameWndProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
)
static
LRESULT
CALLBACK
FrameWndProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
{
T
CHAR
b1
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
W
CHAR
b1
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
switch
(
nmsg
)
{
switch
(
nmsg
)
{
case
WM_CLOSE
:
case
WM_CLOSE
:
...
@@ -2186,7 +2186,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -2186,7 +2186,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
break
;
break
;
if
(
cmd
>=
ID_DRIVE_FIRST
&&
cmd
<=
ID_DRIVE_FIRST
+
0xFF
)
{
if
(
cmd
>=
ID_DRIVE_FIRST
&&
cmd
<=
ID_DRIVE_FIRST
+
0xFF
)
{
T
CHAR
drv
[
_MAX_DRIVE
],
path
[
MAX_PATH
];
W
CHAR
drv
[
_MAX_DRIVE
],
path
[
MAX_PATH
];
ChildWnd
*
child
;
ChildWnd
*
child
;
LPCTSTR
root
=
Globals
.
drives
;
LPCTSTR
root
=
Globals
.
drives
;
int
i
;
int
i
;
...
@@ -2216,7 +2216,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -2216,7 +2216,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
break
;
break
;
case
ID_WINDOW_NEW
:
{
case
ID_WINDOW_NEW
:
{
T
CHAR
path
[
MAX_PATH
];
W
CHAR
path
[
MAX_PATH
];
ChildWnd
*
child
;
ChildWnd
*
child
;
GetCurrentDirectoryW
(
MAX_PATH
,
path
);
GetCurrentDirectoryW
(
MAX_PATH
,
path
);
...
@@ -2323,7 +2323,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -2323,7 +2323,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
#ifdef __WINE__
#ifdef __WINE__
case
ID_DRIVE_UNIX_FS
:
{
case
ID_DRIVE_UNIX_FS
:
{
T
CHAR
path
[
MAX_PATH
];
W
CHAR
path
[
MAX_PATH
];
char
cpath
[
MAX_PATH
];
char
cpath
[
MAX_PATH
];
ChildWnd
*
child
;
ChildWnd
*
child
;
...
@@ -2340,7 +2340,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -2340,7 +2340,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
#endif
#endif
#ifdef _SHELL_FOLDERS
#ifdef _SHELL_FOLDERS
case
ID_DRIVE_SHELL_NS
:
{
case
ID_DRIVE_SHELL_NS
:
{
T
CHAR
path
[
MAX_PATH
];
W
CHAR
path
[
MAX_PATH
];
ChildWnd
*
child
;
ChildWnd
*
child
;
if
(
activate_fs_window
(
RS
(
b1
,
IDS_SHELL
)))
if
(
activate_fs_window
(
RS
(
b1
,
IDS_SHELL
)))
...
@@ -2403,7 +2403,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -2403,7 +2403,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
}
}
static
T
CHAR
g_pos_names
[
COLUMNS
][
20
]
=
{
static
W
CHAR
g_pos_names
[
COLUMNS
][
20
]
=
{
{
'\0'
}
/* symbol */
{
'\0'
}
/* symbol */
};
};
...
@@ -2686,7 +2686,7 @@ static BOOL pattern_match(LPCTSTR str, LPCTSTR pattern)
...
@@ -2686,7 +2686,7 @@ static BOOL pattern_match(LPCTSTR str, LPCTSTR pattern)
static
BOOL
pattern_imatch
(
LPCTSTR
str
,
LPCTSTR
pattern
)
static
BOOL
pattern_imatch
(
LPCTSTR
str
,
LPCTSTR
pattern
)
{
{
T
CHAR
b1
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
W
CHAR
b1
[
BUFFER_LEN
],
b2
[
BUFFER_LEN
];
lstrcpyW
(
b1
,
str
);
lstrcpyW
(
b1
,
str
);
lstrcpyW
(
b2
,
pattern
);
lstrcpyW
(
b2
,
pattern
);
...
@@ -2782,10 +2782,10 @@ static int insert_entries(Pane* pane, Entry* dir, LPCTSTR pattern, int filter_fl
...
@@ -2782,10 +2782,10 @@ static int insert_entries(Pane* pane, Entry* dir, LPCTSTR pattern, int filter_fl
static
void
format_bytes
(
LPTSTR
buffer
,
LONGLONG
bytes
)
static
void
format_bytes
(
LPTSTR
buffer
,
LONGLONG
bytes
)
{
{
static
const
T
CHAR
sFmtGB
[]
=
{
'%'
,
'.'
,
'1'
,
'f'
,
' '
,
'G'
,
'B'
,
'\0'
};
static
const
W
CHAR
sFmtGB
[]
=
{
'%'
,
'.'
,
'1'
,
'f'
,
' '
,
'G'
,
'B'
,
'\0'
};
static
const
T
CHAR
sFmtMB
[]
=
{
'%'
,
'.'
,
'1'
,
'f'
,
' '
,
'M'
,
'B'
,
'\0'
};
static
const
W
CHAR
sFmtMB
[]
=
{
'%'
,
'.'
,
'1'
,
'f'
,
' '
,
'M'
,
'B'
,
'\0'
};
static
const
T
CHAR
sFmtkB
[]
=
{
'%'
,
'.'
,
'1'
,
'f'
,
' '
,
'k'
,
'B'
,
'\0'
};
static
const
W
CHAR
sFmtkB
[]
=
{
'%'
,
'.'
,
'1'
,
'f'
,
' '
,
'k'
,
'B'
,
'\0'
};
static
const
T
CHAR
sFmtB
[]
=
{
'%'
,
'u'
,
0
};
static
const
W
CHAR
sFmtB
[]
=
{
'%'
,
'u'
,
0
};
float
fBytes
=
(
float
)
bytes
;
float
fBytes
=
(
float
)
bytes
;
...
@@ -2802,7 +2802,7 @@ static void format_bytes(LPTSTR buffer, LONGLONG bytes)
...
@@ -2802,7 +2802,7 @@ static void format_bytes(LPTSTR buffer, LONGLONG bytes)
static
void
set_space_status
(
void
)
static
void
set_space_status
(
void
)
{
{
ULARGE_INTEGER
ulFreeBytesToCaller
,
ulTotalBytes
,
ulFreeBytes
;
ULARGE_INTEGER
ulFreeBytesToCaller
,
ulTotalBytes
,
ulFreeBytes
;
T
CHAR
fmt
[
64
],
b1
[
64
],
b2
[
64
],
buffer
[
BUFFER_LEN
];
W
CHAR
fmt
[
64
],
b1
[
64
],
b2
[
64
],
buffer
[
BUFFER_LEN
];
if
(
GetDiskFreeSpaceExW
(
NULL
,
&
ulFreeBytesToCaller
,
&
ulTotalBytes
,
&
ulFreeBytes
))
{
if
(
GetDiskFreeSpaceExW
(
NULL
,
&
ulFreeBytesToCaller
,
&
ulTotalBytes
,
&
ulFreeBytes
))
{
format_bytes
(
b1
,
ulFreeBytesToCaller
.
QuadPart
);
format_bytes
(
b1
,
ulFreeBytesToCaller
.
QuadPart
);
...
@@ -2819,7 +2819,7 @@ static WNDPROC g_orgTreeWndProc;
...
@@ -2819,7 +2819,7 @@ static WNDPROC g_orgTreeWndProc;
static
void
create_tree_window
(
HWND
parent
,
Pane
*
pane
,
UINT
id
,
UINT
id_header
,
LPCTSTR
pattern
,
int
filter_flags
)
static
void
create_tree_window
(
HWND
parent
,
Pane
*
pane
,
UINT
id
,
UINT
id_header
,
LPCTSTR
pattern
,
int
filter_flags
)
{
{
static
const
T
CHAR
sListBox
[]
=
{
'L'
,
'i'
,
's'
,
't'
,
'B'
,
'o'
,
'x'
,
'\0'
};
static
const
W
CHAR
sListBox
[]
=
{
'L'
,
'i'
,
's'
,
't'
,
'B'
,
'o'
,
'x'
,
'\0'
};
static
int
s_init
=
0
;
static
int
s_init
=
0
;
Entry
*
entry
=
pane
->
root
;
Entry
*
entry
=
pane
->
root
;
...
@@ -2858,7 +2858,7 @@ static void InitChildWindow(ChildWnd* child)
...
@@ -2858,7 +2858,7 @@ static void InitChildWindow(ChildWnd* child)
}
}
static
void
format_date
(
const
FILETIME
*
ft
,
T
CHAR
*
buffer
,
int
visible_cols
)
static
void
format_date
(
const
FILETIME
*
ft
,
W
CHAR
*
buffer
,
int
visible_cols
)
{
{
SYSTEMTIME
systime
;
SYSTEMTIME
systime
;
FILETIME
lft
;
FILETIME
lft
;
...
@@ -2952,7 +2952,7 @@ static void output_number(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str
...
@@ -2952,7 +2952,7 @@ static void output_number(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str
int
x
=
dis
->
rcItem
.
left
;
int
x
=
dis
->
rcItem
.
left
;
RECT
rt
;
RECT
rt
;
LPCTSTR
s
=
str
;
LPCTSTR
s
=
str
;
T
CHAR
b
[
128
];
W
CHAR
b
[
128
];
LPTSTR
d
=
b
;
LPTSTR
d
=
b
;
int
pos
;
int
pos
;
...
@@ -2981,7 +2981,7 @@ static void output_number(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str
...
@@ -2981,7 +2981,7 @@ static void output_number(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str
static
BOOL
is_exe_file
(
LPCTSTR
ext
)
static
BOOL
is_exe_file
(
LPCTSTR
ext
)
{
{
static
const
T
CHAR
executable_extensions
[][
4
]
=
{
static
const
W
CHAR
executable_extensions
[][
4
]
=
{
{
'C'
,
'O'
,
'M'
,
'\0'
},
{
'C'
,
'O'
,
'M'
,
'\0'
},
{
'E'
,
'X'
,
'E'
,
'\0'
},
{
'E'
,
'X'
,
'E'
,
'\0'
},
{
'B'
,
'A'
,
'T'
,
'\0'
},
{
'B'
,
'A'
,
'T'
,
'\0'
},
...
@@ -2994,8 +2994,8 @@ static BOOL is_exe_file(LPCTSTR ext)
...
@@ -2994,8 +2994,8 @@ static BOOL is_exe_file(LPCTSTR ext)
{
'\0'
}
{
'\0'
}
};
};
T
CHAR
ext_buffer
[
_MAX_EXT
];
W
CHAR
ext_buffer
[
_MAX_EXT
];
const
T
CHAR
(
*
p
)[
4
];
const
W
CHAR
(
*
p
)[
4
];
LPCTSTR
s
;
LPCTSTR
s
;
LPTSTR
d
;
LPTSTR
d
;
...
@@ -3035,7 +3035,7 @@ static enum FILE_TYPE get_file_type(LPCTSTR filename)
...
@@ -3035,7 +3035,7 @@ static enum FILE_TYPE get_file_type(LPCTSTR filename)
static
void
draw_item
(
Pane
*
pane
,
LPDRAWITEMSTRUCT
dis
,
Entry
*
entry
,
int
calcWidthCol
)
static
void
draw_item
(
Pane
*
pane
,
LPDRAWITEMSTRUCT
dis
,
Entry
*
entry
,
int
calcWidthCol
)
{
{
T
CHAR
buffer
[
BUFFER_LEN
];
W
CHAR
buffer
[
BUFFER_LEN
];
DWORD
attrs
;
DWORD
attrs
;
int
visible_cols
=
pane
->
visible_cols
;
int
visible_cols
=
pane
->
visible_cols
;
COLORREF
bkcolor
,
textcolor
;
COLORREF
bkcolor
,
textcolor
;
...
@@ -3273,8 +3273,8 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
...
@@ -3273,8 +3273,8 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
#ifndef _NO_EXTENSIONS
#ifndef _NO_EXTENSIONS
if
(
entry
->
bhfi_valid
)
{
if
(
entry
->
bhfi_valid
)
{
if
(
visible_cols
&
COL_INDEX
)
{
if
(
visible_cols
&
COL_INDEX
)
{
static
const
T
CHAR
fmtlow
[]
=
{
'%'
,
'X'
,
0
};
static
const
W
CHAR
fmtlow
[]
=
{
'%'
,
'X'
,
0
};
static
const
T
CHAR
fmthigh
[]
=
{
'%'
,
'X'
,
'%'
,
'0'
,
'8'
,
'X'
,
0
};
static
const
W
CHAR
fmthigh
[]
=
{
'%'
,
'X'
,
'%'
,
'0'
,
'8'
,
'X'
,
0
};
if
(
entry
->
bhfi
.
nFileIndexHigh
)
if
(
entry
->
bhfi
.
nFileIndexHigh
)
wsprintfW
(
buffer
,
fmthigh
,
wsprintfW
(
buffer
,
fmthigh
,
...
@@ -3307,10 +3307,10 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
...
@@ -3307,10 +3307,10 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
/* show file attributes */
/* show file attributes */
if
(
visible_cols
&
COL_ATTRIBUTES
)
{
if
(
visible_cols
&
COL_ATTRIBUTES
)
{
#ifdef _NO_EXTENSIONS
#ifdef _NO_EXTENSIONS
static
const
T
CHAR
s4Tabs
[]
=
{
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\0'
};
static
const
W
CHAR
s4Tabs
[]
=
{
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\0'
};
lstrcpyW
(
buffer
,
s4Tabs
);
lstrcpyW
(
buffer
,
s4Tabs
);
#else
#else
static
const
T
CHAR
s11Tabs
[]
=
{
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\0'
};
static
const
W
CHAR
s11Tabs
[]
=
{
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\t'
,
' '
,
'\0'
};
lstrcpyW
(
buffer
,
s11Tabs
);
lstrcpyW
(
buffer
,
s11Tabs
);
#endif
#endif
...
@@ -3342,7 +3342,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
...
@@ -3342,7 +3342,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
/*TODO
/*TODO
if (flags.security) {
if (flags.security) {
static const
T
CHAR sSecTabs[] = {
static const
W
CHAR sSecTabs[] = {
' ','\t',' ','\t',' ','\t',' ',
' ','\t',' ','\t',' ','\t',' ',
' ','\t',' ',
' ','\t',' ',
' ','\t',' ','\t',' ','\t',' ',
' ','\t',' ','\t',' ','\t',' ',
...
@@ -3527,7 +3527,7 @@ static LRESULT pane_notify(Pane* pane, NMHDR* pnmh)
...
@@ -3527,7 +3527,7 @@ static LRESULT pane_notify(Pane* pane, NMHDR* pnmh)
static
void
scan_entry
(
ChildWnd
*
child
,
Entry
*
entry
,
int
idx
,
HWND
hwnd
)
static
void
scan_entry
(
ChildWnd
*
child
,
Entry
*
entry
,
int
idx
,
HWND
hwnd
)
{
{
T
CHAR
path
[
MAX_PATH
];
W
CHAR
path
[
MAX_PATH
];
HCURSOR
old_cursor
=
SetCursor
(
LoadCursorW
(
0
,
(
LPCWSTR
)
IDC_WAIT
));
HCURSOR
old_cursor
=
SetCursor
(
LoadCursorW
(
0
,
(
LPCWSTR
)
IDC_WAIT
));
/* delete sub entries in left pane */
/* delete sub entries in left pane */
...
@@ -3654,7 +3654,7 @@ static void refresh_right_pane(ChildWnd* child)
...
@@ -3654,7 +3654,7 @@ static void refresh_right_pane(ChildWnd* child)
static
void
set_curdir
(
ChildWnd
*
child
,
Entry
*
entry
,
int
idx
,
HWND
hwnd
)
static
void
set_curdir
(
ChildWnd
*
child
,
Entry
*
entry
,
int
idx
,
HWND
hwnd
)
{
{
T
CHAR
path
[
MAX_PATH
];
W
CHAR
path
[
MAX_PATH
];
if
(
!
entry
)
if
(
!
entry
)
return
;
return
;
...
@@ -3685,7 +3685,7 @@ static void set_curdir(ChildWnd* child, Entry* entry, int idx, HWND hwnd)
...
@@ -3685,7 +3685,7 @@ static void set_curdir(ChildWnd* child, Entry* entry, int idx, HWND hwnd)
static
void
refresh_child
(
ChildWnd
*
child
)
static
void
refresh_child
(
ChildWnd
*
child
)
{
{
T
CHAR
path
[
MAX_PATH
],
drv
[
_MAX_DRIVE
+
1
];
W
CHAR
path
[
MAX_PATH
],
drv
[
_MAX_DRIVE
+
1
];
Entry
*
entry
;
Entry
*
entry
;
int
idx
;
int
idx
;
...
@@ -3726,7 +3726,7 @@ static void create_drive_bar(void)
...
@@ -3726,7 +3726,7 @@ static void create_drive_bar(void)
{
{
TBBUTTON
drivebarBtn
=
{
0
,
0
,
TBSTATE_ENABLED
,
BTNS_BUTTON
,
{
0
,
0
},
0
,
0
};
TBBUTTON
drivebarBtn
=
{
0
,
0
,
TBSTATE_ENABLED
,
BTNS_BUTTON
,
{
0
,
0
},
0
,
0
};
#ifndef _NO_EXTENSIONS
#ifndef _NO_EXTENSIONS
T
CHAR
b1
[
BUFFER_LEN
];
W
CHAR
b1
[
BUFFER_LEN
];
#endif
#endif
int
btn
=
1
;
int
btn
=
1
;
PTSTR
p
;
PTSTR
p
;
...
@@ -3769,7 +3769,7 @@ static void create_drive_bar(void)
...
@@ -3769,7 +3769,7 @@ static void create_drive_bar(void)
for
(
p
=
Globals
.
drives
;
*
p
;
)
{
for
(
p
=
Globals
.
drives
;
*
p
;
)
{
#ifdef _NO_EXTENSIONS
#ifdef _NO_EXTENSIONS
/* insert drive letter */
/* insert drive letter */
T
CHAR
b
[
3
]
=
{
tolower
(
*
p
)};
W
CHAR
b
[
3
]
=
{
tolower
(
*
p
)};
SendMessageW
(
Globals
.
hdrivebar
,
TB_ADDSTRINGW
,
0
,
(
LPARAM
)
b
);
SendMessageW
(
Globals
.
hdrivebar
,
TB_ADDSTRINGW
,
0
,
(
LPARAM
)
b
);
#endif
#endif
switch
(
GetDriveTypeW
(
p
))
{
switch
(
GetDriveTypeW
(
p
))
{
...
@@ -3820,7 +3820,7 @@ static BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow)
...
@@ -3820,7 +3820,7 @@ static BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow)
static
BOOL
launch_entry
(
Entry
*
entry
,
HWND
hwnd
,
UINT
nCmdShow
)
static
BOOL
launch_entry
(
Entry
*
entry
,
HWND
hwnd
,
UINT
nCmdShow
)
{
{
T
CHAR
cmd
[
MAX_PATH
];
W
CHAR
cmd
[
MAX_PATH
];
#ifdef _SHELL_FOLDERS
#ifdef _SHELL_FOLDERS
if
(
entry
->
etype
==
ET_SHELL
)
{
if
(
entry
->
etype
==
ET_SHELL
)
{
...
@@ -3990,7 +3990,7 @@ static BOOL is_directory(LPCTSTR target)
...
@@ -3990,7 +3990,7 @@ static BOOL is_directory(LPCTSTR target)
static
BOOL
prompt_target
(
Pane
*
pane
,
LPTSTR
source
,
LPTSTR
target
)
static
BOOL
prompt_target
(
Pane
*
pane
,
LPTSTR
source
,
LPTSTR
target
)
{
{
T
CHAR
path
[
MAX_PATH
];
W
CHAR
path
[
MAX_PATH
];
int
len
;
int
len
;
get_path
(
pane
->
cur
,
path
);
get_path
(
pane
->
cur
,
path
);
...
@@ -4014,8 +4014,8 @@ static BOOL prompt_target(Pane* pane, LPTSTR source, LPTSTR target)
...
@@ -4014,8 +4014,8 @@ static BOOL prompt_target(Pane* pane, LPTSTR source, LPTSTR target)
/* If the target already exists as directory, create a new target below this. */
/* If the target already exists as directory, create a new target below this. */
if
(
is_directory
(
path
))
{
if
(
is_directory
(
path
))
{
T
CHAR
fname
[
_MAX_FNAME
],
ext
[
_MAX_EXT
];
W
CHAR
fname
[
_MAX_FNAME
],
ext
[
_MAX_EXT
];
static
const
T
CHAR
sAppend
[]
=
{
'%'
,
's'
,
'/'
,
'%'
,
's'
,
'%'
,
's'
,
'\0'
};
static
const
W
CHAR
sAppend
[]
=
{
'%'
,
's'
,
'/'
,
'%'
,
's'
,
'%'
,
's'
,
'\0'
};
_wsplitpath
(
source
,
NULL
,
NULL
,
fname
,
ext
);
_wsplitpath
(
source
,
NULL
,
NULL
,
fname
,
ext
);
...
@@ -4305,7 +4305,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -4305,7 +4305,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
break
;
break
;
case
ID_FILE_MOVE
:
{
case
ID_FILE_MOVE
:
{
T
CHAR
source
[
BUFFER_LEN
],
target
[
BUFFER_LEN
];
W
CHAR
source
[
BUFFER_LEN
],
target
[
BUFFER_LEN
];
if
(
prompt_target
(
pane
,
source
,
target
))
{
if
(
prompt_target
(
pane
,
source
,
target
))
{
SHFILEOPSTRUCT
shfo
=
{
hwnd
,
FO_MOVE
,
source
,
target
};
SHFILEOPSTRUCT
shfo
=
{
hwnd
,
FO_MOVE
,
source
,
target
};
...
@@ -4319,7 +4319,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -4319,7 +4319,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
break
;}
break
;}
case
ID_FILE_COPY
:
{
case
ID_FILE_COPY
:
{
T
CHAR
source
[
BUFFER_LEN
],
target
[
BUFFER_LEN
];
W
CHAR
source
[
BUFFER_LEN
],
target
[
BUFFER_LEN
];
if
(
prompt_target
(
pane
,
source
,
target
))
{
if
(
prompt_target
(
pane
,
source
,
target
))
{
SHFILEOPSTRUCT
shfo
=
{
hwnd
,
FO_COPY
,
source
,
target
};
SHFILEOPSTRUCT
shfo
=
{
hwnd
,
FO_COPY
,
source
,
target
};
...
@@ -4333,7 +4333,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -4333,7 +4333,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
break
;}
break
;}
case
ID_FILE_DELETE
:
{
case
ID_FILE_DELETE
:
{
T
CHAR
path
[
BUFFER_LEN
];
W
CHAR
path
[
BUFFER_LEN
];
SHFILEOPSTRUCT
shfo
=
{
hwnd
,
FO_DELETE
,
path
,
NULL
,
FOF_ALLOWUNDO
};
SHFILEOPSTRUCT
shfo
=
{
hwnd
,
FO_DELETE
,
path
,
NULL
,
FOF_ALLOWUNDO
};
get_path
(
pane
->
cur
,
path
);
get_path
(
pane
->
cur
,
path
);
...
@@ -4530,7 +4530,7 @@ static LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -4530,7 +4530,7 @@ static LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
static
void
InitInstance
(
HINSTANCE
hinstance
)
static
void
InitInstance
(
HINSTANCE
hinstance
)
{
{
static
const
T
CHAR
sFont
[]
=
{
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
' '
,
'S'
,
'a'
,
'n'
,
's'
,
' '
,
'S'
,
'e'
,
'r'
,
'i'
,
'f'
,
'\0'
};
static
const
W
CHAR
sFont
[]
=
{
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
' '
,
'S'
,
'a'
,
'n'
,
's'
,
' '
,
'S'
,
'e'
,
'r'
,
'i'
,
'f'
,
'\0'
};
WNDCLASSEX
wcFrame
;
WNDCLASSEX
wcFrame
;
WNDCLASS
wcChild
;
WNDCLASS
wcChild
;
...
@@ -4619,9 +4619,9 @@ static void InitInstance(HINSTANCE hinstance)
...
@@ -4619,9 +4619,9 @@ static void InitInstance(HINSTANCE hinstance)
static
BOOL
show_frame
(
HWND
hwndParent
,
int
cmdshow
,
LPCTSTR
path
)
static
BOOL
show_frame
(
HWND
hwndParent
,
int
cmdshow
,
LPCTSTR
path
)
{
{
static
const
T
CHAR
sMDICLIENT
[]
=
{
'M'
,
'D'
,
'I'
,
'C'
,
'L'
,
'I'
,
'E'
,
'N'
,
'T'
,
'\0'
};
static
const
W
CHAR
sMDICLIENT
[]
=
{
'M'
,
'D'
,
'I'
,
'C'
,
'L'
,
'I'
,
'E'
,
'N'
,
'T'
,
'\0'
};
T
CHAR
buffer
[
MAX_PATH
],
b1
[
BUFFER_LEN
];
W
CHAR
buffer
[
MAX_PATH
],
b1
[
BUFFER_LEN
];
ChildWnd
*
child
;
ChildWnd
*
child
;
HMENU
hMenuFrame
,
hMenuWindow
;
HMENU
hMenuFrame
,
hMenuWindow
;
windowOptions
opts
;
windowOptions
opts
;
...
@@ -4723,8 +4723,8 @@ static BOOL show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
...
@@ -4723,8 +4723,8 @@ static BOOL show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
if
(
child
->
hwnd
&&
path
&&
path
[
0
])
if
(
child
->
hwnd
&&
path
&&
path
[
0
])
{
{
int
index
,
count
;
int
index
,
count
;
T
CHAR
drv
[
_MAX_DRIVE
+
1
],
dir
[
_MAX_DIR
],
name
[
_MAX_FNAME
],
ext
[
_MAX_EXT
];
W
CHAR
drv
[
_MAX_DRIVE
+
1
],
dir
[
_MAX_DIR
],
name
[
_MAX_FNAME
],
ext
[
_MAX_EXT
];
T
CHAR
fullname
[
_MAX_FNAME
+
_MAX_EXT
+
1
];
W
CHAR
fullname
[
_MAX_FNAME
+
_MAX_EXT
+
1
];
memset
(
name
,
0
,
sizeof
(
name
));
memset
(
name
,
0
,
sizeof
(
name
));
memset
(
name
,
0
,
sizeof
(
ext
));
memset
(
name
,
0
,
sizeof
(
ext
));
...
@@ -4771,7 +4771,7 @@ static int g_foundPrevInstance = 0;
...
@@ -4771,7 +4771,7 @@ static int g_foundPrevInstance = 0;
static
BOOL
CALLBACK
EnumWndProc
(
HWND
hwnd
,
LPARAM
lparam
)
static
BOOL
CALLBACK
EnumWndProc
(
HWND
hwnd
,
LPARAM
lparam
)
{
{
T
CHAR
cls
[
128
];
W
CHAR
cls
[
128
];
GetClassName
(
hwnd
,
cls
,
128
);
GetClassName
(
hwnd
,
cls
,
128
);
...
@@ -4837,7 +4837,7 @@ int APIENTRY WinMain(HINSTANCE hinstance, HINSTANCE previnstance, LPSTR cmdline,
...
@@ -4837,7 +4837,7 @@ int APIENTRY WinMain(HINSTANCE hinstance, HINSTANCE previnstance, LPSTR cmdline,
#endif
#endif
{
/* convert ANSI cmdline into WCS path string */
{
/* convert ANSI cmdline into WCS path string */
T
CHAR
buffer
[
MAX_PATH
];
W
CHAR
buffer
[
MAX_PATH
];
MultiByteToWideChar
(
CP_ACP
,
0
,
cmdline
,
-
1
,
buffer
,
MAX_PATH
);
MultiByteToWideChar
(
CP_ACP
,
0
,
cmdline
,
-
1
,
buffer
,
MAX_PATH
);
winefile_main
(
hinstance
,
cmdshow
,
buffer
);
winefile_main
(
hinstance
,
cmdshow
,
buffer
);
}
}
...
...
programs/winefile/winefile.h
View file @
21049ffb
...
@@ -128,11 +128,11 @@ typedef struct
...
@@ -128,11 +128,11 @@ typedef struct
HWND
hdrivebar
;
HWND
hdrivebar
;
HFONT
hfont
;
HFONT
hfont
;
T
CHAR
num_sep
;
W
CHAR
num_sep
;
SIZE
spaceSize
;
SIZE
spaceSize
;
HIMAGELIST
himl
;
HIMAGELIST
himl
;
T
CHAR
drives
[
BUFFER_LEN
];
W
CHAR
drives
[
BUFFER_LEN
];
BOOL
prescan_node
;
/*TODO*/
BOOL
prescan_node
;
/*TODO*/
BOOL
saveSettings
;
BOOL
saveSettings
;
...
...
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