|
|
@ -25,14 +25,18 @@ int cmp_find_many(usize nhaystacks; const map_t *pIN needle, usize sizes[pOUT nh
|
|
|
|
va_start(v_haystacks, nhaystacks);
|
|
|
|
va_start(v_haystacks, nhaystacks);
|
|
|
|
|
|
|
|
|
|
|
|
const map_t* pINOUT haystack;
|
|
|
|
const map_t* pINOUT haystack;
|
|
|
|
|
|
|
|
register int rval=-1;
|
|
|
|
for(usize i=0;i<nhaystacks;i++)
|
|
|
|
for(usize i=0;i<nhaystacks;i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
usize *pOUT size = sizes + i;
|
|
|
|
usize *pOUT size = sizes + i;
|
|
|
|
haystack = va_arg(v_haystacks, const map_t* pIN);
|
|
|
|
haystack = va_arg(v_haystacks, const map_t* pIN);
|
|
|
|
if(!haystack || !haystack->origin) FATAL("haystack %lu was null or its origin was null", i);
|
|
|
|
if(!haystack || !haystack->origin) FATAL("haystack %lu was null or its origin was null", i);
|
|
|
|
if(!cmp_find(needle, haystack, size)) return (int)i;
|
|
|
|
if(!cmp_find(needle, haystack, size)) {
|
|
|
|
|
|
|
|
rval = (int)i;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
va_end(v_haystacks);
|
|
|
|
va_end(v_haystacks);
|
|
|
|
return -1;
|
|
|
|
return rval;
|
|
|
|
}
|
|
|
|
}
|
|
|
|