Subject:
|
Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Tue, 2 Mar 2004 06:44:07 GMT
|
Viewed:
|
6351 times
|
| |
| |
In lugnet.cad.dev, Michael Lachmann wrote:
> In lugnet.cad.dev, Lars C. Hassing wrote:
> > Also I suggest a \ after <LDRAWDIR>: "2=<HIDE><LDRAWDIR>\P"
> > Unix platform should of course convert to /.
>
> I cannot see any reason for this but we could eliminate it later on
> anyway. - at least Windows doesn't care about single or double backslashes.
I believe that this isn't entirely true. We had a problem at work where a
program didn't work right in Windows 9x (I think it was 98, but I'm not entirely
sure), but worked fine in Windows NT and Windows 2000. After some careful
debugging, I determined that that version of Windows didn't accept a double
backslash in a path. Aditionally, there is of course special behavior for \\
(or //, for that matter) at the beggining of a path.
On a side note, all Windows API calls accept / as a path separator with the
exact same meaning as \. They can even both be used in the same path (ie
C:/ldraw\parts). This might even date back to the DOS days, although I'm not
sure on that one. One catch is that / on the command line is treated entirely
differently from \, making it impossible to use it on the command line (or at
the least very difficult). You can, however, use / in the address bar of
Explorer (and I do mean explorer, not IE, although it works in IE as well with
the appropriate file:// URL syntax).
Having said all that, I think it looks better to have the \ in the ini file. I
think it makes it more obvious that a path is being specified when just glancing
at the file. I think any program making use of the file needs to carefully make
sure a single \ (or /) separates the special dir from whatever's after it, but I
don't think either syntax in the ini file is easier or more difficult than the
other. (I personally try to always strip trailing \ and / characters off my
paths when storing them in variables, and then always add them back when
concatenating path segments together.)
--Travis Cobbs
|
|
Message has 2 Replies: | | Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
|
| (...) Sorry to immediately respond to my own respond to my own reply, but I forgot one minor detail. The corallary to this bit is that to be safe, Windows programs should treat both / and \ as path separators any time they parse paths, and work (...) (21 years ago, 2-Mar-04, to lugnet.cad.dev)
| | | Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
|
| (...) Directory separators were added in DOS 2, which accepted both / and \ for that purpose. The feature was imitated from Unix. At the time, there also appeared a config.sys setting for *switch* character, which would default to / but could be set (...) (20 years ago, 15-Jul-04, to lugnet.cad.dev)
|
Message is in Reply To:
| | Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
|
| Ok I hop on again ... "Lars C. Hassing" <sp.lars@am.hassings.dk> schrieb im Newsbeitrag news:Htnz7B.G2z@lugnet.com... (...) located (...) directories, (...) (URL) However, I suggest section name [LDrawSearch] which is more in line with [LDraw]. I (...) (21 years ago, 1-Mar-04, to lugnet.cad.dev)
|
132 Messages in This Thread: (Inline display suppressed due to large size. Click Dots below to view.)
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|