Subject: Re: Netatalk and Long Filenames
To: None <port-mac68k@netbsd.org>
From: Donald Lee <donlee_68k@icompute.com>
List: port-mac68k
Date: 11/21/2001 11:38:39
OT again...

At 1:05 AM -0600 11/21/01, Emile Schwarz wrote:
>gabriel rosenkoetter <gr@eclipsed.net> wrote:
>
>>Huh. That makes me wonder if these >32 character files are actually
>>visibile to the finder, and then hidden by it, but could be seen on
>>the Mac OS side using a tool like ResEdit. Might be an interesting
>>experiment for the curious.
>
>That is how MacOS 9 (and upper) works; you can set the file name > 31 chars using a special tool (the file is suffixed like #1244 or
>so) but the Finder is not able to let you type more than 31 chars and do not displays them.
>Works only on HFS+ formatted hard disk.

I _have_ to comment that this talk of 32 char filenames does not sound right.

I could easily be wrong about this, but...

My recollection of the bowels of MacOS is that that filename in HFS is
a 32-char "pascal" string.  A "pascal" string has, as its first char, a
length byte.  It's stored this way on disk, and means that the limit is
31 chars.

The file API to MacOS also used the same structure (32 char "pascal" string).
You can imagine - the finder used this API, and was limited to 31 chars.
AFP probably also used it.

When HFS+ came along, the FS supported longer names. (but they're still "pascal"
strings on disk, as I recall.)   This happened at MacOS 8.1, but Apple
didn't have an API that supported the new features of the new FS (longer
names, files > 2Gb, etc.)  The API came along with MacOS 9.0.  However,
I don't think they started using the new API in the finder.

The "save file" dialogs also have an API, and have also undergone changes.
The "old" ones only support the short names, and the new one - Navigation
Services - support the long names.  Nav services has a completely separate API,
and is supported via library back to MacOS 8.5 (?)  Applications can use
one or the other (or both ;-] )

OK.  This is all over AFP, and is useless unless AFP can carry the information.
I spent a few minutes this morning reading Apple's docs on AFP, and it
is not clear to me whether AFP will handle longer names.

SO.....  my 3 cents.

-dgl-