- Timestamp:
- Nov 14, 2022, 8:33:33 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/reindex.c
r42082 r42305 72 72 } 73 73 } 74 if (ivec->type == OPIHI_STR) { 75 opihi_int *vx = xvec[0].elements.Int; 76 for (Npts = i = 0; i < xvec[0].Nelements; i++, vx++) { 77 if (Npts >= NPTS) { 78 NPTS += 2000; 79 REALLOCATE (ovec[0].elements.Str, char *, NPTS); 80 } 81 if (*vx < 0) { 82 if (KEEP_UNMATCH) { 83 ovec[0].elements.Str[Npts] = strcreate(""); // XXX use a different or a specified value? 84 Npts++; 85 } 86 continue; 87 } 88 if (*vx > Nmax) ESCAPE("unexpected value in index: "OPIHI_INT_FMT" (%d)\n", *vx, i); 89 ovec[0].elements.Str[Npts] = strcreate(ivec->elements.Str[*vx]); 90 Npts++; 91 } 92 } 74 93 75 94 // free up unused memory
Note:
See TracChangeset
for help on using the changeset viewer.
