Changeset 28003 for branches/pap/Ohana/src/uniphot/src/ConfigInit.c
- Timestamp:
- May 18, 2010, 12:49:05 PM (16 years ago)
- Location:
- branches/pap
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/Ohana
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/Ohana merged eligible /branches/eam_branches/Ohana.20100407 27635-27772 /branches/pap_delete/Ohana 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/pap/Ohana/src/uniphot/src/ConfigInit.c
r25757 r28003 1 1 # include "uniphot.h" 2 3 void GetConfig (char *config, char *field, char *format, int N, void *ptr); 2 4 3 5 void ConfigInit (int *argc, char **argv) { … … 18 20 if (VERBOSE) fprintf (stderr, "loaded config file: %s\n", file); 19 21 20 ScanConfig (config, "CATDIR", "%s", 0, CATDIR);22 GetConfig (config, "CATDIR", "%s", 0, CATDIR); 21 23 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 22 24 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); … … 24 26 25 27 sprintf (ImageCat, "%s/Images.dat", CATDIR); 28 29 GetConfig (config, "GSCFILE", "%s", 0, GSCFILE); 30 if (!ScanConfig (config, "SKY_DEPTH", "%d", 0, &SKY_DEPTH)) { 31 SKY_DEPTH = 2; 32 } 33 if (!ScanConfig (config, "SKY_TABLE", "%s", 0, SKY_TABLE)) { 34 SKY_TABLE[0] = 0; 35 } 26 36 27 37 ScanConfig (config, "ZERO_PT", "%lf", 0, &ZERO_POINT); … … 42 52 43 53 } 54 55 void GetConfig (char *config, char *field, char *format, int N, void *ptr) { 56 57 char *status; 58 59 status = ScanConfig (config, field, format, N, ptr); 60 if (status == NULL) { 61 fprintf (stderr, "error in config, cannot find %s\n", field); 62 exit (1); 63 } 64 return; 65 }
Note:
See TracChangeset
for help on using the changeset viewer.
