Filetype setting on fopen

Nick Burrett nick at
Tue Aug 6 01:24:48 PDT 2002

Peter Naulls wrote:
> What do people think of this?
> When a file is created (with fopen/open), its type is set depending upon
> its extension.  so .html gets 0xFAF etc.  The lookup is the normal
> Mimetype lookup of course.   Behaviour would be controlled via an
> additional flag to the current riscosify settings.  Should it be
> default?  I can't think of any reason why not.
> I have a number of programs that would benefit from this, and it would
> allow the only RISC OS specific changes to be removed.

This looks like a good idea to me.

I'm assuming that index.html will be saved as "index" with the file type 
set to 0xfaf, rather than as index.html with the file type set to 0xfaf.

We could use this feature to fix the other silly GCC features of saving 
AOF/ALF files as text files.


Nick Burrett
Development Manager, Designer Servers Ltd.

More information about the gcc mailing list