IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 3, 2013, 12:23:57 PM (13 years ago)
Author:
eugene
Message:

final fixes to fix-LAP-edges-delete; whitespace changes

Location:
branches/eam_branches/ipp-20130509/Ohana/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/resort_catalog.c

    r35719 r35743  
    3232void SortAveMeasMatch (off_t *MEAS, off_t *AVE, off_t N) {
    3333
    34 # define SWAPFUNC(A,B){ off_t tmp_meas; off_t tmp_ave;  \
    35     tmp_meas = MEAS[A]; MEAS[A] = MEAS[B]; MEAS[B] = tmp_meas;          \
    36     tmp_ave  = AVE[A];  AVE[A]  = AVE[B];  AVE[B]  = tmp_ave;           \
     34# define SWAPFUNC(A,B){ off_t tmp_meas; off_t tmp_ave;          \
     35    tmp_meas = MEAS[A]; MEAS[A] = MEAS[B]; MEAS[B] = tmp_meas;  \
     36    tmp_ave  = AVE[A];  AVE[A]  = AVE[B];  AVE[B]  = tmp_ave;   \
    3737  }
    3838# define COMPARE(A,B)(AVE[A] < AVE[B])
     
    4242}
    4343
    44 # define MARKTIME(MSG,...) { \
    45   float dtime; \
    46   gettimeofday (&stop, (void *) NULL); \
    47   dtime = DTIME (stop, start); start = stop; \
    48   fprintf (stderr, MSG, __VA_ARGS__); }
     44# define MARKTIME(MSG,...) {                    \
     45    float dtime;                                \
     46    gettimeofday (&stop, (void *) NULL);        \
     47    dtime = DTIME (stop, start); start = stop;  \
     48    fprintf (stderr, MSG, __VA_ARGS__); }
    4949
    5050// XXX : where is the time going?  perhaps the ALLOCATE?
     
    101101        measure[measureSeq[i]].objID = average[averageSeq[i]].objID; // XXX I don't really like this...
    102102      }
     103# endif
    103104    }
    104 # endif
    105105  }
    106106 
  • branches/eam_branches/ipp-20130509/Ohana/src/delstar/src/Shutdown.c

    r7080 r35743  
    2222
    2323  SetProtect (TRUE);
    24   gfits_db_close (db);
     24  if (db) gfits_db_close (db);
    2525  fprintf (stderr, "ERROR: delstar halted\n");
    2626  exit (1);
  • branches/eam_branches/ipp-20130509/Ohana/src/delstar/src/delete_fix_LAP_edges_delete.c

    r35740 r35743  
    8383
    8484    int myCatID = skylist[0].regions[i][0].index;
     85    if (myCatID > maxCatID) continue;
    8586    if (!catIDcount[myCatID]) continue;
    8687
     
    106107    }
    107108
     109    off_t NaverageStart = catalog.Naverage;
     110    off_t NmeasureStart = catalog.Nmeasure;
    108111    delete_fix_LAP_edges_drop_measures (&catalog, measure_edge, Nmeasure_edge, catIDcount[myCatID]);
    109112
    110     // need to save the catalog here, after we confirm functionality
     113    // skip if nothing was deleted
     114    int noChange = (NaverageStart == catalog.Naverage) && (NmeasureStart == catalog.Nmeasure);
     115    if (UPDATE && !noChange) {
     116      // XXX save a backup copy first
     117      dvo_catalog_backup (&catalog, TRUE);
     118      dvo_catalog_save_complete (&catalog, VERBOSE2);
     119    }
    111120
    112121    dvo_catalog_unlock (&catalog);
     
    135144    exit (1);
    136145  }   
     146
     147  {
     148    // ensure that the paths are absolute path names
     149    char *tmppath = abspath (EDGE_DELETIONS, DVO_MAX_PATH);
     150    free (EDGE_DELETIONS);
     151    EDGE_DELETIONS = tmppath;
     152  }
    137153
    138154  int i, j;
     
    172188    if (VERBOSE2)   { snprintf (tmpline, 1024, "%s -vv",     command);             strcpy (command, tmpline); }
    173189    if (SINGLE_CPT) { snprintf (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
    174     // if (UPDATE)     { snprintf (tmpline, 1024, "%s -update", command);             strcpy (command, tmpline); }
     190    if (UPDATE)     { snprintf (tmpline, 1024, "%s -update", command);             strcpy (command, tmpline); }
    175191
    176192    fprintf (stderr, "command: %s\n", command);
     
    224240  for (i = 0; i < Nmeasure_edge; i++) {
    225241    if (measure_edge[i].catID != myCatID) continue;
    226     myAssert (NbadMeasures >= catIDcount, "too many bad measures?");
     242    myAssert (NbadMeasures < catIDcount, "too many bad measures?");
    227243    badMeasures[NbadMeasures] = i;
    228244    NbadMeasures ++;
  • branches/eam_branches/ipp-20130509/Ohana/src/delstar/src/delstar_client.c

    r35730 r35743  
    5858    }
    5959
     60    case MODE_FIX_LAP_EDGES_DELETE: {
     61      if (!delete_fix_LAP_edges_delete()) {
     62        fprintf (stderr, "problem loading edge measures\n");
     63        exit (1);
     64      }
     65      exit (0);
     66      break;
     67    }
     68
    6069    case MODE_IMAGEFILE:
    6170      break;
  • branches/eam_branches/ipp-20130509/Ohana/src/libdvo/include/dvo.h

    r35736 r35743  
    251251/* definitions for parallel dvo host information
    252252   XXX : need better names (safer namespace)
    253  */
     253*/
    254254
    255255typedef enum {
Note: See TracChangeset for help on using the changeset viewer.