This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to add fputs->fwrite conversion


 > From: Kamil Iskra <kamil@wins.uva.nl>
 > 
 > On Wed, 20 Sep 2000, Kaveh R. Ghazi wrote:
 > 
 > > The following patch extends the exiting builtin_fputs to handle
 > > lengths other than 1 for constant strings.  (Currently length 1
 > > becomes fputc.)  Now length==0 gets deleted and length > 1 becomes
 > > fwrite.
 > 
 > Is it safe to convert to fwrite? Does fwrite obey the same buffering rules
 > as fputs?

Yes it is safe, because the buffering mode is set on the stream, not
on the stdio function you manipulate it with.

--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]