commit - 210b303941e517a9d7df1cba1e3229165fb4037b
commit + cd3b4915c3358b93f8dbff531bff82c0cd833c0b
blob - d8ef88f132866a4c3c7f67a7670218abe15aa9ce
blob + 5be73f73bbc3b95c205c5453eeaf6131d9253be6
--- dmenu.c
+++ dmenu.c
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));
}
}
blob - 80a50743cad683237b2ffa8b27891395ea9cce41
blob + 83ced4b78fed48c50c7e0e94b2fb579c6ac03fe8
--- draw.c
+++ draw.c
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
+
+ if(fmt[strlen(fmt)-1] == ':') {
+ fputc(' ', stderr);
+ perror(NULL);
+ }
exit(EXIT_FAILURE);
}
if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())
weprintf("no locale support\n");
if(!(dc = calloc(1, sizeof *dc)))
- eprintf("cannot malloc %u bytes\n", sizeof *dc);
+ eprintf("cannot malloc %u bytes:", sizeof *dc);
if(!(dc->dpy = XOpenDisplay(NULL)))
eprintf("cannot open display\n");