Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > No fread and fwrite for wide characters?

Thread Tools

No fread and fwrite for wide characters?

Phil Carmody
Posts: n/a
Ike Naar <(E-Mail Removed)> writes:
> On 2011-11-11, Phil Carmody <(E-Mail Removed)> wrote:
> > Lauri Alanko <(E-Mail Removed)> writes:
> >> In article <(E-Mail Removed)>,
> >> James Kuyper <(E-Mail Removed)> wrote:
> >> > So, this is not at all the wide character equivalent of fwrite(), which
> >> > makes more sense, since narrow characters have nothing to do fwrite().
> >>
> >> They certainly do, since as you quoted, fwrite is just a utility for
> >> looping fputc()-calls.

> >
> > What are you gibbering about?
> >
> > size_t fwrite(const void * restrict ptr,
> > size_t size, size_t nmemb,
> > FILE * restrict stream);
> >
> > There is precisely *nothing* related to the characters one sends to fputc
> > in that function declaration. End of. Any attempts to counter my argument
> > are, like *ptr, void.

> 7.19.3 p12:
> The byte output functions write characters to the stream as if
> by successive calls to the fputc function.
> fwrite is one of the byte output functions (7.19.1 p5).

You're right, and I retract and apologise. In this case, I believe I've
probably misinterpreted something said way earlier in the thread which
the above would also contradict, and which when I saw going unchallenged
I took as true. Maybe I'm misingerpreting the *whole thread*, as that p12
seems to be the immediate answer to everything. Thanks for hunting it
out and so succinctly correcting my unacceptable error.


Unix is simple. It just takes a genius to understand its simplicity
-- Dennis Ritchie (1941-2011), Unix Co-Creator
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
fread fwrite struct C Programming 4 03-31-2006 05:47 AM
Portable use of fread/fwrite with structs mazsx C Programming 2 11-11-2005 03:55 PM
Re: fread/fwrite Bits CBFalconer C Programming 0 01-03-2004 04:02 AM
fread / fwrite error C Programming 9 08-07-2003 07:42 PM
problem using fread, fwrite, and fsetpos Brady C Programming 8 07-20-2003 11:49 PM