WANTED: ""/filename == ./filename

WANTED: ""/filename == ./filename

Post by Leonard Norrga » Wed, 30 Jan 1991 11:03:16



As you might have observed, the Amiga notation for the current
directory, "", doesn't denote the current directory anymore if you
append a filename. Strange and weird. I want ""/filename to match
./filename on unix systems. I'll go for any hack adding this.
Looks like a thing that could be useful in sksh as well...
  Anybody have a solution?

-- Leonard

 
 
 

WANTED: ""/filename == ./filename

Post by Olaf 'Rhialto' Seibe » Thu, 31 Jan 1991 02:07:45



>As you might have observed, the Amiga notation for the current
>directory, "", doesn't denote the current directory anymore if you
>append a filename. Strange and weird. I want ""/filename to match
>./filename on unix systems. I'll go for any hack adding this.
>Looks like a thing that could be useful in sksh as well...
>  Anybody have a solution?

I am afraid that there is no real solution without introducing some new
name that is equivalent to "". This is because the name of the current
directory is not ``quote-quote'', but ``'', the empty name. So if you
append ``/filename'' to the empty string, the result is again ``/filename''.

Note, by the way, that even in Unix the empty name (implicitly)
indicates the current directory, since the name ``.'' which is normally
used for that purpose is usually just a normal directory entry like
any other.

A possible hack would be some handler which intercepts all DOS packets
sent to file systems, interprets all path names in them, rewriting them
into standard notation, and passing them on to the original filesystem.
(The simplest rewrite of a Lock-path pair would be into a Lock on the
intended file or directory and the empty path.) This can certainly
be done, if you take care of all the details which I forgot ;-)

Quote:>-- Leonard

--
--

How can you be so stupid if you're identical to me? -Robert Silverberg

 
 
 

WANTED: ""/filename == ./filename

Post by Joe Pork » Fri, 01 Feb 1991 04:26:31




>>As you might have observed, the Amiga notation for the current
>>directory, "", doesn't denote the current directory anymore if you
>>append a filename. Strange and weird. I want ""/filename to match
>>./filename on unix systems. I'll go for any hack adding this.
>>Looks like a thing that could be useful in sksh as well...
>>  Anybody have a solution?
>I am afraid that there is no real solution without introducing some new
>name that is equivalent to "". This is because the name of the current
>directory is not ``quote-quote'', but ``'', the empty name. So if you
>append ``/filename'' to the empty string, the result is again ``/filename''.

Of course, under 2.x you can use MakeLink . "" and  MakeLink .. /
to get your . and .. to work.
 
 
 

WANTED: ""/filename == ./filename

Post by Randell Jes » Fri, 01 Feb 1991 17:42:34



>Of course, under 2.x you can use MakeLink . "" and  MakeLink .. /
>to get your . and .. to work.

        Just don't do "dir all".  :-(  Many system utilities are only
marginally knowlegable about links at this point, though that will change.
Be careful with links to directories, particularily self-referential ones.
(Unix makes this only usable from super-user mode.)

--
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.

The compiler runs
Like a swift-flowing river
I wait in silence.  (From "The Zen of Programming")  ;-)

 
 
 

WANTED: ""/filename == ./filename

Post by Peter da Sil » Fri, 01 Feb 1991 21:40:10



> Strange and weird. I want ""/filename to match
> ./filename on unix systems.

Change your thinking. To add a filename to a directory spec just add the
filename:

        ""            "filename"
        "/"           "/filename"
        "dev:"                "dev:filename"
        "subdir/"     "subdir/filename"

That last one is where you have to make a breakthrough. It works. Then, to
go back up a level append a slash. It works.

AmigaDOS isn't UNIX, even if it feels like "UNIX LITE".
--
Peter da Silva.   `-_-'

 
 
 

WANTED: ""/filename == ./filename

Post by Darren N » Sat, 02 Feb 1991 03:56:08



>Be careful with links to directories, particularily self-referential ones.
>(Unix makes this only usable from super-user mode.)

Or symbolic links to a parent directory.  Which UNIX doesn't handle
very well either.       -- Darren, the bitten one
--
--- Darren New --- Grad Student --- CIS --- Univ. of Delaware ---
----- Network Protocols, Graphics, Programming Languages,
      Formal Description Techniques (esp. Estelle), Coffee, Amigas -----
              =+=+=+ Let GROPE be an N-tuple where ... +=+=+=
 
 
 

WANTED: ""/filename == ./filename

Post by Mike (My Watch Has Windo » Sat, 02 Feb 1991 01:41:37


   (Unix makes this only usable from super-user mode.)

I still maintain that this is correct, as soft links will allow for
links to directories without creating the problems associated with
hard links. If hard links to directories wind up in 2.0 and I'm right,
taking them out will be nearly impossible. If I'm wrong and they don't
wind up in 2.0, adding them in later will be easy. For that reason, I
still wish that the facility not be in the ROM version.

Come to think of it, the change doesn't have to be in ROM. If the
MakeLink command won't link to a directory, and the appropriate OS
calls are documented as having unpredictable results if a hard link to
a directory is created, that should be sufficient for the present. A
later WB upgrade can then replace MakeLink if I'm wrong.

        <mike
--
My feet are set for dancing,                            Mike Meyer

My heart is like a loaded gun,                          decwrl!mwm
Won't you let the water run.

 
 
 

1. AMIGA 4000 with WARP sale"""""""""""""""""""""""""

4000 50megs ram,Warp 040/40, 120HD,320HD,340HD,2meg chip.
All mint $4200  

4000 24megs ram,Warp 040/40mhz, 120HD,500HD,2meg chip ram.
Mint shape
$3500

Both systems work great and the 50 meg system has lots of software
on it.
24meg system has some.

Will include a bernoulli disk full of objects for either system.
150 meg disk with tons of objects  etc.

2. secondary and primary on the same machine

3. Origin of "boot", "bug", "crash",...

4. Notes 5 with Lotus Organizer

5. Mind.forth "mind21.lha" in "Files" #43 "Programming"

6. Tower Assault

7. Wanted: Gustaf "Lizardking" Grevberg: "Physiology" CD

8. STiK and 2400 modems

9. "Last Action Hero" movie; does it "suck" ?

10. Mac "find" performs far better than Unix O(n^2) "find"

11. Mac OS just sucks -- "ease of use" = "lack of freedom" ?

12. "hero" or "super hero"