Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!agate!ucbvax!decwrl!decvax!ima!think!barmar From: barmar@think.COM (Barry Margolin) Newsgroups: comp.std.c Subject: Re: Thoughts on moving towards ANSI Message-ID: <36220@think.UUCP> Date: 8 Feb 89 06:21:31 GMT References: <795@n8emr.UUCP> Sender: news@think.UUCP Reply-To: barmar@kulla.think.com.UUCP (Barry Margolin) Distribution: usa Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 21 In article <795@n8emr.UUCP> lwv@n8emr.UUCP (Larry W. Virden) writes: > As an example, he mentioned >that in APW C and I assume MPW C, a printf format of %p was used for 'pascal' >format strings, where the length is specified as a 2 byte (?) value before >the string. Thus, he wasnt going to be able to support the ANSI %p for pointer >format. This can be handled simply by providing two implementations of printf, which can be selected at link time. Another possibility would be to require something like Unix's "-Dformat=APW_format" for programs being ported from the old version to the new version, where the APW_format function implements the old printf semantics. Or you could have a compiler option that specifies whether you want compatible or ANSI semantics (it could predefine a bunch of such macros). Barry Margolin Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar