Sujet : Re: question about nullptr
De : dave_thompson_2 (at) *nospam* comcast.net
Groupes : comp.lang.cDate : 25. Aug 2024, 21:55:40
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <5g6ncjdsjfe86osi00k8il2ijlfbu8ouva@4ax.com>
References : 1 2 3 4 5
User-Agent : Forte Agent 3.3/32.846
On Mon, 15 Jul 2024 19:49:08 -0400, James Kuyper
<
jameskuyper@alumni.caltech.edu> wrote:
On 7/15/24 18:51, Lawrence D'Oliveiro wrote:
[silliness]
Keep in mind that, in text mode, the <stdio.h> library routines use '\n'
in memory to represent whatever platform-specific method is used in
files to indicate a new line. For example, that can be a simple '\n' on
typical Unix-like machines, '\n\r' or '\r\n' on other operating systems,
and on a number of older systems, it could be converted to and from a
fixed-size block with a character count at the the beginning of the
block. There's no requirement that it be the Unicode line feed character.
I never knew any older system that used a fixed-size block (or rather
record, which in those days was not the same as block) AND prefix
count in the same file, although OS/360 et seq used ONE of them.
And Tandem Enscribe used either offset or count fields (depending on
structure) at _end_ of block, near but not adjacent to records, except
for textfiles had prefix counts per line AND word (of nonblanks) --
but the initial versions of their C implementation couldn't handle
textfiles, so you had to convert them to and from 'data'.