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
a1639ebf
Commit
a1639ebf
authored
Jun 03, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Jun 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Fix dir /w.
Use of %* fails when using wvsprintf, so just pad manually, but maintain only a single output call.
parent
81c1aa14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
directory.c
programs/cmd/directory.c
+19
-2
No files found.
programs/cmd/directory.c
View file @
a1639ebf
...
...
@@ -72,6 +72,7 @@ static const WCHAR dotdotW[] = {'.','.','\0'};
static
const
WCHAR
starW
[]
=
{
'*'
,
'\0'
};
static
const
WCHAR
slashW
[]
=
{
'\\'
,
'\0'
};
static
const
WCHAR
emptyW
[]
=
{
'\0'
};
static
const
WCHAR
spaceW
[]
=
{
' '
,
'\0'
};
/*****************************************************************************
* WCMD_directory
...
...
@@ -618,8 +619,24 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
if
((
cur_width
+
widest
)
>
max_width
)
{
cur_width
=
0
;
}
else
{
static
const
WCHAR
fmt
[]
=
{
'%'
,
'*'
,
'.'
,
's'
,
'\0'
};
WCMD_output
(
fmt
,
(
tmp_width
-
cur_width
),
emptyW
);
int
padding
=
cur_width
-
tmp_width
;
int
toWrite
=
0
;
WCHAR
temp
[
101
];
/* Note: WCMD_output uses wvsprintf which does not allow %*
so manually pad with spaces to appropriate width */
strcpyW
(
temp
,
emptyW
);
while
(
padding
>
0
)
{
strcatW
(
&
temp
[
toWrite
],
spaceW
);
toWrite
++
;
if
(
toWrite
>
99
)
{
WCMD_output
(
temp
);
toWrite
=
0
;
strcpyW
(
temp
,
emptyW
);
}
padding
--
;
}
WCMD_output
(
temp
);
}
}
else
if
((
fd
+
i
)
->
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
{
...
...
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