- for (i=0; i < ep->nuses; i++)
- if (useoffsets[i] == -1)
- ep->uses[i].parent = (void *)NULL;
+#if NCURSES_XNAMES
+ if ((n = NUM_EXT_NAMES(tp)) != 0) {
+ unsigned length = 0;
+ for (i = 0; i < n; i++) {
+ length += strlen(tp->ext_Names[i]) + 1;
+ offsets[i] = tp->ext_Names[i] - stringbuf;
+ }
+ if ((tp->ext_str_table = typeMalloc(char, length)) == 0)
+ _nc_err_abort("Out of memory");
+ for (i = 0, length = 0; i < n; i++) {
+ tp->ext_Names[i] = tp->ext_str_table + length;
+ strcpy(tp->ext_Names[i], stringbuf + offsets[i]);
+ length += strlen(tp->ext_Names[i]) + 1;
+ }
+ }
+#endif
+
+ for (i=0; i < ep->nuses; i++) {
+ if (useoffsets[i] == ABSENT_OFFSET)
+ ep->uses[i].parent = (void *)0;