summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-03-28 19:48:45 +0000
committerache <ache@FreeBSD.org>1995-03-28 19:48:45 +0000
commitb7b8244a6fb374e16ff5dde5faa30bd7d83c6347 (patch)
tree7efba3dfc1abba915c8669fadae336b5e26bae6b /usr.bin
parent7cff2496a2d56428fe2b00a796710d3589112946 (diff)
downloadFreeBSD-src-b7b8244a6fb374e16ff5dde5faa30bd7d83c6347.zip
FreeBSD-src-b7b8244a6fb374e16ff5dde5faa30bd7d83c6347.tar.gz
Don't allow talk own messages wrap around on the screen, just
scroll them like normal user input/output does.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/talk/invite.c4
-rw-r--r--usr.bin/talk/io.c11
2 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/talk/invite.c b/usr.bin/talk/invite.c
index ae73539..16fc4e6 100644
--- a/usr.bin/talk/invite.c
+++ b/usr.bin/talk/invite.c
@@ -122,7 +122,9 @@ re_invite()
{
message("Ringing your party again");
- current_line++;
+ 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);
announce_invite();
diff --git a/usr.bin/talk/io.c b/usr.bin/talk/io.c
index 5ba6f97..e9f0480 100644
--- a/usr.bin/talk/io.c
+++ b/usr.bin/talk/io.c
@@ -118,7 +118,7 @@ extern int sys_nerr;
p_error(string)
char *string;
{
- wmove(my_win.x_win, current_line%my_win.x_nlines, 0);
+ 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);
@@ -133,10 +133,9 @@ p_error(string)
message(string)
char *string;
{
- wmove(my_win.x_win, current_line % my_win.x_nlines, 0);
- wprintw(my_win.x_win, "[%s]", string);
- wclrtoeol(my_win.x_win);
- current_line++;
- wmove(my_win.x_win, current_line % my_win.x_nlines, 0);
+ 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);
}
OpenPOWER on IntegriCloud