IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 24, 2005, 3:04:17 PM (21 years ago)
Author:
evanalst
Message:

Update psListGetNext to come back onto list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psList.c

    r3082 r3085  
    66 *  @author Robert Daniel DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-01-25 00:12:12 $
     8 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-01-25 01:04:17 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    495495psPtr psListGetNext(psListIterator* iterator)
    496496{
    497     if (iterator == NULL || iterator->cursor == NULL) {
     497    if (iterator == NULL ) {
     498        return NULL;
     499    }
     500    if (( iterator->cursor == NULL) && (iterator->offEnd)) {
     501        return NULL;
     502    }
     503    if ( (iterator->cursor == NULL) && (!iterator->offEnd)) {
     504        iterator->cursor = iterator->list->head;
     505        iterator->index = 0;
    498506        return NULL;
    499507    }
     
    512520psPtr psListGetPrevious(psListIterator* iterator)
    513521{
    514     if ( (iterator == NULL ) || ((iterator->cursor == NULL) && (!iterator->offEnd)) ) {
     522    if (iterator == NULL ) {
     523        return NULL;
     524    }
     525    if ((iterator->cursor == NULL) && (!iterator->offEnd))  {
     526        psLogMsg(__func__,PS_LOG_WARN,"Attempt to get previous with itertator cursor NULL and offEnd false");
    515527        return NULL;
    516528    }
Note: See TracChangeset for help on using the changeset viewer.