Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!samsung!uunet!kddlab!titcca!ccut!ascgw!fgw!flab!cliff From: cliff@escher.soft.flab.fujitsu.co.jp (Cliff MILLER) Newsgroups: comp.sys.mac.hypercard Subject: Debugging XCMDs Message-ID: Date: 8 May 90 04:53:20 GMT Sender: news@flab.flab.fujitsu.co.jp Distribution: comp.sys.mac.hypercard Organization: Fujitsu Laboratories Ltd., Kawasaki, Japan. Lines: 38 I've started writing XCMDs and XFCNs using Lightspeed C v3.0 and have been having a hard time finding a good way to debug them. The way I do it now is to just right a plain old LS C program and throw in the code from the XCMD that I want to test and debug it with the LS debugger. I wish there was a better way. Is there? I have a specific problem trying to use strcpy() with data type Str255. It works fine with the plain LS programs, but when put it into an XCMD and try to use it in conjunction with t he glue routine that sends messages to a card in a stack, the string doesn't seem to get copied. Here's an excerpt: ... Str255 msg; strcpy(msg, "put junk"); ToPascalString(msg); /* shift chars one to right */ /* and put length in first element */ SendCardMessage(paramPtr, msg); ... ("SendCardMessage" may not be the exact name of the glue routine; it's the first glue listed by Apple) I tested my ToPascalString() function and it works fine in non-XCMD programs as does the strcpy() function. It appears that in the XCMD, the strcpy is not copying the string and I can't tell why. Please e-mail any ideas or help. Thank you. -- $@IY;NDL@n:j8&5f=j%=%U%H#18&(J Cliff Miller $@7*IY