Home | History | Annotate | Download | only in cups

Lines Matching refs:current

40   * The current implementation uses an insertion sort into an array of
48 current, /* Current element */
171 * Find the end of the current delimited string and see if we need to add
230 void **e; /* Current element */
242 a->current = -1;
274 * 'cupsArrayCurrent()' - Return the current element in the array.
276 * The current element is undefined until you call @link cupsArrayFind@,
293 * Return the current element...
296 if (a->current >= 0 && a->current < a->num_elements)
297 return (a->elements[a->current]);
330 void **e; /* Current element */
379 da->current = a->current;
445 int current, /* Current element */
474 current = a->current;
479 current = a->hash[hash];
481 if (current < 0 || current >= a->num_elements)
482 current = a->current;
487 current = a->current;
491 current = cups_array_find(a, e, current, &diff);
505 while (current > 0 && !(*(a->compare))(e, a->elements[current - 1],
507 current --;
510 a->current = current;
513 a->hash[hash] = current;
515 return (a->elements[current]);
523 a->current = -1;
550 a->current = 0;
557 * 'cupsArrayGetIndex()' - Get the index of the current element.
559 * The current element is undefined until you call @link cupsArrayFind@,
565 int /* O - Index of the current element, starting at 0 */
571 return (a->current);
604 a->current = n;
664 a->current = a->num_elements - 1;
754 a->current = -1;
812 * to set the current element.
831 if (a->current < a->num_elements)
832 a->current ++;
845 * to set the current element.
864 if (a->current >= 0)
865 a->current --;
888 current; /* Current element */
906 current = cups_array_find(a, e, a->current, &diff);
917 (a->freefunc)(a->elements[current], a->data);
919 if (current < a->num_elements)
920 memmove(a->elements + current, a->elements + current + 1,
921 (size_t)(a->num_elements - current) * sizeof(void *));
923 if (current <= a->current)
924 a->current --;
926 if (current < a->insert)
928 else if (current == a->insert)
932 if (current <= a->saved[i])
943 * 'cupsArrayRestore()' - Reset the current element to the last @link cupsArraySave@.
948 void * /* O - New current element */
958 a->current = a->saved[a->num_saved];
960 if (a->current >= 0 && a->current < a->num_elements)
961 return (a->elements[a->current]);
968 * 'cupsArraySave()' - Mark the current element for a later @link cupsArrayRestore@.
970 * The current element is undefined until you call @link cupsArrayFind@,
972 * to set the current element.
988 a->saved[a->num_saved] = a->current;
1023 current; /* Current element */
1024 int diff; /* Comparison with current element */
1084 current = 0; /* Insert at beginning */
1086 current = a->num_elements; /* Append to the end */
1094 current = cups_array_find(a, e, a->insert, &diff);
1099 * Insert after the current element...
1102 current ++;
1108 * the current run of equal elements...
1119 while (current > 0 && !(*(a->compare))(e, a->elements[current - 1],
1121 current --;
1131 current ++;
1133 while (current < a->num_elements &&
1134 !(*(a->compare))(e, a->elements[current], a->data));
1143 if (current < a->num_elements)
1149 memmove(a->elements + current + 1, a->elements + current,
1150 (size_t)(a->num_elements - current) * sizeof(void *));
1152 if (a->current >= current)
1153 a->current ++;
1156 if (a->saved[i] >= current)
1159 DEBUG_printf(("9cups_array_add: insert element at index " CUPS_LLFMT, CUPS_LLCAST current));
1163 DEBUG_printf(("9cups_array_add: append element at " CUPS_LLFMT, CUPS_LLCAST current));
1168 if ((a->elements[current] = (a->copyfunc)(e, a->data)) == NULL)
1175 a->elements[current] = e;
1178 a->insert = current;
1181 for (current = 0; current < a->num_elements; current ++)
1182 DEBUG_printf(("9cups_array_add: a->elements[" CUPS_LLFMT "]=%p", CUPS_LLCAST current, a->elements[current]));
1203 current, /* Current element */
1204 diff; /* Comparison with current element */
1268 current = (left + right) / 2;
1269 diff = (*(a->compare))(e, a->elements[current], a->data);
1271 DEBUG_printf(("9cups_array_find: left=%d, right=%d, current=%d, diff=%d",
1272 left, right, current, diff));
1277 right = current;
1279 left = current;
1290 current = left;
1294 current = right;
1308 for (current = 0; current < a->num_elements; current ++)
1309 if (a->elements[current] == e)
1320 DEBUG_printf(("8cups_array_find: Returning %d, diff=%d", current, diff));
1324 return (current);