Home | History | Annotate | Download | only in lib

Lines Matching full:elems

976   set->elems = re_malloc (Idx, size);
977 if (BE (set->elems == NULL, 0))
988 set->elems = re_malloc (Idx, 1);
989 if (BE (set->elems == NULL, 0))
994 set->elems[0] = elem;
1003 set->elems = re_malloc (Idx, 2);
1004 if (BE (set->elems == NULL, 0))
1009 set->elems[0] = elem1;
1016 set->elems[0] = elem1;
1017 set->elems[1] = elem2;
1021 set->elems[0] = elem2;
1022 set->elems[1] = elem1;
1036 dest->elems = re_malloc (Idx, dest->alloc);
1037 if (BE (dest->elems == NULL, 0))
1042 memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
1051 Note: We assume dest->elems is NULL, when dest->alloc is 0. */
1067 Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc);
1070 dest->elems = new_elems;
1082 if (src1->elems[i1] == src2->elems[i2])
1085 while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1])
1088 if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1])
1089 dest->elems[--sbase] = src1->elems[i1];
1096 else if (src1->elems[i1] < src2->elems[i2])
1119 if (dest->elems[is] > dest->elems[id])
1122 dest->elems[id + delta--] = dest->elems[is--];
1129 dest->elems[id + delta] = dest->elems[id];
1136 memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx));
1153 dest->elems = re_malloc (Idx, dest->alloc);
1154 if (BE (dest->elems == NULL, 0))
1169 if (src1->elems[i1] > src2->elems[i2])
1171 dest->elems[id++] = src2->elems[i2++];
1174 if (src1->elems[i1] == src2->elems[i2])
1176 dest->elems[id++] = src1->elems[i1++];
1180 memcpy (dest->elems + id, src1->elems + i1,
1186 memcpy (dest->elems + id, src2->elems + i2,
1207 Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc);
1210 dest->elems = new_buffer;
1217 memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
1227 if (dest->elems[id] == src->elems[is])
1229 else if (dest->elems[id] < src->elems[is])
1230 dest->elems[--sbase] = src->elems[is--];
1231 else /* if (dest->elems[id] > src->elems[is]) */
1239 memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx));
1253 if (dest->elems[is] > dest->elems[id])
1256 dest->elems[id + delta--] = dest->elems[is--];
1263 dest->elems[id + delta] = dest->elems[id];
1267 memcpy (dest->elems, dest->elems + sbase,
1293 set->elems[0] = elem;
1303 new_elems = re_realloc (set->elems, Idx, set->alloc);
1306 set->elems = new_elems;
1311 if (elem < set->elems[0])
1315 set->elems[idx] = set->elems[idx - 1];
1319 for (idx = set->nelem; set->elems[idx - 1] > elem; idx--)
1320 set->elems[idx] = set->elems[idx - 1];
1324 set->elems[idx] = elem;
1342 new_elems = re_realloc (set->elems, Idx, set->alloc);
1345 set->elems = new_elems;
1349 set->elems[set->nelem++] = elem;
1364 if (set1->elems[i] != set2->elems[i])
1385 if (set->elems[mid] < elem)
1390 return set->elems[idx] == elem ? idx + 1 : 0;
1401 set->elems[idx] = set->elems[idx + 1];
1467 hash += nodes->elems[i];
1583 Idx elem = newstate->nodes.elems[i];
1645 re_token_t *node = dfa->nodes + nodes->elems[i];
1697 re_token_t *node = dfa->nodes + nodes->elems[i];