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.

> This is an impossible task.

Even if you had to distribute a list of magic numbers, /etc/magic
from any unix box covers a wide range of filetypes, and is 75k on
my linux box. Hardly huge, and that includes a lot that could easily
be done away with for the SAM.

> The OS would start out with the basic say 24 SAM file types
> as magic numbers and wouldn't recognise any new ones which were created
> until a new version of the OS is spread to EVERYONE.

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.

> 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????

> The extension would have to really be an extension

But then the OS still has to know what all the extensions mean, doesn't it?

> What have you lot got to say about that?

See above ^

rjp

Reply via email to