1 #include <atalk/adouble.h>
8 Where it matters, data stored in either of these two structs is in
9 network byte order. Any routines that need to interpret this data
10 locally would need to do the conversion. Mostly this affects the
11 fork length variables. Time values are affected as well, if any
12 routines actually need to look at them.
19 #define HEX2NAD 0 /* unhex */
20 #define BIN2NAD 1 /* unbin */
21 #define SINGLE2NAD 2 /* unsingle */
22 #define NAD2BIN 3 /* macbinary */
23 #define HEX2BIN 4 /* hqx2bin */
24 #define SINGLE2BIN 5 /* single2bin */
25 #define NADHEADER 6 /* header */
26 #define BINHEADER 7 /* mac binary header */
27 #define MEGATRON 8 /* megatron, default, usually HEX2NAD */
28 #define CONVERTS 9 /* # conversions defined */
30 #define OPTION_NONE (0)
31 #define OPTION_HEADERONLY (1 << 0)
32 #define OPTION_STDOUT (1 << 2)
44 u_int16_t fdUnused[3];
52 char name[ ADEDLEN_NAME ];
53 char comment[ ADEDLEN_COMMENT ];
54 u_int32_t forklen[ NUMFORKS ];
55 u_int32_t create_date;
57 u_int32_t backup_date;
58 struct FInfo finder_info;
59 struct FXInfo finder_xinfo;
62 #define MAC_DATE_TO_UNIX(a) (ntohl(a) - 2082844800U)
63 #define MAC_DATE_FROM_UNIX(a) (htonl((a) + 2082844800U))
64 #define AD_DATE_FROM_MAC(a) (htonl(ntohl(a) - 3029529600U))
65 #define AD_DATE_TO_MAC(a) (htonl(ntohl(a) + 3029529600U))
67 #define FILEIOFF_CREATE 0
68 #define FILEIOFF_MODIFY 4
69 #define FILEIOFF_BACKUP 8
70 #define FILEIOFF_ATTR 14
71 #define FINDERIOFF_TYPE 0
72 #define FINDERIOFF_CREATOR 4
73 #define FINDERIOFF_FLAGS 8
74 #define FINDERIOFF_LOC 10
75 #define FINDERIOFF_FLDR 14
76 #define FINDERIOFF_SCRIPT 24
77 #define FINDERIOFF_XFLAGS 25
83 # define S_ISDIR(s) (( s & S_IFMT ) == S_IFDIR )
86 extern char *mtoupath( char *);