Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8049ae1a
Commit
8049ae1a
authored
Mar 04, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Mar 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: PROMPT option to show pushd levels.
parent
00ba810d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
builtins.c
programs/cmd/builtins.c
+5
-6
wcmd.h
programs/cmd/wcmd.h
+9
-0
wcmdmain.c
programs/cmd/wcmdmain.c
+8
-1
No files found.
programs/cmd/builtins.c
View file @
8049ae1a
...
...
@@ -42,12 +42,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(cmd);
void
WCMD_execute
(
char
*
orig_command
,
char
*
parameter
,
char
*
substitution
);
struct
env_stack
{
struct
env_stack
*
next
;
WCHAR
*
strings
;
};
struct
env_stack
*
saved_environment
;
struct
env_stack
*
pushd_directories
;
...
...
@@ -612,6 +606,11 @@ void WCMD_pushd (void) {
}
else
{
curdir
->
next
=
pushd_directories
;
curdir
->
strings
=
thisdir
;
if
(
pushd_directories
==
NULL
)
{
curdir
->
stackdepth
=
1
;
}
else
{
curdir
->
stackdepth
=
pushd_directories
->
stackdepth
+
1
;
}
pushd_directories
=
curdir
;
}
}
...
...
programs/cmd/wcmd.h
View file @
8049ae1a
...
...
@@ -94,6 +94,15 @@ typedef struct {
BOOL
skip_rest
;
/* Skip the rest of the batch program and exit */
}
BATCH_CONTEXT
;
/* Data structure to save setlocal and pushd information */
struct
env_stack
{
struct
env_stack
*
next
;
int
stackdepth
;
/* Only used for pushd and popd */
WCHAR
*
strings
;
};
#endif
/* !RC_INVOKED */
/*
...
...
programs/cmd/wcmdmain.c
View file @
8049ae1a
...
...
@@ -45,6 +45,7 @@ const char anykey[] = "Press Return key to continue: ";
char
quals
[
MAX_PATH
],
param1
[
MAX_PATH
],
param2
[
MAX_PATH
];
BATCH_CONTEXT
*
context
=
NULL
;
static
HANDLE
old_stdin
=
INVALID_HANDLE_VALUE
,
old_stdout
=
INVALID_HANDLE_VALUE
;
extern
struct
env_stack
*
pushd_directories
;
static
char
*
WCMD_expand_envvar
(
char
*
start
);
...
...
@@ -932,10 +933,16 @@ void WCMD_show_prompt (void) {
case
'V'
:
lstrcat
(
q
,
version_string
);
while
(
*
q
)
q
++
;
break
;
break
;
case
'_'
:
*
q
++
=
'\n'
;
break
;
case
'+'
:
if
(
pushd_directories
)
{
memset
(
q
,
'+'
,
pushd_directories
->
stackdepth
);
q
=
q
+
pushd_directories
->
stackdepth
;
}
break
;
}
p
++
;
*
q
=
'\0'
;
...
...
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