[Info-vax] wrong file format
Craig A. Berry
craigberry at nospam.mac.com
Sat Jan 2 23:01:08 EST 2021
On 1/2/21 8:04 PM, Arne Vajhøj wrote:
> On 12/31/2020 10:54 PM, Bill Gunshannon wrote:
>> Does a call to printf/scanf in a C program use RMS?
>> (Really, can someone answer that question?)
>
> You will need someone with access to source to confirm.
>
> But:
> * the traditional story is that all language RTL IO goes
> through RMS - including C RTL (even though that one
> supposedly is a bit more complicated than other
> languages)
> * as a rule of thumb: if the IO works both with a terminal
> and a file then it is likely going through RMS - printf and
> scanf does
I believe calls such as read() and write() may be implemented via $QIO
if the filehandle is a socket and perhaps other things that are not a
regular file or terminal. But otherwise your inference concurs with
mine. fwrite() is infamously (mis)implemented such that it introduces a
record boundary for each character in the string passed to it, at least
for the idiomatic case where the size is passed as 1 and the number of
items is the number of bytes in the string.
More information about the Info-vax
mailing list