home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!decwrl!decwrl!apple!mumbo.apple.com!gallant.apple.com!kip2-16.apple.com!user
- From: athos@apple.com (Rick Eames)
- Newsgroups: comp.sys.mac.hypercard
- Subject: Re: New to XCMDs in 'C' - How to begin
- Message-ID: <athos-071192101220@kip2-16.apple.com>
- Date: 7 Nov 92 18:12:10 GMT
- References: <1992Nov6.213246.8511@agt.uucp>
- Sender: news@gallant.apple.com
- Followup-To: comp.sys.mac.hypercard
- Organization: Apple Computer, Inc.
- Lines: 37
-
- In article <1992Nov6.213246.8511@agt.uucp>, Allen Winter
- <AWINTER1@agt.ab.ca> wrote:
- >
- > I am using THINK c V5.0 and I want to learn how to write XCMDs . But I
- > am having trouble just getting to 1st base.
- >
- > I have looked at the source code in 'XCMD Shell' and also 'XcShell' -
- > hoping
- > that they would serve as examples. But they look awfully complicated and
- > also they will not compile on THINK C V5.0. For one thing I don'tseem to
- > have all
- > of the headers needed, such as 'MacTypes.h' etc. Also there are
- > different
- > versions of 'XCMDUtil.c' and also 'HyperXcmd.h'.
- >
- > Can anyone provide me with either source code for a simple XCMD that
- > WILL compile (including headers and utility files)?
-
- Here is about as simple as they get:
-
- #include <HyperXCmd.h>
-
- pascal void main(XCmdPtr pp)
- {
- pp->returnValue = PasToZero(pp, "\pThis is a test.");
- }
-
- 1) Create a project with this source and the MacTraps Lib and the HyperXLib
- included. Compile as either XCMD or XFCN code resource.
-
- Be the ball.
-
- ******************************************************************************
- Rick Eames My Opinions Are My Own (not
- Apple's)
- athos@apple.com
- ******************************************************************************
-