ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/extfs_unix.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/extfs_unix.cpp (file contents):
Revision 1.14 by cebix, 2000-07-22T16:07:20Z vs.
Revision 1.22 by asvitkine, 2007-01-24T02:37:06Z

# Line 1 | Line 1
1   /*
2   *  extfs_unix.cpp - MacOS file system for access native file system access, Unix specific stuff
3   *
4 < *  Basilisk II (C) 1997-2000 Christian Bauer
4 > *  Basilisk II (C) 1997-2005 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 161 | Line 161 | static const ext2type e2t_translation[]
161          {".Z", FOURCC('Z','I','V','M'), FOURCC('L','Z','I','V')},
162          {".gz", FOURCC('G','z','i','p'), FOURCC('G','z','i','p')},
163          {".hqx", FOURCC('T','E','X','T'), FOURCC('S','I','T','x')},
164 +        {".bin", FOURCC('T','E','X','T'), FOURCC('S','I','T','x')},
165          {".pdf", FOURCC('P','D','F',' '), FOURCC('C','A','R','O')},
166          {".ps", FOURCC('T','E','X','T'), FOURCC('t','t','x','t')},
167          {".sit", FOURCC('S','I','T','!'), FOURCC('S','I','T','x')},
# Line 217 | Line 218 | static const ext2type e2t_translation[]
218          {NULL, 0, 0}    // End marker
219   };
220  
221 < void get_finfo(const char *path, uint32 finfo, uint32 fxinfo)
221 > void get_finfo(const char *path, uint32 finfo, uint32 fxinfo, bool is_dir)
222   {
223          // Set default finder info
224          Mac_memset(finfo, 0, SIZEOF_FInfo);
# Line 238 | Line 239 | void get_finfo(const char *path, uint32
239          }
240  
241          // No Finder info file, translate file name extension to MacOS type/creator
242 <        struct stat st;
242 <        if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) {
242 >        if (!is_dir) {
243                  int path_len = strlen(path);
244                  for (int i=0; e2t_translation[i].ext; i++) {
245                          int ext_len = strlen(e2t_translation[i].ext);
# Line 254 | Line 254 | void get_finfo(const char *path, uint32
254          }
255   }
256  
257 < void set_finfo(const char *path, uint32 finfo, uint32 fxinfo)
257 > void set_finfo(const char *path, uint32 finfo, uint32 fxinfo, bool is_dir)
258   {
259          // Open Finder info file
260          int fd = open_finf(path, O_RDWR);
# Line 375 | Line 375 | bool extfs_rename(const char *old_path,
375          // Now rename file
376          return rename(old_path, new_path) == 0;
377   }
378 +
379 +
380 + // Convert from the host OS filename encoding to MacRoman
381 + const char *host_encoding_to_macroman(const char *filename)
382 + {
383 +        return filename;
384 + }
385 +
386 + // Convert from MacRoman to host OS filename encoding
387 + const char *macroman_to_host_encoding(const char *filename)
388 + {
389 +        return filename;
390 + }
391 +
392 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines