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
36d32df5
Commit
36d32df5
authored
Nov 01, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Nov 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Constify some variables.
parent
4c516e63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
25 deletions
+26
-25
shlfileop.c
dlls/shell32/shlfileop.c
+26
-25
No files found.
dlls/shell32/shlfileop.c
View file @
36d32df5
...
...
@@ -931,10 +931,10 @@ static inline void grow_list(FILE_LIST *list)
/* adds a file to the FILE_ENTRY struct
*/
static
void
add_file_to_entry
(
FILE_ENTRY
*
feFile
,
LPWSTR
szFile
)
static
void
add_file_to_entry
(
FILE_ENTRY
*
feFile
,
LP
C
WSTR
szFile
)
{
DWORD
dwLen
=
lstrlenW
(
szFile
)
+
1
;
LPWSTR
ptr
;
LP
C
WSTR
ptr
;
feFile
->
szFullPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwLen
*
sizeof
(
WCHAR
));
lstrcpyW
(
feFile
->
szFullPath
,
szFile
);
...
...
@@ -953,9 +953,10 @@ static void add_file_to_entry(FILE_ENTRY *feFile, LPWSTR szFile)
feFile
->
bFromWildcard
=
FALSE
;
}
static
LPWSTR
wildcard_to_file
(
LP
WSTR
szWildCard
,
LP
WSTR
szFileName
)
static
LPWSTR
wildcard_to_file
(
LP
CWSTR
szWildCard
,
LPC
WSTR
szFileName
)
{
LPWSTR
szFullPath
,
ptr
;
LPCWSTR
ptr
;
LPWSTR
szFullPath
;
DWORD
dwDirLen
,
dwFullLen
;
ptr
=
StrRChrW
(
szWildCard
,
NULL
,
'\\'
);
...
...
@@ -970,7 +971,7 @@ static LPWSTR wildcard_to_file(LPWSTR szWildCard, LPWSTR szFileName)
return
szFullPath
;
}
static
void
parse_wildcard_files
(
FILE_LIST
*
flList
,
LPWSTR
szFile
,
LPDWORD
pdwListIndex
)
static
void
parse_wildcard_files
(
FILE_LIST
*
flList
,
LP
C
WSTR
szFile
,
LPDWORD
pdwListIndex
)
{
WIN32_FIND_DATAW
wfd
;
HANDLE
hFile
=
FindFirstFileW
(
szFile
,
&
wfd
);
...
...
@@ -1080,7 +1081,7 @@ static void destroy_file_list(FILE_LIST *flList)
HeapFree
(
GetProcessHeap
(),
0
,
flList
->
feFiles
);
}
static
void
copy_dir_to_dir
(
FILE_OPERATION
*
op
,
FILE_ENTRY
*
feFrom
,
LP
WSTR
szDestPath
)
static
void
copy_dir_to_dir
(
FILE_OPERATION
*
op
,
const
FILE_ENTRY
*
feFrom
,
LPC
WSTR
szDestPath
)
{
WCHAR
szFrom
[
MAX_PATH
],
szTo
[
MAX_PATH
];
SHFILEOPSTRUCTW
fileOp
;
...
...
@@ -1124,7 +1125,7 @@ static void copy_dir_to_dir(FILE_OPERATION *op, FILE_ENTRY *feFrom, LPWSTR szDes
SHFileOperationW
(
&
fileOp
);
}
static
BOOL
copy_file_to_file
(
FILE_OPERATION
*
op
,
WCHAR
*
szFrom
,
WCHAR
*
szTo
)
static
BOOL
copy_file_to_file
(
FILE_OPERATION
*
op
,
const
WCHAR
*
szFrom
,
const
WCHAR
*
szTo
)
{
if
(
!
(
op
->
req
->
fFlags
&
FOF_NOCONFIRMATION
)
&&
PathFileExistsW
(
szTo
))
{
...
...
@@ -1136,7 +1137,7 @@ static BOOL copy_file_to_file(FILE_OPERATION *op, WCHAR *szFrom, WCHAR *szTo)
}
/* copy a file or directory to another directory */
static
void
copy_to_dir
(
FILE_OPERATION
*
op
,
FILE_ENTRY
*
feFrom
,
FILE_ENTRY
*
feTo
)
static
void
copy_to_dir
(
FILE_OPERATION
*
op
,
const
FILE_ENTRY
*
feFrom
,
const
FILE_ENTRY
*
feTo
)
{
if
(
!
PathFileExistsW
(
feTo
->
szFullPath
))
SHNotifyCreateDirectoryW
(
feTo
->
szFullPath
,
NULL
);
...
...
@@ -1152,10 +1153,10 @@ static void copy_to_dir(FILE_OPERATION *op, FILE_ENTRY *feFrom, FILE_ENTRY *feTo
copy_dir_to_dir
(
op
,
feFrom
,
feTo
->
szFullPath
);
}
static
void
create_dest_dirs
(
LPWSTR
szDestDir
)
static
void
create_dest_dirs
(
LP
C
WSTR
szDestDir
)
{
WCHAR
dir
[
MAX_PATH
];
LPWSTR
ptr
=
StrChrW
(
szDestDir
,
'\\'
);
LP
C
WSTR
ptr
=
StrChrW
(
szDestDir
,
'\\'
);
/* make sure all directories up to last one are created */
while
(
ptr
&&
(
ptr
=
StrChrW
(
ptr
+
1
,
'\\'
)))
...
...
@@ -1172,11 +1173,11 @@ static void create_dest_dirs(LPWSTR szDestDir)
}
/* the FO_COPY operation */
static
HRESULT
copy_files
(
FILE_OPERATION
*
op
,
FILE_LIST
*
flFrom
,
FILE_LIST
*
flTo
)
static
HRESULT
copy_files
(
FILE_OPERATION
*
op
,
const
FILE_LIST
*
flFrom
,
const
FILE_LIST
*
flTo
)
{
DWORD
i
;
FILE_ENTRY
*
entryToCopy
;
FILE_ENTRY
*
fileDest
=
&
flTo
->
feFiles
[
0
];
const
FILE_ENTRY
*
entryToCopy
;
const
FILE_ENTRY
*
fileDest
=
&
flTo
->
feFiles
[
0
];
BOOL
bCancelIfAnyDirectories
=
FALSE
;
if
(
flFrom
->
bAnyDontExist
)
...
...
@@ -1269,7 +1270,7 @@ static HRESULT copy_files(FILE_OPERATION *op, FILE_LIST *flFrom, FILE_LIST *flTo
return
ERROR_SUCCESS
;
}
static
BOOL
confirm_delete_list
(
HWND
hWnd
,
DWORD
fFlags
,
BOOL
fTrash
,
FILE_LIST
*
flFrom
)
static
BOOL
confirm_delete_list
(
HWND
hWnd
,
DWORD
fFlags
,
BOOL
fTrash
,
const
FILE_LIST
*
flFrom
)
{
if
(
flFrom
->
dwNumFiles
>
1
)
{
...
...
@@ -1281,7 +1282,7 @@ static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, FILE_LIST
}
else
{
FILE_ENTRY
*
fileEntry
=
&
flFrom
->
feFiles
[
0
];
const
FILE_ENTRY
*
fileEntry
=
&
flFrom
->
feFiles
[
0
];
if
(
IsAttribFile
(
fileEntry
->
attributes
))
return
SHELL_ConfirmDialogW
(
hWnd
,
(
fTrash
?
ASK_TRASH_FILE
:
ASK_DELETE_FILE
),
fileEntry
->
szFullPath
,
NULL
);
...
...
@@ -1292,9 +1293,9 @@ static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, FILE_LIST
}
/* the FO_DELETE operation */
static
HRESULT
delete_files
(
LPSHFILEOPSTRUCTW
lpFileOp
,
FILE_LIST
*
flFrom
)
static
HRESULT
delete_files
(
LPSHFILEOPSTRUCTW
lpFileOp
,
const
FILE_LIST
*
flFrom
)
{
FILE_ENTRY
*
fileEntry
;
const
FILE_ENTRY
*
fileEntry
;
DWORD
i
;
BOOL
bPathExists
;
BOOL
bTrash
;
...
...
@@ -1354,7 +1355,7 @@ static HRESULT delete_files(LPSHFILEOPSTRUCTW lpFileOp, FILE_LIST *flFrom)
return
ERROR_SUCCESS
;
}
static
void
move_dir_to_dir
(
LPSHFILEOPSTRUCTW
lpFileOp
,
FILE_ENTRY
*
feFrom
,
LP
WSTR
szDestPath
)
static
void
move_dir_to_dir
(
LPSHFILEOPSTRUCTW
lpFileOp
,
const
FILE_ENTRY
*
feFrom
,
LPC
WSTR
szDestPath
)
{
WCHAR
szFrom
[
MAX_PATH
],
szTo
[
MAX_PATH
];
SHFILEOPSTRUCTW
fileOp
;
...
...
@@ -1380,7 +1381,7 @@ static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, FILE_ENTRY *feFrom, LPWS
}
/* moves a file or directory to another directory */
static
void
move_to_dir
(
LPSHFILEOPSTRUCTW
lpFileOp
,
FILE_ENTRY
*
feFrom
,
FILE_ENTRY
*
feTo
)
static
void
move_to_dir
(
LPSHFILEOPSTRUCTW
lpFileOp
,
const
FILE_ENTRY
*
feFrom
,
const
FILE_ENTRY
*
feTo
)
{
WCHAR
szDestPath
[
MAX_PATH
];
...
...
@@ -1393,11 +1394,11 @@ static void move_to_dir(LPSHFILEOPSTRUCTW lpFileOp, FILE_ENTRY *feFrom, FILE_ENT
}
/* the FO_MOVE operation */
static
HRESULT
move_files
(
LPSHFILEOPSTRUCTW
lpFileOp
,
FILE_LIST
*
flFrom
,
FILE_LIST
*
flTo
)
static
HRESULT
move_files
(
LPSHFILEOPSTRUCTW
lpFileOp
,
const
FILE_LIST
*
flFrom
,
const
FILE_LIST
*
flTo
)
{
DWORD
i
;
FILE_ENTRY
*
entryToMove
;
FILE_ENTRY
*
fileDest
;
const
FILE_ENTRY
*
entryToMove
;
const
FILE_ENTRY
*
fileDest
;
if
(
!
flFrom
->
dwNumFiles
||
!
flTo
->
dwNumFiles
)
return
ERROR_CANCELLED
;
...
...
@@ -1445,10 +1446,10 @@ static HRESULT move_files(LPSHFILEOPSTRUCTW lpFileOp, FILE_LIST *flFrom, FILE_LI
}
/* the FO_RENAME files */
static
HRESULT
rename_files
(
LPSHFILEOPSTRUCTW
lpFileOp
,
FILE_LIST
*
flFrom
,
FILE_LIST
*
flTo
)
static
HRESULT
rename_files
(
LPSHFILEOPSTRUCTW
lpFileOp
,
const
FILE_LIST
*
flFrom
,
const
FILE_LIST
*
flTo
)
{
FILE_ENTRY
*
feFrom
;
FILE_ENTRY
*
feTo
;
const
FILE_ENTRY
*
feFrom
;
const
FILE_ENTRY
*
feTo
;
if
(
flFrom
->
dwNumFiles
!=
1
)
return
ERROR_GEN_FAILURE
;
...
...
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