1298 if(errno == EINTR) |
1298 if(errno == EINTR) |
1299 continue; |
1299 continue; |
1300 eprint("select failed\n"); |
1300 eprint("select failed\n"); |
1301 } |
1301 } |
1302 if(FD_ISSET(STDIN_FILENO, &rd)) { |
1302 if(FD_ISSET(STDIN_FILENO, &rd)) { |
1303 if(stext == fgets(stext, sizeof stext - 1, stdin)) |
1303 if((readin = (stext == fgets(stext, sizeof stext - 1, stdin)))) |
1304 stext[strlen(stext) - 1] = '\0'; /* remove tailing '\n' */ |
1304 stext[strlen(stext) - 1] = '\0'; /* remove tailing '\n' */ |
1305 else { |
1305 else if(feof(stdin)) |
1306 readin = False; |
1306 strncpy(stext, "EOF", 4); |
1307 if(feof(stdin)) |
1307 else /* error occured */ |
1308 strncpy(stext, "EOF", 4); |
1308 strncpy(stext, strerror(errno), sizeof stext - 1); |
1309 else /* error occured */ |
|
1310 strncpy(stext, strerror(errno), sizeof stext - 1); |
|
1311 } |
|
1312 drawbar(); |
1309 drawbar(); |
1313 } |
1310 } |
1314 while(XPending(dpy)) { |
1311 while(XPending(dpy)) { |
1315 XNextEvent(dpy, &ev); |
1312 XNextEvent(dpy, &ev); |
1316 if(handler[ev.type]) |
1313 if(handler[ev.type]) |