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
ae964c68
Commit
ae964c68
authored
Mar 13, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Mar 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Add DIR /X support.
parent
577b8ef2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
directory.c
programs/cmd/directory.c
+25
-11
No files found.
programs/cmd/directory.c
View file @
ae964c68
...
...
@@ -47,6 +47,7 @@ typedef enum _DISPLAYTIME
}
DISPLAYTIME
;
static
int
file_total
,
dir_total
,
recurse
,
wide
,
bare
,
max_width
,
lower
;
static
int
shortname
;
static
ULONGLONG
byte_total
;
static
DISPLAYTIME
dirTime
;
...
...
@@ -71,10 +72,11 @@ void WCMD_directory (void) {
/* Handle args */
paged_mode
=
(
strstr
(
quals
,
"/P"
)
!=
NULL
);
recurse
=
(
strstr
(
quals
,
"/S"
)
!=
NULL
);
wide
=
(
strstr
(
quals
,
"/W"
)
!=
NULL
);
bare
=
(
strstr
(
quals
,
"/B"
)
!=
NULL
);
lower
=
(
strstr
(
quals
,
"/L"
)
!=
NULL
);
recurse
=
(
strstr
(
quals
,
"/S"
)
!=
NULL
);
wide
=
(
strstr
(
quals
,
"/W"
)
!=
NULL
);
bare
=
(
strstr
(
quals
,
"/B"
)
!=
NULL
);
lower
=
(
strstr
(
quals
,
"/L"
)
!=
NULL
);
shortname
=
(
strstr
(
quals
,
"/X"
)
!=
NULL
);
if
((
p
=
strstr
(
quals
,
"/T"
))
!=
NULL
)
{
p
=
p
+
2
;
...
...
@@ -94,7 +96,8 @@ void WCMD_directory (void) {
}
/* Handle conflicting args and initialization */
if
(
bare
)
wide
=
FALSE
;
if
(
bare
||
shortname
)
wide
=
FALSE
;
if
(
bare
)
shortname
=
FALSE
;
if
(
wide
)
{
if
(
GetConsoleScreenBufferInfo
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
&
consoleInfo
))
...
...
@@ -280,8 +283,13 @@ void WCMD_list_directory (char *search_path, int level) {
dir_count
++
;
if
(
!
bare
)
{
WCMD_output
(
"%10s %8s <DIR> %s
\n
"
,
datestring
,
timestring
,
(
fd
+
i
)
->
cFileName
);
if
(
shortname
)
{
WCMD_output
(
"%10s %8s <DIR> %-13s%s
\n
"
,
datestring
,
timestring
,
(
fd
+
i
)
->
cAlternateFileName
,
(
fd
+
i
)
->
cFileName
);
}
else
{
WCMD_output
(
"%10s %8s <DIR> %s
\n
"
,
datestring
,
timestring
,
(
fd
+
i
)
->
cFileName
);
}
}
else
{
if
(
!
((
strcmp
((
fd
+
i
)
->
cFileName
,
"."
)
==
0
)
||
(
strcmp
((
fd
+
i
)
->
cFileName
,
".."
)
==
0
)))
{
...
...
@@ -294,10 +302,16 @@ void WCMD_list_directory (char *search_path, int level) {
file_size
.
u
.
LowPart
=
(
fd
+
i
)
->
nFileSizeLow
;
file_size
.
u
.
HighPart
=
(
fd
+
i
)
->
nFileSizeHigh
;
byte_count
.
QuadPart
+=
file_size
.
QuadPart
;
if
(
!
bare
)
{
WCMD_output
(
"%10s %8s %10s %s
\n
"
,
datestring
,
timestring
,
WCMD_filesize64
(
file_size
.
QuadPart
),
(
fd
+
i
)
->
cFileName
);
if
(
!
bare
)
{
if
(
shortname
)
{
WCMD_output
(
"%10s %8s %10s %-13s%s
\n
"
,
datestring
,
timestring
,
WCMD_filesize64
(
file_size
.
QuadPart
),
(
fd
+
i
)
->
cAlternateFileName
,
(
fd
+
i
)
->
cFileName
);
}
else
{
WCMD_output
(
"%10s %8s %10s %s
\n
"
,
datestring
,
timestring
,
WCMD_filesize64
(
file_size
.
QuadPart
),
(
fd
+
i
)
->
cFileName
);
}
}
else
{
WCMD_output
(
"%s%s
\n
"
,
recurse
?
real_path
:
""
,
(
fd
+
i
)
->
cFileName
);
}
...
...
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