Changeset 42389 for trunk/Ohana/src/opihi/cmd.data/reindex.c
- Timestamp:
- Feb 8, 2023, 12:17:35 PM (3 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/opihi/cmd.data/reindex.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
trunk/Ohana/src/opihi/cmd.data/reindex.c
r42082 r42389 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.
