Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #13146

Re: No fread and fwrite for wide characters?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: No fread and fwrite for wide characters?
Date Fri, 11 Nov 2011 18:00:06 -0500
Organization A noiseless patient Spider
Lines 33
Message-ID <4EBDA8F6.6060604@verizon.net> (permalink)
References <j9h1ff$odc$1@oravannahka.helsinki.fi> <4EBC0B3D.5040504@verizon.net> <j9h3bu$p8k$1@oravannahka.helsinki.fi> <4EBC1A22.5090407@verizon.net> <j9hmdp$at8$1@oravannahka.helsinki.fi> <87k476cn0v.fsf@bazspaz.fatphil.org>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="2P71cupDoazVVolqpw1jrw"; logging-data="15178"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/wu+AWRoUjG8TDHe9DqtKgFL7cNtX2PU="
User-Agent Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110624 Thunderbird/5.0
In-Reply-To <87k476cn0v.fsf@bazspaz.fatphil.org>
Cancel-Lock sha1:M42DTfGZC+nBM+rOsaGHQMM9hco=
Xref x330-a1.tempe.blueboxinc.net comp.lang.c:13146

Show key headers only | View raw


On 11/11/2011 05:28 PM, Phil Carmody wrote:
> Lauri Alanko <la@iki.fi> writes:
>> In article <4EBC1A22.5090407@verizon.net>,
>> James Kuyper  <jameskuyper@verizon.net> 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.

As I cited earlier in this thread, 7.19.8.2p2 says: "For each object,
size calls are made to the fputc function, taking the values (in order)
from an array of unsigned char exactly overlaying the object."

That sounds a lot like looping over calls to fputc() to me. If you
interpreted "looping fputc() - calls" to mean anything inconsistent with
what 7.19.8.2p2 says, then you've probably misunderstood his intent.

I think that defining his proposed fwwrite() function by the analogy of
fputc():fwrite() :: fputwc():fwwrite() is faulty, but not by reason of
there being no relationship between fputc() and fwrite(). I've failed to
come up with a convincing explanation of what I find objectionable about
it, which is why I've not responded to that message.

Back to comp.lang.c | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

No fread and fwrite for wide characters? Lauri Alanko <la@iki.fi> - 2011-11-10 17:26 +0000
  Re: No fread and fwrite for wide characters? James Kuyper <jameskuyper@verizon.net> - 2011-11-10 12:34 -0500
    Re: No fread and fwrite for wide characters? Lauri Alanko <la@iki.fi> - 2011-11-10 17:58 +0000
      Re: No fread and fwrite for wide characters? James Kuyper <jameskuyper@verizon.net> - 2011-11-10 13:38 -0500
        Re: No fread and fwrite for wide characters? Lauri Alanko <la@iki.fi> - 2011-11-10 23:23 +0000
          Re: No fread and fwrite for wide characters? Harald van Dijk <truedfx@gmail.com> - 2011-11-11 09:33 -0800
            Re: No fread and fwrite for wide characters? Lauri Alanko <la@iki.fi> - 2011-11-12 00:09 +0000
          Re: No fread and fwrite for wide characters? Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-11-12 00:28 +0200
            Re: No fread and fwrite for wide characters? Ike Naar <ike@sverige.freeshell.org> - 2011-11-11 22:58 +0000
              Re: No fread and fwrite for wide characters? Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-11-12 14:07 +0200
            Re: No fread and fwrite for wide characters? James Kuyper <jameskuyper@verizon.net> - 2011-11-11 18:00 -0500

csiph-web