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
634c7a49
Commit
634c7a49
authored
Sep 22, 2004
by
Martin Fuchs
Committed by
Alexandre Julliard
Sep 22, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Handle "." and ".." as special case and move them at the very first
beginning of directory listings. - Remove unused variable wStringTableOffset.
parent
1c8d9b66
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
5 deletions
+32
-5
winefile.c
programs/winefile/winefile.c
+32
-3
winefile.h
programs/winefile/winefile.h
+0
-2
No files found.
programs/winefile/winefile.c
View file @
634c7a49
...
@@ -987,13 +987,42 @@ static void read_directory_shell(Entry* dir, HWND hwnd)
...
@@ -987,13 +987,42 @@ static void read_directory_shell(Entry* dir, HWND hwnd)
#endif
/* _SHELL_FOLDERS */
#endif
/* _SHELL_FOLDERS */
/* sort order for different directory/file types */
enum
TYPE_ORDER
{
TO_DIR
=
0
,
TO_DOT
=
1
,
TO_DOTDOT
=
2
,
TO_OTHER_DIR
=
3
,
TO_FILE
=
4
};
/* distinguish between ".", ".." and any other directory names */
static
int
TypeOrderFromDirname
(
LPCTSTR
name
)
{
if
(
name
[
0
]
==
'.'
)
{
if
(
name
[
1
]
==
'\0'
)
return
TO_DOT
;
/* "." */
if
(
name
[
1
]
==
'.'
&&
name
[
2
]
==
'\0'
)
return
TO_DOTDOT
;
/* ".." */
}
return
TO_OTHER_DIR
;
/* anything else */
}
/* directories first... */
/* directories first... */
static
int
compareType
(
const
WIN32_FIND_DATA
*
fd1
,
const
WIN32_FIND_DATA
*
fd2
)
static
int
compareType
(
const
WIN32_FIND_DATA
*
fd1
,
const
WIN32_FIND_DATA
*
fd2
)
{
{
int
dir1
=
fd1
->
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
;
int
order1
=
fd1
->
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
?
TO_DIR
:
TO_FILE
;
int
dir2
=
fd2
->
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
;
int
order2
=
fd2
->
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
?
TO_DIR
:
TO_FILE
;
/* Handle "." and ".." as special case and move them at the very first beginning. */
if
(
order1
==
TO_DIR
&&
order2
==
TO_DIR
)
{
order1
=
TypeOrderFromDirname
(
fd1
->
cFileName
);
order2
=
TypeOrderFromDirname
(
fd2
->
cFileName
);
}
return
dir2
==
dir1
?
0
:
dir2
<
dir1
?
-
1
:
1
;
return
order2
==
order1
?
0
:
order1
<
order2
?
-
1
:
1
;
}
}
...
...
programs/winefile/winefile.h
View file @
634c7a49
...
@@ -143,8 +143,6 @@ typedef struct
...
@@ -143,8 +143,6 @@ typedef struct
TCHAR
drives
[
BUFFER_LEN
];
TCHAR
drives
[
BUFFER_LEN
];
BOOL
prescan_node
;
/*TODO*/
BOOL
prescan_node
;
/*TODO*/
UINT
wStringTableOffset
;
#ifdef _SHELL_FOLDERS
#ifdef _SHELL_FOLDERS
IShellFolder
*
iDesktop
;
IShellFolder
*
iDesktop
;
IMalloc
*
iMalloc
;
IMalloc
*
iMalloc
;
...
...
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