Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Portable 16 bit binary integer write Date: Sat, 24 Sep 2016 14:13:04 -0700 Organization: None to speak of Lines: 19 Message-ID: References: <50a1e8f4-4fb3-4491-97d0-54768bf28685@googlegroups.com> <4fde1133-61ff-4045-9cbe-cccff1408ad3@googlegroups.com> <0b757bbb-0494-44cb-bd5a-26f117aaa404@googlegroups.com> <2cf666d7-0755-4c70-adad-07dbafc2b2e7@googlegroups.com> <09cb4413-16a6-4b63-89d0-9dafe56562f6@googlegroups.com> <68e53f3a-5fcc-44fc-90c4-bcf8dc3db680@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="22984"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zGLL7ZEo4Bp38Et7jgnPt" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:W59cVOMacif1ad4HlJnx1qn0Czw= sha1:GuZYRO5Fa7IroVGjBvnKCwhvPM4= Xref: csiph.com comp.lang.c:93995 Malcolm McLean writes: [...] > However if we standardised fput16be, fput16le, fget16be, fget16le > and so on, then it would stop people thinking "no function to write > an int in binary? Hom hum. Oh, I get it, you don't need one because > you can use fread() and fwrite()". > > And it wouldn't be a huge change, just the addition of a few new > functions. Exactly how many new functions would be needed? Presumably 4 functions for each supported size greater than 1 byte -- but how many such sizes are there, and what are they? -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"