Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

thd_dsetinslist.c File Reference

#include "mrilib.h"
#include "thd.h"

Go to the source code of this file.


Functions

THD_slist_find THD_dset_in_sessionlist (int find_type, void *target, THD_sessionlist *ssl, int iss)

Function Documentation

THD_slist_find THD_dset_in_sessionlist int    find_type,
void *    target,
THD_sessionlist   ssl,
int    iss
 

Definition at line 16 of file thd_dsetinslist.c.

References BADFIND, THD_slist_find::dset, ISVALID_SESSIONLIST, THD_sessionlist::num_sess, THD_slist_find::sess_index, THD_sessionlist::ssar, and THD_dset_in_session().

Referenced by AFNI_drive_purge_memory(), AFNI_make_descendants_old(), PLUTO_dset_finder(), PLUTO_find_dset(), PLUTO_prefix_ok(), RENAME_main(), and THD_reconcile_parents().

00018 {
00019    int jss ;
00020    THD_slist_find find ;
00021 
00022    /*-- sanity check --*/
00023 
00024    if( ! ISVALID_SESSIONLIST(ssl) || ssl->num_sess <= 0 ){
00025       BADFIND(find) ; return find ;
00026    }
00027 
00028    /* search session # iss first */
00029 
00030    if( iss >=0 && iss < ssl->num_sess ){
00031       find = THD_dset_in_session( find_type,target , ssl->ssar[iss] ) ;
00032       if( find.dset != NULL ){ find.sess_index = iss ; return find ; }
00033    }
00034 
00035    /* search everybody else */
00036 
00037    for( jss=0 ; jss < ssl->num_sess ; jss++ ){
00038       if( jss == iss ) continue ;
00039       find = THD_dset_in_session( find_type,target , ssl->ssar[jss] ) ;
00040       if( find.dset != NULL ){ find.sess_index = jss ; return find ; }
00041    }
00042 
00043    return find ;
00044 }
 

Powered by Plone

This site conforms to the following standards: