Doxygen Source Code Documentation
thd_newprefix.c File Reference
#include "mrilib.h"Go to the source code of this file.
Functions | |
| char * | THD_newprefix (THD_3dim_dataset *dset, char *suffix) |
Function Documentation
|
||||||||||||
|
Definition at line 9 of file thd_newprefix.c. References DSET_PREFIX, ENTRY, ISVALID_DSET, malloc, and RETURN.
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 }
|