diff options
author | peter <peter@FreeBSD.org> | 1996-08-20 00:31:37 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-08-20 00:31:37 +0000 |
commit | 3ca8ec42efd038328d2337045f76ce7b8d8af77d (patch) | |
tree | 9e40f7f0efb4dc209221832f30b9a479a08e780a /usr.bin/talk | |
parent | 54e95f2de6e4e92f27f72460c7a5335bf84f8840 (diff) | |
download | FreeBSD-src-3ca8ec42efd038328d2337045f76ce7b8d8af77d.zip FreeBSD-src-3ca8ec42efd038328d2337045f76ce7b8d8af77d.tar.gz |
If running under a typical sysv-style curses, including ncurses, use
hline() to draw the window split rather than fudging it with dashes.
This causes the line to be drawn in line-draw characters if the terminal
description has them.
Suggested by: ache
Diffstat (limited to 'usr.bin/talk')
-rw-r--r-- | usr.bin/talk/init_disp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/talk/init_disp.c b/usr.bin/talk/init_disp.c index 14f0e02..48c2614 100644 --- a/usr.bin/talk/init_disp.c +++ b/usr.bin/talk/init_disp.c @@ -75,7 +75,6 @@ void init_display() { struct sigaction sa; - int i; if (initscr() == NULL) errx(1, "Terminal type unset or lacking necessary features."); @@ -104,8 +103,11 @@ init_display() wclear(his_win.x_win); line_win = newwin(1, COLS, my_win.x_nlines, 0); - for (i = 0; i < COLS; i++) - mvwaddch(line_win, 0, i, '-'); +#if defined(hline) || defined(whline) || defined(NCURSES_VERSION) + whline(line_win, 0, COLS); +#else + box(line_win, '-', '-'); +#endif wrefresh(line_win); /* let them know we are working on it */ current_state = "No connection yet"; |