Searched refs:mid (Results 1 - 19 of 19) sorted by relevance

/ast/src/lib/libast/string/
H A Dstrsearch.c44 register char* mid; local
49 mid = lo + (((hi - lo) / siz) / 2) * siz;
50 if (!(v = context ? (*(Strcmp_context_f)comparf)(name, *((char**)mid), context) : (*comparf)(name, *((char**)mid))))
51 return (void*)mid;
53 lo = mid + siz;
54 else hi = mid - siz;
H A Dstrpsearch.c57 register char* mid; local
73 mid = lo + (sequential ? 0 : (((hi - lo) / siz) / 2) * siz);
74 if (!(v = c - MAP(m, *(s = *((unsigned char**)mid)))) || *s == '[' && !(v = c - MAP(m, *++s)) && (v = 1))
95 return (void*)mid;
99 while ((mid -= siz) >= lo && (s = *((unsigned char**)mid)) && ((c == MAP(m, *s)) || *s == '[' && c == MAP(m, *(s + 1))));
120 lo = mid + siz;
122 hi = mid - siz;
/ast/src/lib/libcs/
H A Dmsgindex.c37 register const char** mid; local
47 mid = lo + (hi - lo) / 2;
49 m = (unsigned char*)*mid;
55 return mid - msg_info.name;
60 lo = mid + 1;
65 hi = mid - 1;
/ast/src/cmd/builtin/
H A Dwhat.c82 register size_t mid; local
92 if ((mid = sfvalue(ip)) <= (index = 3))
94 e = buf + mid;
97 while ((index += skip[buf[index]]) < mid);
103 switch (mid)
106 s[0] = buf[mid - 3];
109 s[1] = buf[mid - 2];
112 s[2] = buf[mid - 1];
119 if ((mid = sfvalue(ip)) <= (index = 3))
121 e = buf + mid;
[all...]
H A Dlook.c98 Sfoff_t mid; local
171 mid = (low + high) / 2;
172 sfseek(fp, mid, SEEK_SET);
174 mid = sftell(fp);
175 if (mid > high)
178 low = mid;
183 high = mid - len;
185 low = mid;
188 if((mid+=sfvalue(fp)) >= high)
190 high = mid;
[all...]
/ast/src/cmd/3d/
H A Dlib.c344 register Map_t* mid; local
358 mid = 0;
365 message((-12, "T_PREFIX: %-*s: key=%-*s mid=%-*s", keysize, key, lo->keysize, lo->key, mid ? mid->keysize : 1, mid ? mid->key : "-"));
372 mid = lo;
382 if (mid && mid
[all...]
/ast/src/cmd/tests/cdt/
H A Dtbags.c62 long i, k, mid, n_mid, n_obj, meth; local
109 mid = ((N_OBJ/R_OBJ)/2) * R_OBJ; /* key for middle group */
110 proto.key = mid;
116 terror("%s: dtatmost (key=%d) failed", name, mid);
121 terror("%s: dtatleast (key=%d) failed", name, mid);
140 { if(o->key == mid)
149 { if(o->key == mid)
170 if(o->key == mid)
181 if(o->key == mid)
192 if(o->key == mid)
[all...]
/ast/src/cmd/mailx/
H A Dlocal.c734 register char* mid; local
743 mid = lo + (sequential ? 0 : (((hi - lo) / siz) / 2) * siz);
744 if (!(v = c - *(s = *((unsigned char**)mid))) || *s == '[' && !(v = c - *++s) && (v = 1)) {
759 return (void*)mid;
762 while ((mid -= siz) >= lo && (c == *(s = *((unsigned char**)mid)) || *s == '[' && c == *(s + 1)));
781 lo = mid + siz;
783 hi = mid - siz;
805 register char* mid; local
810 mid
[all...]
H A Dmailx.h485 int mid; /* mid character match */ member in struct:match
493 unsigned char mid[256]; /* mid character match */ member in struct:linematch
H A Dvars.c671 mp->mid[xp->mid = s[n/2]] = 1;
H A Dfio.c169 if (state.bodymatch && !inhead && mp && !(mp->m_flag & MSCAN) && count >= state.bodymatch->minline && state.bodymatch->beg[cp[0]] && state.bodymatch->mid[cp[state.bodymatch->minline/2]] && state.bodymatch->end[cp[state.bodymatch->minline-1]])
171 if (count >= xp->length && cp[0] == xp->beg && cp[xp->length/2] == xp->mid && cp[xp->length-1] == xp->end && !memcmp(cp, xp->string, xp->length))
/ast/src/lib/libast/regex/
H A Dregrexec.c49 size_t mid; local
64 mid = (len < e->re.bm.right) ? 0 : (len - e->re.bm.right);
75 while ((index += skip[buf[index]]) < mid);
138 if ((index += exactlen) >= mid)
H A Dregnexec.c1908 register size_t mid = len - e->re.bm.right; local
1915 DEBUG_TEST(0x0080,(sfprintf(sfstdout, "AHA#%04d REX_BM len=%d right=%d left=%d size=%d %d %d\n", __LINE__, len, e->re.bm.right, e->re.bm.left, e->re.bm.size, index, mid)),(0));
1918 while ((index += skip[buf[index]]) < mid);
/ast/src/lib/libast/port/
H A Dastconf.c867 register Conf_t* mid = (Conf_t*)conf; local
868 register Conf_t* lo = mid;
869 register Conf_t* hi = mid + conf_elements;
931 mid = lo + (hi - lo) / 2;
933 error(-7, "astconf lookup name=%s mid=%s", name, mid->name);
935 if (!(v = c - *((unsigned char*)mid->name)) && !(v = strcmp(name, mid->name)))
937 hi = mid;
941 if ((look->standard < 0 || look->standard == mid
[all...]
/ast/src/lib/libast/cdt/
H A Ddttree.c258 Dtlink_t *l, *mid; local
266 mid = l->_rght; l->_rght = NIL(Dtlink_t*);
267 mid->_left = tbalance(list, (n = size/2) );
268 mid->_rght = tbalance(mid->_rght, size - (n + 1));
269 return mid;
/ast/src/lib/libtksh/tcl/
H A DtclDate.c1027 int mid; local
1035 mid = (first+last)/2;
1036 j = TclDatembchars[mid].character;
1038 return TclDatembchars[mid].tvalue;
1040 first = mid + 1;
1042 last = mid -1;
/ast/src/lib/libvcodex/
H A Dvcsfxsort.c170 static void sfxswap(Vcsfxint_t* min, Vcsfxint_t* mid, Vcsfxint_t* max) argument
172 static void sfxswap(min, mid, max)
174 Vcsfxint_t* mid;
180 if((n = max-mid) > (m = mid-min+1) )
/ast/src/cmd/nmake/
H A Dexpand.c293 register Edit_map_t* mid = (Edit_map_t*)editmap; local
294 register Edit_map_t* lo = mid;
295 register Edit_map_t* hi = mid + elementsof(editmap) - 1;
299 mid = lo + (hi - lo) / 2;
301 t = (unsigned char*)mid->name;
308 return mid;
312 lo = mid + 1;
317 hi = mid - 1;
/ast/src/lib/libbz/
H A Dbzlib.c667 Int32 nb, na, mid; local
671 mid = (nb + na) >> 1;
672 if (indx >= cftab[mid]) nb = mid; else na = mid;

Completed in 75 milliseconds