From owner-freebsd-bugs Fri Jun 8 14:10:14 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1C7D637B403 for ; Fri, 8 Jun 2001 14:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f58LA3k47074; Fri, 8 Jun 2001 14:10:03 -0700 (PDT) (envelope-from gnats) Date: Fri, 8 Jun 2001 14:10:03 -0700 (PDT) Message-Id: <200106082110.f58LA3k47074@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Sebastiaan van Erk Subject: Re: bin/27972: losing information with talk Reply-To: Sebastiaan van Erk Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/27972; it has been noted by GNATS. From: Sebastiaan van Erk To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/27972: losing information with talk Date: Fri, 8 Jun 2001 23:02:33 +0200 Hi, Sorry for my stupidity, but my previous patch was wrong. Here is the final (and tested) patch. Greetings, Sebastiaan van Erk --------------------------------->8------------------------------------------ diff -c -r talk/init_disp.c /usr/src/usr.bin/talk/init_disp.c *** talk/init_disp.c Mon Aug 30 10:21:17 1999 --- /usr/src/usr.bin/talk/init_disp.c Fri Jun 8 22:55:24 2001 *************** *** 90,111 **** signal(SIGINT, sig_sent); signal(SIGPIPE, sig_sent); /* curses takes care of ^Z */ ! my_win.x_nlines = LINES / 2; my_win.x_ncols = COLS; ! my_win.x_win = newwin(my_win.x_nlines, my_win.x_ncols, 0, 0); idlok(my_win.x_win, TRUE); scrollok(my_win.x_win, TRUE); wclear(my_win.x_win); ! his_win.x_nlines = LINES / 2 - 1; ! his_win.x_ncols = COLS; ! his_win.x_win = newwin(his_win.x_nlines, his_win.x_ncols, ! my_win.x_nlines+1, 0); ! idlok(my_win.x_win, TRUE); ! scrollok(his_win.x_win, TRUE); ! wclear(his_win.x_win); ! ! line_win = newwin(1, COLS, my_win.x_nlines, 0); #if defined(hline) || defined(whline) || defined(NCURSES_VERSION) whline(line_win, 0, COLS); #else --- 90,111 ---- signal(SIGINT, sig_sent); signal(SIGPIPE, sig_sent); /* curses takes care of ^Z */ ! his_win.x_nlines = LINES / 2; ! his_win.x_ncols = COLS; ! his_win.x_win = newwin(his_win.x_nlines, his_win.x_ncols, 0, 0); ! idlok(his_win.x_win, TRUE); ! scrollok(his_win.x_win, TRUE); ! wclear(his_win.x_win); ! ! my_win.x_nlines = LINES / 2 - 1; my_win.x_ncols = COLS; ! my_win.x_win = newwin(my_win.x_nlines, my_win.x_ncols, ! his_win.x_nlines + 1, 0); idlok(my_win.x_win, TRUE); scrollok(my_win.x_win, TRUE); wclear(my_win.x_win); ! line_win = newwin(1, COLS, his_win.x_nlines, 0); #if defined(hline) || defined(whline) || defined(NCURSES_VERSION) whline(line_win, 0, COLS); #else diff -c -r talk/invite.c /usr/src/usr.bin/talk/invite.c *** talk/invite.c Sat Feb 3 11:27:57 2001 --- /usr/src/usr.bin/talk/invite.c Fri Jun 8 22:12:23 2001 *************** *** 127,134 **** { message("Ringing your party again"); ! waddch(my_win.x_win, '\n'); ! if (current_line < my_win.x_nlines - 1) current_line++; /* force a re-announce */ msg.id_num = htonl(remote_id + 1); --- 127,134 ---- { message("Ringing your party again"); ! waddch(his_win.x_win, '\n'); ! if (current_line < his_win.x_nlines - 1) current_line++; /* force a re-announce */ msg.id_num = htonl(remote_id + 1); diff -c -r talk/io.c /usr/src/usr.bin/talk/io.c *** talk/io.c Fri Aug 18 12:24:17 2000 --- /usr/src/usr.bin/talk/io.c Fri Jun 8 22:14:35 2001 *************** *** 124,133 **** p_error(string) char *string; { ! wmove(my_win.x_win, current_line, 0); ! wprintw(my_win.x_win, "[%s : %s (%d)]\n", string, strerror(errno), errno); ! wrefresh(my_win.x_win); move(LINES-1, 0); refresh(); quit(); --- 124,133 ---- p_error(string) char *string; { ! wmove(his_win.x_win, current_line, 0); ! wprintw(his_win.x_win, "[%s : %s (%d)]\n", string, strerror(errno), errno); ! wrefresh(his_win.x_win); move(LINES-1, 0); refresh(); quit(); *************** *** 140,148 **** message(string) char *string; { ! wmove(my_win.x_win, current_line, 0); ! wprintw(my_win.x_win, "[%s]\n", string); ! if (current_line < my_win.x_nlines - 1) current_line++; ! wrefresh(my_win.x_win); } --- 140,148 ---- message(string) char *string; { ! wmove(his_win.x_win, current_line, 0); ! wprintw(his_win.x_win, "[%s]\n", string); ! if (current_line < his_win.x_nlines - 1) current_line++; ! wrefresh(his_win.x_win); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message