Changeset 40501 for trunk/Ohana/src/imregister/detrend/altpath.c
- Timestamp:
- Jul 6, 2018, 1:42:20 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/imregister/detrend/altpath.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/imregister/detrend/altpath.c
r34088 r40501 7 7 off_t i, j, n, Nlist; 8 8 off_t *list; 9 char *dBPath, infile[ 256], outfile[256], line[1024];9 char *dBPath, infile[512], outfile[512], line[1100]; 10 10 struct stat statbuf; 11 11 … … 28 28 i = list[j]; 29 29 for (n = 0; n < NDetrendAltDB; n++) { 30 s printf (infile, "%s/%s", dBPath, image[i].filename);31 s printf (outfile, "%s/%s", DetrendAltDB[n], image[i].filename);30 snprintf (infile, 512, "%s/%s", dBPath, image[i].filename); 31 snprintf (outfile, 512, "%s/%s", DetrendAltDB[n], image[i].filename); 32 32 status = ckpathname (outfile); 33 33 if (!status) { … … 35 35 continue; 36 36 } 37 s printf (line, "cp %s %s", infile, outfile);37 snprintf (line, 1100, "cp %s %s", infile, outfile); 38 38 fprintf (stderr, "%s\n", line); 39 39 status = system (line); … … 73 73 image[i].altpath = FALSE; 74 74 for (n = 0; n < NDetrendAltDB; n++) { 75 s printf (outfile, "%s/%s", DetrendAltDB[n], image[i].filename);76 s printf (line, "rm %s", outfile);75 snprintf (outfile, 512, "%s/%s", DetrendAltDB[n], image[i].filename); 76 snprintf (line, 1100, "rm %s", outfile); 77 77 fprintf (stderr, "%s\n", line); 78 78 status = system (line); … … 104 104 found = TRUE; 105 105 for (n = 0; found && (n < NDetrendAltDB); n++) { 106 s printf (outfile, "%s/%s", DetrendAltDB[n], image[i].filename);106 snprintf (outfile, 512, "%s/%s", DetrendAltDB[n], image[i].filename); 107 107 status = stat (outfile, &statbuf); 108 108 fprintf (stderr, "checking for %s, status is %d\n", outfile, status);
Note:
See TracChangeset
for help on using the changeset viewer.
