Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!munnari!basser!frankng From: frankng@basser.UUCP Newsgroups: comp.sys.mac Subject: anomoly in LightspeedC include file? (maybe) Message-ID: <904@basser.oz> Date: Wed, 22-Apr-87 12:40:51 EST Article-I.D.: basser.904 Posted: Wed Apr 22 12:40:51 1987 Date-Received: Sat, 25-Apr-87 04:11:22 EST Organization: Dept. of Comp. Science, Uni of Sydney, Australia Lines: 31 Keywords: strings, handles, pointers, C, pascal After getting some inconsistent results during program development, I found what seems to be suspect code in the *MacTypes.h* file of LightspeedC (v2.01). It is the definition of StringHandle and StringPtr types. In the file it has: ... typedef unsigned char Str255[256]; typedef unsigned char * StringPtr,** StringHandle ; ... whereas in page 78 of IM Vol 1 it states: ...the Memory Manager includes the following definitions: TYPE Str255 = STRING[255]; StringPtr = ^Str255; StringHandle = ^StringPtr; ... Would some helpful being out there please tell me if this would cause anomalies in programs using string functions (and syntax error, especially with the LightspeedC pointer checking turned on). There are a few cases where this can cause confusion, if not errors. For example the Toolbox function *NewString*, which returns a StringHandle. Does this return a handle to a C string or a Pascal string (with the length byte at the beginning)? Thanks in advance for any help. -- Frank Ng ACSnet: frankng@basser.oz Department of Computer Science ARPA: frankng%basser.oz@seismo.css.gov University of Sydney NSW 2006 UUCP: seismo!munnari!basser.oz!frankng AUSTRALIA