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
540d8186
Commit
540d8186
authored
Mar 12, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Mar 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Fix compilation on systems that don't support nameless unions.
parent
868dd534
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
builtins.c
programs/cmd/builtins.c
+5
-5
wcmd.h
programs/cmd/wcmd.h
+1
-1
wcmdmain.c
programs/cmd/wcmdmain.c
+2
-2
No files found.
programs/cmd/builtins.c
View file @
540d8186
...
...
@@ -632,9 +632,9 @@ void WCMD_pushd (char *command) {
curdir
->
next
=
pushd_directories
;
curdir
->
strings
=
thisdir
;
if
(
pushd_directories
==
NULL
)
{
curdir
->
stackdepth
=
1
;
curdir
->
u
.
stackdepth
=
1
;
}
else
{
curdir
->
stackdepth
=
pushd_directories
->
stackdepth
+
1
;
curdir
->
u
.
stackdepth
=
pushd_directories
->
u
.
stackdepth
+
1
;
}
pushd_directories
=
curdir
;
}
...
...
@@ -916,7 +916,7 @@ void WCMD_setlocal (const char *s) {
/* Save the current drive letter */
GetCurrentDirectory
(
MAX_PATH
,
cwd
);
env_copy
->
cwd
=
cwd
[
0
];
env_copy
->
u
.
cwd
=
cwd
[
0
];
}
else
LocalFree
(
env_copy
);
...
...
@@ -990,10 +990,10 @@ void WCMD_endlocal (void) {
}
/* Restore current drive letter */
if
(
IsCharAlpha
(
temp
->
cwd
))
{
if
(
IsCharAlpha
(
temp
->
u
.
cwd
))
{
char
envvar
[
4
];
char
cwd
[
MAX_PATH
];
sprintf
(
envvar
,
"=%c:"
,
temp
->
cwd
);
sprintf
(
envvar
,
"=%c:"
,
temp
->
u
.
cwd
);
if
(
GetEnvironmentVariable
(
envvar
,
cwd
,
MAX_PATH
))
{
WINE_TRACE
(
"Resetting cwd to %s
\n
"
,
cwd
);
SetCurrentDirectory
(
cwd
);
...
...
programs/cmd/wcmd.h
View file @
540d8186
...
...
@@ -104,7 +104,7 @@ struct env_stack
union
{
int
stackdepth
;
/* Only used for pushd and popd */
char
cwd
;
/* Only used for set/endlocal */
};
}
u
;
WCHAR
*
strings
;
};
...
...
programs/cmd/wcmdmain.c
View file @
540d8186
...
...
@@ -1028,8 +1028,8 @@ void WCMD_show_prompt (void) {
break
;
case
'+'
:
if
(
pushd_directories
)
{
memset
(
q
,
'+'
,
pushd_directories
->
stackdepth
);
q
=
q
+
pushd_directories
->
stackdepth
;
memset
(
q
,
'+'
,
pushd_directories
->
u
.
stackdepth
);
q
=
q
+
pushd_directories
->
u
.
stackdepth
;
}
break
;
}
...
...
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