cmd: Remove unneeded NONAMELESS* defines and ifdefs.
Francois Gouget
fgouget at free.fr
Mon Mar 5 03:26:16 CST 2007
---
directory.c does not need to define and check for NONAMELESSUNION /
NONAMELESSSTRUCT because LARGE_INTEGER always defines a named struct
containing the fields we want to access. So this patch simplifies the
code and removes unneeded #ifdefs.
Then we could define the NONAMLESS* macros in wcmd.h to prevent the
recurence of compilation issues in gcc 2.95, but I think that for
Winelib applications which we may want to compile with the PSDK headers
it's best not to use them as a way to check the nameless case in our
headers too.
programs/cmd/directory.c | 12 ------------
1 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c
index 6a70eb8..ea652f9 100644
--- a/programs/cmd/directory.c
+++ b/programs/cmd/directory.c
@@ -25,8 +25,6 @@
* environment-variable and batch parameter substitution already done.
*/
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
#define WIN32_LEAN_AND_MEAN
#include "wcmd.h"
@@ -224,13 +222,8 @@ void WCMD_list_directory (char *search_path, int level) {
WCMD_output ("%s", (fd+i)->cFileName);
tmp_width = tmp_width + strlen((fd+i)->cFileName) ;
file_count++;
-#ifndef NONAMELESSSTRUCT
- file_size.LowPart = (fd+i)->nFileSizeLow;
- file_size.HighPart = (fd+i)->nFileSizeHigh;
-#else
file_size.u.LowPart = (fd+i)->nFileSizeLow;
file_size.u.HighPart = (fd+i)->nFileSizeHigh;
-#endif
byte_count.QuadPart += file_size.QuadPart;
}
cur_width = cur_width + widest;
@@ -257,13 +250,8 @@ void WCMD_list_directory (char *search_path, int level) {
}
else {
file_count++;
-#ifndef NONAMELESSSTRUCT
- file_size.LowPart = (fd+i)->nFileSizeLow;
- file_size.HighPart = (fd+i)->nFileSizeHigh;
-#else
file_size.u.LowPart = (fd+i)->nFileSizeLow;
file_size.u.HighPart = (fd+i)->nFileSizeHigh;
-#endif
byte_count.QuadPart += file_size.QuadPart;
if (!bare) {
WCMD_output ("%10s %8s %10s %s\n",
--
1.4.4.4
More information about the wine-patches
mailing list