[comp.sys.mac.programmer] awk

rae@geaclib.UUCP (Reid Ellis) (02/01/89)

engber@shorty.cs.wisc.edu (Mike Engber) writes:
|I've gotten several positive responses to my orignal request for awk, but
|they all run under the MPW shell (which I don't use). Has anyone got it
|running as a standalone application?                   

Just as a general point, and as something Mike might want to try, it
should be noted that MPW tools *can* be run as standalone applications.  Of
course, you cannot supply command-line arguments, but that can't be helped.
Simply changing the type of the file from "MPST" to "APPL" [and the creator
from "MPS " to "????" or something, unless you want to conflict with MPW
itself] will allow you to run the program.

Note: this is not a recommended general practice.  It's probably
best thought of as an interesting side effect of the way MPW works.

How hard would it be to write a PD standalone shell that only allowed MPW
tools to be run and did nothing else?  Single window etc.

Reid
-- 
Reid Ellis, geaclib!rae@geac.uucp, rae@geaclib.uucp [if you're lucky]
"Now we can AVENGE ourselves! Restore our Khundian honor! And KILL the little
 *!!@ who put us in those itsy-bitsy, teeny-weeny BOXES!"

ech@pegasus.ATT.COM (Edward C Horvath) (02/03/89)

From article <3625@geaclib.UUCP>, by rae@geaclib.UUCP (Reid Ellis):
> How hard would it be to write a PD standalone shell that only allowed MPW
> tools to be run and did nothing else?  Single window etc.

A fair bit of work, even if Apple would tell you enough to pull it off.  MPW
supplies, for example, a full set of stdio functionality via a jump table
set up at "launch."  MPW Shell actually loads and runs the tools within its
own heap, but of course with their own jump tables.  It goes through a
fairly hairy procedure to restore it's own A5, etc., whenever there's
a call on one of its services.

The service interface is not documented anywhere I know of, you get it for
free when you link with the MPW tool library (i.e. there are really two
stdio libs, one for free-standing, one for pass-thru to MPW, both linked
with every tool, and the interface decides which to use when launched), so
you don't "need to know."

Unless, of course, you're a compiler writer who doesn't want (or can't)
link with the MPW libraries...

=Ned Horvath=

tim@hoptoad.uucp (Tim Maroney) (02/03/89)

In article <3625@geaclib.UUCP> rae@geaclib.UUCP (Reid Ellis) writes:
>Just as a general point, and as something Mike might want to try, it
>should be noted that MPW tools *can* be run as standalone applications.  Of
>course, you cannot supply command-line arguments, but that can't be helped.
>Simply changing the type of the file from "MPST" to "APPL" [and the creator
>from "MPS " to "????" or something, unless you want to conflict with MPW
>itself] will allow you to run the program.

I believe your information is out of date.  This was true with the
original MPW, but I noticed that all references to writing a tool that
could be run as an application vanished with 2.0.  I just tried eight
or so of my MPW 2.0.2 tools and none worked standalone under
Multifinder.  Make crashed, while the rest returned immediately to the
Finder.  I didn't bother changing the types, just used the old
option-command-double-click "launch any file" hack.

Just as well -- the way they worked in 1.0 was extremely ugly...
-- 
Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim
"Do what you wanna, do what you will;
 Just don't mess up your neighbor's thrill.
 And when you pay the bill, kindly leave a little tip
 To help the next poor sucker on his one-way trip."
    - Frank Zappa, "You Are What You Is"