R Parlington wrote... (in reply to me) >Stefan Drissen wrote... > >> Firstly a magic number is rubbish. Any operating system will have to >> know beforehand what all the magic numbers signify. > >Why? Only the applications that need to understand a particular filetype >need to know the magic number. eg Linux itself doesn't know what 'GIF' >means at the start of a file -- it attaches no significance to that. >However, xv knows that 'GIF' at the start means it's a GIF image, and >so can be handled appropriately.
Wouldn't it then be easier for the user if the file type was contained as legible text rather than some number? After all, isn't a combination of 4 text charachters just a big magic number (in the range [0..96*96*96*96-1])? >It's not the job of the OS to recognise files though (although you'd have >to make array files/screen$/basic files recognisable -- probably). Like >I said, it's the application that uses magic numbers. If you need the OS >to understand them, get `file' and port that to the SAM. This is what I mean with the OS having to recognize certain file types. The OS doesn't have to recognize the other types. But it would be nice to know what kind of files are on a disc when you do a DIR. >> The MSDOS extension system is rather good I think, > >:) > >> just that the names are a bit short. >> So have a dos with say 24 characters for the name and 8 for the extension. > >8 byte extensions???? Why not? Wouldn't you be able to give better descriptions to the file types this way instead of cramming everything into silly three letter names? Stefan Drissen aka Solar Flare of Entropy E-mail: [EMAIL PROTECTED] (Stefan Drissen) S-mail: Zevende Herven 6, 5232 JZ 's-Hertogenbosch, The Netherlands

