/*chIonLbl use information in line array to generate a null terminated ion label */ #include #include "cddefines.h" #include "taulines.h" #include "elementnames.h" #include "chionlbl.h" void chIonLbl(char *chIonLbl_v , EmLine * t ) { /*static char chIonLbl_v[5];*/ # ifdef DEBUG_FUN fputs( "<+>chIonLbl()\n", debug_fp ); # endif /* function to use information within the line array * to generate an ion label, giving element and * ionization stage * */ if( t->nelem < 0 ) { /* this line is to be ignored */ strcpy( chIonLbl_v, "Dumy" ); } else { /* ElmntSym.chElementSym is null terminated, 2 ch + null, string giving very * short form of element name */ strcpy( chIonLbl_v , elementnames.chElementSym[t->nelem -1] ); /* chIonStage is four char null terminated string, starting with "_1__" */ strcat( chIonLbl_v, elementnames.chIonStage[t->IonStg-1]); } # ifdef DEBUG_FUN fputs( " <->chIonLbl()\n", debug_fp ); # endif /* chIonLbl is four char null terminated string */ return/*( chIonLbl_v )*/; }