Changeset 33872 for branches/eam_branches/ipp-20120405/Ohana
- Timestamp:
- May 16, 2012, 4:17:56 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120405/Ohana/src/photdbc
- Files:
-
- 5 edited
-
include/dvodist.h (modified) (1 diff)
-
include/photdbc.h (modified) (2 diffs)
-
src/ConfigInit.c (modified) (1 diff)
-
src/md5_ops.c (modified) (4 diffs)
-
src/photdbc_catalogs.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120405/Ohana/src/photdbc/include/dvodist.h
r33655 r33872 27 27 char *dstHostname; 28 28 29 # define MAX_PATH_LENGTH 102429 # define DVO_MAX_PATH 1024 30 30 31 31 void usage(); -
branches/eam_branches/ipp-20120405/Ohana/src/photdbc/include/photdbc.h
r33655 r33872 30 30 // need to get RADIUS from Config 31 31 32 # define MAX_PATH_LENGTH 102432 # define DVO_MAX_PATH 1024 33 33 34 34 /* global variables */ … … 38 38 double UNIQ_RADIUS; 39 39 double DMCAL_MIN;; 40 char ImageCat[ MAX_PATH_LENGTH];41 char GSCFILE[ MAX_PATH_LENGTH];42 char CATDIR[ MAX_PATH_LENGTH];40 char ImageCat[DVO_MAX_PATH]; 41 char GSCFILE[DVO_MAX_PATH]; 42 char CATDIR[DVO_MAX_PATH]; 43 43 char *CATMODE; /* raw, mef, split, mysql */ 44 44 char *CATFORMAT; /* internal, elixir, loneos, panstarrs */ 45 char PhotCodeFile[ MAX_PATH_LENGTH];45 char PhotCodeFile[DVO_MAX_PATH]; 46 46 47 47 double RMIN; -
branches/eam_branches/ipp-20120405/Ohana/src/photdbc/src/ConfigInit.c
r33655 r33872 56 56 57 57 WarnConfig (config, "CATDIR", "%s", 0, CATDIR); 58 char *tmpcatdir = abspath (CATDIR, MAX_PATH_LENGTH);58 char *tmpcatdir = abspath (CATDIR, DVO_MAX_PATH); 59 59 strcpy (CATDIR, tmpcatdir); 60 60 free (tmpcatdir); -
branches/eam_branches/ipp-20120405/Ohana/src/photdbc/src/md5_ops.c
r33655 r33872 60 60 IOBuffer buffer; 61 61 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); 65 65 66 66 write (host->stdio[0], line, Nline); … … 72 72 fprintf (stderr, "buffer: %s\n", buffer.buffer); 73 73 74 char result[ MAX_PATH_LENGTH], fileout[MAX_PATH_LENGTH];74 char result[DVO_MAX_PATH], fileout[DVO_MAX_PATH]; 75 75 int Nscan = sscanf (buffer.buffer, "%s %s", result, fileout); 76 76 assert (Nscan == 2); … … 86 86 IOBuffer buffer, stdout_buf, stderr_buf; 87 87 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); 91 91 92 92 // fprintf (stderr, "command: %s\n", line); … … 119 119 // fprintf (stderr, "result from md5sum: %s\n", stdout_buf.buffer); 120 120 121 char result[ MAX_PATH_LENGTH], fileout[MAX_PATH_LENGTH];121 char result[DVO_MAX_PATH], fileout[DVO_MAX_PATH]; 122 122 int Nscan = sscanf (stdout_buf.buffer, "%s %s", result, fileout); 123 123 if (Nscan != 2) { -
branches/eam_branches/ipp-20120405/Ohana/src/photdbc/src/photdbc_catalogs.c
r33655 r33872 20 20 21 21 // 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); 24 24 incatalog.filename = hostID ? hostfile : skylist[0].filename[i]; 25 25 incatalog.Nsecfilt = GetPhotcodeNsecfilt (); … … 39 39 40 40 // 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); 43 43 outcatalog.filename = outfile; 44 44 if (outcatalog.filename == NULL) Shutdown ("error with input catalog name"); … … 99 99 100 100 // 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); 102 102 free (table->hosts[i].pathname); 103 103 table->hosts[i].pathname = tmppath; 104 104 105 105 // ensure that the paths are absolute path names 106 char *tmproot = abspath (outroot, MAX_PATH_LENGTH);106 char *tmproot = abspath (outroot, DVO_MAX_PATH); 107 107 108 108 // 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", 111 111 tmproot, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, 112 112 REGION.Rmin, REGION.Rmax, REGION.Dmin, REGION.Dmax, … … 114 114 ); 115 115 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); } 125 125 126 126 fprintf (stderr, "command: %s\n", command);
Note:
See TracChangeset
for help on using the changeset viewer.
