Path: utzoo!mnetor!uunet!husc6!sri-unix!quintus!pds From: pds@quintus.UUCP (Peter Schachte) Newsgroups: comp.sys.amiga Subject: Re: New Assigns Message-ID: <738@sandino.quintus.UUCP> Date: 7 Mar 88 22:19:37 GMT References: <8802270215.AA06588@jade.berkeley.edu> <3414@cbmvax.UUCP> <23728@amdahl.uts.amdahl.com> Organization: Quintus Computer Systems, Mountain View, CA Lines: 45 Summary: People will want to create their own paths In article <23728@amdahl.uts.amdahl.com>, kim@amdahl.uts.amdahl.com (Kim DeVaughn) writes: > In article <3414@cbmvax.UUCP>, andy@cbmvax.UUCP (Andy Finkel) writes: > > Now, maybe what you actually mean is that we should have a device > > path and a library path. > > Let's not stop there. Add to the list, a "cd" path, and an "operand" path > (i.e., a file searching path). > > Any others? Someone already mentioned fonts. One I sometimes want is an include path so I can put some of my includes in ram:. Perhaps another for shell scripts, if we're going to have to keep them separate (I like the way shell does this much better). If we ever get an extensible emacs, we'll need a path to search for emacs mock lisp (or whatever) files. SB-Prolog needs (and has) a path for the files it autoloads. It would be good to have a path for configuration files (every program seems to have its own idea where to find config files). Any program may want to search a path (or several!) to find files it needs to use. I think the path mechanism badly needs to be generalized, so that anyone can create a path, and it is easy for code to search a path for a file. That's why I believe assigns are the right place to do that: they're easy to set up and use. As for implementation: why is it so {hard | inefficient}? It would be easy to have a data structure struct pathelt { struct Lock *lock; struct char *name; struct pathelt *next; } An assign would point to one of these. When you go to open a file in a path assign, you first check the lock. If it's NULL, you lock the name and store it in lock. Then you use the lock and the file name just as you do now for an assign. If you don't find it, you repeat the process for next (unless next is NULL, in which case you fail). Ta Da. No problem. -- -Peter Schachte pds@quintus.uucp ...!sun!quintus!pds