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
ebb27911
Commit
ebb27911
authored
Nov 02, 2000
by
Dave Pickles
Committed by
Alexandre Julliard
Nov 02, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pause command interpreter while executing a console-mode app.
parent
9400e2d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
ChangeLog
programs/wcmd/ChangeLog
+4
-0
Makefile.in
programs/wcmd/Makefile.in
+1
-1
wcmdmain.c
programs/wcmd/wcmdmain.c
+15
-1
No files found.
programs/wcmd/ChangeLog
View file @
ebb27911
v0.15 - 31 October 2000
-Running console mode programs the interpreter now waits for the
program to exit before issuing the next prompt.
v0.14 - 1 August 2000
Errorlevel support added
Most errors reported via FormatMessage()
...
...
programs/wcmd/Makefile.in
View file @
ebb27911
...
...
@@ -5,7 +5,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
none
PROGRAMS
=
wcmd
IMPORTS
=
user32 gdi32 kernel32 ntdll
IMPORTS
=
shell32
user32 gdi32 kernel32 ntdll
C_SRCS
=
\
batch.c
\
...
...
programs/wcmd/wcmdmain.c
View file @
ebb27911
...
...
@@ -25,7 +25,7 @@ DWORD errorlevel;
int
echo_mode
=
1
,
verify_mode
=
0
;
char
nyi
[]
=
"Not Yet Implemented
\n\n
"
;
char
newline
[]
=
"
\n
"
;
char
version_string
[]
=
"WCMD Version 0.1
4
\n\n
"
;
char
version_string
[]
=
"WCMD Version 0.1
5
\n\n
"
;
char
anykey
[]
=
"Press any key to continue: "
;
char
quals
[
MAX_PATH
],
param1
[
MAX_PATH
],
param2
[
MAX_PATH
];
BATCH_CONTEXT
*
context
=
NULL
;
...
...
@@ -339,8 +339,11 @@ void WCMD_run_program (char *command) {
STARTUPINFO
st
;
PROCESS_INFORMATION
pe
;
SHFILEINFO
psfi
;
DWORD
console
;
BOOL
status
;
HANDLE
h
;
HINSTANCE
hinst
;
char
filetorun
[
MAX_PATH
];
WCMD_parse
(
command
,
quals
,
param1
,
param2
);
/* Quick way to get the filename */
...
...
@@ -371,6 +374,16 @@ char filetorun[MAX_PATH];
/* No batch file found, assume executable */
hinst
=
FindExecutable
(
param1
,
NULL
,
filetorun
);
if
((
int
)
hinst
<
32
)
{
WCMD_print_error
();
return
;
}
console
=
SHGetFileInfo
(
filetorun
,
0
,
&
psfi
,
sizeof
(
psfi
),
SHGFI_EXETYPE
);
if
(
!
console
)
{
WCMD_print_error
();
return
;
}
ZeroMemory
(
&
st
,
sizeof
(
STARTUPINFO
));
st
.
cb
=
sizeof
(
STARTUPINFO
);
status
=
CreateProcess
(
NULL
,
command
,
NULL
,
NULL
,
FALSE
,
...
...
@@ -378,6 +391,7 @@ char filetorun[MAX_PATH];
if
(
!
status
)
{
WCMD_print_error
();
}
if
(
!
HIWORD
(
console
))
WaitForSingleObject
(
pe
.
hProcess
,
INFINITE
);
GetExitCodeProcess
(
pe
.
hProcess
,
&
errorlevel
);
if
(
errorlevel
==
STILL_ACTIVE
)
errorlevel
=
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