X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f Date: Mon, 04 Mar 2002 21:19:36 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp-workers AT delorie DOT com Message-Id: <2110-Mon04Mar2002211936+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: <3C835CE4.E455B061@yahoo.com> (message from CBFalconer on Mon, 04 Mar 2002 06:39:16 -0500) Subject: Re: Malloc/free DJGPP code References: <3C835CE4 DOT E455B061 AT yahoo DOT com> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Mon, 04 Mar 2002 06:39:16 -0500 > From: CBFalconer > > > > Why do you need to mix fwrite and write? Why not use write alone? > > The write is needed for the internal debuggery, which is entirely > turned off (and excised) by NDEBUG. The external debuggery can > only function after initialization, so doesn't need the write > provisions at all. Using fwrite etc. (really fprintf) makes the > external stuff purely standard after the single call to the > non-standard _sysmalloc(). I still don't see why can't you settle with _write alone. If you need to print numerical values, a simply function, like itox in dpmiexcp.c, will suffice. You don't need all the bloat in fprintf and its subroutines, and you solve the buffering issue as a bonus.