Lines Matching defs:src
25 ** Find the longest prefix of tar that match some substring of src
43 /* initial assumptions: src[0] == tar[0] && src+n_match <= endsrc */
44 static long domatch(char* src, char* endsrc, char* tar, char* endtar, long n_match)
49 for(sp = src+n_match, tp = tar+n_match; sp > src; --sp, --tp)
54 if(sp == src)
56 sp = src+n_match+1;
66 long mtchstring(char* src, long n_src, char* tar, long n_tar, char** match)
78 if(src != Cursrc)
87 if(!src || n_src <= 0 || !tar || n_tar <= 0)
90 endsrc = src + n_src;
94 if(src != Cursrc)
96 Cursrc = src;
109 else for(sp = src; sp < endsrc; ++sp)
151 src = n_ind > 0 ? *ind++ : endsrc;
154 else for(; src+n_match < endsrc; ++src)
155 if(*src == *tar)
157 if(src+n_match >= endsrc)
160 if((m = domatch(src,endsrc,tar,endtar,n_match)) > n_match)
163 *match = src;