riscosify and /home/riscos/env/

Alex Waugh alex at alexwaugh.com
Tue Jun 14 14:56:36 PDT 2005


In message <20050614213117.GO5969 at chiark.greenend.org.uk>
          Theo Markettos <theo at markettos.org.uk> wrote:

> I've been working on a patch to convert Unix filename
> /home/riscos/env/foo/bar/ into RISC OS filename foo:bar in __riscosify()
> Before I submit it I have a few questions:
> 
> As part of this it's quite valuable to tidy up Unix paths before they get
> converted to make matching path components easier, so
> /../home////fred/../riscos/./env//spong gets converted to
> /home/riscos/env/spong.  This also improves the matching of special cases
> /var, /usr, /dev and mappings supplied in UnixFS$/ variables.  Currently
> __riscosify translates /foo/bar/../blob into $.foo.bar.^.blob, but under
> such a scheme it would translate to $.foo.blob.  Would this cause problems
> for anyone?  In my patch this only affects pathnames starting with a slash,
> but the tidying code will work on relative pathnames too.

On Unix it may cause differences if there are symlinks in the path, but
I can't think of any similar problems on RISC OS.

> Secondly as doing translations is fairly complex I have a small conformance
> testing program which can test different corner cases.  Is there any
> interest in collecting a bunch of such programs into a testsuite?  It would
> make testing future modifications easier and an automatic testbench might
> help diagnose future problems.

unixlib/source/test already contains some test programs including a
riscosify one, and any additions would be welcome. It would be great if
it was more automated, so it was simple to compile and run all the test
programs in one go.

Alex

-- 
Alex Waugh                                           alex at alexwaugh.com

PHP, Roots, Subversion, WebJames and more from http://www.alexwaugh.com/



More information about the gcc mailing list