Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!ucsd!ames!vsi1!altnet!uunet!sugar!peter
From: peter@sugar.UUCP (Peter da Silva)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Pathname Comparison
Keywords: function, C, help
Message-ID: <2305@sugar.UUCP>
Date: 14 Jul 88 11:01:00 GMT
References: <483@amanpt1.zone1.com>
Organization: Sugar Land UNIX - Houston, TX
Lines: 25

Well, it looks like it should pretty much work, but this is smaller and might
be a bit more reliable, taken from the source to Browser:

----------
#include 
#include 

SameFile(lock1, lock2)	/* return true if the locks match */
long lock1, lock2;
{
	struct FileLock *flock1, *flock2;

	if(!lock1 || !lock2)	/* handle special case of the zero lock */
		return lock1 == lock2;

	flock1 = (struct FileLock *) (lock1<<2);	/* convert BPTRs */
	flock2 = (struct FileLock *) (lock2<<2);

	return	flock1->fl_Volume == flock2->fl_Volume &&
		flock1->fl_Key == flock2->fl_Key;
}
-- 
-- `-_-' Peter (have you hugged your wolf today?) da Silva.
--   U   Mail to ...!uunet!sugar!peter, flames to alt.dev.null.
-- "Running OS/2 on a '386 is like pulling your camper with an Indy car"