Filetype setting on fopen

Peter Naulls peter at
Tue Aug 6 04:30:18 PDT 2002

In message <4b61ba59e7sbellon at>
          Stefan Bellon <sbellon at> wrote:

> > index.html        index/html  (faf - from mimemap)
> > index.html        index/html  (fff - no mime file)
> >         index/foo   (fff - mimetype lookup fails)
> > index             index       (fff - no ext so no mime lookup)
> I totally agree with Ian.

Well, the behaviour of mimemapping essentially forces this, so there
isn't much choice on the disagreement front :-)

> > The following requested by Alex but I don't know where they'd
> > be used (it's AcornNFS server-side notation, not for unixlib
> > apps to be generating names like this)
> > index.html,abc    index/html  (abc - explicit filetype override mime)
> > index,abc         index       (abc - explicit filetype)
> I thought __riscosify() already has code to handle this?

It does.  It doesn't trim the extension though - John?  John had a
requirement to add this behaviour for CVS stuff.

I'll just make it clear that what I'm doing will be very simple (as
it's currently all I need) - if people want more complex behaviour they
are of course welcome to modify.  My lookup will simply be what comes
after a strrchr(filename, '.').  The existing ,xxx code which comes
after this may override the result of that.

 Peter Naulls - peter at
 Homepage                     -
 RISC OS C Programming        -
 Unix Programs on RISC OS     -

More information about the gcc mailing list