IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33872


Ignore:
Timestamp:
May 16, 2012, 4:17:56 PM (14 years ago)
Author:
eugene
Message:

move max path length to dvo.h and rename DVO_MAX_PATH

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

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120405/Ohana/src/photdbc/include/dvodist.h

    r33655 r33872  
    2727char     *dstHostname;
    2828
    29 # define MAX_PATH_LENGTH 1024
     29# define DVO_MAX_PATH 1024
    3030
    3131void          usage();
  • branches/eam_branches/ipp-20120405/Ohana/src/photdbc/include/photdbc.h

    r33655 r33872  
    3030// need to get RADIUS from Config
    3131
    32 # define MAX_PATH_LENGTH 1024
     32# define DVO_MAX_PATH 1024
    3333
    3434/* global variables */
     
    3838double UNIQ_RADIUS;
    3939double DMCAL_MIN;;
    40 char   ImageCat[MAX_PATH_LENGTH];
    41 char   GSCFILE[MAX_PATH_LENGTH];
    42 char   CATDIR[MAX_PATH_LENGTH];
     40char   ImageCat[DVO_MAX_PATH];
     41char   GSCFILE[DVO_MAX_PATH];
     42char   CATDIR[DVO_MAX_PATH];
    4343char  *CATMODE;    /* raw, mef, split, mysql */
    4444char  *CATFORMAT;  /* internal, elixir, loneos, panstarrs */
    45 char   PhotCodeFile[MAX_PATH_LENGTH];
     45char   PhotCodeFile[DVO_MAX_PATH];
    4646
    4747double RMIN;
  • branches/eam_branches/ipp-20120405/Ohana/src/photdbc/src/ConfigInit.c

    r33655 r33872  
    5656
    5757  WarnConfig (config, "CATDIR",                 "%s",  0, CATDIR);
    58   char *tmpcatdir = abspath (CATDIR, MAX_PATH_LENGTH);
     58  char *tmpcatdir = abspath (CATDIR, DVO_MAX_PATH);
    5959  strcpy (CATDIR, tmpcatdir);
    6060  free (tmpcatdir);
  • branches/eam_branches/ipp-20120405/Ohana/src/photdbc/src/md5_ops.c

    r33655 r33872  
    6060  IOBuffer buffer;
    6161
    62   char line[MAX_PATH_LENGTH];
    63   int Nline = snprintf (line, MAX_PATH_LENGTH, "md5sum %s\n", filename);
    64   assert (Nline < MAX_PATH_LENGTH);
     62  char line[DVO_MAX_PATH];
     63  int Nline = snprintf (line, DVO_MAX_PATH, "md5sum %s\n", filename);
     64  assert (Nline < DVO_MAX_PATH);
    6565
    6666  write (host->stdio[0], line, Nline);
     
    7272  fprintf (stderr, "buffer: %s\n", buffer.buffer);
    7373
    74   char result[MAX_PATH_LENGTH], fileout[MAX_PATH_LENGTH];
     74  char result[DVO_MAX_PATH], fileout[DVO_MAX_PATH];
    7575  int Nscan = sscanf (buffer.buffer, "%s %s", result, fileout);
    7676  assert (Nscan == 2);
     
    8686  IOBuffer buffer, stdout_buf, stderr_buf;
    8787
    88   char line[MAX_PATH_LENGTH];
    89   int Nline = snprintf (line, MAX_PATH_LENGTH, "job md5sum %s\n", filename);
    90   assert (Nline < MAX_PATH_LENGTH);
     88  char line[DVO_MAX_PATH];
     89  int Nline = snprintf (line, DVO_MAX_PATH, "job md5sum %s\n", filename);
     90  assert (Nline < DVO_MAX_PATH);
    9191
    9292  // fprintf (stderr, "command: %s\n", line);
     
    119119  // fprintf (stderr, "result from md5sum: %s\n", stdout_buf.buffer);
    120120
    121   char result[MAX_PATH_LENGTH], fileout[MAX_PATH_LENGTH];
     121  char result[DVO_MAX_PATH], fileout[DVO_MAX_PATH];
    122122  int Nscan = sscanf (stdout_buf.buffer, "%s %s", result, fileout);
    123123  if (Nscan != 2) {
  • branches/eam_branches/ipp-20120405/Ohana/src/photdbc/src/photdbc_catalogs.c

    r33655 r33872  
    2020
    2121    // set the parameters which guide catalog open/load/create
    22     char hostfile[MAX_PATH_LENGTH];
    23     snprintf (hostfile, MAX_PATH_LENGTH, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
     22    char hostfile[DVO_MAX_PATH];
     23    snprintf (hostfile, DVO_MAX_PATH, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
    2424    incatalog.filename  = hostID ? hostfile : skylist[0].filename[i];
    2525    incatalog.Nsecfilt = GetPhotcodeNsecfilt ();
     
    3939
    4040    // create output catalog filename
    41     char outfile[MAX_PATH_LENGTH];
    42     snprintf (outfile, MAX_PATH_LENGTH, "%s/%s.cpt", outroot, skylist[0].regions[i]->name);
     41    char outfile[DVO_MAX_PATH];
     42    snprintf (outfile, DVO_MAX_PATH, "%s/%s.cpt", outroot, skylist[0].regions[i]->name);
    4343    outcatalog.filename = outfile;
    4444    if (outcatalog.filename == NULL) Shutdown ("error with input catalog name");
     
    9999
    100100    // ensure that the paths are absolute path names
    101     char *tmppath = abspath (table->hosts[i].pathname, MAX_PATH_LENGTH);
     101    char *tmppath = abspath (table->hosts[i].pathname, DVO_MAX_PATH);
    102102    free (table->hosts[i].pathname);
    103103    table->hosts[i].pathname = tmppath;
    104104
    105105    // ensure that the paths are absolute path names
    106     char *tmproot = abspath (outroot, MAX_PATH_LENGTH);
     106    char *tmproot = abspath (outroot, DVO_MAX_PATH);
    107107
    108108    // options / arguments that can affect relastro_client -update-objects:
    109     char command[MAX_PATH_LENGTH];
    110     snprintf (command, MAX_PATH_LENGTH, "photdbc_client %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -D NMEAS_MIN %d -D NMEAS_MIN_FILTERED %d -D AVE_SIGMA_LIM %f -D SIGMA_MAX %f",
     109    char command[DVO_MAX_PATH];
     110    snprintf (command, DVO_MAX_PATH, "photdbc_client %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -D NMEAS_MIN %d -D NMEAS_MIN_FILTERED %d -D AVE_SIGMA_LIM %f -D SIGMA_MAX %f",
    111111              tmproot, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname,
    112112              REGION.Rmin, REGION.Rmax, REGION.Dmin, REGION.Dmax,
     
    114114      );
    115115
    116     char tmpline[MAX_PATH_LENGTH];
    117     if (VERBOSE)            { snprintf (tmpline, MAX_PATH_LENGTH, "%s -v",                command);                             strcpy (command, tmpline); }
    118     if (ExcludeByInstMag)   { snprintf (tmpline, MAX_PATH_LENGTH, "%s -instmag %f %f",    command, INST_MAG_MIN, INST_MAG_MAX); strcpy (command, tmpline); }
    119     if (ExcludeByMinSigma)  { snprintf (tmpline, MAX_PATH_LENGTH, "%s -min-sigma %f",     command, SIGMA_MIN_KEEP);             strcpy (command, tmpline); }
    120     if (ExcludeByMaxMinMag) { snprintf (tmpline, MAX_PATH_LENGTH, "%s -maxminmag %f",     command, MAX_MIN_MAG);                strcpy (command, tmpline); }
    121     if (PHOTCODE_DROP_LIST) { snprintf (tmpline, MAX_PATH_LENGTH, "%s -photcode-drop %s", command, PHOTCODE_DROP_LIST);         strcpy (command, tmpline); }
    122     if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, MAX_PATH_LENGTH, "%s -photcode-skip %s", command, PHOTCODE_SKIP_LIST);         strcpy (command, tmpline); }
    123     if (CATFORMAT)          { snprintf (tmpline, MAX_PATH_LENGTH, "%s -set-format %s",    command, CATFORMAT);                  strcpy (command, tmpline); }
    124     if (CATMODE)            { snprintf (tmpline, MAX_PATH_LENGTH, "%s -set-mode %s",      command, CATMODE);                    strcpy (command, tmpline); }
     116    char tmpline[DVO_MAX_PATH];
     117    if (VERBOSE)            { snprintf (tmpline, DVO_MAX_PATH, "%s -v",                command);                             strcpy (command, tmpline); }
     118    if (ExcludeByInstMag)   { snprintf (tmpline, DVO_MAX_PATH, "%s -instmag %f %f",    command, INST_MAG_MIN, INST_MAG_MAX); strcpy (command, tmpline); }
     119    if (ExcludeByMinSigma)  { snprintf (tmpline, DVO_MAX_PATH, "%s -min-sigma %f",     command, SIGMA_MIN_KEEP);                strcpy (command, tmpline); }
     120    if (ExcludeByMaxMinMag) { snprintf (tmpline, DVO_MAX_PATH, "%s -maxminmag %f",     command, MAX_MIN_MAG);                   strcpy (command, tmpline); }
     121    if (PHOTCODE_DROP_LIST) { snprintf (tmpline, DVO_MAX_PATH, "%s -photcode-drop %s", command, PHOTCODE_DROP_LIST);    strcpy (command, tmpline); }
     122    if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, DVO_MAX_PATH, "%s -photcode-skip %s", command, PHOTCODE_SKIP_LIST);    strcpy (command, tmpline); }
     123    if (CATFORMAT)          { snprintf (tmpline, DVO_MAX_PATH, "%s -set-format %s",    command, CATFORMAT);                     strcpy (command, tmpline); }
     124    if (CATMODE)            { snprintf (tmpline, DVO_MAX_PATH, "%s -set-mode %s",      command, CATMODE);                       strcpy (command, tmpline); }
    125125
    126126    fprintf (stderr, "command: %s\n", command);
Note: See TracChangeset for help on using the changeset viewer.