/*cdEms obtain the local emissivity for a line, for the last computed zone */ #include #include "cddefines.h" #include "linesave.h" #include "cap4.h" #include "caps.h" #include "cddrive.h" int cdEms(char *chLabel, long int length, double *emiss ) { /* use following to store local image of character strings */ char chCARD[81]; char chCaps[5]; long int j; # ifdef DEBUG_FUN fputs( "<+>cdEms()\n", debug_fp ); # endif /* routine returns the emissivity in the desired line * only used internally by the code, to do punch lines structure */ strcpy( chCARD, chLabel ); /* make sure chLabel is all caps */ caps(chCARD);/* convert to caps */ for( j=0; j < LineSave.nsum; j++ ) { /* change chLabel to all caps to be like input chAmLab */ cap4(chCaps , (char*)LineSv[j].chALab); /* check wavelength and chLabel for a match */ if( LineSv[j].lin == length && strcmp(chCaps,chCARD) == 0 ) { /* match, so set emiss to emissivity in line */ *emiss = LineSv[j].emslin; # ifdef DEBUG_FUN fputs( " <->cdEms()\n", debug_fp ); # endif /* and announce success */ return TRUE ; } } # ifdef DEBUG_FUN fputs( " <->cdEms()\n", debug_fp ); # endif /* we fell through without finding the line - return false */ return FALSE; }