Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site gould9.UUCP Path: utzoo!watmath!clyde!cbosgd!gould9!joel From: joel@gould9.UUCP (Joel West) Newsgroups: net.micro.mac Subject: Re: Desktop file comments from Get Info Message-ID: <488@gould9.UUCP> Date: Sun, 20-Apr-86 13:10:37 EST Article-I.D.: gould9.488 Posted: Sun Apr 20 13:10:37 1986 Date-Received: Mon, 21-Apr-86 08:01:54 EST References: <588@talcott.UUCP> Organization: CACI, Inc. -- La Jolla, Calif. Lines: 50 Summary: Tech note #29 In article <588@talcott.UUCP>, mandel@talcott.UUCP (Victor Mandel) writes: > Given a file, how can you tell if there is a comment in the Get Info box > for that file. What is the formula to link the ID of the 'fcmt' resource > in the Desktop file to the owning file? Tech Note #29, "Resources Contained in the Desktop File", says that the ID on an MFS volume is a hashed result from the object name the algorithm: ; HashString(str: 255): INTEGER; move.l (sp)+,a0 move.l (sp)+,a1 moveq #0,d0 move.b (a1)+,d0 moveq #0,d2 @0 move.b (a1)+,d1 eor.b d1,d2 ror #1,d2 bmi.s @1 neg d2 @1 subq #1,d0 bne @0 move d2,(sp) jmp (a0) For an HFS document it's even easier; the ID is in "kept in the Finder file information record in a new filed called FFComment ([offset] $5E)." I cannot say strongly enough that everyone who's forked out $ for Inside Mac should also send $25 for one year to Macintosh Technical Notes Apple Computer, Inc 20525 Mariania Ave MS3-T Cupertino, CA 95014 I'm not a certified developer, but I couldn't get by without these notes. The software supplements are valuable, too, but at $25 a quarter, they're not as clear-cut a value. I believe many of them are also available for FTP for ARPA sites from the INFO-MAC headquarters. Does anyone want to start a mod.mac.technotes? -- Joel West (619) 457-9681 CACI, Inc. Federal, 3344 N. Torrey Pines Ct., La Jolla, CA 92037 {cbosgd, ihnp4, sdcsvax, ucla-cs} !gould9!joel {seismo!s3sun, hplabs!hp-sdd, sun!pyramid} !gould9!joel joel%gould9.uucp@NOSC.ARPA