[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dos2unx (was: Environment variables)



Hi all!

While trying to get the automatic enviroment variable conversion right, 
I encountered the following problem:

Why does _dos2unx() in the mntlib's unx2dos.c only convert slashes, but 
not drive specs?  What does _full_dos2unx() in the TOS library?  (Why at 
all does the TOS lib have to conversion schemes?)

A file name of "x:/foo" looks quite invalid to Unix applications, and lets 
them break sometimes.  (For example:  Assuming you have a symbolic link 
"bin -> u:\h\bin" in U:'s root directory, trying "cd /bin" in Kenneth 
Almquist's bourne shell (which has been floating around in the net for 
some time) yields a "lstat /u: failes".)

That's why I propose translating DOS file names like "x:\foo" to
o   "/foo", if x is _rootdir (which is 'u' most of the time),
o   "/x/foo", if _rootdir == 'u', but x != 'u'
o   "/dev/x/foo" else.

Is there any reason why we should stick to the current _dos2unx() 
functionality?

Michael
-- 
Internet: hohmuth@freia.inf.tu-dresden.de