All pastes #383157 Raw Edit

Someone

public text v1 · immutable
·published 2007-03-06 04:02 UTC
rendered paste body
   switch (move) {
      case MOVE_HEAD:
           list->curr = list->head;
           break;
      case MOVE_PREV:
           if (list->curr != list->head) 
             list->curr = list->curr->prev;
           break;
      case MOVE_NEXT:
           if (list->curr != list->last)
              list->curr = list->curr->next;
           break;
      case MOVE_LAST:
           list->curr = list->last;
           break;
      default: assert (FALSE);
   };