Message-Id: <3.0.16.19980115022038.3acf43e4@hem1.passagen.se> Date: Thu, 15 Jan 1998 02:20:42 -0500 To: DJ Delorie From: Peter Palotas Subject: Re: printf("%p"); Cc: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk At 19.29 1998-01-14 -0500, you wrote: > >> >> -- [ Why isn't %p printed with a '0x' prefix ] -- >> > `p' >> > A pointer. This is printed with an `x' specifier. >> > >> >I interpret that to mean that "%p" works just like "%x", which it does. >> > >> >In any case, the way a pointer is printed is considered >> >"implementation-dependent". It is not necessary that DJGPP print pointers >> >the same way as any other system. Of course, if you have a compelling reason >> >you think it should, let's hear it. >> >> Well, Linux does it that way for one, and DJGPP should be as compatible as >> possible with Linux, don't you think? > >Not always. POSIX compliance, yes. Common practice, perhaps. We >don't always side with Linux, because we're a DOS compiler, and some >practices aren't all that common. > >In this case, Turbo C returns (i.e.) FF48 or 145E:8D30 > >SGI IRIX (another unix) returns (i.e.) 7fff2ef0 > >Linux is the odd-one-out in this case. Okay, if you say so, you should know best! Guess I'll just have to settle with the ugly looking pointer then! (Why not atleast make it capital letters!?) -- Peter Palotas alias Blizzar -- blizzar AT hem1 DOT passagen DOT se -- ***************************************************** * A brief description of DJGPP: * * NEVER BEFORE HAS SO FEW DONE SO MUCH FOR SO MANY! * *****************************************************