🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #24638

Re: sprintf() bug?

#24638
From: Richard Siegel
Date: Wed, 03 Feb 1988 16:01
19 lines
1181 bytes

"Of course, LSC might do something differently, like it could treat \p as a
literal constant character that glue versions of DrawString (et. al.) could
notice and then do internal CtoPStr operations (gackkk!).  This is somewhat
in accord with how I read the second poster's information.  I don't think
LSC does this though, though I don't have it available to check."

LightspeedC doesn't do this. The exact mechanism I don't know, but what 
happens with "\pfoo" is that you get a 4-byte space with a length byte at the 
beginning followed by the characters, which is suitable for passing to ROM 
traps. There's no glue involved.

MPW and Aztec, on the other hand, allow you to pass C strings to ROM calls; 
they *do* have glue. For EVERY SINGLE trap that takes a string, they have 
glue.
Icky.

		--Rich
Technical Details
Message-ID: <MW1oTmy00Xo18P01No@andrew.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!rs4u+

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!rs4u+
From: rs4u+@andrew.cmu.edu (Richard Siegel)
Newsgroups: comp.sys.mac
Subject: Re: sprintf() bug?
Message-ID: <MW1oTmy00Xo18P01No@andrew.cmu.edu>
Date: 3 Feb 88 16:01:54 GMT
Organization: Carnegie Mellon University
Lines: 18
In-Reply-To: <1131@iscuva.ISCS.COM>