From mboxrd@z Thu Jan 1 00:00:00 1970 From: cowan@mercury.ccil.org (John Cowan) Date: Sat, 26 Mar 2016 18:05:52 -0400 Subject: [TUHS] Command-line options In-Reply-To: <4B49E73B-51BD-4834-AA8C-5F9F74BA784E@ronnatalie.com> References: <201603251443.u2PEh8OZ019856@skeeve.com> <20160325212925.GA5761@minnie.tuhs.org> <20160325232516.GG3766@eureka.lemis.com> <20160326021018.GG897@mercury.ccil.org> <4B49E73B-51BD-4834-AA8C-5F9F74BA784E@ronnatalie.com> Message-ID: <20160326220551.GD12921@mercury.ccil.org> 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