🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #15713

anomoly in LightspeedC include file? (maybe)

#15713
From: frankng
Date: Wed, 22 Apr 1987 17:40
31 lines
1754 bytes
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
Technical Details
Message-ID: <904@basser.oz>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!seismo!munnari!basser!frankng

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!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