File:  [CSRG BSD Unix] / 43BSD / contrib / icon / rt / locate.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

#include "../h/rt.h"
#ifdef SETS

/*
 * locate - returns 1 if obj is in the hash chain which
 *  starts at ep in some set, returns 0 if not there
 *  (used only in diff.c and inter.c).
 */

locate(ep, obj)
struct b_selem *ep, *obj;
   {
   while (ep != NULL) {
      if (ep->hnum > obj->hnum)
          return 0;
      else if ((ep->hnum == obj->hnum) &&
                 (equiv(&ep->setmem, &obj->setmem)))
          return 1;
      ep = (struct b_selem *) BLKLOC(ep->sblink);
      }
   return 0;
   }
#else SETS
char junk;	/* prevent null object file */
#endif SETS

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.