#include #include "UDFCDF_Str.h" #include "UDFCDF_Ansi.h" #include "util_str.h" ByTe_2 BegEndSrc (ByTe_2 Beg ) { extern struct UserDefs InFo; struct SrcInfo *S, *Sb; register ByTe_2 *s1, *sEnD; u_ByTe_2 BVeR, VeR; u_ByTe_4 BKeY, KeY; ByTe_2 Cntr = 0, NumSrc; Sb = (struct SrcInfo *)InFo.Src; /* pntr to first src */ NumSrc = InFo.EmptySrc - 1; /* last src number */ if (Beg > NumSrc) /* out of sources */ return (0); /* return none left */ s1 = (ByTe_2 *)InFo.SOrder + Beg; /* source order array */ sEnD = (ByTe_2 *)InFo.SOrder + NumSrc; /* source order array */ S = Sb + *s1; /* first source */ BKeY = S->Key; /* base key */ BVeR = S->Ver; KeY = BKeY; /* first key */ VeR = BVeR; /* first key */ while (BKeY == KeY && BVeR == VeR && s1 <= sEnD) /* loop over source */ { /* BEG SOURCE LOOP */ ++Cntr; /* num same keys */ S = Sb + *(++s1); /* next source */ KeY = S->Key; /* next key */ VeR = S->Ver; } /* BEG SOURCE LOOP */ return (Cntr); }