- if(!(item = calloc(1, sizeof *item)))
- eprintf("cannot malloc %u bytes\n", sizeof *item);
- if(!(item->text = strdup(buf)))
- eprintf("cannot strdup %u bytes\n", strlen(buf)+1);
- inputw = MAX(inputw, textw(dc, item->text));
+ if(!(items[i].text = strdup(buf)))
+ eprintf("cannot strdup %u bytes:", strlen(buf)+1);
+ inputw = MAX(inputw, textw(dc, items[i].text));