[TUHS] History of strncpy
usotsuki at buric.co
Thu Jan 24 16:34:27 AEST 2013
On Wed, 23 Jan 2013, Larry McVoy wrote:
> On Wed, Jan 23, 2013 at 04:46:51PM -0500, John Cowan wrote:
>> Ronald Natalie scripsit:
>>> Why on earth did they preserve the silly fread/fwrite size feature
>>> that just multiplies the two middle args together long after it was
>>> realized that portability doesn't demand making such a distinction.
>> I like the idea: essentially it's about reading or writing an array
>> of a specified type.
> As a SPARC guy (in the past), I think it may have had something to do
> about alignment.
> That said, I hate the fread/fwrite interfaces. We're fixing them in
> our stdio. freadn(f, buf, n).
That syntax makes sense. Though you'd prolly need a "#define
fread(b,s,n,f) freadn(f,b,((s)*(n)))", right? For backward compatibility.
More information about the TUHS