+/* -------------------- */
+static struct finderinfo *unpack_buffer(struct finderinfo *finfo, char *buffer)
+{
+ memcpy(&finfo->f_type, buffer +FINDERINFO_FRTYPEOFF, sizeof(finfo->f_type));
+ memcpy(&finfo->creator, buffer +FINDERINFO_FRCREATOFF, sizeof(finfo->creator));
+ memcpy(&finfo->attrs, buffer +FINDERINFO_FRFLAGOFF, sizeof(finfo->attrs));
+ memcpy(&finfo->label, buffer +FINDERINFO_FRFLAGOFF, sizeof(finfo->label));
+ finfo->attrs &= 0xff00; /* high 8 bits */
+ finfo->label &= 0xff; /* low 8 bits */
+
+ return finfo;
+}
+
+/* -------------------- */
+static struct finderinfo *
+unpack_finderinfo(struct vol *vol, struct path *path, struct adouble **adp, struct finderinfo *finfo, int islnk)
+{
+ packed_finder buf;
+ void *ptr;
+
+ *adp = adl_lkup(vol, path, *adp);
+ ptr = get_finderinfo(vol, path->u_name, *adp, &buf,islnk);
+ return unpack_buffer(finfo, ptr);
+}
+
+/* -------------------- */