home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD1.img
/
d1xx
/
d179
/
launch
/
launch.doc
< prev
next >
Wrap
Text File
|
1989-02-25
|
2KB
|
63 lines
LAUNCH -- start a workbench application from the CLI.
This is an example of how you run a workbench application. As you can see,
it's pretty complex... even with the stuff encapsulated like this. However,
once you get it working it works just fine... unlike the CLI. Just ask anyone
who's tried to run a program under the CLI from, say, runback.
Usage:
run wbcleanup (only once, in your CLI)
launch [options] program [filename]...
Loads and executes program in a workbench environment, then returns
to the CLI.
Options:
stack nnnn
Specifies initial stack for the program.
priority pppp
Specifies initial priority for the program.
window wwww
Specifies TOOLWINDOW for the program.
wait
Wait for reply, rather than passing it off to wbcleanup.
wblaunch.c:
message = Launch(port, program, argv, argc, pri, win, stack);
Launch loads and executes program in a workbench environment. The
specified port is where the startup message will be returned. The
arguments will be passed to the program, workbench-style (directory
lock and filename). The first argument should be the same as the
program, but it's possible to spawn a program in an illicit way. If
you don't want to specify a window, use NULL. You need to specify a
stack.
If you don't want to specify a port, run wbcleanup and use the
public message port "Workbench.Cleanup".
You really don't need to do anything with the message when it's
returned from Launch, but it's a convenient non-zero value to
indicate success.
wbfree.c:
FreeStartup(message);
FreeStartup takes a startup message created by Launch and releases
all the public memory, removes the lock, and so on. It should be
called after the startup message is returned.
launch.c:
This contains the mainline for the 'launch' program. Most of it is
arg parsing.
wbcleanup.c:
This contains the mainline for the 'wbcleanup' program.
util.c:
dictcmp(s1, s2);
An analog to strcmp, but ignores case differences in words. Not a
full dictionary comparison, since it doesn't sort numbers by their
spelling.