Changeset 41630
- Timestamp:
- Jun 2, 2021, 10:04:18 AM (5 years ago)
- Location:
- tags/ipp-ps1-20210510/Ohana/src/getstar
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/ReadImageFiles.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-ps1-20210510/Ohana/src/getstar
- Property svn:mergeinfo set to
-
tags/ipp-ps1-20210510/Ohana/src/getstar/src/ReadImageFiles.c
r37807 r41630 1 1 # include "dvoImageOverlaps.h" 2 3 // given FOO:BAR:file.ext return file.ext 4 char *nebbasename (char *name) { 5 6 char *c, *file; 7 8 ALLOCATE (file, char, strlen(name) + 16); 9 10 c = strrchr (name, ':'); 11 if (c == (char *) NULL) { 12 strcpy (file, name); 13 } else { 14 strcpy (file, c+1); 15 } 16 return (file); 17 } 2 18 3 19 Image *ReadImageFiles (char *filename, off_t *Nimages) { … … 63 79 continue; 64 80 } 81 82 // the image name just needs to be a useful identifier 83 // remove the full path and in the case of nebulous files, remove the rest of 84 // the nebulous path: 85 // 14508045500.gpc1:ipp.tdbtest.tag.ps1.20210527.gentoo:o8966g0113o.1602706:o8966g0113o.1602706.cm.2417132.smf 86 // -> o8966g0113o.1602706.cm.2417132.smf 65 87 66 88 /* find image rootname */ 67 name = filebasename (file[i]); 89 char *rawname = filebasename (file[i]); 90 name = nebbasename (rawname); // 91 free (rawname); 92 68 93 snprintf (image[N].name, DVO_IMAGE_NAME_LEN, "%s", name); 69 94 free (name); … … 188 213 189 214 /* find image rootname */ 190 name = filebasename (file[0]); 191 215 char *rawname = filebasename (file[0]); 216 name = nebbasename (rawname); 217 free (rawname); 218 192 219 // now run through the images, interpret the headers and read the stars 193 220 for (i = N = 0; i < Nimage; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.
