Changeset 1915
- Timestamp:
- 04/04/08 02:23:31 (9 months ago)
- Location:
- trunk/source
- Files:
-
- 2 modified
-
cdgetlinelist.cpp (modified) (3 diffs)
-
parse_table.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/cdgetlinelist.cpp
r1815 r1915 2 2 * others. For conditions of distribution and use see copyright notice in license.txt */ 3 3 /*cdGetLineList routine to read in master list of emission line wavelengths and ids, for 4 * generating loc grids, 5 * someday add cdGetNLRLineList */ 4 * generating loc grids */ 6 5 #include "cddefines.h" 7 6 #include "cddrive.h" … … 38 37 chFilename = ( strlen(chFile) == 0 ) ? "LineList_BLR.dat" : chFile; 39 38 40 /* >>chng 04 nov 06, had searched only on path, now search locally41 * and then on path if not found */42 39 /* we will check local space first, then on path if not present */ 43 40 ioData = open_data( chFilename, "r", AS_LOCAL_DATA_TRY ); 44 41 45 42 if( ioData == NULL ) 43 { 44 /* did not find file, return -1 */ 46 45 return -1; 46 } 47 47 48 48 /* count how many lines are in the file, ignoring all lines … … 69 69 70 70 /* create 1-d array of string labels */ 71 /* create first dim of space for labels */72 71 *chLabels = (char**)MALLOC((size_t)(nLines+1)*sizeof(char *) ); 73 72 -
trunk/source/parse_table.cpp
r1815 r1915 878 878 879 879 lgLines_Malloc = true; 880 /* this flag says we didnot find a continuum source - nearly all table XXX880 /* this flag says this is not find a continuum source - nearly all table XXX 881 881 * commands deal with continuum sources */ 882 882 ncont = -10; 883 883 884 884 /* actually get the lines, and malloc the space in the arrays */ 885 nLINE_TABLE = cdGetLineList( chLINE_LIST , &chLabel , &wl); 885 if( (nLINE_TABLE = cdGetLineList( chLINE_LIST , &chLabel , &wl) )<0 ) 886 { 887 /* did not find file, abort */ 888 fprintf(ioQQQ,"\n DISASTER PROBLEM ParseTable could not find " 889 "line list file %s\n", chLINE_LIST ); 890 fprintf(ioQQQ," Please check the spelling of the file name and that it " 891 "is in either the local or data directory.\n\n"); 892 cdEXIT(EXIT_FAILURE); 893 } 886 894 } 887 895
