IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2004, 1:27:31 PM (22 years ago)
Author:
harman
Message:

Updated new functions in SDRS 10 per latest polycon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astronomy/psMetadata.c

    r2657 r2659  
    1212*  @author Ross Harman, MHPCC
    1313*
    14 *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2004-12-07 22:58:59 $
     14*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2004-12-07 23:27:25 $
    1616*
    1717*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    521521    return entry;
    522522}
    523 
    524 psBool psMetadataSetIterator(psMetadata *md, psS32 where)
    525 {
    526     PS_PTR_CHECK_NULL(md,NULL);
    527     PS_PTR_CHECK_NULL(md->list,NULL);
    528 
    529     psListSetIterator(md->list, where);
    530 
    531     return true;
    532 }
    533 
    534 psMetadataItem* psMetadataGetNext(psMetadata *md, const char *match, psS32 which)
    535 {
    536     psList* mdList = NULL;
    537     psMetadataItem* entry = NULL;
    538 
    539 
    540     PS_PTR_CHECK_NULL(md,NULL);
    541     PS_PTR_CHECK_NULL(md->list,NULL);
    542 
    543     mdList = md->list;
    544 
    545     psListSetIterator(mdList, which);
    546     entry = psListGetCurrent(mdList);
    547     while (entry != NULL) {
    548         if(match != NULL) {
    549             if (!strncmp(match, entry->name, strlen(match))) {
    550 
    551                 // Match found
    552                 return entry;
    553             }
    554             entry = psListGetNext(mdList);
    555         } else {
    556             entry = psListGetNext(mdList);
    557             break;
    558         }
    559     }
    560 
    561     return entry;
    562 }
    563 
    564 psMetadataItem* psMetadataGetPrevious(psMetadata *md, const char *match, psS32 which)
    565 {
    566     psList* mdList = NULL;
    567     psMetadataItem* entry = NULL;
    568 
    569 
    570     PS_PTR_CHECK_NULL(md,NULL);
    571     PS_PTR_CHECK_NULL(md->list,NULL);
    572 
    573     mdList = md->list;
    574 
    575     psListSetIterator(mdList, which);
    576     entry = psListGetCurrent(mdList);
    577     while (entry != NULL) {
    578         if(match != NULL) {
    579             if (!strncmp(match, entry->name, strlen(match))) {
    580 
    581                 // Match found
    582                 return entry;
    583             }
    584             entry = psListGetPrevious(mdList);
    585         } else {
    586             entry = psListGetPrevious(mdList);
    587             break;
    588         }
    589     }
    590 
    591     return entry;
    592 }
Note: See TracChangeset for help on using the changeset viewer.