From mboxrd@z Thu Jan 1 00:00:00 1970 From: lm@bitmover.com (Larry McVoy) Date: Wed, 23 Jan 2013 22:02:05 -0800 Subject: [TUHS] History of strncpy In-Reply-To: <20130123214651.GF22559@mercury.ccil.org> References: <1301231756.AA27240@ivan.Harhan.ORG> <20130123214651.GF22559@mercury.ccil.org> Message-ID: <20130124060205.GQ24498@bitmover.com> 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). -- --- Larry McVoy lm at bitmover.com http://www.bitkeeper.com