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  

list_struct.h

Go to the documentation of this file.
00001 #ifndef _LIST_STRUCT_H_
00002 #define _LIST_STRUCT_H_ 
00003 
00004 /*----------------------------------------------------------------------
00005  * list_struct.h      - for creating and destroying lists
00006  *
00007  * I tried to follow Bob's structure and element naming style.
00008  *
00009  * Rick Reynolds - December 6, 2004
00010  *----------------------------------------------------------------------*/
00011 
00012 /* value lists include number used, number allocated, and the list */
00013 typedef struct { int num,nall;  float *  list; } float_list;
00014 typedef struct { int num,nall;  int   *  list; } int_list;
00015 typedef struct { int num,nall;  short *  list; } short_list;
00016 typedef struct { int num,nall;  void  *  list; } void_list;
00017                                                                                 
00018 /* pointer lists also include an element length field (# elements allocated) */
00019 typedef struct { int num,nall,elen;  float ** list; } floatp_list;
00020 typedef struct { int num,nall,elen;  int   ** list; } intp_list;
00021 typedef struct { int num,nall,elen;  short ** list; } shortp_list;
00022 typedef struct { int num,nall,elen;  void  ** list; } voidp_list;
00023 
00024 /* create lists of the requested number of elements */
00025 int init_float_list  ( float_list * d_list, int nel );
00026 int init_int_list    ( int_list   * d_list, int nel );
00027 int init_short_list  ( short_list * d_list, int nel );
00028 int init_void_list   ( void_list  * d_list, int nel );
00029 
00030 /* create nel lists, of length len */
00031 int init_floatp_list ( floatp_list * d_list, int nel, int len );
00032 int init_intp_list   ( intp_list   * d_list, int nel, int len );
00033 int init_shortp_list ( shortp_list * d_list, int nel, int len );
00034 int init_voidp_list  ( voidp_list  * d_list, int nel, int len );
00035 
00036 /* free simple lists and clelist structures */
00037 int free_float_list  ( float_list * d_list );
00038 int free_int_list    ( int_list   * d_list );
00039 int free_short_list  ( short_list * d_list );
00040 int free_void_list   ( void_list  * d_list );
00041 
00042 /* free list lists, and clelist structures */
00043 int free_floatp_list ( floatp_list * d_list );
00044 int free_intp_list   ( intp_list   * d_list );
00045 int free_shortp_list ( shortp_list * d_list );
00046 int free_voidp_list  ( voidp_list  * d_list );
00047 
00048 #endif
 

Powered by Plone

This site conforms to the following standards: