Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
thd_newprefix.c
Go to the documentation of this file.00001 #include "mrilib.h"
00002
00003
00004
00005
00006
00007
00008
00009 char * THD_newprefix( THD_3dim_dataset *dset , char *suffix )
00010 {
00011 char *np ;
00012
00013 ENTRY("THD_newprefix") ;
00014
00015 if( !ISVALID_DSET(dset) ){
00016 np = (suffix == NULL || suffix[0] == '\0') ? strdup("none")
00017 : strdup(suffix) ;
00018 } else {
00019 np = (char *) malloc( strlen(DSET_PREFIX(dset)) + strlen(suffix) + 1 ) ;
00020 strcpy(np,DSET_PREFIX(dset)) ; strcat(np,suffix) ;
00021 }
00022
00023 RETURN(np) ;
00024 }