index.c

tmi2_fluffos_v2/lib/adm/simul_efun/index.c · 436 B

From the archive tmi2_fluffos_v2.zip

Download the archive   « Back to the archive contents

/*
// Index.c written by Sulam@TMI
// Yet another handy little simul_efun for you!
// Happily sliced into a module by Buddha(2-18-92)
// A part of the TMI distribution mudlib... keep the header...
*/

int
index(mixed target, mixed *array, int offset)
{
   int i;
   
   if( !pointerp(array) || !intp(offset) ) return -1;
   array = array[offset..<1];
   if( (i = member_array(target, array)) < 0 ) return -1;
   else return i+offset;
}

Site Stats

Snippets: 1791
Codebases: 571