Lines Matching refs:cursor
161 hentry_t *cursor; /* Current element in the list */ member
247 h->cursor = h->list.next; in history_def_first()
248 if (h->cursor != &h->list) in history_def_first()
249 *ev = h->cursor->ev; in history_def_first()
267 h->cursor = h->list.prev; in history_def_last()
268 if (h->cursor != &h->list) in history_def_last()
269 *ev = h->cursor->ev; in history_def_last()
287 if (h->cursor == &h->list) { in history_def_next()
292 if (h->cursor->next == &h->list) { in history_def_next()
297 h->cursor = h->cursor->next; in history_def_next()
298 *ev = h->cursor->ev; in history_def_next()
312 if (h->cursor == &h->list) { in history_def_prev()
318 if (h->cursor->prev == &h->list) { in history_def_prev()
323 h->cursor = h->cursor->prev; in history_def_prev()
324 *ev = h->cursor->ev; in history_def_prev()
338 if (h->cursor != &h->list) in history_def_curr()
339 *ev = h->cursor->ev; in history_def_curr()
363 if (h->cursor == &h->list || h->cursor->ev.num != n) { in history_def_set()
364 for (h->cursor = h->list.next; h->cursor != &h->list; in history_def_set()
365 h->cursor = h->cursor->next) in history_def_set()
366 if (h->cursor->ev.num == n) in history_def_set()
369 if (h->cursor == &h->list) { in history_def_set()
390 for (h->cursor = h->list.prev; h->cursor != &h->list; in history_set_nth()
391 h->cursor = h->cursor->prev) in history_set_nth()
394 if (h->cursor == &h->list) { in history_set_nth()
411 HistEventPrivate *evp = (void *)&h->cursor->ev; in history_def_add()
413 if (h->cursor == &h->list) in history_def_add()
421 (void) Strncpy(s, h->cursor->ev.str, len); in history_def_add()
426 *ev = h->cursor->ev; in history_def_add()
440 ev->str = Strdup(h->cursor->ev.str); in history_deldata_nth()
441 ev->num = h->cursor->ev.num; in history_deldata_nth()
443 *data = h->cursor->data; in history_deldata_nth()
444 history_def_delete(h, ev, h->cursor); in history_deldata_nth()
459 ev->str = Strdup(h->cursor->ev.str); in history_def_del()
460 ev->num = h->cursor->ev.num; in history_def_del()
461 history_def_delete(h, ev, h->cursor); in history_def_del()
476 if (h->cursor == hp) { in history_def_delete()
477 h->cursor = hp->prev; in history_def_delete()
478 if (h->cursor == &h->list) in history_def_delete()
479 h->cursor = hp->next; in history_def_delete()
496 h->cursor = (hentry_t *) malloc(sizeof(hentry_t)); in history_def_insert()
497 if (h->cursor == NULL) in history_def_insert()
499 if ((h->cursor->ev.str = h_strdup(str)) == NULL) { in history_def_insert()
500 free(h->cursor); in history_def_insert()
503 h->cursor->data = NULL; in history_def_insert()
504 h->cursor->ev.num = ++h->eventid; in history_def_insert()
505 h->cursor->next = h->list.next; in history_def_insert()
506 h->cursor->prev = &h->list; in history_def_insert()
507 h->list.next->prev = h->cursor; in history_def_insert()
508 h->list.next = h->cursor; in history_def_insert()
511 *ev = h->cursor->ev; in history_def_insert()
563 h->cursor = &h->list; in history_def_init()
902 *d = ((history_t *)h->h_ref)->cursor->data; in history_next_evdata()
1131 ((history_t *)h->h_ref)->cursor->ev.str = s; in FUNW()
1132 ((history_t *)h->h_ref)->cursor->data = d; in FUNW()