24 const char* chFilename;
32 fprintf(stderr,
" cdInit must be called before cdGetLineList.\n");
37 chFilename = ( strlen(chFile) == 0 ) ?
"LineList_BLR.dat" : chFile;
52 while( (
read_whole_line( chLine , (
int)
sizeof(chLine) , ioData ) != NULL) && !lgDONE )
54 if( chLine[0] ==
'\n')
62 if( (chLine[0] !=
'#') )
69 *chLabels = (
char**)
MALLOC((
size_t)(nLines+1)*
sizeof(
char *) );
72 if( fseek( ioData , 0 , SEEK_SET ) != 0 )
74 fprintf(
ioQQQ,
" cdGetLineList could not rewind line list.\n");
81 while( (
read_whole_line( chLine , (
int)
sizeof(chLine) , ioData ) != NULL) && !lgDONE)
86 if( chLine[0] ==
'\n')
96 (*chLabels)[i] = (
char*)
MALLOC(5*
sizeof(
char) );
98 strncpy( (*chLabels)[i] , chLine , 4);
99 (*chLabels)[i][4] = 0;
106 if( chLine[j-1] ==
'M' || chLine[j-1] ==
'm')
111 else if( chLine[j-1] ==
'C' || chLine[j-1] ==
'c')