{
if (!strcmp(name, "TermType"))
return dupstr(getenv("TERM"));
- if (!strcmp(name, "UserName"))
- return get_username();
+ if (!strcmp(name, "UserName"))
+ return get_username();
if (!strcmp(name, "SerialLine"))
return dupstr("/dev/ttyS0");
return NULL;
void sigwinch(int signum)
{
- write(signalpipe[1], "x", 1);
+ if (write(signalpipe[1], "x", 1) <= 0)
+ /* not much we can do about it */;
}
/*
if (FD_ISSET(signalpipe[0], &rset)) {
char c[1];
struct winsize size;
- read(signalpipe[0], c, 1); /* ignore its value; it'll be `x' */
+ if (read(signalpipe[0], c, 1) <= 0)
+ /* ignore error */;
+ /* ignore its value; it'll be `x' */
if (ioctl(0, TIOCGWINSZ, (void *)&size) >= 0)
back->size(backhandle, size.ws_col, size.ws_row);
}