IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 75


Ignore:
Timestamp:
May 15, 2003, 11:22:51 PM (23 years ago)
Author:
eugene
Message:

altpath, TYPE/MODE const cleanup

Location:
trunk/Ohana/src/imregister/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/imregister/src/detsearch.c

    r3 r75  
    11# include "imregister.h"
    22# include "detrend.h"
    3 static char *version = "detsearch $Revision: 3.0 $";
     3static char *version = "detsearch $Revision: 3.1 $";
    44
    55int main (int argc, char **argv) {
     
    1313  args (argc, argv);
    1414
     15  if (output.Criteria) PrintCriteria ();
     16       
    1517  status = load_db ();
    1618  if (!status) {
     
    1820    exit (0);
    1921  }
    20   if (!output.Modify && !output.Delete) close_db ();
     22  if (!output.Modify && !output.Delete && !output.Altpath) close_db ();
    2123 
    2224  match = MatchCriteria (&Nmatch);          /* match basic criteria */
     
    2426  match = CloseCriteria (match, &Nmatch);   /* reduce matches based on closeness */
    2527
    26   if (output.Criteria) PrintCriteria ();
    27        
    2828  if (output.Select) {
    2929    match = UniqueSubset (match, &Nmatch);
     
    3535  }
    3636
     37  if (output.Altpath) SetAltpath (match, Nmatch);
    3738  if (output.Modify) ModifySubset (match, Nmatch);
    3839  if (output.Delete) DeleteSubset (match, Nmatch);
  • trunk/Ohana/src/imregister/src/imregister.c

    r70 r75  
    11# include "imregister.h"
    22# include "imreg.h"
    3 static char *version = "imregister $Revision: 3.1 $";
     3static char *version = "imregister $Revision: 3.2 $";
    44
    55int main (int argc, char **argv) {
     
    1515  /* define new entries (pimage, Nnew) */
    1616  switch (image[0].mode) {
    17   case MODE_CUBE:
     17  case M_CUBE:
    1818    Nnew = image[0].ccd + 1;
    1919    ALLOCATE (pimage, RegImage, Nnew);
     
    2323      pimage[i] = image[0];
    2424      pimage[i].ccd = i - 1;
    25       pimage[i].mode = MODE_SLICE;
     25      pimage[i].mode = M_SLICE;
    2626      pimage[i].obstime += *dtime*pimage[i].ccd;
    2727    }
    2828    break;
    29   case MODE_MEF:
     29  case M_MEF:
    3030    Nnew = image[0].ccd;
    3131    ALLOCATE (pimage, RegImage, Nnew);
     
    3535    }
    3636    break;
    37   case MODE_SPLIT:
    38   case MODE_SINGLE:
     37  case M_SPLIT:
     38  case M_SINGLE:
    3939    Nnew = 1;
    4040    pimage = &image[0];
  • trunk/Ohana/src/imregister/src/imsort.c

    r67 r75  
    11# include "imregister.h"
    22# include "imreg.h"
    3 static char *version = "imsort $Revision: 3.1 $";
     3static char *version = "imsort $Revision: 3.2 $";
    44
    55int main (int argc, char **argv) {
     
    1515  /* define new entries (pimage, Nnew) */
    1616  switch (image[0].mode) {
    17   case MODE_CUBE:
     17  case M_CUBE:
    1818    Nnew = image[0].ccd + 1;
    1919    ALLOCATE (pimage, RegImage, Nnew);
     
    2323      pimage[i] = image[0];
    2424      pimage[i].ccd = i - 1;
    25       pimage[i].mode = MODE_SLICE;
     25      pimage[i].mode = M_SLICE;
    2626      pimage[i].obstime += *dtime*pimage[i].ccd;
    2727    }
    2828    break;
    29   case MODE_MEF:
     29  case M_MEF:
    3030    Nnew = image[0].ccd;
    3131    ALLOCATE (pimage, RegImage, Nnew);
     
    3535    }
    3636    break;
    37   case MODE_SPLIT:
    38   case MODE_SINGLE:
     37  case M_SPLIT:
     38  case M_SINGLE:
    3939    Nnew = 1;
    4040    pimage = &image[0];
  • trunk/Ohana/src/imregister/src/imstatreg.c

    r70 r75  
    11# include "imregister.h"
    22# include "imreg.h"
    3 static char *version = "imstatreg $Revision: 3.2 $";
     3static char *version = "imstatreg $Revision: 3.3 $";
    44
    55int main (int argc, char **argv) {
     
    77  RegImage *image;
    88  float *dtime;
    9   int i, *match, Nmatch, status, child;
     9  int i, *match, Nmatch, status, child, Nentry;
    1010  char *TempDB, *LogFile;
     11  FILE *f;
    1112
    1213  get_version (argc, argv, version);
     
    1516  if (CLIENT) imregclient (argv[1], argv[2], argv[3]);
    1617
     18  /* create db.log and db.bfr */
    1719  ALLOCATE (TempDB, char, strlen (ImageDB) + 10);
    1820  sprintf (TempDB, "%s.bfr", ImageDB);
     21  ALLOCATE (LogFile, char, strlen (ImageDB) + 10);
     22  sprintf (LogFile, "%s.log", ImageDB);
    1923
    2024  SetSignals ();
     
    3337
    3438  /* redirect stderr, stdout to logfile */
    35   ALLOCATE (LogFile, char, strlen (ImageDB) + 10);
    36   sprintf (LogFile, "%s.log", ImageDB);
    37   tmpfd = freopen (LogFile, "w", stderr);
    38   if (tmpfd == (FILE *) NULL)
    39     fprintf (LogFile, "can't open log file %s, writing to stderr\n", LogFile);
     39  f = freopen (LogFile, "w", stderr);
     40  if (f == (FILE *) NULL)
     41    fprintf (stderr, "can't open log file %s, writing to stderr\n", LogFile);
    4042  else
    41     stderr = tmpfd;
    42   tmpfd = freopen (LogFile, "w", stdout);
    43   if (tmpfd == (FILE *) NULL)
    44     fprintf (LogFile, "can't open log file %s, writing to stderr\n", LogFile);
     43    stderr = f;
     44  f = freopen (LogFile, "w", stdout);
     45  if (f == (FILE *) NULL)
     46    fprintf (stderr, "can't open log file %s, writing to stderr\n", LogFile);
    4547  else
    46     stdout = tmpfd;
     48    stdout = f;
    4749
    48     /* start loop */
     50  /* start loop */
    4951  while (1) {
    5052
    51     fflush (stderr);
    52     fflush (stdout);
    5353    set_db (TempDB);
    5454    status = load_db ();
    5555    if (!status) {
    5656      fprintf (stderr, "temporary database is empty\n");
    57       close_db (); sleep (60); continue;
     57      close_db ();
     58      fflush (stderr);
     59      fflush (stdout);
     60      sleep (60);
     61      continue;
    5862    }
    5963    image = get_images (&Nentry);
     
    7983    unlink (TempDB);
    8084    clearlockfile2 (TempDB, -1, LCK_HARD, &status);
     85    fflush (stderr);
     86    fflush (stdout);
    8187    sleep (60);
    8288  }
    8389}
    84 
    85 
Note: See TracChangeset for help on using the changeset viewer.