[TUHS] Command-line options
John Cowan
cowan at mercury.ccil.org
Sun Mar 27 08:05:52 AEST 2016
Ronald Natalie scripsit:
> More strictly, UNIX doesn’t have “type” in a file. They’re
> just a bunch of bytes. It’s up to whoever is making the file to
> decide if the name conveys that information or a magic number does.
True. On the IBM PC AT I mentioned earlier, I needed a number of binary
file formats, as it was clear that ASCII-binary conversion was too slow
for the purpose. (Probably not true even then, but what did I know?)
So I duly assigned 16-bit magic numbers for each file format, and
#define'd them in the code. Where did the magic come from? They were
RAD50 encodings of three-letter file codes!
Johnny Billquist scripsit:
> On the PDP-8, you sometimes saw @ used as a prefix character in
> SIXBIT. So you'd use @M to get a CR, and @J for an LF, and @@ would
> mark the end of the string. But not for filenames. But in code, since
> you sometimes used SIXBIT for string constants as well.
Yes, I think that's what I was half-remembering.
--
John Cowan http://www.ccil.org/~cowan cowan at ccil.org
You are a child of the universe no less than the trees and all other acyclic
graphs; you have a right to be here. --DeXiderata by Sean McGrath
More information about the TUHS
mailing list