]> git.saurik.com Git - apple/hfs.git/blob - livefiles_hfs_plugin/lf_hfs_defs.h
hfs-522.0.9.tar.gz
[apple/hfs.git] / livefiles_hfs_plugin / lf_hfs_defs.h
1 //
2 // lf_hfs_defs.h
3 // livefiles_hfs
4 //
5 // Created by Yakov Ben Zaken on 22/03/2018.
6 //
7
8 #ifndef lf_hfs_defs_h
9 #define lf_hfs_defs_h
10
11 #include <MacTypes.h>
12 #include "lf_hfs_vnode.h"
13
14 typedef const unsigned char * ConstUTF8Param;
15 typedef struct vnode* FileReference;
16 typedef const UniChar * ConstUniCharArrayPtr;
17
18 enum {
19 dskFulErr = -34, /*disk full*/
20 bdNamErr = -37, /*there may be no bad names in the final system!*/
21 paramErr = -50, /*error in user parameter list*/
22 memFullErr = -108, /*Not enough room in heap zone*/
23 fileBoundsErr = -1309, /*file's EOF, offset, mark or size is too big*/
24 kTECUsedFallbacksStatus = -8783,
25
26 };
27
28 enum {
29 fsRtParID = 1,
30 fsRtDirID = 2
31 };
32
33 enum {
34 /* Mac OS encodings*/
35 kTextEncodingMacRoman = 0L,
36 kTextEncodingMacJapanese = 1,
37 kTextEncodingMacChineseTrad = 2,
38 kTextEncodingMacKorean = 3,
39 kTextEncodingMacArabic = 4,
40 kTextEncodingMacHebrew = 5,
41 kTextEncodingMacGreek = 6,
42 kTextEncodingMacCyrillic = 7,
43 kTextEncodingMacDevanagari = 9,
44 kTextEncodingMacGurmukhi = 10,
45 kTextEncodingMacGujarati = 11,
46 kTextEncodingMacOriya = 12,
47 kTextEncodingMacBengali = 13,
48 kTextEncodingMacTamil = 14,
49 kTextEncodingMacTelugu = 15,
50 kTextEncodingMacKannada = 16,
51 kTextEncodingMacMalayalam = 17,
52 kTextEncodingMacSinhalese = 18,
53 kTextEncodingMacBurmese = 19,
54 kTextEncodingMacKhmer = 20,
55 kTextEncodingMacThai = 21,
56 kTextEncodingMacLaotian = 22,
57 kTextEncodingMacGeorgian = 23,
58 kTextEncodingMacArmenian = 24,
59 kTextEncodingMacChineseSimp = 25,
60 kTextEncodingMacTibetan = 26,
61 kTextEncodingMacMongolian = 27,
62 kTextEncodingMacEthiopic = 28,
63 kTextEncodingMacCentralEurRoman = 29,
64 kTextEncodingMacVietnamese = 30,
65 kTextEncodingMacExtArabic = 31, /* The following use script code 0, smRoman*/
66 kTextEncodingMacSymbol = 33,
67 kTextEncodingMacDingbats = 34,
68 kTextEncodingMacTurkish = 35,
69 kTextEncodingMacCroatian = 36,
70 kTextEncodingMacIcelandic = 37,
71 kTextEncodingMacRomanian = 38,
72 kTextEncodingMacUnicode = 0x7E,
73
74 kTextEncodingMacFarsi = 0x8C, /* Like MacArabic but uses Farsi digits */ /* The following use script code 7, smCyrillic */
75 kTextEncodingMacUkrainian = 0x98, /* The following use script code 32, smUnimplemented */
76 };
77
78 #if DEBUG
79 void RequireFileLock(FileReference vp, int shareable);
80 #define REQUIRE_FILE_LOCK(vp,s) RequireFileLock((vp),(s))
81 #else
82 #define REQUIRE_FILE_LOCK(vp,s)
83 #endif
84
85 #define BlockMoveData(src, dest, len) bcopy((src), (dest), (len))
86
87 #define ClearMemory(start, length) bzero((start), (size_t)(length));
88
89 enum {
90 /* Finder Flags */
91 kHasBeenInited = 0x0100,
92 kHasCustomIcon = 0x0400,
93 kIsStationery = 0x0800,
94 kNameLocked = 0x1000,
95 kHasBundle = 0x2000,
96 kIsInvisible = 0x4000,
97 kIsAlias = 0x8000
98 };
99 #endif /* lf_hfs_defs_h */