Loading src/client/main.c +6 −4 Original line number Diff line number Diff line Loading @@ -966,8 +966,10 @@ int idle(int fd, int millis) int incoming_pipe = ipc_getfd(); FD_ZERO(&readfds); FD_ZERO(&exceptfds); if (incoming_pipe >= 0) { FD_SET(incoming_pipe, &readfds); FD_SET(incoming_pipe, &exceptfds); } if (fd >= 0) { FD_SET(fd, &readfds); Loading @@ -986,7 +988,7 @@ int idle(int fd, int millis) select_error = errno; if (fd >= 0) fcntl(fd, F_SETFL, fl); if (nfds > 0) { if (FD_ISSET(incoming_pipe, &exceptfds)) { if (incoming_pipe >= 0 && FD_ISSET(incoming_pipe, &exceptfds)) { fprintf(stderr, _("\nError reading incoming message pipe. panic.\n")); return -1; } Loading @@ -994,7 +996,7 @@ int idle(int fd, int millis) fprintf(stderr, _("\nError on input terminal, argh.\n")); return -1; } if (FD_ISSET(incoming_pipe, &readfds)) if (incoming_pipe >= 0 && FD_ISSET(incoming_pipe, &readfds)) handle_mesg(); } in_idle--; Loading src/client/read.c +4 −12 Original line number Diff line number Diff line Loading @@ -166,7 +166,6 @@ void ls(int folnum, struct user *user, int many) int afile; struct folder fold; struct Header head; char buff[SUBJECTSIZE+1]; int linecount=0; int listpoint; int screen_height = screen_h(); Loading Loading @@ -198,17 +197,10 @@ void ls(int folnum, struct user *user, int many) (is_private(&fold, user) && (stringcmp(head.from, user->record.name, -1) || stringcmp(head.to, user->record.name, -1))))) /*marked for deletion*/ { strncpy(buff,head.to,NAMESIZE); buff[NAMESIZE]=0; printf("%4d %*s -> %*s ", head.Ref,NAMESIZE,head.from,NAMESIZE,buff); if (strlen(head.subject)>40) { strncpy(buff,head.subject,37); strcat(buff,"..."); }else strcpy(buff,head.subject); printf("%s\n",buff); printf("%4d %*s -> %*s ", head.Ref, NAMESIZE, head.from, NAMESIZE, head.to); printf("%.*s\n", SUBJECTSIZE, head.subject); linecount++; if (linecount>=(screen_height-1)) { Loading Loading
src/client/main.c +6 −4 Original line number Diff line number Diff line Loading @@ -966,8 +966,10 @@ int idle(int fd, int millis) int incoming_pipe = ipc_getfd(); FD_ZERO(&readfds); FD_ZERO(&exceptfds); if (incoming_pipe >= 0) { FD_SET(incoming_pipe, &readfds); FD_SET(incoming_pipe, &exceptfds); } if (fd >= 0) { FD_SET(fd, &readfds); Loading @@ -986,7 +988,7 @@ int idle(int fd, int millis) select_error = errno; if (fd >= 0) fcntl(fd, F_SETFL, fl); if (nfds > 0) { if (FD_ISSET(incoming_pipe, &exceptfds)) { if (incoming_pipe >= 0 && FD_ISSET(incoming_pipe, &exceptfds)) { fprintf(stderr, _("\nError reading incoming message pipe. panic.\n")); return -1; } Loading @@ -994,7 +996,7 @@ int idle(int fd, int millis) fprintf(stderr, _("\nError on input terminal, argh.\n")); return -1; } if (FD_ISSET(incoming_pipe, &readfds)) if (incoming_pipe >= 0 && FD_ISSET(incoming_pipe, &readfds)) handle_mesg(); } in_idle--; Loading
src/client/read.c +4 −12 Original line number Diff line number Diff line Loading @@ -166,7 +166,6 @@ void ls(int folnum, struct user *user, int many) int afile; struct folder fold; struct Header head; char buff[SUBJECTSIZE+1]; int linecount=0; int listpoint; int screen_height = screen_h(); Loading Loading @@ -198,17 +197,10 @@ void ls(int folnum, struct user *user, int many) (is_private(&fold, user) && (stringcmp(head.from, user->record.name, -1) || stringcmp(head.to, user->record.name, -1))))) /*marked for deletion*/ { strncpy(buff,head.to,NAMESIZE); buff[NAMESIZE]=0; printf("%4d %*s -> %*s ", head.Ref,NAMESIZE,head.from,NAMESIZE,buff); if (strlen(head.subject)>40) { strncpy(buff,head.subject,37); strcat(buff,"..."); }else strcpy(buff,head.subject); printf("%s\n",buff); printf("%4d %*s -> %*s ", head.Ref, NAMESIZE, head.from, NAMESIZE, head.to); printf("%.*s\n", SUBJECTSIZE, head.subject); linecount++; if (linecount>=(screen_height-1)) { Loading