helpful errors

This commit is contained in:
Connor Lane Smith
2011-05-06 21:13:02 +01:00
parent 210b303941
commit cd3b4915c3
2 changed files with 8 additions and 3 deletions

View File

@ -440,9 +440,9 @@ readstdin(void) {
if((p = strchr(buf, '\n')))
*p = '\0';
if(!(item = calloc(1, sizeof *item)))
eprintf("cannot malloc %u bytes\n", sizeof *item);
eprintf("cannot malloc %u bytes:", sizeof *item);
if(!(item->text = strdup(buf)))
eprintf("cannot strdup %u bytes\n", strlen(buf)+1);
eprintf("cannot strdup %u bytes:", strlen(buf)+1);
inputw = MAX(inputw, textw(dc, item->text));
}
}