+extern int CompareCatalogKeys(
+ HFSCatalogKey *searchKey,
+ HFSCatalogKey *trialKey);
+
+extern int CompareExtendedCatalogKeys(
+ HFSPlusCatalogKey *searchKey,
+ HFSPlusCatalogKey *trialKey);
+
+extern void cat_convertattr(
+ struct hfsmount *hfsmp,
+ CatalogRecord * recp,
+ struct cat_attr *attrp,
+ struct cat_fork *datafp,
+ struct cat_fork *rsrcfp);
+
+extern int cat_convertkey(
+ struct hfsmount *hfsmp,
+ CatalogKey *key,
+ CatalogRecord * recp,
+ struct cat_desc *descp);
+
+extern int cat_getkeyplusattr(
+ struct hfsmount *hfsmp,
+ cnid_t cnid,
+ CatalogKey *key,
+ struct cat_attr *attrp);
+
+/* Hard link functions. */
+
+extern int cat_check_link_ancestry(
+ struct hfsmount *hfsmp,
+ cnid_t parentid,
+ cnid_t pointed_at_cnid);
+
+extern int cat_set_childlinkbit(
+ struct hfsmount *hfsmp,
+ cnid_t cnid);
+
+#define HFS_IGNORABLE_LINK 0x00000001
+
+extern int cat_resolvelink( struct hfsmount *hfsmp,
+ u_int32_t linkref,
+ int isdirlink,
+ struct HFSPlusCatalogFile *recp);
+
+extern int cat_createlink( struct hfsmount *hfsmp,
+ struct cat_desc *descp,
+ struct cat_attr *attr,
+ cnid_t nextlinkid,
+ cnid_t *linkfileid);
+
+/* Finder Info's file type and creator for directory hard link alias */
+enum {
+ kHFSAliasType = 0x66647270, /* 'fdrp' */
+ kHFSAliasCreator = 0x4D414353 /* 'MACS' */
+};
+
+extern int cat_deletelink( struct hfsmount *hfsmp,
+ struct cat_desc *descp);
+
+extern int cat_update_siblinglinks( struct hfsmount *hfsmp,
+ cnid_t linkfileid,
+ cnid_t prevlinkid,
+ cnid_t nextlinkid);
+
+extern int cat_lookuplink( struct hfsmount *hfsmp,
+ struct cat_desc *descp,
+ cnid_t *linkfileid,
+ cnid_t *prevlinkid,
+ cnid_t *nextlinkid);
+
+extern int cat_lookup_siblinglinks( struct hfsmount *hfsmp,
+ cnid_t linkfileid,
+ cnid_t *prevlinkid,
+ cnid_t *nextlinkid);
+
+extern int cat_lookup_lastlink( struct hfsmount *hfsmp,
+ cnid_t startid,
+ cnid_t *nextlinkid,
+ struct cat_desc *cdesc);
+
+extern int cat_lookup_dirlink(struct hfsmount *hfsmp,
+ cnid_t dirlink_id,
+ u_int8_t forktype,
+ struct cat_desc *outdescp,
+ struct cat_attr *attrp,
+ struct cat_fork *forkp);
+
+extern int cat_update_dirlink(struct hfsmount *hfsmp,
+ u_int8_t forktype,
+ struct cat_desc *descp,
+ struct cat_attr *attrp,
+ struct cat_fork *rsrcforkp);
+