Re: Supporting Macintosh FinderInfo/Resource Fork in Linux NWFS 2.0

Jeff V. Merkey (jmerkey@timpanogas.com)
Sun, 12 Dec 1999 15:30:14 -0700


Alan Cox wrote:
>
> Take a look at the HFS file system. We present the MAC directories as a
> directory containing dot files. There is a convention for this and we honour
> the convention that is used by Netatalk (the main Unix/Linux appletalk server
> package). Thus you see
>
> foo.gif
> .AppleDouble/foo.gif
>
> This also means you can easily manipulate just the gif file directly from
> non mac systems. See fs/hfs/HFS.txt
>

I will go look at this. I am assuming that what you are saying is that
I need to present the Resource Fork as a file with an inode in this
special directory for all MAC finder info and resource forks. Am I
getting this correctly?

> The second issue is charset translation. I think you can simply use the
> code from fs/hfs/trans.c for this.
>

I am already handling the char set traslation for English names in
NWCREATE.C for MAC clients, so this is probably ok, but I'll check this
out to make sure I am doing it the same way hfs does.

Also, on a side note, I used the ACS_* characters for the ncurses stuff,
but for some reason, the display is still striping the 8th bit during
output.

Here's a code fragment that doesn't seem to output chars above 127 on my
bash shell (???). I'd love to know what's wrong here. Any ideas?

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include "termios.h"
#include "sys/ioctl.h"

char buf[10] = { 201, 187, 200, 188, 204, 185, 186, 205, 0x1E, 0x1F };

int main(int argc, char *argv[])
{
register int i;
struct termios term;

ioctl(1, TCGETS, &term);
term.c_iflag &= ~ISTRIP;
term.c_cflag |= CS8;
ioctl(1, TCGETS, &term);

for (i=0; i < 10; i++)
printf("[%c]\n", buf[i]);

return 0;

}

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/