Lines Matching refs:cursor
127 hentry_t *cursor; /* Current element in the list */
213 h->cursor = h->list.next;
214 if (h->cursor != &h->list)
215 *ev = h->cursor->ev;
233 h->cursor = h->list.prev;
234 if (h->cursor != &h->list)
235 *ev = h->cursor->ev;
253 if (h->cursor == &h->list) {
258 if (h->cursor->next == &h->list) {
263 h->cursor = h->cursor->next;
264 *ev = h->cursor->ev;
278 if (h->cursor == &h->list) {
284 if (h->cursor->prev == &h->list) {
289 h->cursor = h->cursor->prev;
290 *ev = h->cursor->ev;
304 if (h->cursor != &h->list)
305 *ev = h->cursor->ev;
329 if (h->cursor == &h->list || h->cursor->ev.num != n) {
330 for (h->cursor = h->list.next; h->cursor != &h->list;
331 h->cursor = h->cursor->next)
332 if (h->cursor->ev.num == n)
335 if (h->cursor == &h->list) {
356 for (h->cursor = h->list.prev; h->cursor != &h->list;
357 h->cursor = h->cursor->prev)
360 if (h->cursor == &h->list) {
377 HistEventPrivate *evp = (void *)&h->cursor->ev;
379 if (h->cursor == &h->list)
387 (void) strlcpy(s, h->cursor->ev.str, len);
391 *ev = h->cursor->ev;
405 ev->str = strdup(h->cursor->ev.str);
406 ev->num = h->cursor->ev.num;
408 *data = h->cursor->data;
409 history_def_delete(h, ev, h->cursor);
425 ev->str = strdup(h->cursor->ev.str);
426 ev->num = h->cursor->ev.num;
427 history_def_delete(h, ev, h->cursor);
443 if (h->cursor == hp) {
444 h->cursor = hp->prev;
445 if (h->cursor == &h->list)
446 h->cursor = hp->next;
463 h->cursor = (hentry_t *) h_malloc(sizeof(hentry_t));
464 if (h->cursor == NULL)
466 if ((h->cursor->ev.str = h_strdup(str)) == NULL) {
467 h_free((ptr_t)h->cursor);
470 h->cursor->data = NULL;
471 h->cursor->ev.num = ++h->eventid;
472 h->cursor->next = h->list.next;
473 h->cursor->prev = &h->list;
474 h->list.next->prev = h->cursor;
475 h->list.next = h->cursor;
478 *ev = h->cursor->ev;
531 h->cursor = &h->list;
864 *d = ((history_t *)h->h_ref)->cursor->data;
1093 ((history_t *)h->h_ref)->cursor->ev.str = s;
1094 ((history_t *)h->h_ref)->cursor->data = d;