Subject:
|
Re: Online Mac instructions.
|
Newsgroups:
|
lugnet.cad.dev.mac
|
Date:
|
Sat, 30 Mar 2002 19:57:24 GMT
|
Viewed:
|
5273 times
|
| |
| |
In lugnet.cad.dev.mac, Andrew Allan writes:
> As to the HFS filing system, LdGLite (Mac) doesn't use it as the source is
> written entirely in ANSI C with the exception of the Mac compatibility
> section I added.
I would strongly suspect that the ANSI C functions that you are calling are
internally using the Mac (HFS) File System. I don't see how it could do
otherwise. The library functions may be doing a crafty dance to accomplish
certain things, but the Mac File System is the underlying base.
> The HFS prefers to handle files differently (ie by
> allocating an id number to each file dynamically as it is loaded) rather
> than use absolute pathnames (infact the Mac litrature reccomends strongly
> against this), however to make the program run I have had to ignore
> conventional Mac wisdom. In the Mac source I added I handle converting HFS
> file allocations to absolute pathnames and back
The Mac File System allocates a 'refNum' when a file is opened. There are other
ways to reference an (as yet) unopened file than full path name. The most common
is to use an FSSpec (which contains a vRefNum [volume reference number], a parID
[the number of the directory number containing that file] and the file name
itself. Using an FSSpec may require a bit more mac-centric code, but is a good
way to do it. There are other methods depending on your needs. One of the
dangers in using a full path name is that the Mac File System has no
requirements that volume names be unique. You may rightly have multiple mounted
volumes with the same name. This typically can occur when mounting network
volumes, but may occur on local volumes as well. If you have multiple volumes
mounted with the same name, then accessing a file via full-path name may produce
unpredictable results (assuming that the left most part of the path [volume
name] is the one with multiple occurences).
As an example: many Mac OS distributions came with a default volume name of
'Macintosh HD'. If you did not change the name, then you may find other
mountable volumes on the network with the same name.
Ray
|
|
Message is in Reply To:
| | Re: Online Mac instructions.
|
| As case sensitivity, I haven't changed the actual parser code, so if the directory names are in upper case then it should work. However I must confess I haven't tried using the linux ldraw primitives, so to redress this, I have just downloaded the (...) (23 years ago, 30-Mar-02, to lugnet.cad.dev.mac)
|
17 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|