Date: Fri, 8 Jun 2001 14:10:03 -0700 (PDT) From: Sebastiaan van Erk <sebster@sebster.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/27972: losing information with talk Message-ID: <200106082110.f58LA3k47074@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/27972; it has been noted by GNATS.
From: Sebastiaan van Erk <sebster@sebster.com>
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106082110.f58LA3k47074>
