Changeset 8391
- Timestamp:
- Aug 16, 2006, 1:48:48 PM (20 years ago)
- Location:
- trunk/Ohana/src/photdbc/src
- Files:
-
- 9 deleted
- 2 edited
-
check_directory.c (deleted)
-
check_permissions.c (deleted)
-
find_regions.c (deleted)
-
gcatalog.c (deleted)
-
get_regions.c (deleted)
-
image-db.c (deleted)
-
load_catalogs.c (modified) (1 diff)
-
name_region.c (deleted)
-
photdbc.c (modified) (1 diff)
-
time.c (deleted)
-
wcatalog.c (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/photdbc/src/load_catalogs.c
r4808 r8391 13 13 for (i = 0; i < Nregion; i++) { 14 14 catalog[i].filename = region[i].filename; /* don't free region before catalog! */ 15 switch (lock_catalog (&catalog[i], LCK_SOFT)) {16 ca se 0:17 fprintf (stderr, "ERROR: can't lock file %s\n", catalog[i].filename);18 exit (1);19 case 1:20 gcatalog (&catalog[i]); /* load from disk */ 21 break;22 case 2:23 if (VERBOSE) fprintf (stderr, "no data in %s, skipping\n", catalog[i].filename);24 catalog[i].Naverage = 0;25 catalog[i].Nmeasure = 0;26 break;27 default:28 fprintf (stderr, "weird lock_catalog exit state\n");29 exit (1);15 catalog[i].catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 16 catalog[i].filename = skylist[0].filename[i]; 17 catalog[i].Nsecfilt = GetPhotcodeNsecfilt (); 18 catalog[i].catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF; 19 if (options.update) catalog[i].catflags = LOAD_AVES | LOAD_MEAS_META | LOAD_MISS | LOAD_SECF; 20 21 // an error exit status here is a significant error 22 if (!dvo_catalog_open (&catalog[i], skylist[0].regions[i], VERBOSE, "w")) { 23 fprintf (stderr, "ERROR: failure to open/create catalog file %s\n", catalog.filename); 24 exit (2); 25 } 26 if (!catalog[i].Nave_disk) { 27 dvo_catalog_unlock (&catalog[i]); 28 dvo_catalog_free (&catalog[i]); 29 continue; 30 30 } 31 31 } -
trunk/Ohana/src/photdbc/src/photdbc.c
r6238 r8391 35 35 get_mags (catalog); 36 36 37 unlock_catalog (catalog); 37 // XXX this is all messed up: are we working on more than one region or not?? 38 for (i = 0; i < Nregion; i++) { 39 // XXX empty catalogs are already unlocked and freed 40 dvo_catalog_unlock (&catalog[i]); 41 dvo_catalog_free (&catalog[i]); 42 } 38 43 44 // XXX????? 39 45 sprintf (filename, "newdir/%s", argv[1]); 40 46 catalog[0].filename = filename; 41 47 42 48 check_directory (catalog[0].filename); 43 if (! lock_catalog (catalog, LCK_XCLD)) {49 if (!dvo_catalog_open (catalog, ...)) { 44 50 fprintf (stderr, "can't lock new catalog file %s\n", catalog[0].filename); 45 51 exit (1); 46 52 } 47 wcatalog(catalog);53 dvo_catalog_save (catalog); 48 54 exit (0); 49 55 }
Note:
See TracChangeset
for help on using the changeset viewer.
